Summary
Implement admin rotation for the score-registry oracle — extend #27 pause with transfer_admin(new_admin) so production keys can be rotated without redeploying the contract.
Background
#27 added pause/unpause. Production still needs a safe path to rotate ORACLE_SECRET_KEY / admin address when keys are compromised or team members change.
Proposed contract API
File: Contracts/score-registry/src/lib.rs
pub fn transfer_admin(env: Env, new_admin: Address) {
let admin = /* current admin */;
admin.require_auth();
env.storage().instance().set(&ADMIN_KEY, &new_admin);
// emit AdminTransferred event
}
Two-step variant (recommended):
pub fn propose_admin(env, candidate: Address) // stores pending
pub fn accept_admin(env) // candidate.require_auth()
Server changes
- Admin CLI script:
scripts/rotate-oracle-admin.ts
- Document rotation runbook in
Docs/vercel-deploy.md
Acceptance criteria
Related
Out of scope
- Multi-sig admin
- On-chain admin timelock
Summary
Implement admin rotation for the score-registry oracle — extend #27 pause with
transfer_admin(new_admin)so production keys can be rotated without redeploying the contract.Background
#27 added pause/unpause. Production still needs a safe path to rotate
ORACLE_SECRET_KEY/ admin address when keys are compromised or team members change.Proposed contract API
File:
Contracts/score-registry/src/lib.rsTwo-step variant (recommended):
Server changes
scripts/rotate-oracle-admin.tsDocs/vercel-deploy.mdAcceptance criteria
transfer_adminor two-step flow implementedRelated
Out of scope