feat(admin): emit admin_chg event on completed handover - #318
Merged
mikewheeleer merged 1 commit intoJul 28, 2026
Conversation
accept_admin_transfer now emits admin_chg(old_admin, new_admin) once the rotation is persisted, so indexers can track admin changes without polling get_admin. propose_admin_transfer intentionally does not emit this event: a proposal is not yet a state change (it can be re-proposed or cancelled before any handover completes). Adds tests: the event fires with the correct payload on a completed accept, and a mere proposal does not emit admin_chg.
Contributor
|
looks good @thlpkee20-wq — well scoped and easy to review. merging 👍 |
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.
Closes #307
`accept_admin_transfer` now emits `admin_chg(old_admin, new_admin)`
once the rotation is persisted, so indexers can track admin changes
without polling `get_admin`. `propose_admin_transfer` intentionally
does not emit this event: a proposal is not yet a state change (it can
still be re-proposed or cancelled before any handover completes) —
only the completed transfer is the actual "admin state change."
No topic collision: `admin_chg` (9 chars, within the `symbol_short!`
limit) does not match any existing topic in the contract.
Adds tests: the event fires with the correct `(old_admin, new_admin)`
payload on a completed accept, and a mere proposal does not emit
`admin_chg`.
Test plan
pre-existing, unrelated test covered by fix(test): correct cross-call event-count assumption in ownership-transfer test #315.