How to enable automatic contract verification feature in bridge contracts deployment script
The instructions below show how to configure the variables to enable the automatic contract verification in block explorers when using the bridge contracts deployment script. This feature only supports Blockscout and Etherscan block explorers.
In the example we are going to deploy a bridge between Sokol and Kovan testnets, and we are going to automatically verify the contracts on Blockscout for the contracts deployed in Sokol and Etherscan for the contracts deployed in Kovan.
It is worth to mention that the home and foreign side of the bridge are not limited to a specific explorer and they can be used in any of the sides. For example, in this case, we could also use the Kovan Blockscout version to verify the contracts in Kovan.
While Blockscout does not require authentication, Etherscan requires to create an user and an API-KEY.
5. Add an optional name to the API-KEY and click on the button Continue
Add a name and click on continue
6. The created API-KEY will be displayed in the list.
List of API-KEYs
Variable configuration for deployment script
At the moment of setting the variable for the configuration of the bridge deployment the following should be completed:
HOME_EXPLORER_URL: The api url of Blockscout explorer to verify all the deployed contracts in Home network.
HOME_EXPLORER_API_KEY: The api key of the explorer api, if required, used to verify all the deployed contracts in Home network. In this case it is not needed because Blockscout does not require an api key.
FOREIGN_EXPLORER_URL: The api url of Etherscan explorer to verify all the deployed contracts in Foreign network.
FOREIGN_EXPLORER_API_KEY: The api key of Etherscan explorer api, used to verify all the deployed contracts in Foreign network that we generated in the previous step.