This package contains a lookupAddresses
function that can be used to resolve ENS names for a batch of addresses. This leverages ENS's reverse records contract to resolve the names in a single contract call, rather than a call per address.
import { lookupAddresses } from "@manifoldxyz/ens-batch-lookup-ethers"
...
const provider = new ethers.providers.JsonRpcProvider(...)
const addresses = ['0xFoo', '0xBar', ...]
const ensNames = lookupAddresses(provider, addresses)