A program for distributing tokens efficiently via uploading a Merkle root.
This repository targets Anchor 0.31.x and Solana 2.3.x. Install the CLI tools before building:
cargo install --locked anchor-cli@0.31.1
sh -c "$(curl -sSfL https://release.solana.com/v2.3.0/install)" -- --no-modify-pathrustup toolchain install 1.83
cargo install --locked anchor-cli@0.31.1
sh -c "$(curl -sSfL https://release.solana.com/v2.3.0/install)" -- --no-modify-path
npm install -g yarnsolana-test-validator -r &
sleep 5
solana config set -ul
solana airdrop 2anchor build -p merkle_distributor
anchor test -p merkle_distributorTroubleshooting: ensure no OpenSSL dependency leaks.
cargo tree -p merkle-distributor -i openssl-sysTo claim via CLI instead of using https://jito.network/airdrop, run the following commands.
- Build the cli (must have rust + cargo installed):
cargo b -r- Run
claimwith the proper args. Be sure to replace<YOUR KEYPAIR>with the full path of your keypair file. This will transfer tokens from the account8Xm3tkQH581s3MoRHWUNYA5jKbgPATW4tJAAxgwDC6T6to a the associated token account owned by your keypair, creating it if it doesn't exist.
./target/release/cli --rpc-url https://api.mainnet-beta.solana.com --keypair-path <YOUR KEYPAIR> --airdrop-version 0 --mint jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL --program-id mERKcfxMC5SqJn4Ld4BUris3WKZZ1ojjWJ3A3J5CKxv claim --merkle-tree-path merkle_tree.jsonNote that for searchers and validators, not all tokens will be vested until December 7, 2024. You can check the vesting status at https://jito.network/airdrop.