This guide explains how to propose adding new tokens to the Treasure Bridge whitelist registry.
- Fork this repository
- Add your token details to the appropriate JSON file in either
data/mainnet/ordata/testnet/:- ERC20 tokens:
erc20.json - ERC721 tokens:
erc721.json - ERC1155 tokens:
erc1155.json
- ERC20 tokens:
- Create a Pull Request
All tokens should be added to the tokens array in the respective JSON file.
Add your token to erc20.json using the following format:
{ "name": "Token Name", "srcChainId": 5, // Source chain ID "destChainId": 80001, // Destination chain ID "srcTokenAddress": "0x...", // Token address on source chain "destTokenAddress": "0x...", // Token address on destination chain "isNft": false, "isCollateral": true, // Optional: true if token is collateral "underlyingTokenAddress": "0x..." // Optional: required if isCollateral is true }
Add your NFT collection to erc721.json using the following format:
{ "name": "Collection Name", "srcChainId": 421613, "destChainId": 5, "srcTokenAddress": "0x...", "destTokenAddress": "0x...", "isNft": true, "nftStandard": "ERC721", "isCollateral": false, "underlyingTokenAddress": "0x...", // Optional: required if isCollateral is true "nftBatchSignature": "send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)" }
Add your collection to erc1155.json using the following format:
{ "name": "Collection Name", "srcChainId": 5, "destChainId": 420, "srcTokenAddress": "0x...", "destTokenAddress": "0x...", "isNft": true, "nftStandard": "ERC1155", "isCollateral": true, "underlyingTokenAddress": "0x...", // Optional: required if isCollateral is true "nftBatchSignature": "send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)" }
-
Contract Verification
- Contract must be verified on the respective network's block explorer
- Must be a valid implementation of the respective token standard (ERC20/721/1155)
-
Security
- Contract should have no known vulnerabilities
- Preferably audited by a reputable security firm
-
PR Description Requirements
- Source and destination chain IDs
- Contract addresses on both chains
- Brief description of the token/collection
- Link to project website
- Link to verified contracts on block explorers
- Link to audit report (if available)
- Ensure your token information follows the correct JSON format
- Create a PR with a clear title (e.g., "Add MAGIC to ERC20 whitelist")
- Fill out all required information in the PR description
- Wait for review from maintainers
- Address any requested changes
- Once approved, your token will be added to the registry
If you have questions about the contribution process or encounter any issues, please open a GitHub issue in this repository.