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: rewards distribution helper #59

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

woodenfurniture
Copy link
Member

@woodenfurniture woodenfurniture commented Jun 4, 2024

Prints rune allocation per account for the epoch.

Includes the following:

  • Fix to order logs by block number and log index (resolves potential issue of logs being out of order)
  • Use latest rune address by account, derived from stake and setRuneAddress events up to end of epoch
  • Allocate integer rune base units based on total rune allocation, handling remainders
  • Unit tests for the above
  • CI job to rune the tests

Known issues:

  • runeAddress not being decoded correctly (see screenshot)

image

Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

I had issues running this, possibly network or node related, so this review focuses on the code only.

Screenshot 2024-06-06 at 10 39 33 AM

Overall the logic seems sane. A couple of non-blocker comments.

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

CI is happy, and LGTM to me locally as well:

image image

559161847278+41865038152722= 42424200000000 RUNE in THOR base unit, or 424242 RUNE ✅

The only issue re: rune address not being decoded has properly be identified an an issue as part of this PR, meaning: get in

@woodenfurniture woodenfurniture merged commit 2dee2c0 into main Jun 7, 2024
2 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.

3 participants