In the previous article, we created our liquidity pool. However, the token name is still a random number and is difficult to remember In this article, we will learn how to change its name on our exchange and update it on the Solana lab GitHub.
Step 1: To change the token name on our exchange, we need to modify the src/utils/token-list.json. Add your token under the devnet part. In my case, it is
{
"tokenSymbol": "FREEDOGE",
"mintAddress": "5BJoqsHFAiLVc4UmFS1p6Uys6BhaCTqLoj4E8rjipD9m",
"tokenName": "FREE DOGE Devnet",
"icon": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/2SJUtWahbkSAw7ZyDiSVLGvknXNKCBr395bNi2QqJYxQ/logo.png"
},
{
"tokenSymbol": "FREESHIB",
"mintAddress": "Dwshx77oY4ZTQv2DPYrqSPTtp9K2nonUQkXX1LMWyfhV",
"tokenName": "FREE SHIB Devnet",
"icon": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/AhMJmyAB7K4ciVBXNNtaEmP4d8ewJNDAT6xhWgqqH2eT/logo.png"
},
{
"tokenSymbol": "FREEBTC",
"mintAddress": "14brDZCB1RUy9hg1WcEUXkZM7gqyLL9ezU4xNAKAV8EF",
"tokenName": "Free BTC Devnet",
"icon": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E/logo.png"
}
Step 2: You need to build your application again. Go to the terminal and enter ctrl + c to stop the current build. Type npm run build and then serve -s build to run your exchange again.
Step 3: Folk token-list under Solana labs GitHub. Modify the blob/main/src/tokens/solana.tokenlist.json and add your token at the end. Do not change other parts of the project. In my case, it is
{
"chainId": 101,
"address": "5BJoqsHFAiLVc4UmFS1p6Uys6BhaCTqLoj4E8rjipD9m",
"symbol": "FREEDOGE",
"name": "FREE DOGE Devnet",
"decimals": 9,
"logoURI": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/2SJUtWahbkSAw7ZyDiSVLGvknXNKCBr395bNi2QqJYxQ/logo.png",
"tags": [
"meme-token"
]
},
{
"chainId": 101,
"address": "Dwshx77oY4ZTQv2DPYrqSPTtp9K2nonUQkXX1LMWyfhV",
"symbol": "FREESHIB",
"name": "FREE SHIB Devnet",
"decimals": 9,
"logoURI": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/AhMJmyAB7K4ciVBXNNtaEmP4d8ewJNDAT6xhWgqqH2eT/logo.png",
"tags": [
"meme-token"
]
},
{
"chainId": 101,
"address": "14brDZCB1RUy9hg1WcEUXkZM7gqyLL9ezU4xNAKAV8EF",
"symbol": "FREEBTC",
"name": "Free BTC Devnet",
"decimals": 9,
"logoURI": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E/logo.png",
"tags": [
"meme-token",
]
}
Step 4: Submit a pull request. The token list will update once an hour, and your token name should be automatically updated if there is no error. Everything is ready. You may now submit your application to Netlify or Cloudflare Page to run your exchange. 🙂
You may enter yarn build to build the project and deploy it using Netlify or Cloudflare page. The following article will teach you how to deploy your exchange into the Cloudflare page.
If you think this article is helpful, leave a comment below. 🙂
You may also sponsor this website by sending some SOL to this address: AGzgnsepqh7NePfTrNWfrXPaRXKd1ce8jUwfmFh9FfMe