Feat/389 refund admin rotation - #511
Merged
fati-Onchain merged 4 commits intoJul 30, 2026
Merged
Conversation
…promise The refund contract stored a single DataKey::Admin with no rotation path, so a compromised admin key could not be replaced on-chain. Adds propose_admin/accept_admin so the current admin proposes a successor who must independently accept before the swap takes effect.
Adds a Mermaid state diagram to the escrow README showing dispute creation, escalation, appeal, and timeout paths.
Explains how to grant/revoke time-limited observer access and lists which escrow functions are observer-readable vs. restricted.
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.
PR: Refund admin rotation + escrow docs
Summary
propose_admin/accept_admin) to the refund contract, so a compromised admin key can be replaced on-chain instead of permanently controlling the contract. Payment and escrow already had multisig/succession-based admin rotation; refund was the contract still missing it..github/ISSUE_TEMPLATE/feature_request.md.contracts/escrow/README.md.contracts/escrow/README.md.Test plan
cargo build --workspacepasses.cargo fmt --check/cargo clippyclean on all touched code (pre-existing formatting/test issues onmainare unrelated to this branch and untouched).contracts/refund/src/test_admin_rotation.rs: propose/accept happy path, unauthorized proposer, wrong acceptor, no pending proposal, and old admin loses access post-rotation.cargo test --workspacecurrently fails to compile onmaindue to pre-existing stale test helper calls incontracts/refund/src/test_merchant_override_and_error_codes.rs, unrelated to this change — out of scope per instructions not to fix what this PR didn't break.Closes #389
Closes #436
Closes #441
Closes #444