-
Notifications
You must be signed in to change notification settings - Fork 50
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(PrizeDistV2): add missing events #274
feat(PrizeDistV2): add missing events #274
Conversation
POOL-2300 Add any events to PrizeDistributorV2
Add a `Claim` event to the PrizeDistributor that emits the call data and prize amount
|
ccceaf4
to
7ae2349
Compare
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.
This change is really funny to me. Originally the PrizeDistributor was holding tokens, so we wanted the DrawCalculator to be swappable.
Now, the PD doesn't hold tokens. It's okay if we need to swap it. However- the abstraction is bleeding now that the PD is aware of the DrawCalculator implementation: "picks".
We may as well go whole hog and update claim
to take picks instead of the generic bytes data
param.
contracts/DrawCalculatorV3.sol
Outdated
) external view override returns ( | ||
uint256[] memory prizesAwardable, | ||
bytes memory prizeCounts, | ||
uint64[][] memory drawPickIndices |
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.
Haha this is funny!
The _pickIndicesForDraws
are being passed in, decoded, then returned. Nothing else. This is like an elaborate ABI decoder.
The PrizeDistributor has no knowledge of the "picks". Originally that's because we wanted the DC to be swappable.
Returning the picks to the prize distributor means it's now aware of "picks", which completely negates the whole abstraction.
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.
Fixed in: 0f242fb
…-swapping-out feat(PrizeDistV2): add setTokenVault function
…-swapping fix(DrawCalcV3): set gaugeController as immutable
No description provided.