The AbiCoder is a low-level class responsible for encoding JavaScript values into binary data and decoding binary data into JavaScript values.

Constructors

Properties

#private: any

Methods

  • Decode the ABI %%data%% as the %%types%% into values.

    If %%loose%% decoding is enabled, then strict padding is not enforced. Some older versions of Solidity incorrectly padded event data emitted from external functions.

    Parameters

    • types: readonly (string | ParamType)[]
    • data: BytesLike
    • Optional loose: boolean

    Returns Result

  • Encode the %%values%% as the %%types%% into ABI data.

    Parameters

    • types: readonly (string | ParamType)[]
    • values: readonly any[]

    Returns string

    DataHexstring

  • Get the default values for the given %%types%%.

    For example, a uint is by default 0 and bool is by default false.

    Parameters

    Returns Result

  • Parameters

    • value: number

    Returns void

  • Returns the shared singleton instance of a default [[AbiCoder]].

    On the first call, the instance is created internally.

    Returns AbiCoder

Generated using TypeDoc