Skip to content

Commit 11011fb

Browse files
committed
docs(contract): link items in doc comments instead of naming them
Matches the style already used elsewhere in the crate ([`WORST_CASE_ENTRY_BYTES`], [`VerificationResult::Verified`]): a bracketed link reads as a reference to an item rather than as decoration. No rot detection, despite broken_intra_doc_links being denied at the workspace level and check-docs running with RUSTDOCFLAGS=-D warnings. near-sdk refuses to build this crate outside wasm32, so cargo doc cannot document it and the workspace run skips it entirely -- verified by inserting a link to a method that does not exist and watching cargo doc --workspace exit 0. The three paths here were checked by hand instead. Converted the references that name items: Self::get_tee_accounts, Self::config, and crate::MpcContract::submit_participant_info. Parameter names stay in plain backticks, and attestation_storage_fee_millinear stays plain too -- it is read by an operator out of config() JSON, and the field is pub(crate).
1 parent 9375044 commit 11011fb

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/contract/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ impl MpcContract {
775775

776776
/// Grants available to `account_id`: bought, minus those currently backing a
777777
/// stored entry. Zero therefore means either "never prepaid" or "prepaid, and the
778-
/// grant is backing an entry" — cross-reference `get_tee_accounts` to tell which.
778+
/// grant is backing an entry" — cross-reference [`Self::get_tee_accounts`] to tell which.
779779
pub fn available_attestation_grants(&self, account_id: AccountId) -> u32 {
780780
self.grants_for(&account_id)
781781
}
@@ -907,7 +907,7 @@ impl MpcContract {
907907
}
908908
}
909909

910-
/// Fee for one attestation-storage grant. Not exposed as its own view: `config()`
910+
/// Fee for one attestation-storage grant. Not exposed as its own view: [`Self::config`]
911911
/// already returns `attestation_storage_fee_millinear`, and an operator reads it once
912912
/// by hand. A dedicated view can be added later if operators ask for one.
913913
fn attestation_storage_fee_internal(&self) -> NearToken {

crates/contract/src/tee/tee_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl TeeState {
475475
}
476476

477477
/// Account that owns the entry stored under `tls_public_key`, if any. Read-only,
478-
/// so `submit_participant_info` can classify a submission before doing any
478+
/// so [`crate::MpcContract::submit_participant_info`] can classify a submission before doing any
479479
/// verification work.
480480
pub(crate) fn attestation_owner(&self, tls_public_key: &Ed25519PublicKey) -> Option<AccountId> {
481481
self.stored_attestations

crates/contract/tests/snapshots/abi__abi_has_not_changed.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ expression: abi
409409
},
410410
{
411411
"name": "available_attestation_grants",
412-
"doc": " Grants available to `account_id`: bought, minus those currently backing a\n stored entry. Zero therefore means either \"never prepaid\" or \"prepaid, and the\n grant is backing an entry\" — cross-reference `get_tee_accounts` to tell which.",
412+
"doc": " Grants available to `account_id`: bought, minus those currently backing a\n stored entry. Zero therefore means either \"never prepaid\" or \"prepaid, and the\n grant is backing an entry\" — cross-reference [`Self::get_tee_accounts`] to tell which.",
413413
"kind": "view",
414414
"params": {
415415
"serialization_type": "json",

0 commit comments

Comments
 (0)