-
Notifications
You must be signed in to change notification settings - Fork 781
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
[subgraph-split-delegation] New strategy: Subgraph split delegation #1583
[subgraph-split-delegation] New strategy: Subgraph split delegation #1583
Conversation
for (const chunk of chunks) { | ||
const params = { | ||
members: { | ||
__args: { | ||
block: { number: block.number }, | ||
where: { | ||
address_in: chunk.map((address) => address.toLowerCase()) | ||
} | ||
}, | ||
id: true, | ||
address: true, | ||
delegators: { | ||
__args: { | ||
where: { | ||
context: space, | ||
expirationTimestamp_gte: block.timestamp | ||
} | ||
}, | ||
delegator: { | ||
address: true | ||
}, | ||
ratio: true | ||
}, | ||
delegatees: { | ||
__args: { | ||
where: { | ||
context: space, | ||
expirationTimestamp_gte: block.timestamp | ||
} | ||
}, | ||
delegatee: { | ||
address: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i think if a address has more than 1000 delegations this may ignore them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think you are right. I'm going to paginate the delegations too. Thanks!
The subgraph-split-delegation calculates new Vp for the addresses based on the delegation ratios provided by a Subgraph endpoint and an initial strategy Vp.