@marinade.finance/incentives-distribution-cli
v1.0.15
Published
CLI of the incentives distribution
Downloads
4
Readme
Incentives Distribution CLI
Working with CLI
To install the CLI as global npm package
Requirements: Node.js version 16 or higher.
See
npm i -g @marinade.finance/incentives-distribution-cli@latest
Successful installation will be shown in similar fashion to this output
added 198 packages in 20s
19 packages are looking for funding
run `npm fund` for details
# to verify installed version
incentives-distribution --version
1.0.13
To get info on available commands
incentives-distribution --help
Checking the claim records
NOTE: to search data accounts it's needed to use
RPC endpoint that permits method getProgramAccounts
To show information about claim record
export RPC_URL='https://api.mainnet-beta.solana.com'
incentives-distribution -u$RPC_URL show-claim-record \
--treasury iNtR2h6yAUDXawbiVBHVUBZ5qN3qsFCezZJABgfWT8h \
--authority <wallet-pubkey-to-claim-the-rewards>
To show information about all installed treasury(ies)
incentives-distribution -u$RPC_URL show-treasury \
iNtR2h6yAUDXawbiVBHVUBZ5qN3qsFCezZJABgfWT8h
Claiming incentives rewards
The process of claiming consists of two actions bundled under one claiming transaction:
- Claiming rewarded tokens out of the Incentives Distribution contract.
- Depositing the rewarded tokens into the SPL Governance Realm. After claiming accessible at https://app.realms.today/dao/MNDE.
To claim rewards, you need to sign with the claim record authority. This authority corresponds to the owner's wallet, which, for validator rewards, is the validator identity keypair.
- The
--authority
option specifies who is claiming the rewards, requiring a wallet keypair. - The
-k
option defines who will pay fees for transaction processing, necessitating a wallet keypair. - You can increase the chances of getting the transaction into the chain
by tipping the compute price using the
--with-compute-unit-price
argument. - The address for Season 2 rewards is
--treasury iNtR2h6yAUDXawbiVBHVUBZ5qN3qsFCezZJABgfWT8h
.
incentives-distribution -u$RPC_URL claim \
--authority <wallet-keypair-to-claim-the-rewards> \
--treasury iNtR2h6yAUDXawbiVBHVUBZ5qN3qsFCezZJABgfWT8h \
-k <fee-payer-address> \
--with-compute-unit-price 50 \
--debug
Support for Ledger signing
Any signature can be generated using Ledger by specifying either the pubkey
(usb://ledger/9rPVSygg3brqghvdZ6wsL2i5YNQTGhXGdJzF65YxaCQd
) or the path (usb://ledger?key=0/0
)
as the parameter value.
For instance, if the bond authority is set up to be controlled by a key managed on Ledger, the command can be executed as follows:
# using solana-keygen to find pubkey on a particular derivation path
solana-keygen pubkey 'usb://ledger?key=0/3'
The support for ledger came from @marinade.finance/ledger-utils
TS implementation wrapper around @ledgerhq/hw-app-solana
. The implementation tries to be compatible with way how solana
CLI behaves.
incentives distribution CLI Reference
incentives-distribution cli --help
incentives-distribution cli --help
Usage: incentives-distribution [options] [command]
Options:
-V, --version output the version number
-u, --cluster <cluster> Solana cluster (default: "http://localhost:8899")
-k, --keypair <keypair-or-ledger> Wallet keypair (path or ledger url in format usb://ledger/[<pubkey>][?key=<derivedPath>]). Wallet keypair is used to pay for the transaction fees and as default value for signers. (default:
~/.config/solana/id.json)
--program-id <pubkey> Program id of directed stake contract (default: indiXdKbsC4QSLQQnn6ngZvkqfywn6KgEeQbkGSpk1V) (default: {})
-s, --simulate Simulate (default: false)
-p, --print-only Print only mode, no execution, instructions are printed in base64 to output. This can be used for placing the admin commands to SPL Governance UI by hand. (default: false)
--skip-preflight setting transaction execution flag "skip-preflight" (default: false)
--commitment <commitment> Commitment (default: "confirmed")
--confirmation-finality <confirmed|finalized> Confirmation finality of sent transaction. Default is "confirmed" that means for majority of nodes confirms in cluster. "finalized" stands for full cluster finality that takes ~8 seconds.
(default: "confirmed")
--with-compute-unit-price <compute-unit-price> Set compute unit price for transaction, in increments of 0.000001 lamports per compute unit. (default: 10)
-d, --debug Debug (default: false)
-v, --verbose alias for --debug (default: false)
-h, --help display help for command
Commands:
claim [options] Claim record account.
show-claim-record [options] [address] Showing data of claim record account
show-treasury [options] [address] Showing data of treasury account (with --with-claim-records list the claim records as well)
parse-and-show-claim-records [options] Processing claim records from the input file that was used for distribution and checked that state on-chain.
help [command] display help for command