diff --git a/cosmwasm/ibc-union/app/ucs03-zkgm/src/contract.rs b/cosmwasm/ibc-union/app/ucs03-zkgm/src/contract.rs index 28b902fdbb..5253023f27 100644 --- a/cosmwasm/ibc-union/app/ucs03-zkgm/src/contract.rs +++ b/cosmwasm/ibc-union/app/ucs03-zkgm/src/contract.rs @@ -49,7 +49,7 @@ pub const ZKGM_TOKEN_MINTER_LABEL: &str = "zkgm-token-minter"; /// Instantiate `ucs03-zkgm`. /// -/// This will instantiate the minter contract with the provided [`TokenMinterInitMsg`][crate::msg::TokenMinterInitMsg]. The admin of the minter contract is set to `ucs03-zkgm`. All migrations for the minter will be threaded through the `ucs03-zkgm` migrate entrypoint. +/// This will instantiate the minter contract with the provided [`ucs03_zkgm_token_minter_api::TokenMinterInitMsg`]. The admin of the minter contract is set to `ucs03-zkgm`. All migrations for the minter will be threaded through the `ucs03-zkgm` migrate entrypoint. pub fn init(deps: DepsMut, env: Env, msg: InitMsg) -> Result { CONFIG.save(deps.storage, &msg.config)?; diff --git a/cosmwasm/ibc-union/core/msg/src/lightclient.rs b/cosmwasm/ibc-union/core/msg/src/lightclient.rs index 7c65ca911d..bf7cbe9f1d 100644 --- a/cosmwasm/ibc-union/core/msg/src/lightclient.rs +++ b/cosmwasm/ibc-union/core/msg/src/lightclient.rs @@ -64,7 +64,7 @@ pub enum QueryMsg { GetStatus { client_id: ClientId, }, - /// NOTE: Reads state through the [`QueryStore`]. + /// NOTE: Reads state through the `ibc_union::state::QueryStore`. VerifyCreation { caller: String, client_id: ClientId, @@ -83,13 +83,13 @@ pub enum QueryMsg { proof: Bytes, path: Bytes, }, - /// NOTE: Reads state through the [`QueryStore`]. + /// NOTE: Reads state through the `ibc_union::state::QueryStore`. UpdateState { caller: String, client_id: ClientId, relayer: String, }, - /// TODO: Should read state through the [`QueryStore`]. + /// TODO: Should read state through the `ibc_union::state::QueryStore`. Misbehaviour { caller: String, client_id: ClientId, diff --git a/lib/arbitrum-types/src/lib.rs b/lib/arbitrum-types/src/lib.rs index 228908f6c3..18f3b0a484 100644 --- a/lib/arbitrum-types/src/lib.rs +++ b/lib/arbitrum-types/src/lib.rs @@ -17,50 +17,40 @@ pub mod slots { use solidity_slot::{MappingKey, Slot, U256}; use unionlabs_primitives::ByteArrayExt; - /// The slot containing [`_latestNodeCreated`]. + /// The slot containing [`_latestNodeCreated`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#L62). /// /// ```solidity /// _latestNodeCreated uint64; /// ``` - /// - /// [`_latestNodeCreated`] https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#L62 pub const ROLLUP_CORE_LATEST_NODE_CREATED: Slot = Slot::Offset(U256::from_limbs([117, 0, 0, 0])); - /// The offset into the storage layout of the slot containing [`_latestNodeCreated`]. - /// - /// [`_latestNodeCreated`]: https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#L62 + /// The offset into the storage layout of the slot containing [`_latestNodeCreated`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#L62). pub const ROLLUP_CORE_LATEST_NODE_CREATED_SLOT_OFFSET_BYTES: u8 = 16; - /// The base slot of the [`_nodes`] mapping. + /// The base slot of the [`_nodes`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#L64) mapping. /// /// ```solidity /// _nodes mapping(uint64 => struct Node); /// ``` /// - /// Use [`nodes()`] to calculate the slot for the mapping. - /// - /// [`_nodes`] https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/RollupCore.sol#64 + /// Use `nodes()` to calculate the slot for the mapping. pub const ROLLUP_CORE_NODES_MAPPING_BASE: Slot = Slot::Offset(U256::from_limbs([118, 0, 0, 0])); - /// The offset of the `confirmData` field in the storage layout of the [`Node`] struct. + /// The offset of the `confirmData` field in the storage layout of the [`Node`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/Node.sol#L21-L46) struct. /// - /// The node value is stored in the mapping at [`ROLLUP_CORE_NODES_MAPPING_BASE_SLOT`]. - /// - /// [`Node`]: https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/Node.sol#L21-L46 + /// The node value is stored in the mapping at [`crate::slots::ROLLUP_CORE_NODES_MAPPING_BASE`]. pub const NODE_CONFIRM_DATA_OFFSET: U256 = U256::from_limbs([2, 0, 0, 0]); - /// Calculate the slot of the [`confirmData`] field of the `Node` struct stored in the `_nodes` + /// Calculate the slot of the [`confirmData`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/Node.sol#L27) field of the `Node` struct stored in the `_nodes` /// mapping. /// /// ```solidity /// _nodes mapping(uint64 => struct Node); /// ``` /// - /// The base slot for this mapping is [`ROLLUP_CORE_NODES_MAPPING_BASE_SLOT`], and the - /// `confirmData` offset is [`NODE_CONFIRM_DATA_OFFSET`]. - /// - /// [`confirmData`]: https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/rollup/Node.sol#L27 + /// The base slot for this mapping is [`crate::slots::ROLLUP_CORE_NODES_MAPPING_BASE`], and the + /// `confirmData` offset is [`crate::slots::NODE_CONFIRM_DATA_OFFSET`]. pub fn rollup_core_nodes_confirm_data_slot(node_num: u64) -> U256 { Slot::StructOffset( &Slot::Mapping( diff --git a/lib/arbitrum-verifier/src/lib.rs b/lib/arbitrum-verifier/src/lib.rs index 0a0624cf69..0604ab8148 100644 --- a/lib/arbitrum-verifier/src/lib.rs +++ b/lib/arbitrum-verifier/src/lib.rs @@ -24,7 +24,7 @@ pub enum Error { /// Header verification for arbitrum consists of 4 steps: /// /// 1. Verify that the L1 `RollupCore` account root is part of the L1 state root. -/// 2. Verify that the value stored at [`L1_LATEST_NODE_CREATED_SLOT`] is part of the L1 +/// 2. Verify that the value stored at L1_LATEST_NODE_CREATED_SLOT` is part of the L1 /// `RollupCore` account root /// 3. Verify that the confirm data stored in the `Node` struct at the `_nodes` mapping indexed by /// the node number verified in 2. matches the diff --git a/lib/embed-commit/src/lib.rs b/lib/embed-commit/src/lib.rs index a89b48c59d..a287873831 100644 --- a/lib/embed-commit/src/lib.rs +++ b/lib/embed-commit/src/lib.rs @@ -1,6 +1,6 @@ use bytemuck::CheckedBitPattern; -/// The git rev of the code, as supplied at build time. On `wasm32` targets, this is available via the [`commit_hash`] export. +/// The git rev of the code, as supplied at build time. On `wasm32` targets, this is available via the [`crate::commit_hash`] export. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, CheckedBitPattern)] #[repr(C, u64)] #[rustfmt::skip] @@ -50,7 +50,7 @@ pub static GIT_REV: Rev = match option_env!("GIT_REV") { }, }; -#[cfg(target_arch = "wasm32")] +#[cfg(any(target_arch = "wasm32", doc))] #[no_mangle] pub extern "C" fn commit_hash() -> Rev { unsafe { core::ptr::read_volatile(&GIT_REV as *const _) } diff --git a/lib/ethereum-sync-protocol/src/lib.rs b/lib/ethereum-sync-protocol/src/lib.rs index f387dea830..06cb39575d 100644 --- a/lib/ethereum-sync-protocol/src/lib.rs +++ b/lib/ethereum-sync-protocol/src/lib.rs @@ -37,7 +37,7 @@ pub const GENESIS_SLOT: Slot = Slot::new(0); pub const DST_POP_G2: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"; pub trait BlsVerify { - /// Whether to provide non-signers or signers to [`aggregate_verify_signature`] + /// Whether to provide non-signers or signers to [`BlsVerify::aggregate_verify_signature`] const INVERSE: bool; /// Aggregate the public keys and verify the signature diff --git a/lib/evm-storage-verifier/src/lib.rs b/lib/evm-storage-verifier/src/lib.rs index 046dfc9e1d..c2fe7b5ecd 100644 --- a/lib/evm-storage-verifier/src/lib.rs +++ b/lib/evm-storage-verifier/src/lib.rs @@ -76,7 +76,7 @@ pub fn verify_storage_absence( /// * `proof`: Proof of storage. /// * `storage_root`: Storage root of the contract. /// -/// NOTE: You must not trust the `root` unless you verified it by calling [`validate_light_client_update`]. +/// NOTE: You must not trust the `root` unless you verified it by calling `ethereum_sync_protocol::validate_light_client_update`. pub fn verify_account_storage_root( root: H256, address: &H160, diff --git a/lib/voyager-message/src/call.rs b/lib/voyager-message/src/call.rs index d8498afb5f..ea4bbc5716 100644 --- a/lib/voyager-message/src/call.rs +++ b/lib/voyager-message/src/call.rs @@ -86,11 +86,11 @@ pub struct FetchBlocks { /// /// # Implementation Note /// -/// The returned [`Op`] ***MUST*** resolve to an [`OrderedHeaders`] data. +/// The returned [`Op`] ***MUST*** resolve to an [`crate::data::OrderedHeaders`] data. /// This is the entrypoint called when a client update is requested, and /// is intended to be called in the queue of an -/// [`AggregateSubmitTxFromOrderedHeaders`] message, which will -/// be used to build the actual [`MsgUpdateClient`]s. +/// [`crate::Callback::AggregateSubmitTxFromOrderedHeaders`] message, which will +/// be used to build the actual [`unionlabs::ibc::core::client::msg_update_client::MsgUpdateClient`]s. #[model] pub struct FetchUpdateHeaders { /// The type of client that is tracking the consensus on `self.chain_id`. diff --git a/tools/move-bindgen/src/lib.rs b/tools/move-bindgen/src/lib.rs index 628b23bbc6..9d6ee038a8 100644 --- a/tools/move-bindgen/src/lib.rs +++ b/tools/move-bindgen/src/lib.rs @@ -15,7 +15,7 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize}; pub use serde_json; pub use tracing; -/// Types that can either be returned from #[view] functions or read from storage. +/// Types that can either be returned from `#[view]` functions or read from storage. pub trait MoveOutputType { type Raw: DeserializeOwned; diff --git a/unionvisor/src/symlinker.rs b/unionvisor/src/symlinker.rs index 52a95da1a4..7b1d680500 100644 --- a/unionvisor/src/symlinker.rs +++ b/unionvisor/src/symlinker.rs @@ -71,7 +71,7 @@ impl Symlinker { Ok(()) } - /// Only used by the `Symlinker` internally. Consumers of the current link should use [`current_validated`] + /// Only used by the `Symlinker` internally. Consumers of the current link should use [`Symlinker::current_validated`] fn current_path(&self) -> PathBuf { self.root.join("uniond") } diff --git a/voyager/plugins/transaction-batch/src/callback.rs b/voyager/plugins/transaction-batch/src/callback.rs index 84dae23969..60e5e7d4b4 100644 --- a/voyager/plugins/transaction-batch/src/callback.rs +++ b/voyager/plugins/transaction-batch/src/callback.rs @@ -33,7 +33,7 @@ pub enum ModuleCallback { MakeBatchTransactionUnion(MakeBatchTransaction), } -/// Given an [`OrderedMsgUpdateClients`], returns [`Op`]s that generate [`IbcMessage`]s with proofs at the highest height of the updates. +/// Given an `OrderedMsgUpdateClients`, returns [`Op`]s that generate `IbcMessage`s with proofs at the highest height of the updates. #[model] #[serde(bound(serialize = "", deserialize = ""))] pub struct MakeIbcMessagesFromUpdate { diff --git a/voyager/plugins/transaction-batch/src/data.rs b/voyager/plugins/transaction-batch/src/data.rs index d44ec8c313..21551d9e3d 100644 --- a/voyager/plugins/transaction-batch/src/data.rs +++ b/voyager/plugins/transaction-batch/src/data.rs @@ -37,7 +37,7 @@ pub struct BatchableEvent { } // REVIEW: We probably want to add a way to have "a packet timed out" be a variant here as well -/// A subset of [`FullEvent`], containing only events that cause an action on the counterparty chain. +/// A subset of [`ibc_classic_spec::FullEvent`], containing only events that cause an action on the counterparty chain. #[model] #[derive(Enumorph)] pub enum EventClassic { @@ -74,7 +74,7 @@ impl TryFrom for EventClassic { } // REVIEW: We probably want to add a way to have "a packet timed out" be a variant here as well -/// A subset of [`FullEvent`], containing only events that cause an action on the counterparty chain. +/// A subset of [`ibc_union_spec::event::FullEvent`], containing only events that cause an action on the counterparty chain. #[model] #[derive(Enumorph)] pub enum EventUnion {