npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@marinade.finance/incentives-distribution-cli

v1.0.15

Published

CLI of the incentives distribution

Downloads

7

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:

  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