From fed0d921e9497c3a2097afdd267478928a8c1147 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:23:17 +0100 Subject: [PATCH] docs(motion): add documentation to public elements --- pallets/motion/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pallets/motion/src/lib.rs b/pallets/motion/src/lib.rs index 7fb0b742..034a8bee 100644 --- a/pallets/motion/src/lib.rs +++ b/pallets/motion/src/lib.rs @@ -6,8 +6,10 @@ mod mock; mod tests; #[cfg(feature = "runtime-benchmarks")] +/// Dispatchable function benchmarks. mod benchmarking; +/// Dispatchable function weights. pub mod weights; pub use pallet::*; use sp_runtime::DispatchResult; @@ -16,6 +18,7 @@ pub use weights::WeightInfo; extern crate alloc; use alloc::{boxed::Box, vec}; +/// The motion pallet. #[frame_support::pallet] pub mod pallet { use frame_support::{ @@ -28,6 +31,7 @@ pub mod pallet { #[pallet::pallet] pub struct Pallet(_); + /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { /// The runtime event type. @@ -48,6 +52,7 @@ pub mod pallet { type WeightInfo: WeightInfo; } + /// The events that can be emitted. #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { @@ -59,9 +64,11 @@ pub mod pallet { DispatchUnanimous { motion_result: DispatchResult }, } + /// Errors inform users that something went wrong. #[pallet::error] pub enum Error {} + /// The dispatchable functions available. #[pallet::call] impl Pallet { /// Ensures the simple majority is met and dispatches a call with `Root` origin.