getTransactionHistory method
Returns the transactions history for an address
address
.
Implementation
Future<List<TransactionInformation>> getTransactionHistory(
EthereumAddress address,
{required int pageIndex,
required int pageSize,
required bool fullTx,
required String txType,
required String order}) {
final params = <String, dynamic>{
'address': address.hex,
'pageIndex': pageIndex,
'pageSize': pageSize,
'fullTx': fullTx,
'txType': txType,
'order': order
};
return makeRPCCall<Map<String, dynamic>>(
'eth_getTransactionsHistory', [params]).then((response) {
final transactions = response['transactions'] as List<dynamic>;
return transactions
.map((transaction) => TransactionInformation.fromMap(
transaction as Map<String, dynamic>))
.toList();
});
}