dawsbot / eth-labels

📃 A public dataset of crypto addresses labeled
https://eth-labels-production.up.railway.app/swagger
MIT License
198 stars 30 forks source link

📓 feat: added loadAllTokensFromFS() and updated the address api so it… #95

Closed michaelgreen06 closed 4 months ago

michaelgreen06 commented 4 months ago

closes ETH-13

A few notes: I made this branch from the "accounts-api1" branch because I wanted to test if the code I was writing worked.

I used the loadAllAccountsFromFS pattern from the "sqlite" branch to create the loadAllTokensFromFS() function.

I don’t fully understand the anyObject pattern in the load-all-accounts that you made to loadAllAccountsFromFS in the "sqlite" branch so I eliminated it from loadAllTokens() 🤷‍♂️

I noticed that a lot of the token data had empty fields (tokenName, website & tokenSymbol), wasn't formatted corrected (websites weren't always full urls) or certain fields weren't present at all (tokenImage). As a result, the tokenDBRow type allows for null values for tokenName, website & tokenSymbol & doesn't apply .url() for website. I have also marked tokenImage as optional because it seems some scanners don't provide that information.

linear[bot] commented 4 months ago

ETH-13 Implement `loadAllTokensFromFileSystem()`