Skip to content

Emit a dedicated event when staking state changes #425

Description

@mikewheeleer

Event on staking

Description

staking state changes are silent on-chain. This issue emits an event.

Requirements and context

  • Repository scope: StableRoute-Org/Stableroute-contracts only.
  • Emit a documented event whenever staking state changes, with the relevant fields.
  • No duplicate emissions.
  • Cover topic and payload in tests.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/staking-92-event
  • Implement changes
    • Write code in: the relevant module.
    • Write comprehensive tests in: cover the new behaviour and edge cases.
  • Test and commit

Test and commit

  • Run cargo fmt, cargo clippy --all-targets -- -D warnings, and cargo test.
  • Cover edge cases: emitted once, payload correct.
  • Include the full test output in the PR description.

Example commit message

feat(staking): emit state-change event

Guidelines

  • Minimum 95 percent test coverage for impacted modules.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the StableRoute community on Discord: https://discord.gg/37aCpusvx
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — a 5-star rating is much appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions