ContractABI class
Represents the ABI (Application Binary Interface) of a smart contract.
This class provides methods to create a ContractABI instance from JSON, as well as access to different fragments of the contract ABI, such as functions, events, fallbacks, constructors, and errors.
Constructors
-
ContractABI.fromJson(List<
Map< abi, {bool isTron = false})String, dynamic> > -
Factory method to create a ContractABI instance from JSON.
factory
Properties
-
constractors
→ List<
AbiConstructorFragment> -
List of constructor fragments defined in the contract ABI.
latefinal
-
errors
→ List<
AbiErrorFragment> -
List of error fragments defined in the contract ABI.
latefinal
-
events
→ List<
AbiEventFragment> -
List of event fragments defined in the contract ABI.
latefinal
-
fallBacks
→ List<
AbiFallbackFragment> -
List of fallback function fragments defined in the contract ABI.
latefinal
-
fragments
→ List<
AbiBaseFragment> -
final
-
functions
→ List<
AbiFunctionFragment> -
List of function fragments defined in the contract ABI.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- receiveFragment → AbiReceiveFragment?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decodeError(
dynamic error) → List? - Decodes the error data based on the error fragment in the contract ABI.
-
errorFromSelector(
String selectorHex) → AbiErrorFragment - Retrieves an error fragment from the contract ABI from selector.
-
functionFromName(
String name) → AbiFunctionFragment - Retrieves a function fragment from the contract ABI based on its name.
-
functionFromSelector(
String selectorHex) → AbiFunctionFragment - Retrieves a function fragment from the contract ABI based from selector.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- revert → AbiErrorFragment
-
solidity revert Error fragment
final