Skip to content

fix(tholos-v2): emit Revealed events on auto-reveal path (#156) - #161

Closed
s6pa1rta3n-lab wants to merge 1 commit into
drydocs:mainfrom
s6pa1rta3n-lab:fix-issue-156
Closed

fix(tholos-v2): emit Revealed events on auto-reveal path (#156)#161
s6pa1rta3n-lab wants to merge 1 commit into
drydocs:mainfrom
s6pa1rta3n-lab:fix-issue-156

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

In tholos-v2, the Registration -> Reveal phase transition occurs lazily upon the first reveal or resolve_outcome call after the registration deadline. Fixed positions (asserter and disputer) have their position weights auto-counted into agree_weight and disagree_weight, but previously did not emit corresponding Revealed events.

This PR fixes #156 by emitting Revealed events for each fixed position inside open_reveal_phase, ensuring downstream indexers observe a consistent and complete sequence of position reveals without needing special handling for fixed positions.

Changes

  • Emitted Revealed { id, voter, choice } for both fixed voters inside open_reveal_phase in contracts/tholos-v2/src/lib.rs.
  • Preserved existing RevealOpened event emission order and phase transition state logic.
  • Added comprehensive unit tests in contracts/tholos-v2/src/test.rs verifying event emissions and choice mappings for both outcome == true and outcome == false assertions.
  • Updated events table in docs/src/CONTRACT_V2.md and added an entry to docs/src/CHANGELOG.md.

Verification

  • cargo fmt --check: passed
  • cargo clippy --workspace --all-targets -- -D warnings: passed
  • cargo test --workspace: 185 passed across all workspace crates

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@collinsezedike

Copy link
Copy Markdown
Collaborator

@s6pa1rta3n-lab Closing. #156 has no assignee. Comment on the issue and wait to be assigned before opening a PR.

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.

[Chore] Missing Revealed event on tholos-v2's auto-reveal path

2 participants