docs: complete rustdoc coverage for fees, mock-oracle, oracle and identity message APIs - #1042
Open
mxllv wants to merge 1 commit into
Open
docs: complete rustdoc coverage for fees, mock-oracle, oracle and identity message APIs#1042mxllv wants to merge 1 commit into
mxllv wants to merge 1 commit into
Conversation
… 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
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
set_distribution_rates(bps semantics, 10_000 denominator),pending_reward,admin,default_config,fee_treasury, andDynamicFeeProvider::get_recommended_fee.Oracle/OracleRegistrytrait-impl messages — mock price resolution order (pushed price vs deterministic seed), fixed confidence of 95, synthetic ±10% confidence bands, and which registry calls are deliberate no-ops.Oracle/OracleRegistrytrait-impl messages — admin-only role requirements, reputation scale (0–1000 with +10/-50 adjustments and auto-deactivation below 200), slash semantics, anomaly heuristic thresholds. The stale(Issue #497)marker onupdate_valuation_from_sourceswas replaced with an accurate description of the participation tracking and auto-slash behavior.IdentityNotFound,VerificationFailed,Unauthorized), and tier privilege checks.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
mainwith a recent nightly clippy change:clippy::clone_on_copynow 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-depsbuilds cleanlycargo clippy --all-targets --all-features -- -D warningspasses for the whole workspacecargo test -p propchain-fees -p mock-oracle -p oracle -p propchain-identity: 37 passedcargo +nightly fmt --checkclean