diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index 0b06e1acfa36bb7aa42c1a2257013cdcdb03e36f..c9d2db6fcca717eb1a4ef914fe9326a2ec673d8b 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -93,17 +93,35 @@ pub mod pallet { pub trait Config: frame_system::Config + pallet_session::Config + pallet_session::historical::Config { + /// Specifies the type that determines membership status. type IsMember: IsMember<Self::MemberId>; + + /// Handler for when a new session is initiated. type OnNewSession: OnNewSession; + + /// Handler for when a member is removed from authorities. type OnOutgoingMember: OnOutgoingMember<Self::MemberId>; + + /// Handler for when a new member is added to authorities. type OnIncomingMember: OnIncomingMember<Self::MemberId>; - /// Max number of authorities allowed + + /// Maximum number of authorities allowed. #[pallet::constant] type MaxAuthorities: Get<u32>; + + /// Type representing the identifier of a member. type MemberId: Copy + Ord + MaybeSerializeDeserialize + Parameter; + + /// Converts an `AccountId` to an optional `MemberId`. type MemberIdOf: Convert<Self::AccountId, Option<Self::MemberId>>; + + /// Specifies the origin type required to remove a member. type RemoveMemberOrigin: EnsureOrigin<Self::RuntimeOrigin>; + + /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; + + /// Type representing the weight of this pallet type WeightInfo: WeightInfo; } diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index d1c3ffd014bb4f4c1cbe87206816862587dee137..3c70de992f8240cee7e75795c24bdc488532e0e5 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -67,10 +67,11 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { + /// The minimum duration (in blocks) between two certifications issued by the same issuer. #[pallet::constant] - /// Minimum duration between two certifications issued by the same issuer. type CertPeriod: Get<BlockNumberFor<Self>>; - /// A short identity index. + + /// A short identity index type. type IdtyIndex: Parameter + Member + AtLeast32BitUnsigned @@ -80,26 +81,36 @@ pub mod pallet { + MaybeSerializeDeserialize + Debug + MaxEncodedLen; - /// Something that gives the IdtyId of an AccountId and reverse + + /// A type that provides methods to get the IdtyIndex of an AccountId and vice versa. type IdtyAttr: duniter_primitives::Idty<Self::IdtyIndex, Self::AccountId>; - /// Provide method to check that cert is allowed. + + /// A type that provides a method to check if issuing a certification is allowed. type CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>; + + /// The maximum number of active certifications that can be issued by a single issuer. #[pallet::constant] - /// Maximum number of active certifications by issuer. type MaxByIssuer: Get<u32>; - /// Minimum number of certifications received to be allowed to issue a certification. + + /// The minimum number of certifications received that an identity must have + /// to be allowed to issue a certification. #[pallet::constant] type MinReceivedCertToBeAbleToIssueCert: Get<u32>; - /// Handler for NewCert event. + + /// A handler that is called when a new certification event (`NewCert`) occurs. type OnNewcert: OnNewcert<Self::IdtyIndex>; - /// Handler for Removed event. + + /// A handler that is called when a certification is removed (`RemovedCert`). type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. + + /// The overarching event type. 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; + + /// The duration (in blocks) for which a certification remains valid. #[pallet::constant] - /// Duration of validity of a certification. type ValidityPeriod: Get<BlockNumberFor<Self>>; } diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index dd6bbfe8321243772db8ada0861cfa8109c292ba..a03fa64225a6ed5182ba9d56f82392988c51e322 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -130,34 +130,42 @@ pub mod pallet { + pallet_authorship::Config + pallet_identity::Config<IdtyIndex = IdtyIndex> { - /// Currency type used in this pallet (used for reserve/slash) + /// Currency type used in this pallet for reserve and slash operations. type Currency: Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason = Self::RuntimeHoldReason> + Balanced<Self::AccountId>; - /// Overarching hold reason. + + /// The overarching hold reason type. type RuntimeHoldReason: From<HoldReason>; - /// Amount reserved during evaluation + + /// The amount reserved during evaluation. #[pallet::constant] type EvaluationPrice: Get<BalanceOf<Self>>; - /// Evaluation period number of blocks. - /// As the evaluation is done using 3 pools, - /// the evaluation will take 3 * EvaluationPeriod. + + /// The evaluation period in blocks. + /// Since the evaluation uses 3 pools, the total evaluation time will be 3 * EvaluationPeriod. #[pallet::constant] type EvaluationPeriod: Get<u32>; - /// Maximum distance used to define referee's accessibility - /// Unused by runtime but needed by client distance oracle + + /// The maximum distance used to define a referee's accessibility. + /// This value is not used by the runtime but is needed by the client distance oracle. #[pallet::constant] type MaxRefereeDistance: Get<u32>; - /// Minimum ratio of accessible referees + + /// The minimum ratio of accessible referees required. #[pallet::constant] type MinAccessibleReferees: Get<Perbill>; + /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; + /// Type representing the weight of this pallet type WeightInfo: WeightInfo; - /// Handler for successful distance evaluation + + /// A handler that is called when a distance evaluation is successfully validated. type OnValidDistanceStatus: OnValidDistanceStatus<Self>; - /// Trait to check that distance evaluation request is allowed + + /// A trait that provides a method to check if a distance evaluation request is allowed. type CheckRequestDistanceEvaluation: CheckRequestDistanceEvaluation<Self>; } diff --git a/pallets/duniter-account/src/lib.rs b/pallets/duniter-account/src/lib.rs index b60d1c8bb49f96b31e9a3875c29eec534bf7880d..8347c2feacfb9aea63b4ea5ef2405db95c9f2418 100644 --- a/pallets/duniter-account/src/lib.rs +++ b/pallets/duniter-account/src/lib.rs @@ -87,11 +87,14 @@ pub mod pallet { { /// The overarching event type. 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; - /// wrapped type + + /// A wrapped type that handles the charging of transaction fees. type InnerOnChargeTransaction: OnChargeTransaction<Self>; - /// type implementing refund behavior + + /// A type that implements the refund behavior for transaction fees. type Refund: pallet_quota::traits::RefundFee<Self>; } diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs index af148aa5793c1d895bd3d3bfd754084b04cca582..b4d7833eb770628364d6b26cfa8f0ade90d6891a 100644 --- a/pallets/duniter-wot/src/lib.rs +++ b/pallets/duniter-wot/src/lib.rs @@ -85,10 +85,15 @@ pub mod pallet { + pallet_identity::Config<IdtyIndex = IdtyIndex> + pallet_membership::Config<IdtyId = IdtyIndex> { + /// The block number from which the first certification can be issued. #[pallet::constant] type FirstIssuableOn: Get<frame_system::pallet_prelude::BlockNumberFor<Self>>; + + /// The minimum number of certifications required for membership eligibility. #[pallet::constant] type MinCertForMembership: Get<u32>; + + /// The minimum number of certifications required to create an identity. #[pallet::constant] type MinCertForCreateIdtyRight: Get<u32>; } diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 448df78957998081403a09e30b03f2944f4ac4d1..e520380cca0355a79de56853399e0607b13f4721 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -102,34 +102,37 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - /// Period during which the owner can confirm the new identity. - // something like 2 days but this should be done quickly as the first certifier is helping + /// The period during which the owner can confirm the new identity. #[pallet::constant] type ConfirmPeriod: Get<BlockNumberFor<Self>>; - /// Period before which the identity has to be validated (become member). - // this is the 2 month period in v1 + + /// The period during which the identity has to be validated to become a member. #[pallet::constant] type ValidationPeriod: Get<BlockNumberFor<Self>>; - /// Period before which an identity who lost membership is automatically revoked. - // this is the 1 year period in v1 + + /// The period before which an identity that lost membership is automatically revoked. #[pallet::constant] type AutorevocationPeriod: Get<BlockNumberFor<Self>>; - /// Period after which a revoked identity is removed and the keys are freed. + + /// The period after which a revoked identity is removed and the keys are freed. #[pallet::constant] type DeletionPeriod: Get<BlockNumberFor<Self>>; - /// Minimum duration between two owner key changes. - // to avoid stealing the identity without means to revoke + + /// The minimum duration between two owner key changes to prevent identity theft. #[pallet::constant] type ChangeOwnerKeyPeriod: Get<BlockNumberFor<Self>>; - /// 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 + + /// The minimum duration between the creation of two identities by the same creator. + /// Should be greater than or equal to the certification period defined in the certification pallet. #[pallet::constant] type IdtyCreationPeriod: Get<BlockNumberFor<Self>>; - /// Management of the authorizations of the different calls. - /// The default implementation allows everything. + + /// Management of the authorizations of the different calls related to identity. type CheckIdtyCallAllowed: CheckIdtyCallAllowed<Self>; + /// The type used to check account worthiness. type CheckAccountWorthiness: CheckAccountWorthiness<Self>; + /// Custom data to store in each identity. type IdtyData: Clone + Codec @@ -138,7 +141,8 @@ pub mod pallet { + TypeInfo + MaybeSerializeDeserialize + MaxEncodedLen; - /// A short identity index. + + /// A short identity index type. type IdtyIndex: Parameter + Member + AtLeast32BitUnsigned @@ -148,20 +152,28 @@ pub mod pallet { + MaybeSerializeDeserialize + Debug + MaxEncodedLen; - /// Custom type for account data. + + /// A type for linking account data to identity. type AccountLinker: LinkIdty<Self::AccountId, Self::IdtyIndex>; - /// Handle logic to validate an identity name + + /// Handle logic to validate an identity name. type IdtyNameValidator: IdtyNameValidator; - /// On identity created. + + /// Handler called when a new identity is created. type OnNewIdty: OnNewIdty<Self>; - /// On identity removed. + + /// Handler called when an identity is removed. type OnRemoveIdty: OnRemoveIdty<Self>; - /// Signing key of a payload + + /// Signing key type used for payload signatures. type Signer: IdentifyAccount<AccountId = Self::AccountId>; - /// Signature of a payload + + /// Signature type for payload verification. type Signature: Parameter + Verify<Signer = Self::Signer>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. + + /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; + /// Type representing the weight of this pallet type WeightInfo: WeightInfo; } diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index 8fbe2a414f6d2669aef5aade2a24982ba193df3f..ab37b54a077f6aa3f244fe75c84980dfa2c83e53 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -87,27 +87,36 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - /// Ask the runtime whether the identity can perform membership operations + /// Check if the identity can perform membership operations. type CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>; - /// Something that identifies an identity + + /// Something that identifies an identity. type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord; - /// Something that gives the IdtyId of an AccountId and reverse + + /// Something that gives the IdtyId of an AccountId and reverse. type IdtyAttr: duniter_primitives::Idty<Self::IdtyId, Self::AccountId>; - /// Maximum life span of a single membership (in number of blocks) - // (this could be renamed "validity" or "duration") + + /// Maximum lifespan of a single membership (in number of blocks). #[pallet::constant] type MembershipPeriod: Get<BlockNumberFor<Self>>; - /// Minimum delay to wait before renewing membership - // i.e. asking for distance evaluation + + /// Minimum delay to wait before renewing membership, i.e., asking for distance evaluation. #[pallet::constant] type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>; - /// On new and renew membership handler. + + /// Handler called when a new membership is created or renewed. type OnNewMembership: OnNewMembership<Self::IdtyId>; - /// On revoked and removed membership handler. + + /// Handler called when a membership is revoked or removed. type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. + + /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; + + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; + + /// Benchmark setup handler for runtime benchmarks (feature-dependent). #[cfg(feature = "runtime-benchmarks")] type BenchmarkSetupHandler: SetupBenchmark<Self::IdtyId, Self::AccountId>; } diff --git a/pallets/offences/src/lib.rs b/pallets/offences/src/lib.rs index 100203b822fc4cc3568c964e225535f718f37739..66ee776938a46221898fe00fc1bf67e2729c8dc9 100644 --- a/pallets/offences/src/lib.rs +++ b/pallets/offences/src/lib.rs @@ -82,8 +82,10 @@ pub mod pallet { pub trait Config: frame_system::Config { /// The overarching event type. type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; + /// Full identification of the validator. type IdentificationTuple: Parameter; + /// A handler called for every offence report. type OnOffenceHandler: OnOffenceHandler<Self::AccountId, Self::IdentificationTuple, Weight>; } diff --git a/pallets/oneshot-account/src/lib.rs b/pallets/oneshot-account/src/lib.rs index 53128793f3431a053330f7f0125d8bf2d66a65ef..9507e2fb795104960e2b0c4c5a2f62c3ce63a331 100644 --- a/pallets/oneshot-account/src/lib.rs +++ b/pallets/oneshot-account/src/lib.rs @@ -61,10 +61,16 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_transaction_payment::Config { + /// The currency type. type Currency: fungible::Balanced<Self::AccountId> + fungible::Mutate<Self::AccountId>; + + /// A handler for charging transactions. type InnerOnChargeTransaction: OnChargeTransaction<Self>; + + /// The overarching event type. 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; } diff --git a/pallets/provide-randomness/src/lib.rs b/pallets/provide-randomness/src/lib.rs index 25e5b6d1cb929968f5c63211b36380e52702a267..b0aff42eb2fb189f7e8cbf5c1fad038772a6630c 100644 --- a/pallets/provide-randomness/src/lib.rs +++ b/pallets/provide-randomness/src/lib.rs @@ -78,27 +78,36 @@ pub mod pallet { /// Configuration trait. #[pallet::config] pub trait Config: frame_system::Config<Hash = H256> { - // The currency + // The currency type. type Currency: fungible::Balanced<Self::AccountId> + fungible::Mutate<Self::AccountId>; - /// Get the current epoch index + + /// Type providing the current epoch index. type GetCurrentEpochIndex: Get<u64>; - /// Maximum number of not yet filled requests + + /// Maximum number of not yet filled requests. #[pallet::constant] type MaxRequests: Get<u32>; - /// The price of a request + + /// The price of a request. #[pallet::constant] type RequestPrice: Get<BalanceOf<Self>>; - /// On filled randomness + + /// Handler called when randomness is filled. type OnFilledRandomness: OnFilledRandomness; - /// Handler for the unbalanced reduction when the requestor pays fees. + + /// Handler for unbalanced reduction when the requestor pays fees. type OnUnbalanced: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>; - /// A safe source of randomness from the parent block + + /// A safe source of randomness from the parent block. type ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>; - /// A safe source of randomness from one epoch ago + + /// A safe source of randomness from one epoch ago. type RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>; + /// The overarching event type. type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// Type representing the weight of this pallet + + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; } diff --git a/pallets/quota/src/lib.rs b/pallets/quota/src/lib.rs index f35aed5d82d8e0a3ac8938ca280291e43998c2c2..0c9251ccd24352a3b59ca861f261fcd05eaa0ae6 100644 --- a/pallets/quota/src/lib.rs +++ b/pallets/quota/src/lib.rs @@ -82,16 +82,20 @@ pub mod pallet { pub trait Config: frame_system::Config + pallet_balances::Config + pallet_identity::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. + /// The overarching event type. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// number of blocks in which max quota is replenished + + /// Number of blocks after which the maximum quota is replenished. type ReloadRate: Get<BlockNumberFor<Self>>; - /// maximum amount of quota an identity can get + + /// Maximum amount of quota an identity can receive. type MaxQuota: Get<BalanceOf<Self>>; - /// Account used to refund fee + + /// Account used to refund fees. #[pallet::constant] type RefundAccount: Get<Self::AccountId>; - /// Weight + + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; } diff --git a/pallets/smith-members/src/lib.rs b/pallets/smith-members/src/lib.rs index 924b69a8512a987ba3b5c0ee25663d4e6819fa82..7f2c6a6a857be12bb67737641bc662dde5cc8220 100644 --- a/pallets/smith-members/src/lib.rs +++ b/pallets/smith-members/src/lib.rs @@ -108,13 +108,15 @@ pub mod pallet { /// The pallet's config trait. #[pallet::config] pub trait Config: frame_system::Config { - /// To only allow WoT members to be invited + /// Trait to check if identity is a WoT members. type IsWoTMember: IsMember<Self::IdtyIndex>; - /// Notify when a smith is removed (for authority-members to react) + type OnSmithDelete: traits::OnSmithDelete<Self::IdtyIndex>; - /// The overarching event type. + + /// The overarching event type for this pallet. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// A short identity index. + + /// A short identity index type. type IdtyIndex: Parameter + Member + AtLeast32BitUnsigned @@ -124,22 +126,29 @@ pub mod pallet { + MaybeSerializeDeserialize + Debug + MaxEncodedLen; - /// Identifier for an authority-member + + /// Identifier type for an authority-member. type MemberId: Copy + Ord + MaybeSerializeDeserialize + Parameter; - /// Something that gives the IdtyId of an AccountId and reverse + + /// Something that gives the IdtyIndex of an AccountId and reverse. type IdtyAttr: duniter_primitives::Idty<Self::IdtyIndex, Self::AccountId>; - // /// Something that give the owner key of an identity + + /// Something that gives the AccountId of an identity. type IdtyIdOfAuthorityId: Convert<Self::MemberId, Option<Self::IdtyIndex>>; - /// Maximum number of active certifications by issuer + + /// Maximum number of active certifications per issuer. #[pallet::constant] type MaxByIssuer: Get<u32>; - /// Minimum number of certifications to become a Smith + + /// Minimum number of certifications required to become a Smith. #[pallet::constant] type MinCertForMembership: Get<u32>; - /// Maximum duration of inactivity before a smith is removed + + /// Maximum duration of inactivity allowed before a Smith is removed. #[pallet::constant] type SmithInactivityMaxDuration: Get<u32>; - /// Type representing the weight of this pallet + + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; } diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index 31fdbad5ce7d4db3fe0b8addf7d34af5faf99121..d8fd07e5784ffc9b8fcce755fdf8af3c98d64821 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -74,41 +74,50 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - //#[pallet::without_storage_info] pub struct Pallet<T>(_); #[pallet::config] pub trait Config: frame_system::Config + pallet_timestamp::Config { - // Moment into Balance converter + /// Something that convert a Moment inot a Balance. type MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>; - // The currency + + /// The currency type used in this pallet. type Currency: fungible::Balanced<Self::AccountId> + fungible::Mutate<Self::AccountId>; + /// Maximum number of past UD revaluations to keep in storage. #[pallet::constant] type MaxPastReeval: Get<u32>; - /// Somethings that must provide the number of accounts allowed to create the universal dividend + + /// Provides the number of accounts allowed to create the universal dividend. type MembersCount: Get<BalanceOf<Self>>; - /// Somethings that must provide the list of accounts ids allowed to create the universal dividend + + /// Storage for mapping AccountId to their first eligible UD creation time. type MembersStorage: frame_support::traits::StoredMap<Self::AccountId, FirstEligibleUd>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. + + /// The overarching event type for this pallet. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// Square of the money growth rate per ud reevaluation period + + /// Square of the money growth rate per UD reevaluation period. #[pallet::constant] type SquareMoneyGrowthRate: Get<Perbill>; - /// Universal dividend creation period (ms) + + /// Universal dividend creation period in milliseconds. #[pallet::constant] type UdCreationPeriod: Get<Self::Moment>; - /// Universal dividend reevaluation period (ms) + + /// Universal dividend reevaluation period in milliseconds. #[pallet::constant] type UdReevalPeriod: Get<Self::Moment>; - /// The number of units to divide the amounts expressed in number of UDs - /// Example: If you wish to express the UD amounts with a maximum precision of the order - /// of the milliUD, choose 1000 + + /// The number of units to divide the amounts expressed in number of UDs. + /// Example: If you wish to express UD amounts with a maximum precision of milliUDs, choose 1000. #[pallet::constant] type UnitsPerUd: Get<BalanceOf<Self>>; - /// Pallet weights info + + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; - /// Something that gives the IdtyId of an AccountId and reverse + + /// Something that gives the IdtyIndex of an AccountId and reverse, used for benchmarks. #[cfg(feature = "runtime-benchmarks")] type IdtyAttr: duniter_primitives::Idty<u32, Self::AccountId>; } diff --git a/pallets/upgrade-origin/src/lib.rs b/pallets/upgrade-origin/src/lib.rs index bcd8ad688774727ba61fbd5eaa1c2d0c0a38cc5e..cf108ff25c0efa448f5311086c0e2b9b94e234be 100644 --- a/pallets/upgrade-origin/src/lib.rs +++ b/pallets/upgrade-origin/src/lib.rs @@ -54,18 +54,18 @@ pub mod pallet { /// The overarching event type. type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; - /// The upgradable origin + /// The origin type required for performing upgradable operations. type UpgradableOrigin: EnsureOrigin<Self::RuntimeOrigin>; - /// Pallet weights info + /// Type representing the weight of this pallet. type WeightInfo: WeightInfo; + /// Type representing the worst case origin type used in weight benchmarks. #[cfg(feature = "runtime-benchmarks")] - /// The worst case origin type to use in weights benchmarking type WorstCaseOriginType: Into<Self::RuntimeOrigin>; + /// Retrieves the worst case origin for use in weight benchmarks. #[cfg(feature = "runtime-benchmarks")] - /// The worst case origin to use in weights benchmarking type WorstCaseOrigin: Get<Self::WorstCaseOriginType>; }