Smart Contract Verification
A quick guide on how to verify your contracts on Harmony.
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

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 equalOn Success case - you contract will verify and you will see all contract details on contract explorer page

Example for Harmony Remix:
1 - click ABI to copy it

3 - paste your constuctor arguments and click Copy

4 - paste encoded constructor arguments to verify form field

Last modified 1yr ago