G7DAO / seer

Apache License 2.0
8 stars 5 forks source link

Feature request: Add verify command in generated bindings #72

Open karacurt opened 1 month ago

karacurt commented 1 month ago

Problem: developers often need to verify the contracts on the chain after using the deploy command in a binding contract. Solution: I propose implementing a verify command that could verify the contract and a --verify flag that could be used with a deploy command to deploy and verify in the same CLI call.

Example of what would be a verify command:

ERC20 verify --api-url api.rpc.com --api-key $API_KEY --contract TOKEN_ADDRESS --name Token --symbol Symbol --decimals 18

Example of what would be a --verify flag:

ERC20 deploy --rpc rpc.com --keyfile ~/.secrets/keyfile.json --name Token --symbol Symbol --decimals 18 --verify --api-url api.rpc.com --api-key $API_KEY
zomglings commented 1 month ago

Each explorer API has a different format in which they accept verification data. e.g. I believe that Etherscan differs from Blockscout.

We should make a list of different APIs we need to support for verification - we can look at the Foundry or the Hardhat code to do this.