diff --git a/src/strategies/erc1155-balance-of/index.ts b/src/strategies/erc1155-balance-of/index.ts index 32ce8bd92..9a63986a1 100644 --- a/src/strategies/erc1155-balance-of/index.ts +++ b/src/strategies/erc1155-balance-of/index.ts @@ -16,6 +16,12 @@ export async function strategy( options, snapshot ) { + if (!options.tokenId) { + throw new Error( + 'options.tokenId is required for erc-1155-balance-of strategy' + ); + } + const blockTag = typeof snapshot === 'number' ? snapshot : 'latest'; const response = await multicall( network, @@ -28,6 +34,7 @@ export async function strategy( ]), { blockTag } ); + return Object.fromEntries( response.map((value, i) => [ addresses[i],