[Contracts] Add a single vault configuration view

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

Maintainers usually reply within 2 days

@digofavour-hub is already working on this.

Since Nov 20, 2026.

  • #1400 by @digofavour-hub — open

Assessment

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

Research direction

Start with the existing getters in packages/contracts/vault/src/lib.rs and storage definitions in storage.rs to see how the configuration values are read and how the uninitialized state is represented. Add a test for each requested state and run cargo test --workspace; done means the view returns all documented fields, reports the typed error for an uninitialized vault, and leaves existing getters compatible.

Written by the indexing model from the issue text.

Description

contracts enhancement medium Stellar Wave

Summary

The vault exposes admin, adapter, pause state, treasury, fee, and totals through separate getters. A dashboard or admin page performs several reads for one configuration panel.

Motivation

One read gives a consistent snapshot and reduces the chance that a client mixes values from different ledgers. It also makes the contract surface easier to document and consume.

Proposed Solution

Add a read-only get_config that returns the admin, pending admin, active adapter, pause state, treasury, performance fee, total shares, and total assets. Return a typed uninitialized error when the vault is not initialized. Keep the existing getters for compatibility. Cover a fresh vault, a paused vault, a pending admin, and an uninitialized vault with tests.

Scope

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

Alternatives Considered

Adding each field to a client-side batch read keeps multiple calls and the race between them. A new storage key is unnecessary because the view can read existing entries.

Acceptance Criteria

  • One read returns the documented configuration fields
  • An uninitialized vault returns a typed error
  • Existing getters remain unchanged
  • Tests cover fresh, paused, pending admin, and uninitialized states
  • cargo test --workspace and cargo clippy --all-targets -- -D warnings pass

Additional Context

The getters are in packages/contracts/vault/src/lib.rs. Storage keys are in storage.rs. The view must not include any secret or off-chain configuration.

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.