Verifica del Contratto
Remix has a plugin for contract verification. With this plugin, you can verify your contracts on Sourcify, Etherscan, Blockscout and Routescan.
The plugin is called: CONTRACT VERIFICATION.
È possibile accedervi dal Gestore dei Plugin.
The plugin has 4 pages, the Verify page, the Receipts page, the Lookup page, and the Settings page.
Verify page
This is the home view of the plugin where you can verify your contracts.
You can select which verification services you want to use. By default, all that have a valid configuration are selected. On Ethereum Mainnet, this will be all but Etherscan. In order to enable Etherscan, you need to input an API key in the Settings page.
I prerequisiti per la verifica sono:
L’indirizzo di un contratto distribuito su una rete pubblica
Lo stesso contratto compilato in Remix
I parametri del costruttore uguali a quelli utilizzati durante la distribuzione (se necessari)
Pagina delle ricevute
Le ricevute di verifica si trovano nella pagina delle ricevute.
You can hover over the status symbols to get more information about failed verifications.
Lookup page
The Lookup page is used to check if a contract is verified on the verification services, and to download its source code into the file editor.
Settings page
In the settings page, you can configure custom API URLs for the verification services, and add your own API keys. For Etherscan, adding an API key is mandatory.
The settings are always stored per chain, meaning that if you change the settings for a chain, it will not affect other chains. If you want to verify or lookup contracts on Etherscan’s instances on multiple chains (Explorer as a Service), you need to add an API key for each chain separately.
Verifying with constructor arguments
Quando un contratto ha gli argomenti nel costruttore, viene mostrata una casella di testo per inserire gli stessi input del costruttore del contratto distribuito.
Verifica di un contratto proxy
If your contract is behind a proxy, you can verify also the proxy with the implementation contract. You just need to check the «The deployed contract is behind a proxy» checkbox, and provide the address of the proxy contract.
The plugin will first verify the implementation contract, and then verify the proxy contract.
Proxies can only be verified on Etherscan and Blockscout.