Skip to content

docs: complete rustdoc coverage for fees, mock-oracle, oracle and identity message APIs - #1042

Open
mxllv wants to merge 1 commit into
MettaChain:mainfrom
mxllv:feature/contract-api-docs
Open

docs: complete rustdoc coverage for fees, mock-oracle, oracle and identity message APIs#1042
mxllv wants to merge 1 commit into
MettaChain:mainfrom
mxllv:feature/contract-api-docs

Conversation

@mxllv

@mxllv mxllv commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the public API documentation pass across four contracts whose published rustdoc omitted part of their #[ink(message)] surface. Every ink! message in each of these crates now carries a /// doc comment describing behavior, caller/role requirements, units (basis points where relevant), and the error variants that can be returned.

What changed

Docs were written against the actual implementation (caller checks, error returns, unit semantics) rather than mirrored from signatures. No behavior was changed.

CI note

The workspace-wide clippy gate currently fails on pristine main with a recent nightly clippy change: clippy::clone_on_copy now fires inside ink!-generated storage code in all 28 contract crates. This PR adds a targeted crate-level #![allow(clippy::clone_on_copy)] to each affected crate root so the gate passes again; no hand-written code is affected.

Verification

  • cargo doc -p propchain-fees -p mock-oracle -p oracle -p propchain-identity --no-deps builds cleanly
  • cargo clippy --all-targets --all-features -- -D warnings passes for the whole workspace
  • cargo test -p propchain-fees -p mock-oracle -p oracle -p propchain-identity: 37 passed
  • cargo +nightly fmt --check clean

… APIs

Adds /// doc comments to every #[ink(message)] entry point that lacked one:

- propchain-fees: 10 messages (auction getters, validator management,
  distribution rates, pending rewards, admin/treasury/config reads,
  DynamicFeeProvider::get_recommended_fee) with fee-unit (bps) semantics
- mock-oracle: 16 messages (Oracle + OracleRegistry trait impls) covering
  price resolution order, fixed confidence/volatility values, and no-op
  registry behavior
- oracle: 16 messages (Oracle + OracleRegistry trait impls) covering
  role requirements, reputation scale (0-1000), staleness markers
- propchain-identity: 12 messages covering verifier/chain administration,
  verification provider lifecycle, KYC request flow, and tier privileges

Also unblocks the clippy gate: newer nightly clippy flags
clippy::clone_on_copy inside ink!-generated storage code in every
contract crate; adds a targeted crate-level allow.

Closes MettaChain#914
Closes MettaChain#915
Closes MettaChain#916
Closes MettaChain#917
@drips-wave

drips-wave Bot commented Aug 24, 2026

Copy link
Copy Markdown

@mxllv Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

1 participant