Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 608 Bytes

README.md

File metadata and controls

14 lines (10 loc) · 608 Bytes

ens-batch-lookup-ethers

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.

Usage

import { lookupAddresses } from "@manifoldxyz/ens-batch-lookup-ethers"

...

const provider = new ethers.providers.JsonRpcProvider(...)
const addresses = ['0xFoo', '0xBar', ...]
const ensNames = lookupAddresses(provider, addresses)