This repository manages a list of tokens for the Sonic Bitfinity ecosystem. Follow the steps below to add your token and create a pull request (PR) for approval.
- Git: Ensure you have Git installed on your system.
- Node.js: Install Node.js (version 20 or higher is recommended).
- Yarn: Install Yarn for dependency management.
Clone this repository to your local machine:
git clone <https://github.com/sonicdex/bitfinity-token-list.git>
cd bitfinity-token-list
Run the following command to install the required dependencies:
yarn install
Navigate to the src/tokens directory and create a new folder named after your token (e.g., MYTOKEN):
mkdir src/tokens/MYTOKEN
Inside the folder you just created, add a metadata.json file with the following structure:
{
"address": "0xYourTokenAddress",
"decimals": 18,
"name": "Your Token Name",
"symbol": "YOUR",
"logoURI": "https://path-to-your-token-logo/logo.png"
}
- address: The token’s address (must be a valid ERC20 address).
- decimals: Number of decimal places for the token balance.
- name: The token’s full name (max 60 characters).
- symbol: The token’s symbol (max 20 characters).
- logoURI: A valid URI pointing to your token logo (suggested size: 64x64 pixels, in Webp format).
If you don’t have an external link for your token logo, add the logo file with filename logo.webp
to the same folder. Ensure the logoURI in your metadata.json points to the file name.
Run the validation script to ensure your token metadata is valid and doesn’t conflict with the existing token list:
yarn validate
If there are any errors, the script will display details for corrections.
Step 1: Commit Your Changes
Create a new branch and commit your changes:
git checkout -b add-my-token
git add src/tokens/MYTOKEN
git commit -m "feat: add MYTOKEN to token list"
Step 2: Push Your Branch
git push -u origin add-my-token
Step 3: Open a Pull Request
- Go to the repository on GitHub.
- Open the Pull Requests tab.
- Click New Pull Request.
- Compare your branch (add-my-token) with main.
- Add a meaningful description and submit your PR.
Once your PR is reviewed and merged:
- The version of the token list will automatically update.
- Your token will be included in the main token list.
For any questions or issues, feel free to open a GitHub issue or reach out to the maintainers.
Example Token Folder Structure
src/tokens/MYTOKEN/
├── metadata.json
└── logo.webp (optional)