Skip to content

Conversation

patitonar
Copy link
Contributor

Context

Fixes #424

Changes proposed in this pull request

Adds events to the stake(), unstake(), withdrawRewards(), withdrawRewardsTo() and castVote() methods.

Used the events already defined in contracts/interfaces/IAssessment.sol. The only event that was updated is the VoteCast event to include the assessment id as a parameter.

Test plan

Unit tests for the corresponding events were introduced in:

  • test/unit/Assessment/stake.js
  • test/unit/Assessment/unstake.js
  • test/unit/Assessment/withdrawRewards.js
  • test/unit/Assessment/withdrawRewardsTo.js
  • test/unit/Assessment/castVotes.js

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

Copy link
Contributor

@danoctavian danoctavian left a comment

Choose a reason for hiding this comment

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

Small changes required

Otherwise looks good

@patitonar patitonar requested a review from danoctavian October 20, 2022 15:45
Copy link
Contributor

@danoctavian danoctavian left a comment

Choose a reason for hiding this comment

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

LGTM

@roxdanila roxdanila merged commit e40c1c8 into nexus-v2 Oct 21, 2022
@roxdanila roxdanila deleted the feature/assessment-events branch October 21, 2022 08:27
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.

Assessment: add events for stake/unstake/withdrawRewards/castVote methods
3 participants