Verify contract
In forge, contracts can be verified at the time of the deployment (e.g. usingforge script
), or later, if the contracts are already deployed (e.g. using forge verify-contract
).
Tips:
-
Specify the
—verifier=blockscout
flag to use the Blockscout verification provider. API key for Blockscout verification is optional. -
Specify the
--verifier-url=<blockscout_homepage_explorer_url>/api/
flag for connecting to a specific Blockscout instance (e.g.,--verifier-url=https://eth-sepolia.blockscout.com/api/
). - You can specify most configuration options (e.g., evm version, disabling optimizations) via the usual Forge configuration (see https://github.com/foundry-rs/foundry/blob/master/config/README.md).