diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index a93c10f6fb828fe2c49733a014d243f87ce556b6..620c1674c34a0644c650d1e06969d0c6dbe56460 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 c495670a16aafa3fe9b3201bb93b2ea3adc843b2..566e7383905fab4996865f7a71390aefa0b0c6cb 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 d4ebf6b3fd4a919e055e2f5e72e8c2692e992cf7..3494331ad3f026c8fbbda12283aed225cceb9816 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 cd09e397aba562bbfef3cae86f0d1087ef7638d1..f3cc3c0c4783b266154a8b3f8a1b39d0855807e0 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 cbfa3e9ef6e5828d928f2e3da3bc83f3dad9aff5..1790134a02e738b41eb2588b7b39b77e9131fc02 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 67961a5a1a559844d4d26bee3551e10984fd2ef3..7051c922c6eb5f8179a6650a6ea6b1c54147e182 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 01998e0c5dc056155f3059575c3939b71c320c16..dbe7167c5875c110b41eb90e552a3d7288debf5a 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 f0c4637502301347781696eacac8fd8b06af654b..c23c07a867257e885fde4eee0420369a8b318b5b 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 95dd31177915c5dd19b8872c363c7c524ee39d52..8d4df3fa6a46d2538098ee734f2b944b3fd8394e 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 Binary files a/resources/metadata.scale and b/resources/metadata.scale differ