Comment on page
Faucet Instructions
Submit your deployment address to this form. We will provide engineering support and prioritize specific infrastructure needs.
To get devnet tokens programmatically, simply run this curl command in the terminal and replace
YOUR_SOLANA_VM_ACCOUNT
with the address of the wallet that you want to import tokens into.curl https://staging-rpc.dev.eclipsenetwork.xyz -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"requestAirdrop", "params":["YOUR_SOLANA_VM_ACCOUNT", 1000000000]}'
The request is in "lamports," and you must request at least 1 SOL = 1000000000 lamports.
You can alternatively use the Solana CLI to airdrop yourself tokens:
solana config set --url https://staging-rpc.dev.eclipsenetwork.xyz
solana airdrop 1
curl https://staging-rpc.dev.eclipsenetwork.xyz -X POST -H "Content-Type: application/json" -d ' {"jsonrpc":"2.0","id":1, "method":"getBalance", "params":["YOUR_SOLANA_VM_ACCOUNT"]}'
If you've just airdropped yourself some tokens, it might take a moment to show up.
For generating custom tokens, we can use the SPL Token CLI. You can reference the Solana docs on the Token program, or you can follow the steps below to create a dummy fungible token:
Make sure your Solana CLI is configured to Eclipse Devnet and airdrop yourself some tokens. Next, install the SPL token CLI:
cargo install spl-token-cli
You can see all commands for this tool with
spl-token --help
.Create the SPL token:
spl-token create-token
Output
Creating token 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr under program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
Address: 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr
Decimals: 9
Signature: 2a13fRfFHbbBdpF9QSecqAGjSZ4BBWoPKTSurcoXAL2RW5ZchAzbcY1pgqfDLzfGhDvSFd88egof4FTPtrAr72sv
Take note of the token address, which happens to be
7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr
in this case.Create an empty account to hold a balance of your newly created token:
spl-token create-account 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr
Output
Creating account 4dYFmw8ytJmYDmZLvFnobT4CKC7Z5q1W5b9byEuVVap7
Signature: 25EsivN9f75yJNhrSrnM9TuPGHFx9tpyYwUhUomY5kydZpfvjcShJWCsUB5uk7hkP9QeTr6JpJtQV1DPjDjYtAjR
Mint tokens into the newly-created account:
spl-token mint 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr 10000
Output
Minting 10000 tokens
Token: 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr
Recipient: 4dYFmw8ytJmYDmZLvFnobT4CKC7Z5q1W5b9byEuVVap7
Signature: 3aVqfVgmZu333YxwJg7xieKkmebdw9NpPvmsCJgao3eQTDwQNmWYD3KBppp5g6Tbw6cN7pjQonN61Z2d2CFazzqp
See all of the tokens that you own:
spl-token accounts
Output
Token Balance
-----------------------------------------------------
7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr 10000
Transferring tokens to another account:
spl-token transfer 7RFaNSSdVD9Q2aYJf1XNCTz7xKfgN19fAPAsAqzaorqr 50 qp6oBVgpxfQDMP1GKzxgzDxKqEuZnuC8gZo5PK1qrdh
If it's the receiver's first time ever receiving tokens, then you'll get an error like this:
Output
Error: "Error: Recipient's associated token account does not exist. Add `--fund-recipient` to fund their account"
To fix it, you'll have to be the one to "fund" the recipient token account by adding the
--fund-recipient
flag:spl-token transfer --fund-recipient AQoKYV7tYpTrFZN6P5oUufbQKAUr9mNYGe1TTJC9wajM 50 vines1vzrYbzLMRdu58
Output
Transfer 50 tokens
Sender: 4dYFmw8ytJmYDmZLvFnobT4CKC7Z5q1W5b9byEuVVap7
Recipient: qp6oBVgpxfQDMP1GKzxgzDxKqEuZnuC8gZo5PK1qrdh
Recipient associated token account: 7G9XHxAjgXhkKnTmcb8Z24ssSgiXYNnTp8KqRuQVCi9D
Funding recipient: 7G9XHxAjgXhkKnTmcb8Z24ssSgiXYNnTp8KqRuQVCi9D
Signature: 25cb1D1pxN3Sh3cqFhJSP2hmD6jAMRDxeg9jrvp3SH6GNpkY6Z4viEs7FFsHwVH5528xUZB8xCT5F1uVrXpcTBcN