Class BaseContract

Represents a simple wrapper around an ethers.Contract that adds some additional capabilities such as easy multicall structures a retryCall method for view operations, allows for connecting the contract to a different signerOrProvider without redeclaring, etc.

Hierarchy

Constructors

Accessors

  • get address(): string
  • Returns the contract address

    Returns string

  • get contract(): Contract
  • Returns the underlying contract interface

    Returns Contract

Methods

  • Returns an interface allowing for us with the multicall method of a provider

    Parameters

    • name: string
    • Rest ...params: any[]

    Returns ContractCall

  • Protected

    Automatically keeps trying the call unless we get a revert exception

    Type Parameters

    • T

    Parameters

    • func: ((...args) => Promise<T>)
        • (...args): Promise<T>
        • Parameters

          • Rest ...args: any[]

          Returns Promise<T>

    • Rest ...params: any[]

    Returns Promise<T>

  • Returns whether the specified interface is supported by the contract

    Parameters

    • interfaceId: string

    Returns Promise<boolean>