Skip to content

docs(invoice-token): add inline rustdoc documentation for storage keys, structures, and TTL policies in storage.rs #383

Description

@chizzy192

Context & Problem Statement

The storage management layer in contracts/invoice-token/src/storage.rs defines core ledger keys for balances, allowances, nonces, admin roles, and transfer locks. Currently, the module lacks comprehensive module-level documentation and inline /// rustdoc comments explaining key data shapes, lifecycle conventions, and Soroban storage TTL bump policies.

This issue adds exhaustive documentation across the entire storage module.

Architectural Motivation & Technical Requirements

  • In contracts/invoice-token/src/storage.rs:
    • Add //! module-level documentation explaining the storage architecture.
    • Add /// documentation to every StorageKey variant detailing:
      • Purpose of the key.
      • Data type stored in persistent vs instance storage.
      • Read/write access patterns and TTL bump requirements.
    • Add /// documentation to all public helper functions explaining parameters, return values, and failure modes.

Acceptance Criteria

  • Every StorageKey variant documented with rustdoc comments.
  • All public functions in storage.rs have doc comments.
  • cargo doc --no-deps -p invoice-token compiles without warnings.

Target Branch: dev
Estimated Effort: 1–4 hours | Delivery: 1–2 days
Difficulty: Easy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions