Skip to content

feat: Enhance AdminPanel with burn_admin, pending admin transfer & vesting management#316

Merged
zachyo merged 4 commits into
soropad:masterfrom
jayteemoney:feat/admin-panel-enhancements
Jun 30, 2026
Merged

feat: Enhance AdminPanel with burn_admin, pending admin transfer & vesting management#316
zachyo merged 4 commits into
soropad:masterfrom
jayteemoney:feat/admin-panel-enhancements

Conversation

@jayteemoney

Copy link
Copy Markdown
Contributor

Overview

Enhances the token AdminPanel with three previously-missing admin capabilities, plus the one read-only contract getter needed to support them.

Closes #300
Closes #301
Closes #302

#300 — Expose permanent admin burn (burn_admin)

The Clawback card is now a Remove Assets card with a Confiscate/Destroy toggle:

  • Confiscate to Adminclawback(from, amount) (reversible; tokens move to admin balance).
  • Permanently Burnburn_admin(from, amount) (irreversible; reduces total supply, increments total_burned).

Copy clearly differentiates the two paths. Shared form, decimal-scaling, and preflight simulation are reused. No contract change required (burn_admin already existed).

#301pending_admin() getter + two-step transfer UI

  • Contract: added pub fn pending_admin(env: Env) -> Option<Address> (reads DataKey::PendingAdmin) with a unit test.
  • UI: fetches the pending admin on mount; renders a "Admin transfer pending → <address>" banner; shows Accept Admin Role only when the connected wallet matches the pending address; gives the current admin a Cancel Pending Transfer action (overwrites the proposal via propose_admin). State is re-read after every propose/accept/cancel.

#302extend_cliff / revoke vesting UI

New Manage Vesting card (vesting contract + recipient + optional schedule index):

  • Extend Cliffextend_cliff(recipient, new_cliff_ledger, Some(index)), computing new_cliff_ledger from getLatestLedger() with the same days * 17280 math as create_schedule.
  • Revokerevoke(recipient, Some(index)) behind an explicit confirmation explaining that unvested tokens return to the admin.

Option<u32> index is encoded correctly (Void = None, value = Some).

Verification

  • cargo test -p soroban-token — all tests pass (incl. new pending_admin test)
  • tsc --noEmit — clean
  • eslint — clean

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@jayteemoney 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

@zachyo zachyo merged commit af78e0c into soropad:master Jun 30, 2026
0 of 2 checks passed
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