Comment on page

Step 1: Create token

Learn how to create your application token

Prerequisites

CLI
TS
npm i -g rly-cli
or
yarn global add rly-cli
$ npm i rly-js
or
yarn add i rly-js
If you're experiencing permission issues installing the npm package globally on your local machine, please visit https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

Additional resources

Create your token

If you have already created an SPL token via Solana's Token Program, skip to Step 2: Initializing Token Bonding Curve (TBC).

Step 1: Create Token

Configure your token parameters, additional metadata, and the initial token supply to mint. A balance of at least 1 SOL is required.
CLI
TS
rly-cli create-token [options]
Options:
-e, --env <string> Solana cluster env name (default:
"devnet")
-k, --keypair <path> Solana wallet location (default:
"--keypair not provided")
-n, --name <string> token name
-s, --symbol <string> token symbol
-d, --dec <number> token decimals (default: "9")
--supply <number> initial supply (integer value)
-h, --help display help for command
// token
import { Keypair, Connection, clusterApiUrl } from 'solana/web3js`;
import { createToken, getMetadata } from 'rly-js';
const initialSupply = new BN(1_000_000);
const name = "TestToken";
const symbol = "TKNSYMBL";
const decimals = 9
const walletKeyPair = Keypair.generate();
const connection = new Connection(clusterApiUrl("devnet"))
const wallet = new NodeWallet(walletKeyPair)
//create token
const { tx, tokenMint } = await createToken({
initialSupply,
tokenData: { name, symbol, decimals },
connection,
wallet
})
// fetch metadata
const metadata await getMetadata({ tokenMint: tokenMint.publicKey, connection })
The default configuration allows you to mint additional tokens after the initial mint.
The initial token supply will be minted to the associated token account for the keypair creating the token.

That's it!

In this section you should have:
  1. 1.
    Created your on-chain SPL app token
  2. 2.
    Minted an initial token supply to the associated token account
  3. 3.
    Verified your token and supply on chain
  4. 4.
    Verified your token name, symbol, and logo on an explorer/wallet

Additional Resources