Class Contract

Represents an extension to ethers.Contract that allows us to easily dump out the contract calls so that they can be used within a multicall execution pattern

Hierarchy

  • Contract
    • Contract

Implements

Constructors

  • Creates a new instance of the object

    Parameters

    • addressOrName: string
    • contractInterface: ContractInterface
    • Optional signerOrProvider: Provider | Signer | MulticallProvider

    Returns Contract

Properties

_callChain: ContractCall[] = []
multicallProvider?: MulticallProvider

Accessors

  • get connected(): Provider | Signer
  • Returns the connected provider/signer

    Returns Provider | Signer

  • get isSignerConnected(): boolean
  • Returns if the contract is connected to a signer

    Returns boolean

Methods

  • Creates a chainable list of contract calls

    Parameters

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

    Returns Contract

  • Executes the chainable list of contract calls

    Type Parameters

    • Type extends any[] = any[]

    Parameters

    Returns Promise<Type>

  • 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>