we only want to fetch either letters / words on different APIs
since we're getting extra info on each one, filtering at contract level would seem to make sense
can you add a param for type somehow (enum? string?)
currently we just use the balance and keep going through all an owners tokens.
so maybe tokenOfOwnerByIndex(address, tokenIndex); needs to take a type param?
useEffect(() => {
const updateYourCollectibles = async () => {
const collectibleUpdate = [];
for (let tokenIndex = 0; tokenIndex < balance; tokenIndex++) {
const graphemeContract = readContracts.YourCollectible // inside or it will run b4 we have contract
console.group('updateYourCollectibles: ', tokenIndex)
try {
// console.log("toeknIndex:", tokenIndex);
const ownerToken = await graphemeContract.tokenOfOwnerByIndex(address, tokenIndex);
// console.log("ownerToken:", ownerToken);
we only want to fetch either letters / words on different APIs since we're getting extra info on each one, filtering at contract level would seem to make sense
can you add a param for type somehow (enum? string?)
currently we just use the
balance
and keep going through all an owners tokens.so maybe
tokenOfOwnerByIndex(address, tokenIndex);
needs to take a type param?