🔥Forge
Inspect
forge inspect <CONTRACT_NAME> methodsforge inspect <CONTRACT_NAME> storageLayoutforge snapshotContract Verification
If automatic contract verification fails during deployment it can be performed manually using forge.
forge verify-contract <CONTRACT_ADDRESS> ./src/<CONTRACT>.sol:<CONTRACT_NAME> --chain-id <CHAIN_ID> --watch --etherscan-api-key <ETHERSCAN_API_KEY>--watchleaves the terminal waiting for a status confirmation reply.If constructor arguments are required they can be encoded using
caste.g for a constructor requiring a single address:
cast abi-encode "constructor(address)" <ADDRESS_TO_PASS_INTO_CONSTRUCTOR>Then use that
castoutput to add--constructor-argsto the end of theforge verify-contractcommand.
Last updated