Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to fetch strategy harvest info #291

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jstashh
Copy link
Contributor

@jstashh jstashh commented May 24, 2022

Description

Add a getHarvests function to StrategiesInterface that returns data about the harvests of a strategy, optionally within a specified window of blocks

Data returned about each Harvest:

export interface HarvestData {
  transactionId: string;
  gain: BigNumber;
  gainUsdc: BigNumber;
  loss: BigNumber;
  time: Date;
  estimatedTotalAssets: BigNumber;
  apr: number;
}

Motivation and Context

Adding more functionality to the SDK for rendering data about vaults/strategies.

How Has This Been Tested?

added unit tests

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2022

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 48.05 KB (+1.17% 🔺)
dist/sdk.esm.js 48.39 KB (+1.18% 🔺)

@karelianpie karelianpie force-pushed the feat/add-getHarvests branch from c192a1c to de5b710 Compare June 4, 2022 04:41
@karelianpie karelianpie changed the base branch from master to main June 4, 2022 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant