Methods
decode()
external
functions.
Parameters
Parameter | Type | Description |
---|---|---|
types | readonly (string | ParamType )[] | Array of parameter types. |
data | BytesLike | The ABI data to decode. |
loose ? | boolean | Enable loose decoding. Default is false |
Returns
Result
The decoded values.
Source
abi/abi-coder.ts:223encode()
Parameters
Parameter | Type | Description |
---|---|---|
types | readonly (string | ParamType )[] | Array of parameter types. |
values | readonly any [] | Array of values to encode. |
Returns
string
The encoded data in hexadecimal format.
Source
abi/abi-coder.ts:201getDefaultValue()
uint
is by default 0
and bool
is by default
false
.
Parameters
Parameter | Type | Description |
---|---|---|
types | readonly (string | ParamType )[] | Array of parameter types to get default values for. |
Returns
Result
The default values corresponding to the given types.
Source
abi/abi-coder.ts:188defaultAbiCoder()
Returns
AbiCoder
The default ABI coder instance.
Source
abi/abi-coder.ts:252getBuiltinCallException()
Parameters
Parameter | Type | Description |
---|---|---|
action | CallExceptionAction | The action that triggered the exception. |
tx | object | The transaction information. |
tx.data ? | string | - |
tx.from ? | null | string | - |
tx.to ? | null | string | - |
data | null | BytesLike | The data associated with the call exception. |
Returns
CallExceptionError
The corresponding call exception error.