How to verify smart contract in Etherscan
Smart contract verification gives everyone the opportunity to perform an independent code audit of your contract and also provides public access to the JSON interface (ABI) of the contract in the Etherscan service.
ABI (Application Binary Interface) is an interface that defines the list of contract functions and arguments in JSON format. Contract methods may only be invoked by someone with knowledge of ABI.
The section that contains the function of your smart contract (accessible from the Dashboard) provides an Etherscan verification info link; clicking the link displays the information for verification.
You're going to need these details later. After you finish deployment using Smartz, your smart contract can be viewed in Etherscan. To view the general information about the contract, go to the address from the Dashboard. Here we use the example of ERC20 in a Rinkeby test network.
You will see the contract's bytecode on the Code tab.
Follow the Verify And Publish link to start verification of the contract.
The Verify Contract Code section is displayed.
In the Contract Name field enter the name that depends on the type of smart contract you created. You can view the contract name for Etherscan any time in the source code (in the last declaration of the contract class) or on the Etherscan Verification Info tab on the contract's dashboard.
Select the compiler version in the Compiler field. The version number is always displayed in the Etherscan Verification Info tab or in the first line of the contract code during the deployment process:
Select Yes in the Optimization field.
In the Enter the Solidity Contract Code field paste the smart contract code (obtained during deployment).
Then tick the checkbox in the captcha box (bottom of the page) and click the Verify And Publish button.
You will be redirected to the ByteCode And ABI section where a message confirms the successful generation of the bytecode and ABI for your smart contract.
Click the link next to the green-highlighted Successfully generated ByteCode and ABI for Contract Address message.
Contract verification is complete. You will be redirected to the section where your contract's code (Contract Source Code) and the ABI interface (Contract ABI) are displayed on the Code tab.
The Read Contract tab contains an interface for smart contract read functions. The Write Contract tab displays the interface for recording data to the contract.