🔥Forge
Inspect
If you see the error EvmError: NotActivated
when trying to deploy contracts using forge
it may be that you need to explicitly set the --evm-version
when running the forge command.
The evm version can also be set in the foundry.toml
file:
Contract Verification
If automatic contract verification fails during deployment it can be performed manually using forge.
--watch
leaves the terminal waiting for a status confirmation reply.If constructor arguments are required they can be encoded using
cast
e.g for a constructor requiring a single address:
Then use that
cast
output to add--constructor-args
to the end of theforge verify-contract
command.
For Ethereum L1 or L1 testnets use the Etherscan API key: https://etherscan.io/myapikey
For L2s (e.g. Base) or L2 testnets use a Basescan API key (but still call it --etherscan-api-key
in the command): https://basescan.org/myapikey
Last updated