Skip to content

Add sorted list info to getters in BribeInitiative#129

Merged
bingen merged 5 commits intomainfrom
bribe-initiative-sorted-list-getter
Jul 8, 2025
Merged

Add sorted list info to getters in BribeInitiative#129
bingen merged 5 commits intomainfrom
bribe-initiative-sorted-list-getter

Conversation

@bingen
Copy link
Contributor

@bingen bingen commented Jul 4, 2025

No description provided.

@bingen bingen requested a review from danielattilasimon July 4, 2025 11:17
@bingen bingen self-assigned this Jul 4, 2025
Copy link
Contributor

@danielattilasimon danielattilasimon left a comment

Choose a reason for hiding this comment

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

Yes, this is pretty much all that we're missing!

Just to be extra sure, I'd like to rewrite the claiming logic in BribeInitiativeFireAndForget.t.sol to rely solely on publicly readable information, to ensure we're not missing anything else (and also to serve as a demonstration of passing the right parameters to claimBribes()).

external
view
returns (uint256 totalLQTYAllocated, uint256 offset);
returns (uint256 totalLQTYAllocated, uint256 offset, uint256 prev, uint256 next);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should also update the natspec.

external
view
returns (uint256 lqtyAllocated, uint256 offset);
returns (uint256 lqtyAllocated, uint256 offset, uint256 prev, uint256 next);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should also update the natspec.

claimDataAtEpoch.prevLQTYAllocationEpoch = userPrevAllocation;
claimDataAtEpoch.prevTotalLQTYAllocationEpoch = totalPrevAllocation;

claimData.push(claimDataAtEpoch);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you, this is awesome!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks to you for pointing it out!

@bingen bingen merged commit b880481 into main Jul 8, 2025
3 checks passed
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.

2 participants