Create Tokens on Solana
In this tutorial, we will focus on an agile and efficient approach to the ideation, creation and deployment of tokens on Solana, known as SPL tokens.
Instructions
Create a new project folder
Navigate to it in command line
Prepare your development environment:
Install Solana CLI: https://docs.solanalabs.com/cli/install
Install @solana/web3.js:
npm install @solana/web3.jsInstall @solana/spl-token:
npm install @solana/spl-tokenInstall @metaplex-foundation/js:
npm install @metaplex-foundation/jsInstall @metaplex-foundation/mpl-token-metadata:
npm install @metaplex-foundation/mpl-token-metadata
Install MetaBoss
cargo install metaboss
Switch to Devnet -
solana config set --url https://api.devnet.solana.comCreate Keypair File -
solana-keygen new --outfile C:Path\To\Keypair\FileGet 1 SOL in Config Wallet -
solana airdrop 1Create an OFF_CHAIN_DATA_JSON file
Example:
{ "name":"Tunak Tunak Tun", "symbol":"TUNAK", "description": "TUNAK TUNAK TUN TUNAK TUNAK TUN TUNAK TUNAK TUN TAN TAN TAN", "image":"https://arweave.net/lkD2dSYcZG1XZCaj93QflHJZqdtPCeDxJ52bM1xmSm0", "attributes":[], "properties":{ "files":[ {"uri":"https://arweave.net/lkD2dSYcZG1XZCaj93QflHJZqdtPCeDxJ52bM1xmSm0", "type":"image/png"} ] } }
Upload the token symbol to Arweave using Akord
Add the image URI to the ”image” value and the ”files” value
Upload the OFF_CHAIN_DATA_JSON to Arweave using Akord and get a URI
Create an ON_CHAIN_DATA_JSON file
Example:
{ "name": "Tunak Tunak Tun", "symbol": "TUNAK", "uri": "https://arweave.net/--_ohDuhkakw1qQka_vaqhvDq-R61wYxXq9CwVKol0s", "seller_fee_basis_points": 0 }
Add the OFF_CHAIN_DATA_JSON URI to the ON_CHAIN_DATA_JSON
Use MetaBoss to create the token
metaboss create fungible -d 6 -m token_metadata/tunak_onchain.json
Last updated
Was this helpful?