Bring docs/storage.md up to date with every current DataKey variant
Description
The DataKey enum in src/lib.rs has grown to cover Oracle, Timelock, PendingAdminEta, ReentrancyLock, PairCooldown, MaxFeeAbsolute, PairRouteCount, PairVolume, and SchemaVersion, but docs/storage.md predates several of these additions. A storage reference that omits live keys misleads integrators about what state exists, its persistence class, and its TTL handling. This issue audits the enum against the doc and brings storage.md to full parity — every variant, its storage class (persistent vs instance), its default-on-absent value, and which entrypoints read/write it.
Requirements and context
- Repository scope: StableRoute-Org/Stableroute-contracts only.
- Enumerate every
DataKey variant currently in lib.rs and confirm each appears in storage.md with: storage class, value type, default-on-absent, and the reading/writing entrypoints.
- Add the missing entries (at minimum
Oracle, Timelock, PendingAdminEta, ReentrancyLock, PairCooldown, MaxFeeAbsolute).
- Note that this complements, not duplicates, the issues-2 STORAGE.md reference: this issue is a parity/freshness audit of the existing
docs/storage.md against the current enum.
- Keep the doc's existing structure and formatting conventions.
Suggested execution
- Fork the repo and create a branch
git checkout -b docs/contracts-storage-map-parity
- Implement changes
- Write code in:
src/lib.rs — no code change; if a DataKey doc comment is wrong, fix it in passing.
- Write comprehensive tests in:
src/lib.rs — no tests required for a docs-only change; ensure cargo test still passes.
- Add documentation: rewrite/extend
docs/storage.md to cover every variant, cross-linked from README.md.
- Include NatSpec-style doc comments (
///) only where a DataKey comment is corrected, matching the existing style in lib.rs.
- Validate security assumptions: documentation accuracy reduces operational misconfiguration risk.
- Test and commit
Test and commit
- Run
cargo fmt --all -- --check, cargo build, and cargo test.
- Confirm every enum variant is represented and no stale key descriptions remain.
- Include a short diff summary of added/updated storage entries in the PR description.
Example commit message
docs: bring docs/storage.md to full parity with the current DataKey enum
Guidelines
- Minimum 95 percent test coverage for impacted modules.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the StableRoute community on Discord for questions, reviews, and faster merges: https://discord.gg/37aCpusvx
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Bring docs/storage.md up to date with every current DataKey variant
Description
The
DataKeyenum insrc/lib.rshas grown to coverOracle,Timelock,PendingAdminEta,ReentrancyLock,PairCooldown,MaxFeeAbsolute,PairRouteCount,PairVolume, andSchemaVersion, butdocs/storage.mdpredates several of these additions. A storage reference that omits live keys misleads integrators about what state exists, its persistence class, and its TTL handling. This issue audits the enum against the doc and bringsstorage.mdto full parity — every variant, its storage class (persistent vs instance), its default-on-absent value, and which entrypoints read/write it.Requirements and context
DataKeyvariant currently inlib.rsand confirm each appears instorage.mdwith: storage class, value type, default-on-absent, and the reading/writing entrypoints.Oracle,Timelock,PendingAdminEta,ReentrancyLock,PairCooldown,MaxFeeAbsolute).docs/storage.mdagainst the current enum.Suggested execution
git checkout -b docs/contracts-storage-map-paritysrc/lib.rs— no code change; if aDataKeydoc comment is wrong, fix it in passing.src/lib.rs— no tests required for a docs-only change; ensurecargo teststill passes.docs/storage.mdto cover every variant, cross-linked fromREADME.md.///) only where aDataKeycomment is corrected, matching the existing style inlib.rs.Test and commit
cargo fmt --all -- --check,cargo build, andcargo test.Example commit message
docs: bring docs/storage.md to full parity with the current DataKey enumGuidelines
Community & contribution rewards