SmartWalletBase class abstract
An abstract class representing the base structure of a Smart Wallet.
The SmartWalletBase class defines the common structure and methods that a Smart Wallet implementation should have. This allows for flexibility in creating different implementations of Smart Wallets while adhering to a common interface.
- Implementers
Constructors
Properties
- address → EthereumAddress?
-
The Ethereum address associated with the Smart Wallet.
read-only
-
balance
→ Future<
EtherAmount> -
Retrieves the balance of the Smart Wallet.
read-only
-
deployed
→ Future<
bool> -
Checks if the Smart Wallet has been deployed on the blockchain.
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- initCode → String?
-
Retrieves the init code of the Smart Wallet.
read-only
-
initCodeGas
→ Future<
BigInt> -
Retrieves the gas required to deploy the Smart Wallet.
read-only
-
nonce
→ Future<
Uint256> -
Retrieves the nonce of the Smart Wallet.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- toHex → String?
-
Converts the Smart Wallet address to its hexadecimal representation.
read-only
Methods
-
buildUserOperation(
{required Uint8List callData, BigInt? customNonce, BigInt? callGasLimit, BigInt? verificationGasLimit, BigInt? preVerificationGas, BigInt? maxFeePerGas, BigInt? maxPriorityFeePerGas}) → UserOperation - Builds a UserOperation based on provided parameters.
-
createSimpleAccount(
Uint256 salt, {int? index}) → Future - Creates a new wallet address using counterfactual deployment.
-
createSimplePasskeyAccount(
PassKeyPair pkp, Uint256 salt) → Future - Creates a new Passkey wallet address using counterfactual deployment.
-
dangerouslySetInitCode(
String? code) → void - manually Sets the init code of the Smart Wallet and overrides the default.
-
getSimpleAccountAddress(
EthereumAddress signer, Uint256 salt) → Future< EthereumAddress> -
Retrieves the counterfactual address of a wallet created with
createAccount
. -
getSimplePassKeyAccountAddress(
PassKeyPair pkp, Uint256 salt) → Future< EthereumAddress> - Retrieves the counterfactual address of a Passkey wallet created with createSimplePasskeyAccount.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
EthereumAddress recipient, EtherAmount amount) → Future< UserOperationResponse> - Transfers native tokens to another recipient.
-
sendBatchedTransaction(
List< EthereumAddress> recipients, List<Uint8List> calls, {List<EtherAmount> ? amounts}) → Future<UserOperationResponse> - Sends a batched transaction to the wallet.
-
sendSignedUserOperation(
UserOperation op) → Future< UserOperationResponse> - Sends a signed user operation to the bundler.
-
sendTransaction(
EthereumAddress to, Uint8List encodedFunctionData, {EtherAmount? amount}) → Future< UserOperationResponse> - Sends a transaction to the wallet contract.
-
sendUserOperation(
UserOperation op) → Future< UserOperationResponse> - Signs and sends a user operation to the bundler.
-
signUserOperation(
UserOperation userOp, {bool update = true, String? id}) → Future< UserOperation> - Signs a user operation using the provided key.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited