Skip to content

Document the complete DataKey storage map including Oracle, Timelock, ReentrancyLock, and PairCooldown in storage.md #136

Description

@mikewheeleer

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.

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions