This project is a tool for managing the DSwap token list. It includes functionality for validating tokens, building a token list, and uploading it to IPFS using QuickNode's IPFS service.
- Token validation based on smart contract data
- Building a list of valid tokens
- Uploading the token list to IPFS via QuickNode
- Node.js
- npm or yarn
-
Clone the repository:
git clone https://github.com/your-username/dswap-token-list-manager.git -
Navigate to the project directory:
cd dswap-token-list-manager -
Install dependencies:
npm installor
yarn install
-
Create a
.envfile in the root directory of the project and add the following environment variables:QUICKNODE_API_KEY=your_quicknode_api_key IPFS_GATEWAY=https://yourid.quicknode-ipfs.com/ipfs -
Replace
your_quicknode_api_keywith your actual QuickNode API key. -
Optionally, update the IPFS_GATEWAY if you're using a different gateway.
Run the script with the command:
node index.js
The script will perform the following actions:
- Load the ABI from
./abi/Dswap.json - Load the token list from
./dswap-list.json - Validate tokens using the Ethereum mainnet via QuickNode
- Build a list of valid tokens
- Upload the validated token list to IPFS via QuickNode
- Output the CID and URL for accessing the token list via IPFS
index.js: Main scriptdswap-list.json: Source token listabi/Dswap.json: ABI of the Dswap smart contract.env: Environment variables (not tracked in git)
Please read CONTRIBUTING.md for details on how to contribute to this project.
This project is licensed under the MIT License.