fetchTransactions method
Fetch all Transactions for the given token
on the given address
Implementation
Future<List<EtherscanTransaction>> fetchTransactions({
required String address,
int? startblock,
int? endblock,
int? page,
int? offset,
Sorting? sorting,
}) async {
final endpoint = buildTransactionEndpoint(
address: address,
startblock: startblock,
endblock: endblock,
page: page,
offset: offset,
sorting: sorting,
);
final txResults = await fetchEtherscanWithRatelimitRetries(endpoint);
return [
for (final tx in txResults)
EtherscanTransaction.fromJson(
tx,
token: currency,
address: address,
)
];
}