yearn / yearn-sdk

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

feat: add propertiesAggregatorService #289

Closed jstashh closed 2 years ago

jstashh commented 2 years ago

Description

Add a new PropertiesAggregatorService which can aggregate multiple property queries on a contract into a single call, with the limitation that there can be no arguments in the properties. This can be used, for example, for fetching multiple properties of a vault at once, while being flexible for adding/removing the properties queried in the future.

Corresponding PR of where the smart contract functionality has been added to lens - https://github.com/yearn/yearn-lens/pull/55

Motivation and Context

Adding more functionality to the SDK for rendering data about vaults/strategies. This will be followed by adding a function to the vaults interface that supports fetching information about a vault in one call, e.g. name, fees, totalAssets etc

How Has This Been Tested?

Added unit tests

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 47.24 KB (+0.62% 🔺)
dist/sdk.esm.js 47.59 KB (+0.57% 🔺)