Consensys / UniversalToken

Implementation of Universal Token for Assets and Payments
Apache License 2.0
347 stars 188 forks source link

ERC721 Support in BatchReader #144

Closed ecp4224 closed 2 years ago

ecp4224 commented 2 years ago

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

Checklist:

github-actions[bot] commented 2 years ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️