HomePhabricator
Diffusion Comm 8802233178a0

[lib] Batch ENS queries using ReverseRecords smart contract

Description

[lib] Batch ENS queries using ReverseRecords smart contract

Summary:
This resolves ENG-2593. For more info about this smart contract, see official ENS docs and GitHub repo.

When I start my iOS app, it needs to resolve 142 ENS names to build the in-memory search indices for @-mentioning and inbox search.

Before this diff, this meant 142 individual network requests to Alchemy. After this diff, it requires only 1.

Depends on D9524

Test Plan:

  1. Included updated unit tests.
  2. I ran the iOS app and confirmed that the regression described here was resolved.
  3. I added a log statement to the code that issues a "single fetch" to confirm that it wasn't getting triggered anymore on iOS app start. (One "single fetch" was actually triggered, but it was for an ENS name that appeared immediately in my inbox... I think this is actually what we want, since we need that result more urgently.)
  4. I confirmed that ENS resolution still worked on the iOS app.
  5. I confirmed that ENS resolution still worked on the web app.
  6. I confirmed that the keyserver is still able to resolve ENS names in notifs.

Reviewers: rohan, atul, tomek

Reviewed By: tomek

Subscribers: tomek, wyilio

Differential Revision: https://phab.comm.dev/D9525

Details

Provenance
ashoatAuthored on Oct 18 2023, 12:25 PM
Reviewer
tomek
Differential Revision
D9525: [lib] Batch ENS queries using ReverseRecords smart contract
Parents
rCOMM122549950610: [lib] Move EthersProvider type to separate file
Branches
Unknown
Tags
Unknown