ContractVerifier
Handles verification of new contracts on any EVM
class ContractVerifier extends RPCConnectionHandler {}
function constructor( options: | undefined | { clientId?: string; gasless?: | { experimentalChainlessSupport?: boolean; openzeppelin: { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; relayerForwarderAddress?: string; relayerUrl: string; useEOAForwarder?: boolean; }; } | { biconomy: { apiId: string; apiKey: string; deadlineSeconds?: number; }; } | { engine: { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; relayerForwarderAddress?: string; relayerUrl: string; }; experimentalChainlessSupport?: boolean; }; gasSettings?: { maxPriceInGwei?: number; speed?: "standard" | "fast" | "fastest"; }; gatewayUrls?: Array<string>; readonlySettings?: { chainId?: number; rpcUrl: string }; rpcBatchSettings?: { sizeLimit?: number; timeLimit?: number }; secretKey?: string; supportedChains?: Array<{ chainId: number; nativeCurrency: { decimals: number; name: string; symbol: string; }; rpc: Array<string>; slug: string; }>; },
let options: | undefined | { clientId?: string; gasless?: | { experimentalChainlessSupport?: boolean; openzeppelin: { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; relayerForwarderAddress?: string; relayerUrl: string; useEOAForwarder?: boolean; }; } | { biconomy: { apiId: string; apiKey: string; deadlineSeconds?: number; }; } | { engine: { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; relayerForwarderAddress?: string; relayerUrl: string; }; experimentalChainlessSupport?: boolean; }; gasSettings?: { maxPriceInGwei?: number; speed?: "standard" | "fast" | "fastest"; }; gatewayUrls?: Array<string>; readonlySettings?: { chainId?: number; rpcUrl: string }; rpcBatchSettings?: { sizeLimit?: number; timeLimit?: number }; secretKey?: string; supportedChains?: Array<{ chainId: number; nativeCurrency: { decimals: number; name: string; symbol: string; }; rpc: Array<string>; slug: string; }>; };
The function to call whenever the network changes, such as when the users connects their wallet, disconnects their wallet, the connected chain changes, etc.
Verifies any contract
// Note: If verifying on a network different from the SDK instance's network,// update the verifier's chain/network as below://// sdk.verifier.updateSignerOrProvider(chainId); const contractAddress = "";const explorerAPIUrl = ""; // e.g. https://api.etherscan.io/apiconst explorerAPIKey = ""; // Generate API key on the explorer await sdk.verifier.verifyContract( contractAddress, explorerAPIUrl, explorerAPIKey,);
function verifyContract( contractAddress: string, explorerAPIUrl: string, explorerAPIKey: string, constructorArgs?: ConstructorParamMap,): Promise<void>;
Verifies a Thirdweb contract
// Note: If verifying on a network different from the SDK instance's network,// update the verifier's chain/network as below://// sdk.verifier.updateSignerOrProvider(chainId); const explorerAPIUrl = ""; // e.g. https://api.etherscan.io/apiconst explorerAPIKey = ""; // Generate API key on the explorer await sdk.verifier.verifyThirdwebContract( "DropERC721", explorerAPIUrl, explorerAPIKey,);
function verifyThirdwebContract( contractName: string, explorerAPIUrl: string, explorerAPIKey: string, contractVersion: string, constructorArgs?: ConstructorParamMap,): Promise<void>;
Inherited from
RPCConnectionHandler.getProvider
Explicitly get the active provider.
function getProvider(): Provider;
Inherited from
RPCConnectionHandler.getSigner
Explicitly get the active signer.
function getSigner(): undefined | Signer;
Inherited from
RPCConnectionHandler.getSignerOrProvider
function getSignerOrProvider(): Signer | Provider;
Inherited from
RPCConnectionHandler.isReadOnly
function isReadOnly(): boolean;
Inherited from
RPCConnectionHandler.removeListener
Remove the listeners of a given event.
function removeListener( event: T, fn?: (...args: Array<any>) => void, context?: any, once?: boolean,): this;
let options: { clientId?: string; gasless?: | { experimentalChainlessSupport: boolean; openzeppelin: { domainName: string; domainSeparatorVersion: string; domainVersion: string; relayerForwarderAddress?: string; relayerUrl: string; useEOAForwarder: boolean; }; } | { biconomy: { apiId: string; apiKey: string; deadlineSeconds: number; }; } | { engine: { domainName: string; domainSeparatorVersion: string; domainVersion: string; relayerForwarderAddress?: string; relayerUrl: string; }; experimentalChainlessSupport: boolean; }; gasSettings: { maxPriceInGwei: number; speed: "standard" | "fast" | "fastest"; }; gatewayUrls?: Array<string>; readonlySettings?: { chainId?: number; rpcUrl: string }; rpcBatchSettings?: { sizeLimit: number; timeLimit: number }; secretKey?: string; supportedChains: Array<{ chainId: number; nativeCurrency: { decimals: number; name: string; symbol: string; }; rpc: Array<string>; slug: string; }>;};
type clientId = string;
type gasless = | { experimentalChainlessSupport: boolean; openzeppelin: { domainName: string; domainSeparatorVersion: string; domainVersion: string; relayerForwarderAddress?: string; relayerUrl: string; useEOAForwarder: boolean; }; } | { biconomy: { apiId: string; apiKey: string; deadlineSeconds: number; }; } | { engine: { domainName: string; domainSeparatorVersion: string; domainVersion: string; relayerForwarderAddress?: string; relayerUrl: string; }; experimentalChainlessSupport: boolean; };
type gasSettings = { maxPriceInGwei: number; speed: "standard" | "fast" | "fastest";};
type gatewayUrls = Array<string>;
type readonlySettings = { chainId?: number; rpcUrl: string };
type rpcBatchSettings = { sizeLimit: number; timeLimit: number };
type secretKey = string;
type supportedChains = Array<{ chainId: number; nativeCurrency: { decimals: number; name: string; symbol: string }; rpc: Array<string>; slug: string;}>;
let prefixed: string | boolean;