The ContractInstanceEncoder class. Can encode transactions, resolve overloads, and wrap values. Differs from the [[ContractEncoder]] only in that it carries a to address for non-constructor transactions. See below for a method listing.

Hierarchy

  • ContractInstanceEncoder

Constructors

Properties

contractEncoder: ContractEncoder
toAddress: string

Methods

  • This method is asynchronous.

    This method functions identically to [[ContractEncoder.encodeCreation]]. The particular contract instance is ignored, only its class is used.

    Parameters

    Returns Promise<Options>

  • This method is asynchronous.

    This method functions identically to [[ContractEncoder.encodeTransaction]], except that the to option is automatically set to this contract instance's address. If an explicit to address is passed as a transaction option, it will be recognized but ignored.

    Parameters

    • abisOrNameOrSig: string | FunctionEntry[]
    • inputs: unknown[]
    • options: ResolveOptions = {}

    Returns Promise<TxAndAbi>

  • This method is asynchronous.

    This method functions identically to [[ContractEncoder.encodeTxNoResolution]], except that, when preparing a function transaction, the to option is automatically set to this contract instance's address. If an explicit to address is passed as a transaction option, it will be recognized but ignored.

    Parameters

    • abi: FunctionEntry | ConstructorEntry
    • inputs: unknown[]
    • options: ResolveOptions = {}

    Returns Promise<Options>

  • This method is asynchronous.

    This method functions identically to [[ContractEncoder.resolveAndWrap]], except that the to option is automatically set to this contract instance's address. If an explicit to address is passed as a transaction option, it will be recognized but ignored.

    Parameters

    • abis: string | FunctionEntry[]
    • inputs: unknown[]
    • options: ResolveOptions = {}

    Returns Promise<Resolution>

  • This method is asynchronous.

    This method functions identically to [[ContractEncoder.wrapForTransaction]], except that, when preparing a function transaction, the to option is automatically set to this contract instance's address. If an explicit to address is passed as a transaction option, it will be recognized but ignored.

    Parameters

    • abi: FunctionEntry | ConstructorEntry
    • inputs: unknown[]
    • options: ResolveOptions = {}

    Returns Promise<Resolution>

Generated using TypeDoc