diff --git a/contracts/src/governance/extensions/governor_votes/internal.rs b/contracts/src/governance/extensions/governor_votes/internal.rs index 8a08d9ffe..880e7d1b7 100644 --- a/contracts/src/governance/extensions/governor_votes/internal.rs +++ b/contracts/src/governance/extensions/governor_votes/internal.rs @@ -37,7 +37,7 @@ use openbrush::traits::{ Timestamp, }; -///Extension of `Governor` for voting weight extraction from an `PSP22Votes` token +/// Extension of `Governor` for voting weight extraction from an `PSP22Votes` token pub trait GovernorVotesInternal: Storage { /// Initializes the governor votes extension fn _init_governor_votes(&mut self, token: AccountId) -> Result<(), GovernanceError> { diff --git a/contracts/src/governance/utils/votes/data.rs b/contracts/src/governance/utils/votes/data.rs index 636333e18..5c98b6880 100644 --- a/contracts/src/governance/utils/votes/data.rs +++ b/contracts/src/governance/utils/votes/data.rs @@ -29,7 +29,7 @@ use openbrush::{ #[derive(Default, Debug)] #[openbrush::storage_item] pub struct Data { - ///Stores the delegations of the governor. + /// Stores the delegations of the governor. /// The key is the delegator and the value is the delegatee pub delegation: Mapping, AccountId>, /// Stores the checkpoints of the delegations of the governor diff --git a/contracts/src/governance/utils/votes/events.rs b/contracts/src/governance/utils/votes/events.rs index 7c8807176..3163af301 100644 --- a/contracts/src/governance/utils/votes/events.rs +++ b/contracts/src/governance/utils/votes/events.rs @@ -26,7 +26,7 @@ use openbrush::traits::{ }; pub trait VotesEvents { - ///Emitted when a voter delegates their votes to another account + /// Emitted when a voter delegates their votes to another account fn emit_delegate_changed_event( &self, _delegator: &Option, @@ -36,7 +36,7 @@ pub trait VotesEvents { () } - ///Emitted when a voter's votes are delegated to another account + /// Emitted when a voter's votes are delegated to another account fn emit_delegate_votes_changed_event(&self, _delegate: &AccountId, _previous_votes: Balance, _new_votes: Balance) { () } diff --git a/contracts/src/governance/utils/votes/impls.rs b/contracts/src/governance/utils/votes/impls.rs index c2dac889f..7fe72216f 100644 --- a/contracts/src/governance/utils/votes/impls.rs +++ b/contracts/src/governance/utils/votes/impls.rs @@ -44,9 +44,9 @@ use openbrush::traits::{ }; use scale::Encode; -///Common interface for `PSP22Votes`, and other `Votes`-enabled contracts. +/// Common interface for `PSP22Votes`, and other `Votes`-enabled contracts. pub trait VotesImpl: Storage + VotesInternal + NoncesImpl + VotesEvents + TimestampProvider { - ///The amount of votes owned by `account`. + /// The amount of votes owned by `account`. fn get_votes(&self, account: AccountId) -> Result { Ok(self .data::() @@ -56,7 +56,7 @@ pub trait VotesImpl: Storage + VotesInternal + NoncesImpl + VotesEvents + .latest()) } - ///The amount of votes delegated to `account` at the time `timestamp`. + /// The amount of votes delegated to `account` at the time `timestamp`. fn get_past_votes(&self, account: AccountId, timestamp: Timestamp) -> Result { let current_block_timestamp = TimestampProvider::block_timestamp(self); if timestamp > current_block_timestamp { @@ -74,7 +74,7 @@ pub trait VotesImpl: Storage + VotesInternal + NoncesImpl + VotesEvents + } } - ///The total amount of votes at the time `timestamp`. + /// The total amount of votes at the time `timestamp`. fn get_past_total_supply(&self, timestamp: Timestamp) -> Result { let current_block_timestamp = TimestampProvider::block_timestamp(self); if timestamp > current_block_timestamp { @@ -88,18 +88,18 @@ pub trait VotesImpl: Storage + VotesInternal + NoncesImpl + VotesEvents + } } - ///Returns the address delegated to by `delegator`. + /// Returns the address delegated to by `delegator`. fn delegates(&mut self, delegator: AccountId) -> Option { self._delegates(&Some(delegator)) } - ///Delegate votes from `signer` to `delegatee`. + /// Delegate votes from `signer` to `delegatee`. fn delegate(&mut self, delegatee: AccountId) -> Result<(), GovernanceError> { let account = Self::env().caller(); self._delegate(&Some(account), &Some(delegatee)) } - ///Delegate votes from `signer` to `delegatee` using a signature. + /// Delegate votes from `signer` to `delegatee` using a signature. fn delegate_by_signature( &mut self, signer: AccountId, diff --git a/contracts/src/governance/utils/votes/internal.rs b/contracts/src/governance/utils/votes/internal.rs index b812ae273..c14ce1f45 100644 --- a/contracts/src/governance/utils/votes/internal.rs +++ b/contracts/src/governance/utils/votes/internal.rs @@ -47,12 +47,12 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { self.data::().total_checkpoints.get_or_default().latest() } - ///Returns the address delegated to by `delegator`. + /// Returns the address delegated to by `delegator`. fn _delegates(&self, delegator: &Option) -> Option { self.data::().delegation.get(&delegator) } - ///Delegate votes from `delegator` to `delegatee`. + /// Delegate votes from `delegator` to `delegatee`. fn _delegate( &mut self, delegator: &Option, @@ -73,7 +73,7 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { ) } - ///Transfers `amount` voting units from `from` to `to`. + /// Transfers `amount` voting units from `from` to `to`. fn _transfer_voting_units( &mut self, from: &Option, @@ -90,7 +90,7 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { self._move_delegate_votes(&self._delegates(from), &self._delegates(to), amount) } - ///Moves voting units from `from` to `to`. + /// Moves voting units from `from` to `to`. fn _move_delegate_votes( &mut self, from: &Option, @@ -128,7 +128,7 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { Ok(()) } - ///Returns number of checkpoints for `account`. + /// Returns number of checkpoints for `account`. fn _num_checkpoints(&self, account: &AccountId) -> Result { Ok(self .data::() @@ -138,7 +138,7 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { .len() as u32) } - ///Returns the checkpoint for `account` at the given `pos`. + /// Returns the checkpoint for `account` at the given `pos`. fn _checkpoints(&self, account: &AccountId, pos: u32) -> Result { let checkpoints = self .data::() @@ -151,7 +151,7 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { .cloned() } - ///Creates a new checkpoint for `account` and returns its `old_value` and `new_value`. + /// Creates a new checkpoint for `account` and returns its `old_value` and `new_value`. fn _push( &mut self, store: &mut Checkpoints, @@ -172,6 +172,6 @@ pub trait VotesInternal: Storage + VotesEvents + TimestampProvider { Ok(a.checked_sub(b).ok_or(GovernanceError::Overflow)?) } - ///Returns the number of voting units owned by `account`. + /// Returns the number of voting units owned by `account`. fn _get_voting_units(&self, account: &AccountId) -> Balance; } diff --git a/contracts/src/token/psp22/extensions/votes.rs b/contracts/src/token/psp22/extensions/votes.rs index e992bb4ba..54138cba7 100644 --- a/contracts/src/token/psp22/extensions/votes.rs +++ b/contracts/src/token/psp22/extensions/votes.rs @@ -30,7 +30,7 @@ use crate::{ use ink::prelude::vec; use openbrush::traits::AccountId; -///Extension of ERC20 to support Compound-like voting and delegation. +/// Extension of ERC20 to support Compound-like voting and delegation. /// /// This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either /// by calling the `delegate` function directly, or by providing a signature to be used with `delegate_by_sig`. Voting @@ -39,31 +39,31 @@ use openbrush::traits::AccountId; /// By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it /// requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. pub trait PSP22VotesImpl: VotesInternal { - ///Get number of checkpoints for `account`. + /// Get number of checkpoints for `account`. fn num_checkpoints(&self, account: AccountId) -> Result { VotesInternal::_num_checkpoints(self, &account) } - ///Get the `pos`-th checkpoint for `account`. + /// Get the `pos`-th checkpoint for `account`. fn checkpoints(&self, account: AccountId, pos: u32) -> Result { VotesInternal::_checkpoints(self, &account, pos) } } pub trait PSP22VotesInternal: VotesInternal + psp22::Internal { - ///Get number of maximum supply. + /// Get number of maximum supply. fn _max_supply(&self) -> u128 { u128::MAX } - ///Transfer `amount` tokens from `from` to `to`. + /// Transfer `amount` tokens from `from` to `to`. fn _update(&mut self, from: AccountId, to: AccountId, amount: u128) -> Result<(), PSP22Error> { psp22::Internal::_transfer_from_to(self, from, to, amount, vec![])?; Ok(()) } - ///Get number of voting units. + /// Get number of voting units. fn _get_voting_units(&self, account: &AccountId) -> u128 { psp22::Internal::_balance_of(self, account) } diff --git a/contracts/src/traits/governance/extensions/governor_quorum/mod.rs b/contracts/src/traits/governance/extensions/governor_quorum/mod.rs index a02be7906..0c4bb486e 100644 --- a/contracts/src/traits/governance/extensions/governor_quorum/mod.rs +++ b/contracts/src/traits/governance/extensions/governor_quorum/mod.rs @@ -23,27 +23,27 @@ use crate::traits::errors::GovernanceError; use openbrush::traits::Timestamp; -///Extension of `Governor` for voting weight extraction from an `PSP22Votes` token and a quorum expressed as a -///fraction of the total supply. +/// Extension of `Governor` for voting weight extraction from an `PSP22Votes` token and a quorum expressed as a +/// fraction of the total supply. #[openbrush::trait_definition] pub trait Quorum { - ///Returns the current quorum numerator + /// Returns the current quorum numerator #[ink(message)] fn quorum_numerator(&self) -> u128; - ///Returns the quorum numerator at a given timestamp + /// Returns the quorum numerator at a given timestamp #[ink(message)] fn quorum_numerator_at(&self, timestamp: Timestamp) -> u128; - ///Returns the current quorum denominator + /// Returns the current quorum denominator #[ink(message)] fn quorum_denominator(&self) -> u128; - ///Returns the quorum at a given timestamp + /// Returns the quorum at a given timestamp #[ink(message)] fn quorum(&self, time_point: Timestamp) -> Result; - ///Updates the quorum numerator + /// Updates the quorum numerator #[ink(message)] fn update_quorum_numerator(&mut self, numerator: u128) -> Result<(), GovernanceError>; } diff --git a/contracts/src/traits/governance/extensions/governor_settings/mod.rs b/contracts/src/traits/governance/extensions/governor_settings/mod.rs index 7e9c7b06f..8a89e4213 100644 --- a/contracts/src/traits/governance/extensions/governor_settings/mod.rs +++ b/contracts/src/traits/governance/extensions/governor_settings/mod.rs @@ -22,31 +22,30 @@ use crate::traits::errors::GovernanceError; - -///Extension of `Governor` for settings updatable through governance. +/// Extension of `Governor` for settings updatable through governance. #[openbrush::trait_definition] pub trait GovernorSettings { - ///Sets the voting delay + /// Sets the voting delay #[ink(message)] fn set_voting_delay(&mut self, new_voting_delay: u64) -> Result<(), GovernanceError>; - ///Sets the voting period + /// Sets the voting period #[ink(message)] fn set_voting_period(&mut self, new_voting_period: u64) -> Result<(), GovernanceError>; - ///Sets the proposal threshold + /// Sets the proposal threshold #[ink(message)] fn set_proposal_threshold(&mut self, new_proposal_threshold: u128) -> Result<(), GovernanceError>; - ///Returns the voting delay + /// Returns the voting delay #[ink(message)] fn voting_delay(&self) -> u64; - ///Returns the voting period + /// Returns the voting period #[ink(message)] fn voting_period(&self) -> u64; - ///Returns the proposal threshold + /// Returns the proposal threshold #[ink(message)] fn proposal_threshold(&self) -> u128; } diff --git a/contracts/src/traits/governance/governor/mod.rs b/contracts/src/traits/governance/governor/mod.rs index f25600e5a..a0251bbad 100644 --- a/contracts/src/traits/governance/governor/mod.rs +++ b/contracts/src/traits/governance/governor/mod.rs @@ -39,16 +39,16 @@ use openbrush::traits::{ Timestamp, }; -///Core of the governance system, designed to be extended though various modules. +/// Core of the governance system, designed to be extended though various modules. /// -///This contract is abstract and requires several functions to be implemented in various modules: +/// This contract is abstract and requires several functions to be implemented in various modules: /// /// - A counting module must implement `quorum`, `_quorum_reached`, `_vote_succeeded` and `_count_vote`} /// - A voting module must implement `_get_votes` /// - Additionally, `voting_period` must also be implemented #[openbrush::trait_definition] pub trait Governor { - ///Hashing function used to (re)build the proposal id from the proposal details. + /// Hashing function used to (re)build the proposal id from the proposal details. #[ink(message)] fn hash_proposal( &self, @@ -56,23 +56,23 @@ pub trait Governor { description_hash: HashType, ) -> Result; - ///Current state of a proposal, following Compound's convention + /// Current state of a proposal, following Compound's convention #[ink(message)] fn state(&self, proposal_id: ProposalId) -> Result; - ///Returns timestamp at which votes for a proposal starts + /// Returns timestamp at which votes for a proposal starts #[ink(message)] fn proposal_snapshot(&self, proposal_id: ProposalId) -> Result; - ///Returns timestamp at which votes for a proposal ends + /// Returns timestamp at which votes for a proposal ends #[ink(message)] fn proposal_deadline(&self, proposal_id: ProposalId) -> Result; - ///Returns the AccountId of the proposer of a proposal + /// Returns the AccountId of the proposer of a proposal #[ink(message)] fn proposal_proposer(&self, proposal_id: ProposalId) -> Result; - ///Returns the number of votes already casted for a proposal by a given account + /// Returns the number of votes already casted for a proposal by a given account #[ink(message)] fn get_votes_with_params( &mut self, @@ -81,12 +81,12 @@ pub trait Governor { params: Vec, ) -> Result; - ///Makes a proposal for a list of transactions to be executed. + /// Makes a proposal for a list of transactions to be executed. /// Returns the id of the proposal #[ink(message)] fn propose(&mut self, transactions: Vec, description: String) -> Result; - ///Executes a proposal if it is in the `Succeeded` state. + /// Executes a proposal if it is in the `Succeeded` state. /// Returns the id of the executed proposal #[ink(message)] fn execute( @@ -95,7 +95,7 @@ pub trait Governor { description_hash: HashType, ) -> Result; - ///Cancels a proposal if it is in the `Pending` state. + /// Cancels a proposal if it is in the `Pending` state. /// Returns the id of the cancelled proposal #[ink(message)] fn cancel( @@ -104,12 +104,12 @@ pub trait Governor { description_hash: HashType, ) -> Result; - ///Casts a vote for a proposal from a message sender. + /// Casts a vote for a proposal from a message sender. /// Returns the number of votes already casted for the proposal by the sender #[ink(message)] fn cast_vote(&mut self, proposal_id: ProposalId, support: VoteType) -> Result; - ///Casts a vote with reason for a proposal from a message sender. + /// Casts a vote with reason for a proposal from a message sender. /// Returns the number of votes already casted for the proposal by the sender #[ink(message)] fn cast_vote_with_reason( @@ -119,7 +119,7 @@ pub trait Governor { reason: String, ) -> Result; - ///Casts a vote with reason and parameters for a proposal from a message sender. + /// Casts a vote with reason and parameters for a proposal from a message sender. /// Returns the number of votes already casted for the proposal by the sender #[ink(message)] fn cast_vote_with_reason_and_params( @@ -130,7 +130,7 @@ pub trait Governor { params: Vec, ) -> Result; - ///Casts a vote with signature for a proposal from a message sender. Returns the number of votes already casted for the proposal by the sender + /// Casts a vote with signature for a proposal from a message sender. Returns the number of votes already casted for the proposal by the sender #[ink(message)] fn cast_vote_with_signature( &mut self, @@ -140,7 +140,7 @@ pub trait Governor { signature: SignatureType, ) -> Result; - ///Casts a vote with signature and parameters for a proposal from a message sender. Returns the number of votes already casted for the proposal by the sender + /// Casts a vote with signature and parameters for a proposal from a message sender. Returns the number of votes already casted for the proposal by the sender #[ink(message)] fn cast_vote_with_signature_and_params( &mut self, @@ -151,9 +151,9 @@ pub trait Governor { params: Vec, ) -> Result; - ///Relays a transaction or function call to an arbitrary target. In cases where the governance executor - ///is some contract other than the governor itself, like when using a timelock, this function can be invoked - ///in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. + /// Relays a transaction or function call to an arbitrary target. In cases where the governance executor + /// is some contract other than the governor itself, like when using a timelock, this function can be invoked + /// in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. #[ink(message)] fn relay(&mut self, target: AccountId, transaction: Transaction) -> Result<(), GovernanceError>; } diff --git a/contracts/src/traits/governance/utils/votes.rs b/contracts/src/traits/governance/utils/votes.rs index acf8d9092..5dcd5305e 100644 --- a/contracts/src/traits/governance/utils/votes.rs +++ b/contracts/src/traits/governance/utils/votes.rs @@ -30,30 +30,30 @@ use openbrush::traits::{ Timestamp, }; -///Common interface for `PSP22Votes`, and other `Votes`-enabled contracts. +/// Common interface for `PSP22Votes`, and other `Votes`-enabled contracts. #[openbrush::trait_definition] pub trait Votes { - ///The amount of votes owned by `account`. + /// The amount of votes owned by `account`. #[ink(message)] fn get_votes(&self, account: AccountId) -> Result; - ///The amount of votes delegated to `account` at the time `timestamp`. + /// The amount of votes delegated to `account` at the time `timestamp`. #[ink(message)] fn get_past_votes(&self, account: AccountId, timestamp: Timestamp) -> Result; - ///The total amount of votes at the time `timestamp`. + /// The total amount of votes at the time `timestamp`. #[ink(message)] fn get_past_total_supply(&self, timestamp: Timestamp) -> Result; - ///Returns the address delegated to by `delegator`. + /// Returns the address delegated to by `delegator`. #[ink(message)] fn delegates(&mut self, delegator: AccountId) -> Option; - ///Delegate votes from `signer` to `delegatee`. + /// Delegate votes from `signer` to `delegatee`. #[ink(message)] fn delegate(&mut self, delegatee: AccountId) -> Result<(), GovernanceError>; - ///Delegate votes from `signer` to `delegatee` using a signature. + /// Delegate votes from `signer` to `delegatee` using a signature. #[ink(message)] fn delegate_by_signature( &mut self, diff --git a/contracts/src/traits/psp22/extensions/votes.rs b/contracts/src/traits/psp22/extensions/votes.rs index 849880b16..849061b53 100644 --- a/contracts/src/traits/psp22/extensions/votes.rs +++ b/contracts/src/traits/psp22/extensions/votes.rs @@ -29,7 +29,7 @@ use crate::{ }; use openbrush::traits::AccountId; -///Extension of ERC20 to support Compound-like voting and delegation. +/// Extension of ERC20 to support Compound-like voting and delegation. /// /// This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either /// by calling the `delegate` function directly, or by providing a signature to be used with `delegate_by_sig`. Voting @@ -39,11 +39,11 @@ use openbrush::traits::AccountId; /// requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. #[openbrush::trait_definition] pub trait PSP22Votes { - ///Get number of checkpoints for `account`. + /// Get number of checkpoints for `account`. #[ink(message)] fn num_checkpoints(&self, account: AccountId) -> Result; - ///Get the `pos`-th checkpoint for `account`. + /// Get the `pos`-th checkpoint for `account`. #[ink(message)] fn checkpoints(&self, account: AccountId, pos: u32) -> Result; } diff --git a/contracts/src/traits/utils/nonces.rs b/contracts/src/traits/utils/nonces.rs index ba7c5c43f..1d234fd75 100644 --- a/contracts/src/traits/utils/nonces.rs +++ b/contracts/src/traits/utils/nonces.rs @@ -1,9 +1,9 @@ use openbrush::traits::AccountId; -///Provides tracking nonces for addresses. Nonces will only increment. +/// Provides tracking nonces for addresses. Nonces will only increment. #[openbrush::trait_definition] pub trait Nonces { - ///Returns the nonce of `account`. + /// Returns the nonce of `account`. #[ink(message)] fn nonces(&self, account: AccountId) -> u128; } diff --git a/contracts/src/utils/checkpoint/mod.rs b/contracts/src/utils/checkpoint/mod.rs index 29ae20c66..6951e1883 100644 --- a/contracts/src/utils/checkpoint/mod.rs +++ b/contracts/src/utils/checkpoint/mod.rs @@ -23,8 +23,8 @@ pub use crate::traits::errors::CheckpointsError; use ink::prelude::vec::Vec; -///Struct, for checkpointing values as they change at different points in -///time, and later looking up past values by block number. See `Votes` as an example. +/// Struct, for checkpointing values as they change at different points in +/// time, and later looking up past values by block number. See `Votes` as an example. /// /// To create a history of checkpoints define a variable type `Checkpoints` in your contract, and store a new /// checkpoint for the current transaction block using the `push` function. @@ -141,7 +141,7 @@ impl Checkpoints { } } - ///Inserts a (`key`, `value`) pair into a Checkpoints so that it is stored as the checkpoint. + /// Inserts a (`key`, `value`) pair into a Checkpoints so that it is stored as the checkpoint. fn _insert(&mut self, key: u64, value: u128) -> Result<(u128, u128), CheckpointsError> { let pos = self.checkpoints.len(); @@ -164,8 +164,8 @@ impl Checkpoints { } } - ///Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - ///`low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + /// Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + /// `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. fn _upper_binary_lookup(&self, key: u64, mut low: usize, mut high: usize) -> usize { while low < high { let mid = (low + high) / 2; @@ -177,7 +177,7 @@ impl Checkpoints { } high } - ///Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + /// Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. /// `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. fn _lower_binary_lookup(&self, key: u64, mut low: usize, mut high: usize) -> usize { while low < high { diff --git a/contracts/src/utils/nonces/mod.rs b/contracts/src/utils/nonces/mod.rs index a5d33b09d..7fe58ea31 100644 --- a/contracts/src/utils/nonces/mod.rs +++ b/contracts/src/utils/nonces/mod.rs @@ -35,14 +35,14 @@ pub struct Data { pub nonces: Mapping, } -///Provides tracking nonces for addresses. Nonces will only increment. +/// Provides tracking nonces for addresses. Nonces will only increment. pub trait NoncesImpl: Storage { - ///Returns the nonce of `account`. + /// Returns the nonce of `account`. fn nonces(&self, account: &AccountId) -> u128 { self.data().nonces.get(account).unwrap_or_default() } - ///Returns the next nonce of `account`, and increments the nonce. + /// Returns the next nonce of `account`, and increments the nonce. fn _use_nonce(&mut self, account: &AccountId) -> Result { let nonce = self.nonces(account); self.data() @@ -51,7 +51,7 @@ pub trait NoncesImpl: Storage { Ok(nonce) } - ///Returns the next nonce of `account`, and increments the nonce if `nonce` matches the current nonce. + /// Returns the next nonce of `account`, and increments the nonce if `nonce` matches the current nonce. fn _use_checked_nonce(&mut self, account: &AccountId, nonce: u128) -> Result { let current_nonce = self.nonces(&account); if nonce != current_nonce { @@ -62,4 +62,4 @@ pub trait NoncesImpl: Storage { .insert(account, &(nonce.checked_add(1).ok_or(NoncesError::NonceOverflow)?)); Ok(nonce) } -} \ No newline at end of file +}