Skip to content

Feat/389 refund admin rotation - #511

Merged
fati-Onchain merged 4 commits into
Facil-Pay:mainfrom
tech-adrian:feat/389-refund-admin-rotation
Jul 30, 2026
Merged

Feat/389 refund admin rotation#511
fati-Onchain merged 4 commits into
Facil-Pay:mainfrom
tech-adrian:feat/389-refund-admin-rotation

Conversation

@tech-adrian

Copy link
Copy Markdown
Contributor

PR: Refund admin rotation + escrow docs

Summary

  • Adds two-step admin rotation (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.
  • Adds .github/ISSUE_TEMPLATE/feature_request.md.
  • Documents the escrow dispute lifecycle with a Mermaid state diagram in contracts/escrow/README.md.
  • Documents the escrow observer role (grant/revoke, readable vs. restricted functions) in contracts/escrow/README.md.

Test plan

  • cargo build --workspace passes.
  • cargo fmt --check / cargo clippy clean on all touched code (pre-existing formatting/test issues on main are unrelated to this branch and untouched).
  • Added 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.
  • Note: cargo test --workspace currently fails to compile on main due to pre-existing stale test helper calls in contracts/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

…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.
@fati-Onchain
fati-Onchain merged commit c48df6a into Facil-Pay:main Jul 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants