BaseSmartAccount class abstract

Base implementation of SmartAccount with common functionality.

Implemented types
Implementers

Constructors

BaseSmartAccount({required Signer owner, required PublicClient publicClient, required String entryPointAddress, required String implementationAddress, EntryPointVersion entryPointVersion = EntryPointVersion.v07, String? factoryAddress})

Properties

entryPointAddress String
Gets the EntryPoint address this account is compatible with.
no setteroverride
entryPointVersion EntryPointVersion
final
factoryAddress String?
Gets the factory address used to deploy this account.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
implementationAddress String
Gets the account implementation address.
no setteroverride
owner → Signer
Gets the owner/signer of this account.
no setteroverride
publicClient → PublicClient
Protected access to the public client for subclasses.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildUserOperation({required Call call, BigInt? maxFeePerGas, BigInt? maxPriorityFeePerGas, BigInt? nonce}) Future<UserOperation>
Builds a UserOperation for execution.
override
encodeBatchCallData(List<Call> calls) String
Encodes multiple function calls for batch execution.
inherited
encodeCallData(String to, BigInt value, String data) String
Encodes a function call for this account.
inherited
getAddress() Future<String>
Gets the address of this smart account.
override
getFactory() Future<String?>
Gets the factory address used to deploy this account (v0.7+).
override
getFactoryData() Future<String?>
Gets the data for the account factory (v0.7+).
override
getInitCode() Future<String>
Gets the init code for deploying this account (v0.6 only).
override
getNonce({String? key}) Future<BigInt>
Gets the nonce for the next UserOperation.
override
getSalt() Future<String>
Gets the salt used for CREATE2 deployment.
isDeployed() Future<bool>
Checks if this account is deployed on-chain.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
signUserOperation(UserOperation userOp) Future<String>
Signs a UserOperation with this account.
override
toString() String
A string representation of this object.
inherited

Operators

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