Skip to content
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

Bump hardhat-etherscan to verify canonical deployments on Sepolia #80

Closed
wants to merge 1 commit into from

Conversation

adamgall
Copy link

@adamgall adamgall commented Apr 19, 2024

Intention

My goal was to verify both of the RealityModuleERC20.sol and RealityModuleETH.sol contracts on Etherscan's Sepolia instance.

Steps taken

First, I wasn't able to install the dependencies with yarn@1.22.19. However, I realized that yarn install did work if I bumped the declared Node version to v18.20.0. All hardhat tests still pass, and the repo seems to work fine using this updated Node version.

Next, Sepolia wasn't supported by the installed @nomadiclabs/hardhat-etherscan package. I bumped it just enough to be able to specify customChains in the hardhat.config etherscan key, and included support for Sepolia.

In order to use the hardhat script yarn hardhat verify --network sepolia <address>, I had to checkout and compile from commit d05a496. (The branch of this PR comes off of that commit). Otherwise, hardhat complained that the deployed bytecode at the given addresses don't match the bytecode of any local contracts. It seems that there were changes to the contracts since the latest canonical deployments.

Next, I had to determine the constructor args used. Unfortunately, the constructor args in the deployment script weren't yielding a successful verification. This kind of makes sense, because those canonical deployments happen from the https://github.com/gnosisguild/zodiac repository, not this one.

Thankfully, I was able to go to the verified contracts on mainnet, and check the values of the given variables which were set by the constructor args.

From there, I was able to successfully run the yarn hardhat verify --network sepolia [address] [constructor args] scripts for verifying both RealityModuleETH and RealityModuleERC20.

This PR is mostly just meant a paper trail for others, and includes the minimal updates to the repo that allowed me to perform these Etherscan contract verifications.

Copy link
Contributor

github-actions bot commented Apr 19, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@adamgall
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Apr 19, 2024
@adamgall
Copy link
Author

recheck

@juliopavila
Copy link
Contributor

tracked #81

@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants