Smart Contract Verification
Last updated
Was this helpful?
A quick guide on how to verify your contracts on Harmony.
https://explorer.harmony.one/verifycontract
Right now, we support verification only for one single solidity file - therefore, before deployment and verification, you will need to flatten all solidity sources to one file.
To flatten your solidity files we recommended to use https://www.npmjs.com/package/truffle-flattener
npm install truffle-flattener -g
truffle-flattener <solidity-files>Or you can use any other flattener lib
To more easy verification we recommend to deploy contract with Harmony Remix https://docs.harmony.one/home/developers/deploying-on-harmony/using-remix/deployment-using-remix
You can verify your contract here https://explorer.harmony.one/verifycontract

Important to use correct params (the same like on deploy):
Contract address
Contract name
Compiler version
Optimizer
Chain Type (mainnet or testnet)
Sources
Imported libs
Then click Submit button
If all parameters are correct - you should to see Success message, or Error if bytecodes don't equal
On Success case - you contract will verify and you will see all contract details on contract explorer page

https://docs.soliditylang.org/en/develop/abi-spec.html
To get ABI-encoded constructor arguments you can ue this service: https://abi.hashex.org
Example for Harmony Remix:
1 - click ABI to copy it 
2 - paste ABI to https://abi.hashex.org form and click parse 
3 - paste your constuctor arguments and click Copy 
4 - paste encoded constructor arguments to verify form field 
Last updated
Was this helpful?
Was this helpful?