Type Alias ContractResult

ContractResult: {
    abi: any[];
    compilerVersion: string;
    evmVersion: string;
    getSources?: (() => Promise<ContractSources>);
    loader?: ABILoader;
    loaderResult?: EtherscanContractResult | SourcifyContractMetadata | any;
    name: string | null;
    ok: boolean;
    runs: number;
}

Type declaration

  • abi: any[]
  • compilerVersion: string
  • evmVersion: string
  • OptionalgetSources?: (() => Promise<ContractSources>)

    getSources returns the imports -> source code mapping for the contract, if available.

    Caveats:

    • Not all loaders support this, so the property could be undefined.
    • This call could trigger additional fetch requests, depending on the loader.
  • Optionalloader?: ABILoader

    Loader that provided the result. We can make assumptions about the verified status if a verifying loader returned the result.

  • Optional ExperimentalloaderResult?: EtherscanContractResult | SourcifyContractMetadata | any

    Contains the full result from the loader provder. There are no stability guarantees for the data layout of the result, so it's marked as experimental.

    Any useful attributes that can be normalized across loaders should be uplifted into ContractResult. Please open an issue if you end up relying on rawResponse for properties that should be uplifted.

  • name: string | null
  • ok: boolean
  • runs: number