[Contracts] Add a single vault configuration view
Maintainers usually reply within 2 days
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
- Domain
- backend-api-design
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
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 --workspaceandcargo clippy --all-targets -- -D warningspass
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drydocs/meridian
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
[Docs] Add a supported wallet capability matrixPossibly taken @Joeljosef7 claimed this 3 days ago. Opendocs frontend Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drydocs/meridian#1349 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Test] Add cross-language conformance vectors for vault mathPossibly taken @VeronicDev claimed this 3 days ago. Opencontracts medium sdk Stellar Wave testing
drydocs/meridian#1444 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Security] Extend CSP and security headers to landing and docs routesPossibly taken @anietie234 claimed this 3 days ago. Openapi frontend medium security Stellar Wave
drydocs/meridian#1443 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Docs] Establish ADRs and backfill architecture decisionsPossibly taken @Sammydz456 claimed this 3 days ago. Opendocs medium Stellar Wave
drydocs/meridian#1442 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in drydocs/meridian
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
External sources always come back in English: `lc` isn't passed to `/api/v3/external_sources`Possibly taken @Anurag1428 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openfoodfacts/openfoodfacts-explorer#2264 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudflare/workers-sdk#17139 ·
Maintainers usually reply within 1 day
-
area: editor P3 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
halisonworks/mod-codeling#290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
colinhacks/zod#6776 ·
Maintainers usually reply within 1 day