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(PrizeDistV2): add missing events #274

Merged
merged 6 commits into from
Jun 6, 2022

Conversation

PierrickGT
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented May 31, 2022

POOL-2300 Add any events to PrizeDistributorV2

Add a `Claim` event to the PrizeDistributor that emits the call data and prize amount

  • Especially the data! (picks)

@PierrickGT PierrickGT force-pushed the pool-2300-add-any-events-to-prizedistributorv2 branch from ccceaf4 to 7ae2349 Compare June 1, 2022 19:29
Copy link
Contributor

@asselstine asselstine left a 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.

) external view override returns (
uint256[] memory prizesAwardable,
bytes memory prizeCounts,
uint64[][] memory drawPickIndices
Copy link
Contributor

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.

Copy link
Contributor Author

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
@PierrickGT PierrickGT merged commit ca0372c into staging Jun 6, 2022
@PierrickGT PierrickGT deleted the pool-2300-add-any-events-to-prizedistributorv2 branch June 6, 2022 19:49
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.

None yet

2 participants