Skip to content

feat: add timelock contract for delayed admin actions - #1011

Open
bright5455 wants to merge 1 commit into
accesslayerorg:mainfrom
bright5455:feat/timelock-contract
Open

bright5455 wants to merge 1 commit into
accesslayerorg:mainfrom
bright5455:feat/timelock-contract

Conversation

@bright5455

Copy link
Copy Markdown

closes #986

Summary

Adds a timelock Soroban contract that wraps privileged admin operations with a mandatory delay, letting the community observe and cancel actions before they execute.

Scope

  • queue_action(action_type, params, eta) — enforces eta >= now + min_delay
  • execute_action(action_id) — only after eta, otherwise TimeRemaining
  • cancel_action(action_id) — admin only
  • get_queued_actions() — returns all pending actions with eta and params
  • Minimum delay configurable, defaults to 48 hours

Acceptance criteria

  • execute_action blocked before eta → TimelockError::TimeRemaining
  • Queue enforces min delay → TimelockError::MinDelayNotMet
  • Cancel restricted to authorized admin
  • get_queued_actions returns correct params + eta
  • ActionQueued / ActionExecuted events emitted (plus ActionCancelled)

Tests

cargo test -p timelock → 9 passed, 0 failed. Clippy clean with -D warnings.

Files

  • timelock/Cargo.toml (new)
  • timelock/src/lib.rs (new, ~410 LOC incl. tests)
  • timelock/test_snapshots/test/*.json (auto-generated, 9 files)
  • Cargo.toml (add timelock to workspace members)
  • Cargo.lock (cargo update)

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@bright5455 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Implement timelock contract for delayed admin action execution

1 participant