-
Notifications
You must be signed in to change notification settings - Fork 40
Add Etherscan configuration for new networks #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Etherscan configuration for new networks #240
Conversation
🫡 |
@kuzdogan Etherscan verification is always, constantly painful to obtain for one reason or another but Sourcify in the last (at least) year has been a breeze to use, never had any issue when I needed to verify a contract, and all this useful contract data is easily and transparently available. Great job and thanks for the service! |
etherscan: { | ||
apiKey: { | ||
sepolia: ETHERSCAN_API_KEY, | ||
arbitrumOne: ETHERSCAN_API_KEY, | ||
base: ETHERSCAN_API_KEY, | ||
optimisticEthereum: ETHERSCAN_API_KEY, | ||
polygon: ETHERSCAN_API_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this work for you using the same key as other chains??
I tried deploying today with Etherscan API Key (on another project) and it didn't work.
I created a new key specifically for polygonscan.com and then it did.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you need to create an API key per block explorer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is luckily going to change soon, see foundry-rs/foundry#9196.
etherscan: { | ||
apiKey: { | ||
sepolia: ETHERSCAN_API_KEY, | ||
arbitrumOne: ETHERSCAN_API_KEY, | ||
base: ETHERSCAN_API_KEY, | ||
optimisticEthereum: ETHERSCAN_API_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought for now avalanche and polygon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#239 also deployed the other two, so I verified those as well.
bc6649b
to
c6bac3f
Compare
Description
Add the necessary configuration lines for allowing contract verification on the Block explorers of the networks introduced in #239.
BNB was already verified. Optimism and Polygon just worked out of the box. Avalanche defaults to Snowtrace, so I had to include a custom configuration for that network in order to use SnowScan and used:
I also enabled Sourcify because why not?
Test Plan
Check out the contract addresses on the block explorer.