AbiConstructor.decode
ABI-decodes the provided constructor input (inputs
).
Imports
Named
import { AbiConstructor } from 'ox'
Examples
import { AbiConstructor } from 'ox'
const constructor = AbiConstructor.from('constructor(address, uint256)')
const bytecode = '0x...'
const data = AbiConstructor.encode(constructor, {
bytecode,
args: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045', 123n],
})
const decoded = AbiConstructor.decode(constructor, {
bytecode,
data,
})
Definition
function decode(
abiConstructor: AbiConstructor.AbiConstructor,
options: decode.Options,
): readonly unknown[] | undefined
Source: src/core/AbiConstructor.ts
Parameters
abiConstructor
The ABI Constructor to decode.
options
- Type:
decode.Options
Decoding options.
Return Type
The decoded constructor inputs.
readonly unknown[] | undefined