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

[plearn] Add plearn strategy #1357

Merged
merged 18 commits into from
Nov 28, 2023
Merged

[plearn] Add plearn strategy #1357

merged 18 commits into from
Nov 28, 2023

Conversation

jeeraponnnnnnnn
Copy link
Contributor

Changes proposed in this pull request:

  • Add a voting strategy for the Plearn project, which calculates voting power based on holdings of the project(pools, token).

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also some of test cases are failing, can take a look at them plz? :)

src/strategies/plearn/index.ts Outdated Show resolved Hide resolved
src/strategies/plearn/index.ts Outdated Show resolved Hide resolved
src/strategies/plearn/index.ts Outdated Show resolved Hide resolved
Comment on lines 125 to 139
options.lockedPoolAddresses.map((item) =>
multicall(
network,
provider,
lockedPoolabi,
addresses.map((address: any) => [
item.address,
'userInfo',
[address],
{ blockTag }
]),
{ blockTag }
)
)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to limit the number of lockedPoolAddresses foundingInvestorPoolAddresses, pendingWithdrawalAddresses and make sure number of requests doesn't cross 5 https://github.com/snapshot-labs/snapshot-strategies#code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChaituVR
I've implemented the changes as you suggested. Now, I've limited the arrays for lockedPoolAddresses, foundingInvestorPoolAddresses, and pendingWithdrawalAddresses to have no more than 5 addresses each. Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that will max 15 network calls, we can only allow upto max 5 network calls https://github.com/snapshot-labs/snapshot-strategies#code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChaituVR I've updated code, could you please take another look at it?

@ChaituVR
Copy link
Member

@jeeraponnnnnnnn could you resolve conflicts please :)

@ChaituVR ChaituVR merged commit 2d3a070 into snapshot-labs:master Nov 28, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants