You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, verifying the plexus eco-system contracts requires us manually do so in etherscan which is not ideal, especially considering the speed at which we want to push out new contracts and functionality.
Solution
An easy solution to this, is to integrate the etherscan api and use to automatically publish and verify any new contracts we deploy as follows.
Create a new script called verify.js in the scripts folder. This script will be called by the current deploy.js script after it has deployed all the contracts to mainnet.
The script will work as follows.
Read the etherscan api key from a .env file
Remove all the imports and flatten the solidity files using the solidity-flattener tool.
Push all the contracts into etherscan and verify them using the api as shown here
Acceptance Criteria
After adding my mnemonic phrase and etherscan api key to the .env file, I should be able to deploy and verify all the deployed contracts in etherscan in 1 clean sweep using the yarn deploy command.
ETA
3 days.
The text was updated successfully, but these errors were encountered:
@terminator0x
I've got a problem with solidity-flattener.
It has a bug not working with solidity files included OpenZeppelin
Here is the open issue addresses about that. poanetwork/solidity-flattener#49
And I also tried it with truffle-flattener.
It also has some issues, I think that it's related to new features came up with solidity 0.8.
For example, the tool cannot parse "unchecked block" syntax of solidity which was introduced from Solidity 0.8 NomicFoundation/truffle-flattener#77
I keep investigation and trying to find a new tool for flattening solidity files.
Do you have any idea for alternative tools for solidity-flattener or truffle-flattener?
terminator0x
changed the title
Automate Etherscan Contract Verication
Automate Etherscan Contract Verification
Jun 28, 2021
Problem
Right now, verifying the plexus eco-system contracts requires us manually do so in etherscan which is not ideal, especially considering the speed at which we want to push out new contracts and functionality.
Solution
An easy solution to this, is to integrate the etherscan api and use to automatically publish and verify any new contracts we deploy as follows.
verify.js
in the scripts folder. This script will be called by the currentdeploy.js
script after it has deployed all the contracts to mainnet..env
fileAcceptance Criteria
After adding my
mnemonic phrase
andetherscan api key
to the.env
file, I should be able to deploy and verify all the deployed contracts in etherscan in 1 clean sweep using theyarn deploy
command.ETA
3 days.
The text was updated successfully, but these errors were encountered: