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

[DADZ-287] automatic etherscan verification #8

Merged
merged 10 commits into from
Jul 3, 2023

Conversation

ra-phael
Copy link
Contributor

Adds automatic verification of all contracts on deployment, except NFTPositionDescriptor because of #7

Now it prints the following:

Output of latest test deployment (Note: they show as already verified because they were verified from a previous deployment, so Etherscan automatically recognizes it's the same bytecode and verifies the new contract right away.)
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
The contract 0xE8F826035782921DAD48049F8aDAf20717320847 has already been verified.
https://goerli-optimism.etherscan.io/address/0xE8F826035782921DAD48049F8aDAf20717320847#code
✅ Done deploying contract.
Factory deployed at: 0xE8F826035782921DAD48049F8aDAf20717320847
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
The contract 0x3C71f250B92622F495c7c76F6DE8E21402C15bC5 has already been verified.
https://goerli-optimism.etherscan.io/address/0x3C71f250B92622F495c7c76F6DE8E21402C15bC5#code
✅ Done deploying contract.
Quoter deployed at: 0x3C71f250B92622F495c7c76F6DE8E21402C15bC5
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
The contract 0x65aF19F4922D614DB90384Ee6DBffd4F98AD7936 has already been verified.
https://goerli-optimism.etherscan.io/address/0x65aF19F4922D614DB90384Ee6DBffd4F98AD7936#code
✅ Done deploying contract.
QuoterV2 deployed at: 0x65aF19F4922D614DB90384Ee6DBffd4F98AD7936
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
Successfully submitted source code for contract
@violetprotocol/mauve-periphery/contracts/libraries/NFTDescriptor.sol:NFTDescriptor at 0xE20EeF1a43ACD70d3C20Ea7a6ec497B8698B1618
for verification on the block explorer. Waiting for verification result...

Successfully verified contract NFTDescriptor on the block explorer.
https://goerli-optimism.etherscan.io/address/0xE20EeF1a43ACD70d3C20Ea7a6ec497B8698B1618#code
✅ Done deploying contract.
NFTDescriptorLibrary deployed at: 0xE20EeF1a43ACD70d3C20Ea7a6ec497B8698B1618
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
Error verifying contract at address 0x58cF665652C7166f462fD248A9dEd2B4A9937BAA: DeployedBytecodeMismatchError: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

Possible causes are:
  - The artifact for that contract is outdated or missing. You can try compiling the project again with the --force flag before re-running the verification.
  - The contract's code changed after the deployment was executed. Sometimes this happens by changes in seemingly unrelated contracts.
  - The solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.)
  - The given address is wrong.
  - The selected network (optimismGoerli) is wrong.
✅ Done deploying contract.
NFTPositionDescriptor deployed at: 0x58cF665652C7166f462fD248A9dEd2B4A9937BAA
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
The contract 0xf568C3C23d2B94E154987D467fC1cb1aaB3dAe5A has already been verified.
https://goerli-optimism.etherscan.io/address/0xf568C3C23d2B94E154987D467fC1cb1aaB3dAe5A#code
✅ Done deploying contract.
NFTPositionManager deployed at: 0xf568C3C23d2B94E154987D467fC1cb1aaB3dAe5A
------------
Deploying contract...
🚀 Contract deployed! Waiting for 5 confirmations...
The contract 0xf3A030Df942cd5Ac7a7674E5E291a18e15a4CA92 has already been verified.
https://goerli-optimism.etherscan.io/address/0xf3A030Df942cd5Ac7a7674E5E291a18e15a4CA92#code
✅ Done deploying contract.

hardhat.config.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@0xpApaSmURf 0xpApaSmURf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@ra-phael ra-phael merged commit 737fd64 into main Jul 3, 2023
@ra-phael ra-phael deleted the feat/dadz-287-etherscan-verification branch July 3, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants