Socket
Socket
Sign inDemoInstall

@marinade.finance/incentives-distribution-cli

Package Overview
Dependencies
20
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @marinade.finance/incentives-distribution-cli

CLI of the incentives distribution


Version published
Maintainers
1
Created

Readme

Source

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:

  1. Claiming rewarded tokens out of the Incentives Distribution contract.
  2. 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

FAQs

Last updated on 09 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc