From 02aecb56fe0ed42b98ceee7f270da1b1ed972e90 Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Wed, 17 Jan 2024 13:54:26 +0100
Subject: [PATCH] add points in docstrings

---
 docs/api/runtime-errors.md           |  34 +++++++++++++--------------
 docs/api/runtime-events.md           |  10 ++++----
 pallets/authority-members/src/lib.rs |  18 +++++++-------
 pallets/certification/src/lib.rs     |  31 ++++++++++++------------
 pallets/distance/src/lib.rs          |   8 +++----
 pallets/duniter-wot/src/lib.rs       |  10 ++++----
 pallets/identity/src/lib.rs          |   6 ++---
 pallets/membership/src/lib.rs        |   2 +-
 pallets/smith-members/src/lib.rs     |   6 ++---
 resources/metadata.scale             | Bin 128437 -> 128457 bytes
 10 files changed, 62 insertions(+), 63 deletions(-)

diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md
index a93c10f6f..620c1674c 100644
--- a/docs/api/runtime-errors.md
+++ b/docs/api/runtime-errors.md
@@ -386,21 +386,21 @@ A smith has a limited stock of certifications
 <details>
 <summary>
 <code>AlreadyIncoming</code> - 0</summary>
-Member already incoming
+Member already incoming.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>AlreadyOnline</code> - 1</summary>
-Member already online
+Member already online.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>AlreadyOutgoing</code> - 2</summary>
-Member already outgoing
+Member already outgoing.
 </details>
 </li>
 <li>
@@ -414,42 +414,42 @@ Owner key is invalid as a member.
 <details>
 <summary>
 <code>MemberBlacklisted</code> - 4</summary>
-Member is blacklisted
+Member is blacklisted.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>MemberNotBlacklisted</code> - 5</summary>
-Member is not blacklisted
+Member is not blacklisted.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>MemberNotFound</code> - 6</summary>
-Member not found
+Member not found.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>NotOnlineNorIncoming</code> - 7</summary>
-Neither online nor scheduled
+Neither online nor scheduled.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>NotMember</code> - 8</summary>
-Not member
+Not member.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>SessionKeysNotProvided</code> - 9</summary>
-Session keys not provided
+Session keys not provided.
 </details>
 </li>
 <li>
@@ -741,14 +741,14 @@ This account is not allowed to claim UDs.
 <details>
 <summary>
 <code>NotEnoughCerts</code> - 0</summary>
-Insufficient certifications received
+Insufficient certifications received.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>TargetStatusInvalid</code> - 1</summary>
-Target status is incompatible with this operation
+Target status is incompatible with this operation.
 </details>
 </li>
 <li>
@@ -790,7 +790,7 @@ Issuer or receiver not found.
 <details>
 <summary>
 <code>MembershipRenewalPeriodNotRespected</code> - 7</summary>
-Membership can only be renewed after an antispam delay
+Membership can only be renewed after an antispam delay.
 </details>
 </li>
 </ul>
@@ -959,7 +959,7 @@ Membership not found.
 <details>
 <summary>
 <code>AlreadyMember</code> - 3</summary>
-Already member, can not claim membership
+Already member, can not claim membership.
 </details>
 </li>
 </ul>
@@ -970,21 +970,21 @@ Already member, can not claim membership
 <details>
 <summary>
 <code>CannotCertifySelf</code> - 0</summary>
-Identity cannot certify itself
+Identity cannot certify itself.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>IssuedTooManyCert</code> - 1</summary>
-Identity has already issued the maximum number of certifications
+Identity has already issued the maximum number of certifications.
 </details>
 </li>
 <li>
 <details>
 <summary>
 <code>IssuerNotFound</code> - 2</summary>
-Issuer not found
+Issuer not found.
 </details>
 </li>
 <li>
@@ -1093,7 +1093,7 @@ Evaluation result has a wrong length.
 <details>
 <summary>
 <code>TargetMustBeUnvalidated</code> - 12</summary>
-Targeted distance evaluation request is only possible for an unvalidated identity
+Targeted distance evaluation request is only possible for an unvalidated identity.
 </details>
 </li>
 </ul>
diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md
index c495670a1..566e73839 100644
--- a/docs/api/runtime-events.md
+++ b/docs/api/runtime-events.md
@@ -650,7 +650,7 @@ no args
 <details>
 <summary>
 <code>InvitationSent(idty_index, invited_by)</code> - 0</summary>
-An identity is being inivited to become a smith
+An identity is being inivited to become a smith.
 
 ```rust
 idty_index: T::IdtyIndex
@@ -663,7 +663,7 @@ invited_by: T::IdtyIndex
 <details>
 <summary>
 <code>InvitationAccepted(idty_index)</code> - 1</summary>
-The invitation has been accepted
+The invitation has been accepted.
 
 ```rust
 idty_index: T::IdtyIndex
@@ -700,7 +700,7 @@ idty_index: T::IdtyIndex
 <details>
 <summary>
 <code>SmithExcluded(idty_index)</code> - 4</summary>
-A smith has been removed from the smiths set
+A smith has been removed from the smiths set.
 
 ```rust
 idty_index: T::IdtyIndex
@@ -1374,7 +1374,7 @@ who: T::AccountId
 <details>
 <summary>
 <code>EvaluatedValid(idty_index)</code> - 1</summary>
-Distance rule was found valid
+Distance rule was found valid.
 
 ```rust
 idty_index: T::IdtyIndex
@@ -1386,7 +1386,7 @@ idty_index: T::IdtyIndex
 <details>
 <summary>
 <code>EvaluatedInvalid(idty_index)</code> - 2</summary>
