fetchERC721Transactions method
Fetch a list of all ERC721 Tokens for a given address
Implementation
Future<List<EtherscanTransaction>> fetchERC721Transactions({
required String address,
String? contractAddress,
int? startblock,
int? endblock,
int? page,
int? offset,
Sorting? sorting,
}) async {
final endpoint = buildERC721TransactionEndpoint(
address: address,
contractAddress: contractAddress,
startblock: startblock,
endblock: endblock,
page: page,
offset: offset,
sorting: sorting,
);
final result =
await fetchEtherscanWithRatelimitRetries(endpoint) as List<dynamic>;
return [
for (final tx in result)
EtherscanTransaction.fromJsonErc721(
tx,
currency: currency,
address: address,
),
];
}