balanceOfBatch method

Future<List<BigInt>> balanceOfBatch({
  1. required List<String> accounts,
  2. required List<BigInt> tokenIDs,
})

Implementation

Future<List<BigInt>> balanceOfBatch({
  required List<String> accounts,
  required List<BigInt> tokenIDs,
}) async {
  if (accounts.length != tokenIDs.length) {
    throw ArgumentError('accounts and tokenIDs must have the same length');
  }
  final function = abi.functions[1];
  final response = await readSafe(
    function: function.addValues(values: [accounts, tokenIDs]),
  );
  return response.outputs.first.castValue<List<BigInt>>();
}