feat: implement freeze auth coverage, registry admin cooldown, and yield lifecycle events - #969
Merged
greatest0fallt1me merged 1 commit intoJul 29, 2026
Conversation
…eld lifecycle events Implements three GrantFox FWC26 campaign issues: - Closes CalloraOrg#896 — require_auth on every state-changing freeze entrypoint (CalloraFreeze contract with admin+operator auth model) - Closes CalloraOrg#874 — admin cooldown on registry critical actions (1-hour cooldown window via admin::require_cooldown / update_cooldown) - Closes CalloraOrg#872 — structured lifecycle events for yield (DistributionLifecycleEvent, DistributionMode, emit helpers) All changes are tested and documented per repo guidelines.
|
@EmperorNexus 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! 🚀 |
Contributor
|
Merged into main via admin resolver (-X theirs). |
Contributor
|
Merging this one — appreciate the thorough approach! |
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.
Overview
This PR implements three GrantFox FWC26 smart-contract issues:
require_authaudit – Adds theCalloraFreezecontract withrequire_authon every state-changing entrypoint (freeze, unfreeze, set_freeze_operator, init). Admin + freeze-operator auth model.COOLDOWN_SECONDS(1 hour) window between critical admin actions in the registry to prevent rapid abuse.DistributionLifecycleEventpayloads anddistribute_started/distribute_completedemit helpers with snapshot tests.Related Issues
Changes
Freeze auth coverage (#896)
contracts/freeze/src/lib.rs–CalloraFreezeSoroban contract withrequire_authoninit,freeze,unfreeze,set_freeze_operatorFreezeErrorwith stable error codes (1-6)Registry admin cooldown (#874)
contracts/registry/src/admin.rs–require_cooldown()/update_cooldown()helpers withCOOLDOWN_SECONDS = 3600contracts/registry/src/errors.rs– AddedAdminCooldownActive = 9contracts/registry/src/lib.rs– Cooldown checks inregister_offeringandregister_offering_with_gate;LastAdminActionstorage keyYield lifecycle events (#872)
contracts/yield/src/events.rs–DistributionModeenum,DistributionLifecycleEventversioned payload,emit_distribute_started/emit_distribute_completedhelpers,yield_deposited/distribute/batch_distributetopic constructorsVerification Results
require_authrequire_cooldown+update_cooldownDistributionLifecycleEventwith version, mode, batch metadataTimeline