umbra-protocol icon indicating copy to clipboard operation
umbra-protocol copied to clipboard

Optimize CNS Address Lookups

Open apbendi opened this issue 4 years ago • 1 comments

Instead of making a separate Graph call for each address to see what CNS names they own, create a GraphQL query that will look up all required addresses at once and return them in a single request. Refactor the app to "reverse resolve" CNS names in this way on the receive page, AFTER first attempting ENS resolution, ONLY for addresses that don't already have an ENS result.

apbendi avatar Mar 18 '21 20:03 apbendi

There's now a contract that lets you batch lookup ENS reverse records, explained here. So this issue can more generally be to first try a batch reverse lookup of address to ENS, then for the ones with no ENS, fall back to batch CNS lookup.

As an alternative to the ENS reverse record contract, we may just want to use the Multicall contract for ENS reverse lookup, to keep it generic, since we already use that to fetch user token balances

mds1 avatar Mar 24 '21 14:03 mds1

We now look up CNS names uses the Resolution library, so going to close this

mds1 avatar Feb 06 '23 17:02 mds1