Throws an exception because the ABI cannot be represented as a big integer.
The BigInt representation of the ABI.
The ABI cannot be represented as a bigint. VeChainDataModel#bi
Encodes the values according to the specified ABI types when creating the ABI instance.
The ABI-encoded bytes representing the given values.
Throws an exception because the ABI cannot be represented as a number.
The number representation of the ABI.
The mnemonic cannot be represented as a number. VeChainDataModel#n
Compares the current ABI instance with another ABI instance.
The ABI to compare with.
A non-zero number if the current ABI is different to the other ABI or zero if they are equal. VeChainDataModel#compareTo
Decodes event log data based on the provided event name, and data/topics to decode.
The name of the event to be decoded.
An object containing the data and topics to be decoded.
The decoded data of the event log.
Decode the function data of an encoded function
The name of the function defined in the ABI.
The encoded function data.
an array of the decoded function data
Decodes the output from a contract function using the specified ABI and function name. It takes the encoded function output and attempts to decode it according to the ABI definition.
The name of the function in the contract to decode the output for.
The encoded output data from the contract function.
Encodes event log data based on the provided event name, and data to encode.
The name of the event to be encoded.
An array of data to be encoded in the event log.
An object containing the encoded data and topics.
Encode function data that can be used to send a transaction.
The name of the function defined in the ABI.
Optional
functionData: unknown[]The data to pass to the function.
The encoded data in hexadecimal that can be used to send a transaction.
Returns the event with the given name.
The event's name.
The event with the given name.
It gets the first decoded value from the ABI.
The first decoded value from the ABI.
Returns the function with the given name.
The function's name.
The function with the given name.
Checks if the current ABI object is equal to the given ABI object.
The ABI object to compare with.
True if the objects are equal, false otherwise. VeChainDataModel#isEqual
Decodes a VeChain log based on the ABI definition.
This method takes raw data
and topics
from a VeChain log and attempts
to decode them using the contract's ABI definition. If the decoding is successful,
it returns a log object representing the decoded information. If the decoding fails,
it throws a custom error with detailed information.
Static
ofStatic
ofCreates an ABIContract instance from a viem ABI.
representation of the contract.
New instance of ABIContract.
Static
ofDecodes the ABI values from the given ABI types and encoded data.
The list of ABI types representing the types of the values to decode.
The encoded data to decode.
An ABI instance with the decoded values.
Represents an ABI (Application Binary Interface).