Step 2: Initialize Token Bonding Curve (TBC)
Learn how to configure and initialize the TBC that defines the supply and price of your token.
TBC Resources
TBC GuidesTBC ExamplesInitialize the TBC
Step 2.1: Initialize the TBC
Usage: rly-cli tbc-init [options] <token_a> <token_b> <token_b_liquidity>
Arguments:
token_a token A
token_b token B
token_b_liquidity token B liquidity (base units)
Options:
-e, --env <string> Solana cluster env name (default: "devnet")
-k, --keypair <path> Solana wallet location (default: "--keypair not provided")
--slope_numerator <string> slope numerator
--slope_denominator <string> slope denominator
--init_price_a_numerator <string> initial price token A
--init_price_a_denominator <string> initial price token A
-h, --help display help for command// token bonding curve
import { Provider } from "@project-serum/anchor"
import { Keypair, Connection, clusterApiUrl } from 'solana/web3js`;
import { tokenSwapProgram } from 'rly-js';
const walletKeyPair = Keypair.generate();
const provider = new Provider(new Connection(clusterApiUrl("devnet")), new NodeWallet(walletKeyPair), {});
const tokenSwap = await tokenSwapProgram(provider);Step 2.2: Supply application tokens to the TBC swap (Automatic)
That's it!
Last updated