Add
These commands allow you to through the CLI add elements to your YAML file.
Contract
This allows you download the contracts metadata alongside the ABI from an supported network using Etherscan APIs. This uses a shared Etherscan API key to try to download the ABIs, this means you will get rate limited if you use this too much or if many people use this at the same time. You can add your own API key here.
You can see all the chains you can download ABIs from here.
rindexer add contract
it then ask you 2 questions:
- "Enter Network Name" - This is the network name in your YAML file.
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
This will skip for you if you only have one network setup.
- "Enter Contract Address" - This is the contract address you want to add to your YAML project
It will then download the ABI and put it in the abis
folder and map it automatically in your YAML file.
Some things to know:
- If the contract is not verified on Etherscan it will not be able to download the ABI.
- If the contract is a proxy it try to download the ABI of the implementation contract.