From 23a6f2d7427e98a6b53b995dc3e0f582a632d537 Mon Sep 17 00:00:00 2001
From: cdamian <17934949+cdamian@users.noreply.github.com>
Date: Tue, 12 Mar 2024 13:24:18 +0200
Subject: [PATCH] docs: Update pallet docs
---
README.md | 46 +++++++++++++++----
pallets/anchors/src/lib.rs | 7 +--
pallets/block-rewards/src/lib.rs | 13 +++---
pallets/bridge/src/lib.rs | 4 +-
pallets/collator-allowlist/src/lib.rs | 14 +++++-
pallets/crowdloan-claim/src/lib.rs | 20 ++++----
pallets/crowdloan-reward/src/lib.rs | 4 +-
pallets/ethereum-transaction/src/lib.rs | 18 +++++---
pallets/foreign-investments/src/lib.rs | 2 +-
pallets/investments/Cargo.toml | 2 +-
pallets/investments/src/lib.rs | 5 +-
.../axelar-gateway-precompile/src/lib.rs | 7 ++-
.../routers/src/lib.rs | 11 +++++
pallets/liquidity-pools-gateway/src/lib.rs | 15 ++++++
pallets/oracle-collection/src/lib.rs | 6 ++-
pallets/oracle-feed/src/lib.rs | 7 ++-
pallets/order-book/src/lib.rs | 17 ++++---
pallets/pool-fees/src/lib.rs | 6 ++-
pallets/pool-registry/src/lib.rs | 5 ++
pallets/restricted-xtokens/src/lib.rs | 6 +--
pallets/swaps/src/lib.rs | 8 ++--
pallets/token-mux/src/lib.rs | 2 +-
pallets/transfer-allowlist/src/lib.rs | 12 +++--
23 files changed, 166 insertions(+), 71 deletions(-)
diff --git a/README.md b/README.md
index aa74455563..01ad8309c3 100644
--- a/README.md
+++ b/README.md
@@ -28,37 +28,63 @@ Centrifuge is the infrastructure that facilitates the decentralized financing of
## Building blocks
On top of the [Substrate FRAME](https://docs.substrate.io/reference/frame-pallets/) framework, Centrifuge Chain is composed of custom pallets which can be found inside the `pallets` folder. The following list gives a brief overview, and links to the corresponding documentation:
-- [**pool-system**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/pool-system) ([docs](https://reference.centrifuge.io/pallet_pool_system/index.html)): Creating and managing investment pools. It is bundling loans, slicing pools into tranches, and controlling investment epochs.
-
-- [**loans**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/loans) ([docs](https://reference.centrifuge.io/pallet_loans/index.html)): Locking a collateral NFT into a pool allowing to borrow from the pool. The loans pallet is also used for bookkeeping loan values and outstanding debt.
-
- [**anchors**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/anchors) ([docs](https://reference.centrifuge.io/pallet_anchors/index.html)): Storing hashes of documents on-chain. The documents are stored in the Private Off-chain Data (POD) node network.
+- [**block-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/block-rewards) ([docs](https://reference.centrifuge.io/pallet_block_rewards/index.html)): Provides means of configuring and distributing block rewards to collators as well as the annual treasury inflation.
+
- [**bridge**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/bridge) ([docs](https://reference.centrifuge.io/pallet_bridge/index.html)): Connecting [ChainBridge](https://github.com/centrifuge/chainbridge-substrate) to transfer tokens to and from Ethereum.
- [**collator-allowlist**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/collator-allowlist) ([docs](https://reference.centrifuge.io/pallet_collator_allowlist/index.html)): Tracking active collators, and allows the root account to manage this list.
-- [**crowdloan-claim**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/crowdloan-claim) ([docs](https://reference.centrifuge.io/pallet_crowdloan_claim/index.html)): Claiming user rewards for their crowdloan funding support.
-
-- [**crowdloan-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/crowdloan-reward) ([docs](https://reference.centrifuge.io/pallet_crowdloan_reward/index.html)): Calculating the reward amounts for crowdloan contributors. This is used by the `crowdloan-claim` pallet which handles the actual claims.
+- [**ethereum-transaction**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/ethereum-transaction) ([docs](https://reference.centrifuge.io/pallet_ethereum_transaction/index.html)): Wrapper around the Ethereum pallet which allows other pallets to execute EVM calls.
- [**fees**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/fees) ([docs](https://reference.centrifuge.io/pallet_fees/index.html)): Taking fees from accounts and sending this to the treasury, to the author, or burning them.
+- [**foreign-investments**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/foreign-investments) ([docs](https://reference.centrifuge.io/pallet_foreign_investments/index.html)): Enables investing, redeeming and collecting in foreign and non-foreign currencies. Can be regarded as an extension of `pallet-investments` which provides the same toolset for pool (non-foreign) currencies.
+
- [**interest-accrual**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/interest-accrual) ([docs](https://reference.centrifuge.io/pallet_interest_accrual/index.html)): Keeping account of the outstanding debt through interest accrual calculations.
+- [**investments**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/investments) ([docs](https://reference.centrifuge.io/pallet_investments/index.html)): Provides orders for assets and allows user to collect these orders.
+
- [**keystore**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/keystore) ([docs](https://reference.centrifuge.io/pallet_keystore/index.html)): Linking public keys to accounts. Supporting the operations of the offchain document consensus layer through the Centrifuge POD (Private Offchain Data) Node.
-- [**nft**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/nft) ([docs](https://reference.centrifuge.io/pallet_nft/index.html)): Validating a mint request that needs to be transferred through the bridge layer to Ethereum.
+- [**liquidity-pools**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-pools) ([docs](https://reference.centrifuge.io/pallet_liquidity_pools/index.html)): Provides the toolset to enable foreign investments on foreign domains.
+
+- [**liquidity-pools-gateway**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-pools-gateway) ([docs](https://reference.centrifuge.io/pallet_liquidity_pools_gateway/index.html)): The main handler of incoming and outgoing Liquidity Pools messages.
+
+- [**liquidity-pools-gateway-routers**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-pools-gateway/routers) ([docs](https://reference.centrifuge.io/liquidity_pools_gateway_routers/index.html)): This crate contains the `DomainRouters` used by the Liquidity Pools Gateway pallet.
-- [**nft-sales**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/nft-sales) ([docs](https://reference.centrifuge.io/pallet_nft_sales/index.html)): Providing a place for digital art creators and owners to offer their NFTs for sale and for potential buyers to browse and buy them.
+- [**axelar-gateway-precompile**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-pools-gateway/axelar-gateway-precompile) ([docs](https://reference.centrifuge.io/axelar_gateway_precompile/index.html)): Pallet that serves as an EVM precompile for incoming Liquidity Pools messages from the Axelar network.
+
+- [**liquidity-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-rewards) ([docs](https://reference.centrifuge.io/pallet_liquidity_rewards/index.html)): Epoch based reward system.
+
+- [**loans**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/loans) ([docs](https://reference.centrifuge.io/pallet_loans/index.html)): Locking a collateral NFT into a pool allowing to borrow from the pool. The loans pallet is also used for bookkeeping loan values and outstanding debt.
+
+- [**oracle-collection**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/oracle-collection) ([docs](https://reference.centrifuge.io/pallet_oracle_collection/index.html)): Pallet used to collect and aggregate oracle values.
+
+- [**oracle-feed**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/oracle-feed) ([docs](https://reference.centrifuge.io/pallet_oracle_feed/index.html)): Pallet used to feed oracle values.
+
+- [**order-book**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/order-book) ([docs](https://reference.centrifuge.io/pallet_order_book/index.html)): Allows orders for currency swaps to be placed and fulfilled.
- [**permissions**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/permissions) ([docs](https://reference.centrifuge.io/pallet_permissions/index.html)): Linking roles to accounts. It is adding and removing relationships between roles and accounts on chain.
+- [**pool-fees**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/pool-fees) ([docs](https://reference.centrifuge.io/pallet_pool_fees/index.html)): Stores all the fees related to a pool and allows for these fees to be charged.
+
+- [**pool-registry**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/pool-registry) ([docs](https://reference.centrifuge.io/pallet_pool_registry/index.html)): Used for creating, updating, and setting the metadata of pools.
+
+- [**pool-system**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/pool-system) ([docs](https://reference.centrifuge.io/pallet_pool_system/index.html)): Creating and managing investment pools. It is bundling loans, slicing pools into tranches, and controlling investment epochs.
+
- [**restricted-tokens**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/restricted-tokens) ([docs](https://reference.centrifuge.io/pallet_restricted_tokens/index.html)): Transferring tokens and setting balances. It is wrapping `orml-tokens` with the addition of checking for permissions.
+- [**restricted-xtokens**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/restricted-xtokens) ([docs](https://reference.centrifuge.io/pallet_restricted_xtokens/index.html)): Wrapper pallet over `orml-xtokens` which allows the runtime to create arbitrary filters for transfers of x-chain-transfers.
+
- [**rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/rewards) ([docs](https://reference.centrifuge.io/pallet_rewards/index.html)): Implement a [scalable reward distribution](https://solmaz.io/2019/02/24/scalable-reward-changing/) mechanism that can be used for other pallets to create different rewards systems.
-- [**liquidity-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/liquidity-rewards) ([docs](https://reference.centrifuge.io/pallet_liquidity_rewards/index.html)): Epoch based reward system.
+- [**swaps**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/swaps) ([docs](https://reference.centrifuge.io/pallet_swaps/index.html)): Enables applying swaps independently of previous swaps in the same or opposite directions.
+
+- [**token-mux**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/token-mux) ([docs](https://reference.centrifuge.io/pallet_token_mux/index.html)): Enables proxying variants of the same foreign assets to a local asset representation.
+
+- [**transfer-allowlist**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/transfer-allowlist) ([docs](https://reference.centrifuge.io/pallet_transfer_allowlist/index.html)): This pallet checks whether an account should be allowed to make a transfer to a receiving location with a specific currency.
## Developing
Instructions for building, testing, and developing Centrifuge Chain can be found in [`docs/DEVELOPING.md`](docs/DEVELOPING.md).
diff --git a/pallets/anchors/src/lib.rs b/pallets/anchors/src/lib.rs
index ae885bd1eb..35744ed7e7 100644
--- a/pallets/anchors/src/lib.rs
+++ b/pallets/anchors/src/lib.rs
@@ -10,10 +10,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! # Anchors pallet for runtime
+//
+//! # Anchors Pallet
//!
-//! This pallet provides functionality of Storing anchors on Chain
+//! This pallet provides functionality of Storing anchors on Chain.
+
#![cfg_attr(not(feature = "std"), no_std)]
// This pallet is getting a big refactor soon, so no sense doing clippy cleanups
#![allow(clippy::all)]
diff --git a/pallets/block-rewards/src/lib.rs b/pallets/block-rewards/src/lib.rs
index ec9a232d6f..8f846e4356 100644
--- a/pallets/block-rewards/src/lib.rs
+++ b/pallets/block-rewards/src/lib.rs
@@ -12,13 +12,12 @@
//
//! # BlockRewards Pallet
//!
-//! The BlockRewards pallet provides functionality for distributing rewards to
-//! different accounts with different currencies as well as configuring an
-//! annual treasury inflation. The distribution happens when a session (a
-//! constant time interval) finalizes. Users cannot stake manually as their
-//! collator membership is synchronized via a provider.
-//! Thus, when new collators join, they will automatically be staked and
-//! vice-versa when collators leave, they are unstaked.
+//! The BlockRewards pallet provides means of configuring and distributing block
+//! rewards to collators as well as the annual treasury inflation. The
+//! distribution happens when a session (a constant time interval) finalizes.
+//! Users cannot stake manually as their collator membership is synchronized via
+//! a provider. Thus, when new collators join, they will automatically be staked
+//! and vice-versa when collators leave, they are unstaked.
//!
//! The BlockRewards pallet provides functions for:
//!
diff --git a/pallets/bridge/src/lib.rs b/pallets/bridge/src/lib.rs
index f07204c214..fa5b93c3cb 100644
--- a/pallets/bridge/src/lib.rs
+++ b/pallets/bridge/src/lib.rs
@@ -10,8 +10,8 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! # Bridge pallet
+//
+//! # Bridge Pallet
//!
//! This pallet implements a bridge between Chainbridge and Centrifuge Chain.
diff --git a/pallets/collator-allowlist/src/lib.rs b/pallets/collator-allowlist/src/lib.rs
index 48bc94e1f5..24c8315e38 100644
--- a/pallets/collator-allowlist/src/lib.rs
+++ b/pallets/collator-allowlist/src/lib.rs
@@ -1,4 +1,16 @@
-//! Collator Allowlist Pallet
+// Copyright 2024 Centrifuge Foundation (centrifuge.io).
+//
+// This file is part of the Centrifuge chain project.
+// Centrifuge is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version (see http://www.gnu.org/licenses).
+// Centrifuge is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+//! # Collator Allowlist Pallet
//!
//! This pallet provides two extrinsics, one that allows sudo to
//! add collator ids to an allowlist, and another one that allows
diff --git a/pallets/crowdloan-claim/src/lib.rs b/pallets/crowdloan-claim/src/lib.rs
index fe488d8d2f..47deb467d8 100644
--- a/pallets/crowdloan-claim/src/lib.rs
+++ b/pallets/crowdloan-claim/src/lib.rs
@@ -1,20 +1,16 @@
-// Copyright 2021 Parity Technologies (UK) Ltd.
-// This file is part of Centrifuge (centrifuge.io) parachain.
-
-// Cumulus is free software: you can redistribute it and/or modify
+// Copyright 2024 Centrifuge Foundation (centrifuge.io).
+//
+// This file is part of the Centrifuge chain project.
+// Centrifuge is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Cumulus is distributed in the hope that it will be useful,
+// (at your option) any later version (see http://www.gnu.org/licenses).
+// Centrifuge is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Cumulus. If not, see .
-
-//! # Crowdloan claim pallet
+//
+//! # Crowdloan Claim Pallet
//!
//! A pallet used for claiming reward payouts for crowdloan campaigns. This
//! does not implement the rewarding strategy, that is the role of the
diff --git a/pallets/crowdloan-reward/src/lib.rs b/pallets/crowdloan-reward/src/lib.rs
index 52d3cac1c3..97674bcfc1 100644
--- a/pallets/crowdloan-reward/src/lib.rs
+++ b/pallets/crowdloan-reward/src/lib.rs
@@ -10,8 +10,8 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! # Crowdloan reward pallet
+//
+//! # Crowdloan Reward Pallet
//!
//! This pallet implements a specific rewarding strategy for crowdloan
//! campaign. It worth pointing out that this pallet works hand in hand
diff --git a/pallets/ethereum-transaction/src/lib.rs b/pallets/ethereum-transaction/src/lib.rs
index e5673e87f1..892dcaa335 100644
--- a/pallets/ethereum-transaction/src/lib.rs
+++ b/pallets/ethereum-transaction/src/lib.rs
@@ -9,6 +9,16 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
+//! # Ethereum Transaction Pallet
+//!
+//! The Ethereum Transaction pallet is a wrapper around the Ethereum pallet,
+//! and it allows other pallets to execute EVM calls. It keeps track
+//! of the nonce used for each call and builds a fake signature for executing
+//! the provided call.
+//!
+//! The execution fees are charged by the Ethereum pallet, the only other extra
+//! fee is be the one from the nonce read operation.
#![cfg_attr(not(feature = "std"), no_std)]
use cfg_primitives::TRANSACTION_RECOVERY_ID;
@@ -91,12 +101,6 @@ pub mod pallet {
OriginFor:
From + Into>>,
{
- /// This implementation serves as a wrapper around the Ethereum pallet
- /// execute functionality. It keeps track of the nonce used for each
- /// call and builds a fake signature for executing the provided call.
- ///
- /// NOTE - The execution fees are charged by the Ethereum pallet,
- /// we only have to charge for the nonce read operation.
fn call(
from: H160,
to: H160,
@@ -158,7 +162,7 @@ pub mod pallet {
// querying the `Pending` storage of the pallet-ethereum.
let pending = pallet_ethereum::Pending::::get();
let (_, _, receipt) = pending.last().ok_or(DispatchError::Other(
- "Ethereuem not adding pending storage. Unexpected.",
+ "Ethereum not adding pending storage. Unexpected.",
))?;
if Pallet::::valid_code(receipt) {
diff --git a/pallets/foreign-investments/src/lib.rs b/pallets/foreign-investments/src/lib.rs
index e5fe487d84..47f72a8570 100644
--- a/pallets/foreign-investments/src/lib.rs
+++ b/pallets/foreign-investments/src/lib.rs
@@ -14,7 +14,7 @@
//! # Foreign Investment pallet
//!
//! Enables investing, redeeming and collecting in foreign and non-foreign
-//! currencies. Can be regarded as an extension of `pallet-investment` which
+//! currencies. Can be regarded as an extension of `pallet-investments` which
//! provides the same toolset for pool (non-foreign) currencies.
//!
//! - [`Pallet`]
diff --git a/pallets/investments/Cargo.toml b/pallets/investments/Cargo.toml
index 187a37bb8d..80e554f1c0 100644
--- a/pallets/investments/Cargo.toml
+++ b/pallets/investments/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "pallet-investments"
-description = "Provides orders for assests and allows user to collect these orders"
+description = "Provides orders for assets and allows user to collect these orders."
version = "1.0.0"
authors.workspace = true
edition.workspace = true
diff --git a/pallets/investments/src/lib.rs b/pallets/investments/src/lib.rs
index ed7c5027eb..18c7388c73 100644
--- a/pallets/investments/src/lib.rs
+++ b/pallets/investments/src/lib.rs
@@ -10,7 +10,10 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
+//
+//! # Investments Pallet
+//!
+//! Provides orders for assets and allows user to collect these orders.
#![cfg_attr(not(feature = "std"), no_std)]
use cfg_primitives::OrderId;
diff --git a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs
index e634ff1044..140e23109e 100644
--- a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs
+++ b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs
@@ -9,6 +9,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
+//! # Axelar Gateway Precompile
+//!
+//! Pallet that serves as an EVM precompile for incoming Liquidity Pools
+//! messages from the Axelar network.
#![cfg_attr(not(feature = "std"), no_std)]
use cfg_types::domain_address::{Domain, DomainAddress};
@@ -111,7 +116,7 @@ pub mod pallet {
type RuntimeEvent: From> + IsType<::RuntimeEvent>;
/// The origin that is allowed to set the gateway address we accept
- /// messageas from
+ /// messages from
type AdminOrigin: EnsureOrigin<::RuntimeOrigin>;
type WeightInfo: WeightInfo;
diff --git a/pallets/liquidity-pools-gateway/routers/src/lib.rs b/pallets/liquidity-pools-gateway/routers/src/lib.rs
index edd5363283..befd30d808 100644
--- a/pallets/liquidity-pools-gateway/routers/src/lib.rs
+++ b/pallets/liquidity-pools-gateway/routers/src/lib.rs
@@ -9,6 +9,17 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
+//! # Liquidity Pools Gateway Routers
+//!
+//! This crate contains the `DomainRouters` used by the Liquidity Pools Gateway
+//! pallet.
+//!
+//! The routers can be used to communicate with:
+//!
+//! Axelar - via EVM and XCM (through Moonbeam).
+//!
+//! Moonbeam - via XCM.
#![cfg_attr(not(feature = "std"), no_std)]
// polkadot/blob/19f6665a6162e68cd2651f5fe3615d6676821f90/xcm/src/v3/mod.rs#
diff --git a/pallets/liquidity-pools-gateway/src/lib.rs b/pallets/liquidity-pools-gateway/src/lib.rs
index d1c0baa994..eb8ea53a00 100644
--- a/pallets/liquidity-pools-gateway/src/lib.rs
+++ b/pallets/liquidity-pools-gateway/src/lib.rs
@@ -9,6 +9,21 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
+//! # Liquidity Pools Gateway Pallet.
+//!
+//! The Liquidity Pools Gateway pallet is the main handler of incoming and
+//! outgoing Liquidity Pools messages.
+//!
+//! For incoming messages it validates the `Domain` and address of the sender,
+//! and, upon successful validation, it sends the message to the `InboundQueue`
+//! for further processing. The pallet that implements the `InboundQueue` is the
+//! Liquidity Pools pallet.
+//!
+//! For outgoing messages it's using a queue which gets serviced when a block
+//! gets finalized. Each message in the `OutboundMessageQueue` has a `Domain`
+//! assigned to it, and that `Domain` should have a corresponding `DomainRouter`
+//! which should be set prior to sending the message.
#![cfg_attr(not(feature = "std"), no_std)]
use core::fmt::Debug;
diff --git a/pallets/oracle-collection/src/lib.rs b/pallets/oracle-collection/src/lib.rs
index 4f491dfa70..bf42509bbc 100644
--- a/pallets/oracle-collection/src/lib.rs
+++ b/pallets/oracle-collection/src/lib.rs
@@ -10,8 +10,10 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! Oracle pallet to collect and aggregate oracle values.
+//
+//! # Oracle Collection Pallet
+//!
+//! Pallet used to collect and aggregate oracle values.
//!
//! The collection admin configures the collection allowing a list of feeders.
//!
diff --git a/pallets/oracle-feed/src/lib.rs b/pallets/oracle-feed/src/lib.rs
index 93efd819f1..f4a24c0c8d 100644
--- a/pallets/oracle-feed/src/lib.rs
+++ b/pallets/oracle-feed/src/lib.rs
@@ -10,8 +10,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! Oracle pallet to feed values.
+//
+//! # Oracle Feed Pallet
+//!
+//! Pallet used to feed oracle values.
+//!
//! Feeding is permissionless given an initial fee for each key.
//!
//!
diff --git a/pallets/order-book/src/lib.rs b/pallets/order-book/src/lib.rs
index 514723bbe1..3dff5df8d8 100644
--- a/pallets/order-book/src/lib.rs
+++ b/pallets/order-book/src/lib.rs
@@ -9,16 +9,19 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-// This pallet was made using the ZeitGeist Orderbook pallet as a reference;
-// with much of the code being copied or adapted from that pallet.
-// The ZeitGeist Orderbook pallet can be found here: https://github.com/zeitgeistpm/zeitgeist/tree/main/zrml/orderbook-v1
+//
+//! # Orderbook Pallet
+//!
+//! The Orderbook pallet allows orders for currency swaps to be placed and
+//! fulfilled.
+//!
+//! This pallet was made using the ZeitGeist Orderbook pallet as a reference;
+//! with much of the code being copied or adapted from that pallet.
+//! The ZeitGeist Orderbook pallet can be found here:
+//!
#![cfg_attr(not(feature = "std"), no_std)]
-//! This module adds an orderbook pallet, allowing orders for currency swaps to
-//! be placed and fulfilled for currencies in an asset registry.
-
#[cfg(test)]
pub(crate) mod mock;
diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs
index a594777ac2..7ffe3f5f51 100644
--- a/pallets/pool-fees/src/lib.rs
+++ b/pallets/pool-fees/src/lib.rs
@@ -9,7 +9,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
+//
+//! # Pool Fees Pallet
+//!
+//! The Pool Fees pallet stores all the fees related to a pool and allows for
+//! these fees to be charged.
#![cfg_attr(not(feature = "std"), no_std)]
pub use pallet::*;
diff --git a/pallets/pool-registry/src/lib.rs b/pallets/pool-registry/src/lib.rs
index c1e7e2e632..1feb306862 100644
--- a/pallets/pool-registry/src/lib.rs
+++ b/pallets/pool-registry/src/lib.rs
@@ -10,6 +10,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
+//! # Pool Registry Pallet
+//!
+//! The Pool Registry pallet is used for creating, updating, and setting the
+//! metadata of pools.
#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::too_many_arguments)]
diff --git a/pallets/restricted-xtokens/src/lib.rs b/pallets/restricted-xtokens/src/lib.rs
index a9451793eb..637109432d 100644
--- a/pallets/restricted-xtokens/src/lib.rs
+++ b/pallets/restricted-xtokens/src/lib.rs
@@ -9,12 +9,12 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! # Pallet-Restricted-Xtokens Module
+//
+//! # Restricted Xtokens Pallet
//!
//! ## Overview
//!
-//! This pallet is a wrapper pallet over `orml-xtokens` and allows the runtime
+//! This pallet is a wrapper pallet over `orml-xtokens` which allows the runtime
//! to create arbitrary filters for transfers of x-chain-transfers.
//! The interface mimic 1-to-1 the interface of `orml-xtokens`.
//!
diff --git a/pallets/swaps/src/lib.rs b/pallets/swaps/src/lib.rs
index 21fb1fa16c..1ab5825c3d 100644
--- a/pallets/swaps/src/lib.rs
+++ b/pallets/swaps/src/lib.rs
@@ -10,9 +10,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-
-//! # Swaps pallet: Enables applying swaps independently of previous swaps in the same or opposite
-//! directions.
+//
+//! # Swaps Pallet
+//!
+//! The Swaps pallet enables applying swaps independently of previous swaps in
+//! the same or opposite directions.
#![cfg_attr(not(feature = "std"), no_std)]
diff --git a/pallets/token-mux/src/lib.rs b/pallets/token-mux/src/lib.rs
index 86f86c5f7e..6f39175dc3 100644
--- a/pallets/token-mux/src/lib.rs
+++ b/pallets/token-mux/src/lib.rs
@@ -10,7 +10,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//! # Token Mux pallet
+//! # Token Mux Pallet
//!
//! Enables proxying variants of the same foreign assets
//! to a local asset representation. By locking a variant, the user receives
diff --git a/pallets/transfer-allowlist/src/lib.rs b/pallets/transfer-allowlist/src/lib.rs
index 10ebf7ce74..41beabbd4f 100644
--- a/pallets/transfer-allowlist/src/lib.rs
+++ b/pallets/transfer-allowlist/src/lib.rs
@@ -9,17 +9,21 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-#![cfg_attr(not(feature = "std"), no_std)]
-
-//! This module checks whether an account should be allowed to make a transfer
+//
+//! # Transfer Allowlist Pallet
+//!
+//! This pallet checks whether an account should be allowed to make a transfer
//! to a receiving location with a specific currency.
+//!
//! If there are no allowances specified, then the account is assumed to be
//! allowed to send to any location without restrictions.
-//! However once an allowance for a sender to a specific recieving location and
+//!
+//! However, once an allowance for a sender to a specific receiving location and
//! currency is made, /then/ transfers from the sending account are restricted
//! for that currency to:
//! - the account(s) for which allowances have been made
//! - the block range specified in the allowance
+#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(test)]
pub(crate) mod mock;