[Contracts] Add a migration status view with the executable ledger

Open
#1,368 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@mysterioustech is already working on this.

Since Nov 20, 2026.

  • #1485 by @mysterioustech — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, typescript

Research direction

Read packages/contracts/vault/src/storage.rs and packages/contracts/vault/src/lib.rs to find the snapshot type, cooldown, and existing getter. Add the separate read-only status view while keeping the cooldown and getter unchanged; use packages/stellar-sdk-helpers/src/migration-keeper.ts as context for its consumer. Add tests for pending, ready, and empty states, then run the specified workspace tests and clippy command.

Written by the indexing model from the issue text.

Description

contracts enhancement medium Stellar Wave

Summary

get_migration_snapshot returns the target adapter, snapshot value, and snapshot ledger, but not the earliest ledger at which migrate_adapter can execute. A client must recompute the cooldown from a constant.

Motivation

Operators and dashboards need one read that answers whether a pending migration is ready. Recomputing the threshold off chain can drift if the contract constant changes or a client uses the wrong value.

Proposed Solution

Add a read-only migration status view that returns the snapshot plus the earliest executable ledger and the remaining ledgers. Return a clear empty state when no migration is pending. Keep the existing snapshot getter for compatibility. Cover pending, ready, and empty states with tests.

Scope

Field Value
Area Contracts
Protocol affected Both
Network testnet and mainnet
Breaking change? No

Alternatives Considered

Adding fields to the snapshot type would change a stored value and require a migration path. A separate view is additive and does not alter storage.

Acceptance Criteria

  • One read returns the snapshot, earliest ledger, and remaining ledgers
  • The view reports an empty state when no migration is pending
  • The existing snapshot getter is unchanged
  • Tests cover pending, ready, and empty states
  • cargo test --workspace and cargo clippy --all-targets -- -D warnings pass

Additional Context

The snapshot type and cooldown are in packages/contracts/vault/src/storage.rs and packages/contracts/vault/src/lib.rs. The cooldown must not be shortened. The migration keeper in packages/stellar-sdk-helpers/src/migration-keeper.ts is a likely consumer.

Dominant language
TypeScript
Stars
17
Forks
129
Avg merge
3d 13h
Merged PRs (30d)
54

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from drydocs/meridian

All issues in drydocs/meridian

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.