Skip to content

Add admin nuclear pause#609

Open
gloskull wants to merge 2 commits into
CalloraOrg:mainfrom
gloskull:add-admin-nuclear-pause
Open

Add admin nuclear pause#609
gloskull wants to merge 2 commits into
CalloraOrg:mainfrom
gloskull:add-admin-nuclear-pause

Conversation

@gloskull

Copy link
Copy Markdown

Motivation
Provide an admin-only emergency "nuclear" pause that is guarded by the configured Admin address so deployments can set Admin to a Stellar multisig and rely on native multisig thresholds via require_auth.
Description
Add nuclear_pause(env: Env, caller: Address) to contracts/vault/src/lib.rs which requires the caller to be the current admin (calls caller.require_auth()), rejects non-admin callers and already-paused state, sets the Paused storage key, and publishes the existing vault_paused event.
Add focused tests in contracts/vault/src/test.rs covering: current-admin-only access after admin rotation, owner fallback rejection, successful pause, and rejecting an already-paused call.
Update operator and interface documentation: README.md, docs/interfaces/vault.json, docs/ACCESS_CONTROL.md, and contracts/vault/ACCESS_CONTROL.md to document the new nuclear_pause API and the multisig security model.
Small test/format adjustments only where necessary for the new behavior and docs; commit created with message feat: admin nuclear pause.
Testing
Ran git diff --check which passed before committing the changes.
Attempted cargo test -p callora-vault nuclear_pause -- --nocapture and cargo test -p callora-vault pause_unpause_admin_only -- --nocapture, but test runs failed to complete due to pre-existing repository compile errors (duplicate contract exports and unrelated syntax issues in vault/settlement test code), so the new tests were added but could not be validated end-to-end in this environment.
cargo fmt --all could not complete because of pre-existing syntax errors outside the scope of this PR (in contracts/vault/src/test.rs).
Closes #561

@gloskull

Copy link
Copy Markdown
Author

Done with this issue.
Please merge and give and high review.
Please if there are any more tasks, assign them to me, i'd make sure to get them done quickly and submit my PR's in under 5 hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add admin nuclear-pause guarded by multisig

1 participant