execute method

Future<TransactionResponse?> execute({
  1. required String to,
  2. required BigInt value,
  3. required List<int> data,
  4. BigInt? gasPrice,
  5. BigInt? gasLimit,
})

Implementation

Future<TransactionResponse?> execute({
  required String to,
  required BigInt value,
  required List<int> data,
  BigInt? gasPrice,
  BigInt? gasLimit,
}) async {
  await checkIfInitialized();
  if (!isInitialized!) throw Exception("Smart wallet not initialized");
  return await contract.send(
    "execute",
    [
      EthereumAddress.fromHex(to),
      value,
      Uint8List.fromList(data),
    ],
  );
}