BundlerClient class
Bundler client for ERC-4337 UserOperation submission and management.
The Bundler is responsible for:
- Accepting UserOperations from users
- Validating UserOperations
- Estimating gas for UserOperations
- Bundling UserOperations into transactions
- Submitting bundles to the EntryPoint contract
Constructors
- BundlerClient({required String bundlerUrl, RpcProvider? provider, EntryPointVersion entryPointVersion = EntryPointVersion.v07})
Properties
- bundlerUrl → String
-
Gets the bundler URL for testing purposes.
no setter
- entryPointVersion → EntryPointVersion
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
batchEstimateUserOperationGas(
List< UserOperation> userOps, {String? entryPoint}) → Future<List< UserOperationGasEstimate> > - Estimates gas for multiple UserOperations in a batch.
-
batchSendUserOperation(
List< UserOperation> userOps) → Future<List< String> > - Sends multiple UserOperations in a batch.
-
dispose(
) → void - Disposes of the bundler client and cleans up resources.
-
estimateUserOperationGas(
UserOperation userOp, {String? entryPoint}) → Future< UserOperationGasEstimate> - Estimates gas for a UserOperation.
-
getChainId(
) → Future< int> - Gets the chain ID supported by this bundler.
-
getEntryPointAddress(
) → String - Gets the default EntryPoint address for this bundler.
-
getSupportedEntryPoints(
) → Future< List< String> > - Gets the supported EntryPoint addresses by this bundler.
-
getUserOperationByHash(
String userOpHash) → Future< UserOperationByHashResult?> - Gets a UserOperation by its hash.
-
getUserOperationReceipt(
String userOpHash) → Future< UserOperationReceipt?> - Gets the receipt for a UserOperation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendUserOperation(
UserOperation userOp) → Future< String> - Sends a UserOperation to the bundler.
-
toString(
) → String -
A string representation of this object.
inherited
-
waitForUserOperationReceipt(
String userOpHash, {Duration timeout = const Duration(minutes: 2), Duration pollInterval = const Duration(seconds: 3)}) → Future< UserOperationReceipt> - Waits for a UserOperation receipt.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited