Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

Properties

contractEncoder: ContractEncoder
toAddress: string

Methods

  • encodeTransaction(abisOrNameOrSig: string | FunctionEntry[], inputs: unknown[], options?: ResolveOptions): Promise<TxAndAbi>
  • 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>

  • encodeTxNoResolution(abi: FunctionEntry | ConstructorEntry, inputs: unknown[], options?: ResolveOptions): Promise<Options>
  • 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>

  • wrap(dataType: Type, input: unknown): Promise<Value>
  • wrapForTransaction(abi: FunctionEntry | ConstructorEntry, inputs: unknown[], options?: ResolveOptions): 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