Verifying contracts
Verifying a smart contract provides a link to its source code and attests that the source code matches the deployed bytecode.
Follow these steps to verify a contract on the Etherlink block explorer:
-
Find the deployed contract on https://explorer.etherlink.com/ or https://testnet.explorer.etherlink.com/.
-
On the Contract tab, click Verify & publish.
-
In the New smart contract verification window, select the license and verification method. In most cases, use the Solidity (Single file) verification method.
-
Under "Contract verification via Solidity (flattened source code)", in the Compiler field, select the same compiler version that you used to compile the contract.
-
In the EVM version field, select the same EVM version that you used to compile the contract.
-
If your compiler optimized the contract source code, select the Optimization enabled check box. This setting must match your compiler's setting.
-
Paste the source code of the contract in the Contract code field.
The page looks like this:
- Click Verify & publish.
Now the block explorer shows the source code and ABI of the contract on the Contract tab.