IUserOperation class
IUserOperation
is a class representing an ERC-4337 User Operation.
Building a UserOperation involves constructing multiple parts and merging them together.
Constructors
- IUserOperation({required String sender, required BigInt nonce, required String initCode, required String callData, required BigInt callGasLimit, required BigInt verificationGasLimit, required BigInt preVerificationGas, required BigInt maxFeePerGas, required BigInt maxPriorityFeePerGas, required String paymasterAndData, required String signature})
-
Main constructor for the
IUserOperation
. - IUserOperation.defaultUserOp()
-
Default constructor for the
IUserOperation
. It initializes all fields with default values.factory -
IUserOperation.fromJson(Map<
String, dynamic> json) -
Factory constructor that creates an instance of
IUserOperation
from a Map (typically from JSON).factory
Properties
- callData ↔ String
-
The call data of the operation.
getter/setter pair
- callGasLimit ↔ BigInt
-
The gas limit for the operation call.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- initCode ↔ String
-
The init code of the operation.
getter/setter pair
- maxFeePerGas ↔ BigInt
-
The maximum fee per gas for the operation.
getter/setter pair
- maxPriorityFeePerGas ↔ BigInt
-
The maximum priority fee per gas for the operation.
getter/setter pair
- nonce ↔ BigInt
-
The nonce of the operation.
getter/setter pair
- paymasterAndData ↔ String
-
The paymaster and associated data for the operation.
getter/setter pair
- preVerificationGas ↔ BigInt
-
The gas for pre-verification of the operation.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender ↔ String
-
The sender of the operation.
getter/setter pair
- signature ↔ String
-
The signature of the operation.
getter/setter pair
- verificationGasLimit ↔ BigInt
-
The gas limit for operation verification.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
opToJson(
) → Map< String, dynamic> - Converts the operation to JSON format.
-
toJson(
) → Map< String, dynamic> -
Converts the
IUserOperation
to a Map. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited