Welcome to the official repository for the Soroswap token list. This list is essential for validating swap paths on the Soroswap Automated Market Maker (AMM) protocol on Soroban. By adhering to this list, we ensure a trusted and secure environment for all swaps conducted through Soroswap.
To include your token in the Soroswap token list, ensure your token adheres to the following structure. Fields marked with an asterisk (*) are optional and can be omitted if not applicable to your token.
{
"code": "string; // The code representing your token.
"issuer": "string?", // The issuer's account address (optional).
"contract": "string; // The contract address for your token.
"name": "string?", // The name of your token (optional).
"org": "string?", // The organization behind the token (optional).
"domain": "string?", // The website for your token or organization (optional).
"icon": "string; // A URL to the token's icon.
"decimals": number; // The number of decimals for your token. (7)
}
Ensure your token's details are correctly formatted according to the structure above when creating your JSON file. This structured approach helps streamline the inclusion process and maintain the integrity of the Soroswap ecosystem.
-
Fork this Repository: Click on the "Fork" button to create a copy of this repository under your GitHub account.
-
Clone Your Fork: Clone the forked repository to your local machine.
git clone https://github.com/<your-username>/token-list.git cd token-list
-
Add Your Token: Create a new JSON file within the
assets
directory. Name it<CONTRACT_ADDRESS>.json
, replacing<CONTRACT_ADDRESS>
with your token's actual contract address. -
Fill Out Token Information: Populate the new file with your token's details. Follow the provided structure, including all required fields and any applicable optional fields. Check the toml file of the asset in Stellar.Expert to get the correct information
-
Run Local Tests: Your PR can only be merged if the tests pass, so first run the tests locally:
yarn
yarn verify
- Submit a Pull Request (PR): Push the changes to your fork and submit a PR to this repository. The PR should only add the new token file to the
tokens
directory.
- PRs modifying any files other than adding a new token file to the
tokens
directory will be automatically closed. This ensures the integrity and security of the token list. - Upon merging your PR, a GitHub Actions workflow automatically updates the
tokenList.json
. Manual updates to this file are not required in your PR. - All submissions undergo review. Please allow some time for the review and inclusion process.
It runs daily. But you can trigger it manually:
Go to github actions and launch the workflow Restore footprints of the token list
.
Make sure GB5KBIU6KUCKEVVDZOMIIJAKGAEOKQOBZX5TMOBXGCU3D5RAO22WETXE
address is funded to run it on github.
If you want to run it locally, you need to set the environment variables PRIVATE_KEY
and RPC_URL
. Then, you can run the restore footprints script with the following command:
yarn restore-footprints
This feature allow a wallet to set trustlines for all tokens in the token list. You can run the script as follows:
yarn set-trustlines $TRUSTLINES_PRIVATE_KEY
make sure the environment variable TRUSTLINES_PRIVATE_KEY
is set.
For questions or further clarification, feel free to open an issue in this repository. We're here to help ensure a smooth integration process for your token into the Soroswap ecosystem.
Thank you for contributing to Soroswap!