When sending values to or receiving values from a Contract, the data is generally encoded using the ABI standard.
The AbiCoder provides a utility to encode values to ABI data and decode values from ABI data.
Most of the time, developers should favour the Contract class, which further abstracts a lot of the finer details of ABI data.
Returns the shared singleton instance of a default AbiCoder.
Returns an ethers-compatible CallExceptionError Error for the given result data for the CallExceptionAction action against the Transaction tx.
A fragment is a single item from an ABI, which may represent any of:
- Functions
- Events
- Constructors
- Custom Errors
- Fallback or Receive functions
The format to serialize the output as.
"sighash" - the bare formatting, used to compute the selector or topic hash; this format cannot be reversed (as it discards indexed) so cannot by used to export an Interface.
"minimal" - Human-Readable ABI with minimal spacing and without names, so it is compact, but will result in Result objects that cannot be accessed by name.
"full" - Full Human-Readable ABI, with readable spacing and names intact; this is generally the recommended format.
"json" - The JSON ABI format.
The type of a Fragment.
When walking asynchronously a ParamType, this is called on each component.
Returns true if value is a ConstructorFragment.
Returns true if value is an ErrorFragment.
Returns true if value is an EventFragment.
Returns true if value is a FunctionFragment.
Returns true if value is a StructFragment.
A fragment for a method, event or error in a JSON ABI format.
A Type description in a JSON ABI format.
Each input and output of a Fragment is an Array of ParamType.
Returns true if this is an Array type.
This provides a type gaurd ensuring that arrayChildren and arrayLength are non-null.
Returns true if this is an Indexable type.
This provides a type gaurd ensuring that indexed is non-null.
Returns true if this is a Tuple type.
This provides a type gaurd ensuring that components is non-null.