sendTransaction method
- EthereumAddress to,
- Uint8List encodedFunctionData,
- {EtherAmount? amount}
override
Sends a transaction to the wallet contract.
to
: The address of the recipient.encodedFunctionData
: The calldata to send.amount
: The amount to send (optional).
Returns the UserOperationResponse
of the transaction.
Implementation
@override
Future<UserOperationResponse> sendTransaction(
EthereumAddress to, Uint8List encodedFunctionData,
{EtherAmount? amount}) async {
require(_walletAddress != null, 'Wallet not deployed');
return sendUserOperation(buildUserOperation(
callData: Contract.execute(_walletAddress!,
to: to, amount: amount, innerCallData: encodedFunctionData)));
}