This repository contains the scripts for Solana token transfers. Three types of tokens are supported namely,
- SPL Token
- SPL Token Extensions or Token 2022
- Solana Native Token
Run Yarn install
to install all the dependencies
Go here to configure Solana CLI and Solana Keypair
Solana has four networks - localnet, devnet, testnet, and mainnet.
You can use the following cmd to set the appropriate network in your CLI.
solana config set --url <network_name>
You can use the following cmd to get some Sol Native tokens for transactions,
solana airdrop 2
To execute the SPL Token and Token22 transfer, use the following cmd
esrun ./scripts/spl-token-distribution.ts
To execute the Solana Native Token transfer, use the following cmd
esrun ./scripts/sol-token-distribution.ts