|
| 1 | +# Contributing to Treasure Bridged Token Registry |
| 2 | + |
| 3 | +This guide explains how to propose adding new tokens to the Treasure Bridge whitelist registry. |
| 4 | + |
| 5 | +## Token Submission Process |
| 6 | + |
| 7 | +1. Fork this repository |
| 8 | +2. Add your token details to the appropriate JSON file in either `data/mainnet/` or `data/testnet/`: |
| 9 | + - ERC20 tokens: `erc20.json` |
| 10 | + - ERC721 tokens: `erc721.json` |
| 11 | + - ERC1155 tokens: `erc1155.json` |
| 12 | +3. Create a Pull Request |
| 13 | + |
| 14 | +## Token Information Requirements |
| 15 | + |
| 16 | +All tokens should be added to the `tokens` array in the respective JSON file. |
| 17 | + |
| 18 | +### ERC20 Tokens |
| 19 | +Add your token to `erc20.json` using the following format: |
| 20 | + |
| 21 | +{ |
| 22 | + "name": "Token Name", |
| 23 | + "srcChainId": 5, // Source chain ID |
| 24 | + "destChainId": 80001, // Destination chain ID |
| 25 | + "srcTokenAddress": "0x...", // Token address on source chain |
| 26 | + "destTokenAddress": "0x...", // Token address on destination chain |
| 27 | + "isNft": false, |
| 28 | + "isCollateral": true, // Optional: true if token is collateral |
| 29 | + "underlyingTokenAddress": "0x..." // Optional: required if isCollateral is true |
| 30 | +} |
| 31 | + |
| 32 | +### ERC721 Tokens |
| 33 | +Add your NFT collection to `erc721.json` using the following format: |
| 34 | + |
| 35 | +{ |
| 36 | + "name": "Collection Name", |
| 37 | + "srcChainId": 421613, |
| 38 | + "destChainId": 5, |
| 39 | + "srcTokenAddress": "0x...", |
| 40 | + "destTokenAddress": "0x...", |
| 41 | + "isNft": true, |
| 42 | + "nftStandard": "ERC721", |
| 43 | + "isCollateral": false, |
| 44 | + "underlyingTokenAddress": "0x...", // Optional: required if isCollateral is true |
| 45 | + "nftBatchSignature": "send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)" |
| 46 | +} |
| 47 | + |
| 48 | +### ERC1155 Tokens |
| 49 | +Add your collection to `erc1155.json` using the following format: |
| 50 | + |
| 51 | +{ |
| 52 | + "name": "Collection Name", |
| 53 | + "srcChainId": 5, |
| 54 | + "destChainId": 420, |
| 55 | + "srcTokenAddress": "0x...", |
| 56 | + "destTokenAddress": "0x...", |
| 57 | + "isNft": true, |
| 58 | + "nftStandard": "ERC1155", |
| 59 | + "isCollateral": true, |
| 60 | + "underlyingTokenAddress": "0x...", // Optional: required if isCollateral is true |
| 61 | + "nftBatchSignature": "send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)" |
| 62 | +} |
| 63 | + |
| 64 | +## Submission Requirements |
| 65 | + |
| 66 | +1. **Contract Verification** |
| 67 | + - Contract must be verified on the respective network's block explorer |
| 68 | + - Must be a valid implementation of the respective token standard (ERC20/721/1155) |
| 69 | + |
| 70 | +2. **Security** |
| 71 | + - Contract should have no known vulnerabilities |
| 72 | + - Preferably audited by a reputable security firm |
| 73 | + |
| 74 | +3. **PR Description Requirements** |
| 75 | + - Source and destination chain IDs |
| 76 | + - Contract addresses on both chains |
| 77 | + - Brief description of the token/collection |
| 78 | + - Link to project website |
| 79 | + - Link to verified contracts on block explorers |
| 80 | + - Link to audit report (if available) |
| 81 | + |
| 82 | +## Pull Request Process |
| 83 | + |
| 84 | +1. Ensure your token information follows the correct JSON format |
| 85 | +2. Create a PR with a clear title (e.g., "Add MAGIC to ERC20 whitelist") |
| 86 | +3. Fill out all required information in the PR description |
| 87 | +4. Wait for review from maintainers |
| 88 | +5. Address any requested changes |
| 89 | +6. Once approved, your token will be added to the registry |
| 90 | + |
| 91 | +## Questions or Issues? |
| 92 | + |
| 93 | +If you have questions about the contribution process or encounter any issues, please open a GitHub issue in this repository. |
0 commit comments