feat: Add-update_creation_fee#1073
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ONEONUORA Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
close #1031
close #1025
close #1022
close #1020
Summary of Changes
This PR implements several enhancements to the
creator-event-managercontract:1. Admin: Creation Fee Updates
DataKey::CreationFee(0)post-deployment.update_creation_fee(env, caller, new_fee)insrc/admin.rsand wired it intosrc/lib.rs.require_is_adminsignature validation and rejects fees<= 0.("admin", "creation_fee_updated")event upon success.tests/admin_tests.rsfor admin authorization, immediate update reflection viaget_creation_fee(), and strictly positive fee validation.2. Match: Retrieve Single Match by ID
match_id.get_match(env, match_id) -> Matchinsrc/match.rsand wired it intosrc/lib.rs.MatchNotFounderror code toMatchError.DataKey::Match(match_id)and extends the TTL on each read.tests/match_tests.rsverifying successful match lookups,match_not_foundpanics, and storage TTL extension.3. Prediction: Join Event Event Publication
emit_user_joinedinsrc/prediction.rsto publish a("participant", "joined")event with the payload containing(event_id, user_address).tests/prediction_tests.rsasserting exactly one matching event is published on a successful join, and failed joins (e.g. invalid invite code) emit no event.4. Views: check Event Finalized view
Eventstruct.is_event_finalized(env, event_id) -> boolinsrc/views.rsand wired it intosrc/lib.rsto retrieve only theis_finalizedflag.tests/views_tests.rsverifying view accuracy for active, cancelled, and finalized events, as well asevent_not_foundpanic behavior.Verification Status
All contract unit and integration tests compile and pass successfully:
cargo testok. 248 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.11s