SmartWallet class
Constructors
-
SmartWallet({required String abi, required String scwAddress, required String entryPointAddress, required String? ownerAddress, required int? salt, required String bundlerURL, required Signer<_SignerImpl> signer, required List<String>? plugins, required bool usePaymaster, dynamic batch, PaymasterConfig? paymasterConfig})
-
Methods
-
addContractCallToBatch({required String contractAddress, required String contractAbi, required String functionName, required List args, BigInt? gasPrice, BigInt? gasLimit})
→ bool
-
Adds a contract call to a batch of Ethereum transactions.
-
addDeposit({required BigInt value, required Credentials credentials, BigInt? gasPrice, BigInt? gasLimit})
→ Future
-
-
attachPaymaster(Paymaster paymaster)
→ bool
-
Attaches a paymaster to the current paymaster instance, which can be used to pay for gas in user operations (userops).
-
callContract({required String contractAddress, required String contractAbi, required String functionName, required List args, required String currentAddress, bool? useDefaultPaymaster, BigInt? gasPrice, BigInt? gasLimit})
→ Future<String>
-
Calls a function of a smart contract and returns the user operation hash.
-
checkIfInitialized()
→ Future<bool>
-
Checks if the smart contract is initialized.
-
clearBatch()
→ bool
-
Clears the batch of contract calls in the current instance.
-
concatenateBuffers(List<Uint8List> buffers)
→ Uint8List
-
-
constructPaymasterAndData(String paymasterAddress, String validTimeRangeHex, String signedPayMasterData)
→ Uint8List
-
-
depositToWallet({required BigInt value})
→ Future<void>
-
-
detachPaymaster()
→ bool
-
Detaches the currently attached paymaster from the current paymaster instance.
-
disablePlugin(String pluginAddress)
→ Future<String>
-
Disables a plugin for the smart wallet.
-
enablePlugin(String pluginAddress)
→ Future<String>
-
Enables a plugin for the smart wallet.
-
encodeParameters(List<String> types, List values)
→ String
-
-
execute({required String to, required BigInt value, required List<int> data, BigInt? gasPrice, BigInt? gasLimit})
→ Future<TransactionResponse?>
-
-
executeBatch(String currentAddress, bool? useDefaultPaymaster)
→ Future<String>
-
Executes a batch of Ethereum transactions and returns the user operation hash.
-
getAllPlugins()
→ Future<List>
-
-
getDeposit()
→ Future
-
-
getEncodedDataAsList({required String contractAddress, required String contractAbi, required String functionName, required List args, BigInt? gasPrice, BigInt? gasLimit})
→ List
-
-
getEntryPoint()
→ Future<Object>
-
-
getInitCode()
→ Future<String>
-
-
getNonce()
→ Future<BigInt>
-
-
getOwner()
→ Future<String?>
-
-
getSignedPaymasterData(UserOperation userOp)
→ Future<String>
-
-
getUserOpTransactionHash(String userOpHash)
→ Future<TransactionModel>
-
Take a userOp hash and return the transaction hash.
-
isPluginEnabled(String pluginAddress)
→ Future<bool>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFromBatch(int id)
→ bool
-
Removes a contract call from the batch of Ethereum transactions.
-
resetOwner(String newOwner)
→ Future<String>
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
transfer(String toAddress, String value, bool usePaymaster, String currentAddress)
→ Future<String>
-
-
withdrawDepositTo({required String to, required BigInt value, required Credentials credentials, BigInt? gasPrice, BigInt? gasLimit})
→ Future<TransactionResponse?>
-