Feat/issues 1043 1044 1045 1046 - #1170
Merged
Ehonrie merged 3 commits intoJul 28, 2026
Merged
Conversation
… fix withdraw_fees return value - Issue 1043: Add set_fee_bps method (admin-only, rejects values > 10000 basis points) - Issue 1044: Ensure get_balance returns correct escrow balance for market/token pair - Issue 1045: Update withdraw_fees to return amount withdrawn and restrict to admin only - Remove duplicate method definitions and clean up storage key management - Add proper event emissions for fee updates and withdrawals
- Issue 1046: Emit market_created event in Market::initialize
- Event topics: (Symbol('market_created'), market_id)
- Event data: Full Market struct (matches MarketInfo field-for-field)
- Document event structure and topics in contracts/README.md
- Fix Market struct initialization to remove duplicate outcome field
- Ensure indexer can decode event without ambiguity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements protocol fee rate management in Treasury contract and ensures market creation events are properly emitted for indexer compatibility.
Changes
Treasury Contract (Issue #1043, #1044, #1045)
Market Contract (Issue #1046)
market_createdevent in Market::initialize with:Documentation
Testing
Closes #1043
Closes #1044
Closes #1045
Closes #1046