yearn / yearn-sdk

🦧 SDK for the yearn.finance platform. WIP
https://npm.im/@yfi/sdk
MIT License
53 stars 56 forks source link

feat: Implement caching for `AddressProvider#addressById` #279

Closed karelianpie closed 2 years ago

karelianpie commented 2 years ago

Description

Caches AddressProvider#addressById for 30 seconds

Motivation and Context

Address provider is making too many requests when getting the addressById

How Has This Been Tested?

Screenshots

Before caching:

Screen Shot 2022-04-13 at 9 25 05 am
github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 44.62 KB (+0.59% 🔺)
dist/sdk.esm.js 45.01 KB (+0.61% 🔺)