-Distance rule was found invalid
+Distance rule was found invalid.
 
 ```rust
 idty_index: T::IdtyIndex
diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs
index d4ebf6b3f..3494331ad 100644
--- a/pallets/authority-members/src/lib.rs
+++ b/pallets/authority-members/src/lib.rs
@@ -177,25 +177,25 @@ pub mod pallet {
 
     #[pallet::error]
     pub enum Error<T> {
-        /// Member already incoming
+        /// Member already incoming.
         AlreadyIncoming,
-        /// Member already online
+        /// Member already online.
         AlreadyOnline,
-        /// Member already outgoing
+        /// Member already outgoing.
         AlreadyOutgoing,
         /// Owner key is invalid as a member.
         MemberIdNotFound,
-        /// Member is blacklisted
+        /// Member is blacklisted.
         MemberBlacklisted,
-        /// Member is not blacklisted
+        /// Member is not blacklisted.
         MemberNotBlacklisted,
-        /// Member not found
+        /// Member not found.
         MemberNotFound,
-        /// Neither online nor scheduled
+        /// Neither online nor scheduled.
         NotOnlineNorIncoming,
-        /// Not member
+        /// Not member.
         NotMember,
-        /// Session keys not provided
+        /// Session keys not provided.
         SessionKeysNotProvided,
         /// Too many authorities.
         TooManyAuthorities,
diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs
index cd09e397a..f3cc3c0c4 100644
--- a/pallets/certification/src/lib.rs
+++ b/pallets/certification/src/lib.rs
@@ -58,7 +58,7 @@ pub mod pallet {
     #[pallet::config]
     pub trait Config: frame_system::Config {
         #[pallet::constant]
-        /// Minimum duration between two certifications issued by the same issuer
+        /// Minimum duration between two certifications issued by the same issuer.
         type CertPeriod: Get<Self::BlockNumber>;
         /// A short identity index.
         type IdtyIndex: Parameter
@@ -70,27 +70,26 @@ pub mod pallet {
             + MaybeSerializeDeserialize
             + Debug
             + MaxEncodedLen;
-        /// Something that give the owner key of an identity
+        /// Something that give the owner key of an identity.
         type OwnerKeyOf: Convert<Self::IdtyIndex, Option<Self::AccountId>>;
-        ///
+        /// Provide method to check that cert is allowed.
         type CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>;
         #[pallet::constant]
-        /// Maximum number of active certifications by issuer
+        /// Maximum number of active certifications by issuer.
         type MaxByIssuer: Get<u32>;
-        /// Minimum number of certifications that must be received to be able to issue
-        /// certifications.
+        /// Minimum number of certifications received to be allowed to issue a certification.
         #[pallet::constant]
         type MinReceivedCertToBeAbleToIssueCert: Get<u32>;
-        /// Handler for NewCert event
+        /// Handler for NewCert event.
         type OnNewcert: OnNewcert<Self::IdtyIndex>;
-        /// Handler for Removed event
+        /// Handler for Removed event.
         type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>;
         /// Because this pallet emits events, it depends on the runtime's definition of an event.
         type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
-        /// Type representing the weight of this pallet
+        /// Type representing the weight of this pallet.
         type WeightInfo: WeightInfo;
         #[pallet::constant]
-        /// Duration of validity of a certification
+        /// Duration of validity of a certification.
         type ValidityPeriod: Get<Self::BlockNumber>;
     }
 
@@ -200,19 +199,19 @@ pub mod pallet {
 
     // STORAGE //
 
-    /// Certifications metada by issuer
+    /// Certifications metada by issuer.
     #[pallet::storage]
     #[pallet::getter(fn idty_cert_meta)]
     pub type StorageIdtyCertMeta<T: Config> =
         StorageMap<_, Twox64Concat, T::IdtyIndex, IdtyCertMeta<T::BlockNumber>, ValueQuery>;
 
-    /// Certifications by receiver
+    /// Certifications by receiver.
     #[pallet::storage]
     #[pallet::getter(fn certs_by_receiver)]
     pub type CertsByReceiver<T: Config> =
         StorageMap<_, Twox64Concat, T::IdtyIndex, Vec<(T::IdtyIndex, T::BlockNumber)>, ValueQuery>;
 
-    /// Certifications removable on
+    /// Certifications removable on.
     #[pallet::storage]
     #[pallet::getter(fn certs_removable_on)]
     pub type CertsRemovableOn<T: Config> =
@@ -245,11 +244,11 @@ pub mod pallet {
 
     #[pallet::error]
     pub enum Error<T> {
-        /// Identity cannot certify itself
+        /// Identity cannot certify itself.
         CannotCertifySelf,
-        /// Identity has already issued the maximum number of certifications
+        /// Identity has already issued the maximum number of certifications.
         IssuedTooManyCert,
-        /// Issuer not found
+        /// Issuer not found.
         IssuerNotFound,
         /// Insufficient certifications received.
         NotEnoughCertReceived,
diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs
index cbfa3e9ef..1790134a0 100644
--- a/pallets/distance/src/lib.rs
+++ b/pallets/distance/src/lib.rs
@@ -167,9 +167,9 @@ pub mod pallet {
             idty_index: T::IdtyIndex,
             who: T::AccountId,
         },
-        /// Distance rule was found valid
+        /// Distance rule was found valid.
         EvaluatedValid { idty_index: T::IdtyIndex },
-        /// Distance rule was found invalid
+        /// Distance rule was found invalid.
         EvaluatedInvalid { idty_index: T::IdtyIndex },
     }
 
@@ -191,7 +191,7 @@ pub mod pallet {
         CallerIdentityNotFound,
         /// Caller not member.
         CallerNotMember,
-        // Caller status can only be Unvalidated, Member or NotMember
+        // Caller status can only be Unvalidated, Member or NotMember.
         CallerStatusInvalid,
         /// Target identity not found.
         TargetIdentityNotFound,
@@ -201,7 +201,7 @@ pub mod pallet {
         TooManyEvaluators,
         /// Evaluation result has a wrong length.
         WrongResultLength,
-        /// Targeted distance evaluation request is only possible for an unvalidated identity
+        /// Targeted distance evaluation request is only possible for an unvalidated identity.
         TargetMustBeUnvalidated,
     }
 
diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs
index 67961a5a1..7051c922c 100644
--- a/pallets/duniter-wot/src/lib.rs
+++ b/pallets/duniter-wot/src/lib.rs
@@ -83,11 +83,11 @@ pub mod pallet {
 
     #[pallet::error]
     pub enum Error<T> {
-        /// Insufficient certifications received
+        /// Insufficient certifications received.
         NotEnoughCerts,
-        /// Target status is incompatible with this operation
-        // Membership can not be added/renewed with this status
-        // Certification can not be added to identity with this status
+        /// Target status is incompatible with this operation.
+        // - Membership can not be added/renewed with this status
+        // - Certification can not be added to identity with this status
         TargetStatusInvalid,
         /// Identity creation period not respected.
         IdtyCreationPeriodNotRespected,
@@ -99,7 +99,7 @@ pub mod pallet {
         IssuerNotMember,
         /// Issuer or receiver not found.
         IdtyNotFound,
-        /// Membership can only be renewed after an antispam delay
+        /// Membership can only be renewed after an antispam delay.
         MembershipRenewalPeriodNotRespected,
     }
 }
diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs
index 01998e0c5..dbe7167c5 100644
--- a/pallets/identity/src/lib.rs
+++ b/pallets/identity/src/lib.rs
@@ -82,18 +82,18 @@ pub mod pallet {
         /// Period after which a revoked identity is removed and the keys are freed.
         #[pallet::constant]
         type DeletionPeriod: Get<Self::BlockNumber>;
-        /// Minimum duration between two owner key changes
+        /// Minimum duration between two owner key changes.
         // to avoid stealing the identity without means to revoke
         #[pallet::constant]
         type ChangeOwnerKeyPeriod: Get<Self::BlockNumber>;
-        /// Minimum duration between the creation of 2 identities by the same creator
+        /// Minimum duration between the creation of 2 identities by the same creator.
         // it should be greater or equal than the certification period in certification pallet
         #[pallet::constant]
         type IdtyCreationPeriod: Get<Self::BlockNumber>;
         /// Management of the authorizations of the different calls.
         /// The default implementation allows everything.
         type CheckIdtyCallAllowed: CheckIdtyCallAllowed<Self>;
-        /// Custom data to store in each identity
+        /// Custom data to store in each identity.
         type IdtyData: Clone
             + Codec
             + Default
diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs
index f0c463750..c23c07a86 100644
--- a/pallets/membership/src/lib.rs
+++ b/pallets/membership/src/lib.rs
@@ -181,7 +181,7 @@ pub mod pallet {
         MembershipAlreadyAcquired,
         /// Membership not found.
         MembershipNotFound,
-        /// Already member, can not claim membership
+        /// Already member, can not claim membership.
         AlreadyMember,
     }
 
diff --git a/pallets/smith-members/src/lib.rs b/pallets/smith-members/src/lib.rs
index 95dd31177..8d4df3fa6 100644
--- a/pallets/smith-members/src/lib.rs
+++ b/pallets/smith-members/src/lib.rs
@@ -128,12 +128,12 @@ pub mod pallet {
     #[pallet::event]
     #[pallet::generate_deposit(pub(super) fn deposit_event)]
     pub enum Event<T: Config> {
-        /// An identity is being inivited to become a smith
+        /// An identity is being inivited to become a smith.
         InvitationSent {
             idty_index: T::IdtyIndex,
             invited_by: T::IdtyIndex,
         },
-        /// The invitation has been accepted
+        /// The invitation has been accepted.
         InvitationAccepted { idty_index: T::IdtyIndex },
         /// Certification received
         CertificationReceived {
@@ -142,7 +142,7 @@ pub mod pallet {
         },
         /// A smith gathered enough certifications to become an authority (can call `go_online()`).
         PromotedToSmith { idty_index: T::IdtyIndex },
-        /// A smith has been removed from the smiths set
+        /// A smith has been removed from the smiths set.
         SmithExcluded { idty_index: T::IdtyIndex },
     }
 
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 9c20a389c719ccedf73e8456078a50778a2675e3..820374cd2073ee49d2ba67359255742635e037a9 100644
GIT binary patch
delta 838
zcmdn`n*HQ!_6;}H7!ORorKZoQH<?r2h_Pj|jk*G(-sTu}8Aiq}lPfiJ81*(U)p#Py
z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