daimo-eth / daimo

Real world Ethereum
https://daimo.com
GNU General Public License v3.0
358 stars 29 forks source link

api: create token registry for known tokens #1178

Closed kayleegeorge closed 3 months ago

kayleegeorge commented 3 months ago

Use a token registry instead of fetching foreign tokens in foreignCoinIndexer.

Note: foreign token list does not include home coin inherently (so the foreignCoinIndexer doesn't pick up USDC transfers) so hav to add a flag to search for it when doing any coin send (sending from homeCoin).

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
daimo-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 6:21pm
daimo-web-stage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 6:21pm
nalinbhardwaj commented 3 months ago

I think getAddress in viem returns a checksummed address -- so we try to consistently use checksummed addresses everywhere.

Where did the all-lowercase address come from? I'd recommend changing that to the checksummed version using getAddress instead.

kayleegeorge commented 3 months ago

Ah I see -- the coin gecko list by default has all-lowercase addresses (and was pulling that in for clippy). but updated now to reflect checksummed on API side