verify

Verifies any contract

Example

const contractAddress = "";
const explorerAPIUrl = ""; // e.g. https://api.etherscan.io/api
const explorerAPIKey = ""; // Generate API key on the explorer
const chainId = 1; // Change according to the network
await sdk.verifier.verify(
contractAddress,
chainId,
explorerAPIUrl,
explorerAPIKey,
storage, // this could be used from the SDK instance, e.g. sdk.storage
);
function verify(
contractAddress: string,
chainId: number,
explorerAPIUrl: string,
explorerAPIKey: string,
type?: ExplorerType,
encodedConstructorArgs?: string,
): Promise<string | Array<string>>;

Parameters

Address of the contract to verify

Type

let contractAddress: string;

Chain ID of the network

Type

let chainId: number;

Explorer API URL

Type

let explorerAPIUrl: string;

Explorer API Key

Type

let explorerAPIKey: string;

Storage instance

Type

Type

let type: ExplorerType;

Type

let encodedConstructorArgs: string;

Returns

let returnType: Promise<string | Array<string>>;