Add the function batchERC721Balances in BatchReader to grab all NFTs owned by tokenHolders in tokens.
Description
The batchERC721Balances accepts two arguments, address[] tokens and address[] tokenHolders. The function will return a matrix of NFTs owned by each tokenHolder in each token.
Motivation and Context
To avoid loop calls to RPC nodes to gather this data
How Has This Been Tested?
This was tested using a unit test that deploys 2 ERC721 tokens, mints several tokens to 3 different addresses and then uses a single batchERC721Balances call to get all data for both tokens
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Add the function
batchERC721Balances
inBatchReader
to grab all NFTs owned bytokenHolders
intokens
.Description
The
batchERC721Balances
accepts two arguments,address[] tokens
andaddress[] tokenHolders
. The function will return a matrix of NFTs owned by eachtokenHolder
in eachtoken
.Motivation and Context
To avoid loop calls to RPC nodes to gather this data
How Has This Been Tested?
This was tested using a unit test that deploys 2 ERC721 tokens, mints several tokens to 3 different addresses and then uses a single
batchERC721Balances
call to get all data for both tokensTypes of changes
Checklist: