Skip to content
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

CLI commands for managing fee state #257

Merged
merged 1 commit into from
Nov 21, 2024
Merged

CLI commands for managing fee state #257

merged 1 commit into from
Nov 21, 2024

Conversation

jgur-psyops
Copy link
Contributor

@jgur-psyops jgur-psyops commented Nov 15, 2024

Adds commands for:

  • init_fee_state
  • edit_fee_state
  • config_group_fee
  • propagate_fee (but you should probably use a script instead of updating one group at a time)

Edits collect_fees, now requires the fee_ata to be passed as an argument (the ATA of global_fee_wallet for the bank's mint)

Samples executed with:

cargo run profile create --name staging --cluster mainnet --rpc-url https://api.mainnet-beta.solana.com --group FCPfpHA69EbS8f9KKSreTRkXbzFpunsKuYf5qNmnJjpo --program-id stag8sTKds2h4KzjUw3zKTsxbqvT4XKHdaR9X9E6Rct --multisig 3HGdGLrnK9DsnHi1mCrUMLGfQHcu6xUrXhMY14GYjqvM --keypair-path ~/keys/staging-deploy.json

For validation against multisig simulation on staging. Note that most commands examples below will fail to sim because the multisig is not the fee admin on staging.

Examples:

init:

cargo run group init-fee-state --admin H4QMTHMVbJ3KrB5bz573cBBZKoYSZ2B4mSST1JKzPUrH --fee-wallet H4QMTHMVbJ3KrB5bz573cBBZKoYSZ2B4mSST1JKzPUrH --bank-init-flat-sol-fee 5000 --program-fee-fixed 0 --program-fee-rate 0.1

edit:

cargo run group edit-fee-state --fee-wallet H4QMTHMVbJ3KrB5bz573cBBZKoYSZ2B4mSST1JKzPUrH --bank-init-flat-sol-fee 5000 --program-fee-fixed 0 --program-fee-rate 0.1 

config:

cargo run group config-group-fee --flag 1

propagate:

cargo run group propagate-fee --marginfi-group FCPfpHA69EbS8f9KKSreTRkXbzFpunsKuYf5qNmnJjpo

@jgur-psyops jgur-psyops merged commit 063a5de into main Nov 21, 2024
4 checks passed
@jgur-psyops jgur-psyops deleted the fee-cli-additions branch November 21, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants