Skip to content

docs(contracts): add Rust doc comments to all public contract functions#3

Open
pauljacobb wants to merge 1 commit into
mainfrom
docs/319-rust-doc-comments
Open

docs(contracts): add Rust doc comments to all public contract functions#3
pauljacobb wants to merge 1 commit into
mainfrom
docs/319-rust-doc-comments

Conversation

@pauljacobb
Copy link
Copy Markdown
Owner

Summary

Ensures every public function across all three Soroban contracts has complete /// doc comments covering arguments, authorization, panics, errors, and example invocations.

Changes

  • apps/contracts/energy_token/src/lib.rs — enhanced balance(), total_supply()
  • apps/contracts/audit_registry/src/lib.rs — enhanced anchor(), verify(), api_signer(), admin()
  • apps/contracts/community_governance/src/lib.rs — enhanced set_quorum_bps(), get_quorum_bps(), set_threshold_bps(), get_threshold_bps(), pending_upgrade(), get_execution_timelock(), proposal_count()

Acceptance criteria

  • All public functions in all three contracts have /// doc comments
  • cargo doc generates without warnings (no undocumented public items)
  • Panics and error conditions documented
  • Example invocations added where helpful

Closes AnnabelJoe#319

AnnabelJoe#319)

- energy_token: enhanced balance() and total_supply() with examples
- audit_registry: enhanced anchor(), verify(), api_signer(), admin() with
  full Arguments/Errors/Example sections
- community_governance: enhanced set_quorum_bps, get_quorum_bps,
  set_threshold_bps, get_threshold_bps, pending_upgrade,
  get_execution_timelock, proposal_count with Panics/Arguments/Examples

All public functions now have /// doc comments with Panics, Arguments,
Authorization, and example invocations where applicable.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Rust doc comments to all public contract functions

1 participant