batchSendTransactions static method
Batch send transactions
transactions
transactions you want to sign and send.
feeMode
is optional, works with aa service.
Result signature or error.
Implementation
static Future<String> batchSendTransactions(List<String> transactions,
{AAFeeMode? feeMode}) async {
final json =
jsonEncode({"transactions": transactions, "fee_mode": feeMode});
final result = await _channel.invokeMethod('evmBatchSendTransactions', json);
if (jsonDecode(result)["status"] == true ||
jsonDecode(result)["status"] == 1) {
final signature = jsonDecode(result)["data"] as String;
return signature;
} else {
final error = RpcError.fromJson(jsonDecode(result)["data"]);
return Future.error(error);
}
}