• Verifies any contract

    Parameters

    • contractAddress: string
    • chainId: number
    • explorerAPIUrl: string
    • explorerAPIKey: string
    • storage: ThirdwebStorage<IpfsUploadBatchOptions>
    • Optional encodedConstructorArgs: string

    Returns Promise<string | string[]>

    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
    );

Generated using TypeDoc