Skip to main content

Contract Verification

Verify contracts on any EVM.

verifyThirdwebContract

Verify one of thirdwebs prebuilt contracts.

const explorerAPIUrl = ""; // e.g. https://api.etherscan.io/api
const explorerAPIKey = ""; // Generate API key on the explorer

await sdk.verifier.verifyThirdwebContract(
"DropERC721", // Name of the prebuilt contract
explorerAPIUrl,
explorerAPIKey,
);
Configuration

contractName

The name of the contract to verify, for e.g. DropERC721, Marketplace, etc.

Must be one of the following string values:

"DropERC721" |
"DropERC1155" |
"DropERC20" |
"SignatureDrop" |
"Marketplace" |
"MarketplaceV3" |
"Multiwrap" |
"Pack" |
"Split" |
"TokenERC721" |
"TokenERC1155" |
"TokenERC20" |
"VoteERC20" |
"AirdropERC721" |
"AirdropERC1155" |
"AirdropERC20" |
"NFTStake" |
"EditionStake" |
"TokenStake";

explorerAPIUrl

The API endpoint to which the verification request will be sent. For e.g., https://api.etherscan.io/api.

Must be a string.

explorerAPIKey

The API key can be generated from the explorer. See etherscan docs here.

Must be a string.

verifyContract

Verifies any contract deployed via thirdweb on a given chain. Can be used for custom contracts.

const contractAddress = "";
const explorerAPIUrl = ""; // e.g. https://api.etherscan.io/api
const explorerAPIKey = ""; // Generate API key on the explorer

await sdk.verifier.verifyContract(
contractAddress,
explorerAPIUrl,
explorerAPIKey,
);
Configuration

contractAddress

The address of the contract to verify.

Must be a string.

explorerAPIUrl

The API endpoint to which the verification request will be sent. For e.g., https://api.etherscan.io/api.

Must be a string.

explorerAPIKey

The API key can be generated from the explorer. See etherscan docs here.

Must be a string.