Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Re-exports ResultInspector
Re-exports nativizeAccessList
Re-exports unsafeNativize
Re-exports unsafeNativizeVariables

Functions

  • containsDeliberateReadError(result: Result): boolean
  • This function is similar to unsafeNativize, but is intended to be safe, and also allows for different output formats. The only currently supported format is "ethers", which is intended to match the way that Truffle Contract currently returns values (based on the Ethers decoder). As such, it only handles ABI types, and in addition does not handle the types fixed, ufixed, or function. Note that in these cases it returns undefined rather than throwing, as we want this function to be used in contexts where it had better not throw. It also does not handle circularities, for similar reasons.

    To handle numeric types, this function takes an optional numberFormatter option that tells it how to handle numbers; this function should take a BigInt as input. By default, this function will be the identity, and so numbers will be represented as BigInts.

    Note that this function begins by calling abify, so out-of-range enums (that aren't so out-of-range as to be padding errors) will not return undefined. Out-of-range booleans similarly will return true rather than undefined. However, other range errors may return undefined; this may technically be a slight incompatibility with existing behavior, but should not be relevant except in quite unusual cases.

    In order to match the behavior for tuples, tuples will be transformed into arrays, but named entries will additionally be keyed by name. Moreover, indexed variables of reference type will be nativized to an undecoded hex string.

    Parameters

    Returns any

  • This function is similar to [[compatibleNativize]], but takes a LogDecoding, and puts the results in an object. Note that this does not return the entire event info, but just the args for the event.

    Parameters

    Returns any

Generated using TypeDoc