AbiFunctionFragment class

Represents a function fragment in ABI, providing methods for working with function calls.

Implemented types
Implementers

Constructors

AbiFunctionFragment({required String name, StateMutability? stateMutability, List<AbiParameter> inputs = const [], List<AbiParameter> outputs = const [], bool? constant, bool? payable})
Creates an AbiFunctionFragment instance.
AbiFunctionFragment.fromJson(Map<String, dynamic> json, bool tronTypes)
Creates an instance of AbiFunctionFragment from JSON representation.
factory

Properties

constant bool?
Indicates whether the function is constant.
final
functionName String
Gets the encoded function name.
no setter
hashCode int
The hash code for this object.
no setterinherited
inputs List<AbiParameter>
The list of input parameters for the fragment.
final
name String
The name of the function
final
outputs List<AbiParameter>
The list of output parameters for the function.
final
payable bool?
Indicates whether the function is payable.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selector List<int>
The function selector.
no setter
signature List<int>
The signature hash of the function.
latefinal
stateMutability StateMutability?
The state mutability of the function.
final
type FragmentTypes
The type of the fragment.
final

Methods

decodeInput(List<int> encodedParams) List
Decodes the input parameters of the function from the encoded input bytes.
decodeOutput(List<int> encodedOutput) List
Decodes the output of the function from the encoded output bytes.
decodeOutputHex(String encodedOutput) List
Decodes the output of the function from the encoded hexadecimal string output.
encode(List params, [bool withSelector = true]) List<int>
Encodes the function with the provided parameters.
encodeHex(List params, [bool withSelector = true]) String
Encodes the function as a hexadecimal string with the provided parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited