-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): add close publisher caps #546
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
RpcProgramAccountsConfig { | ||
filters: Some(vec![RpcFilterType::Memcmp(Memcmp::new( | ||
0, | ||
MemcmpEncodedBytes::Bytes(PublisherCaps::DISCRIMINATOR.to_vec()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should filter on data
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N/A anymore
staking/cli/src/main.rs
Outdated
@@ -97,5 +99,14 @@ fn main() { | |||
Action::SaveStakeAccountsSnapshot {} => { | |||
save_stake_accounts_snapshot(&rpc_client); | |||
} | |||
Action::ClaimRewards { | |||
min_staked, | |||
min_reward, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like having two parameters here. I feel like we should be disciplined and:
- either claim all rewards for accounts with min_staked
- or claim all rewards s.t. reward > min_reward
staking/cli/src/cli.rs
Outdated
ClaimRewards { | ||
#[clap(long, help = "Minimum staked tokens")] | ||
min_staked: u64, | ||
#[clap(long, help = "Minimum reward tokens per publisher")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment saying this is with full decimals?
staking/cli/src/instructions.rs
Outdated
.filter_map(|positions| { | ||
let acc = positions.to_dynamic_position_array(); | ||
let valid = acc | ||
.get_target_exposure(&Target::IntegrityPool, current_epoch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about using get_target_exposure here. get_target_exposure ignores UNLOCKED positions but these can have unclaimed rewards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.