diff --git a/pallets/block-rewards/src/lib.rs b/pallets/block-rewards/src/lib.rs index 8970b65500..9054c42718 100644 --- a/pallets/block-rewards/src/lib.rs +++ b/pallets/block-rewards/src/lib.rs @@ -39,10 +39,11 @@ pub mod weights; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; +use cfg_primitives::Seconds; use cfg_traits::{ self, rewards::{AccountRewards, CurrencyGroupChange, GroupRewards}, - Seconds, TimeAsSecs, + time::UnixTimeSecs, }; use cfg_types::fixed_point::FixedPointNumberExtension; use frame_support::{ @@ -190,7 +191,7 @@ pub mod pallet { + MaxEncodedLen; /// The source of truth for the current time in seconds - type Time: TimeAsSecs; + type Time: UnixTimeSecs; /// Information of runtime weights type WeightInfo: WeightInfo; diff --git a/pallets/block-rewards/src/migrations.rs b/pallets/block-rewards/src/migrations.rs index f8d8e67d05..4c4e00af01 100644 --- a/pallets/block-rewards/src/migrations.rs +++ b/pallets/block-rewards/src/migrations.rs @@ -10,7 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_traits::TimeAsSecs; +use cfg_traits::time::UnixTimeSecs; use frame_support::{ pallet_prelude::Weight, traits::{Get, GetStorageVersion, OnRuntimeUpgrade}, diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs index 4cf182a03f..0429433190 100644 --- a/pallets/pool-fees/src/lib.rs +++ b/pallets/pool-fees/src/lib.rs @@ -30,12 +30,14 @@ pub use weights::WeightInfo; #[frame_support::pallet] pub mod pallet { + use cfg_primitives::Seconds; #[cfg(feature = "runtime-benchmarks")] use cfg_traits::benchmarking::PoolFeesBenchmarkHelper; use cfg_traits::{ changes::ChangeGuard, fee::{FeeAmountProration, PoolFeeBucket, PoolFeesInspect, PoolFeesMutate}, - EpochTransitionHook, PoolInspect, PoolNAV, PoolReserve, PreConditions, Seconds, TimeAsSecs, + time::UnixTimeSecs, + EpochTransitionHook, PoolInspect, PoolNAV, PoolReserve, PreConditions, }; use cfg_types::{ pools::{ @@ -157,7 +159,7 @@ pub mod pallet { type PalletId: Get; /// Fetching method for the time of the current block - type Time: TimeAsSecs; + type Time: UnixTimeSecs; type WeightInfo: WeightInfo; } diff --git a/pallets/pool-system/src/lib.rs b/pallets/pool-system/src/lib.rs index 097c3ac4d5..1eff0d70c1 100644 --- a/pallets/pool-system/src/lib.rs +++ b/pallets/pool-system/src/lib.rs @@ -13,7 +13,8 @@ #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::or_fun_call)] -use cfg_traits::{Permissions, PoolInspect, PoolMutate, PoolNAV, PoolReserve, Seconds, TimeAsSecs}; +use cfg_primitives::Seconds; +use cfg_traits::{time::UnixTimeSecs, Permissions, PoolInspect, PoolMutate, PoolNAV, PoolReserve}; use cfg_types::{ orders::SummarizedOrders, permissions::{PermissionScope, PoolRole, Role}, @@ -320,7 +321,7 @@ pub mod pallet { Fulfillment = FulfillmentWithPrice, >; - type Time: TimeAsSecs; + type Time: UnixTimeSecs; /// Add pool fees type PoolFees: PoolFeesMutate< diff --git a/pallets/pool-system/src/pool_types.rs b/pallets/pool-system/src/pool_types.rs index 0594d15ab2..e615f3eee9 100644 --- a/pallets/pool-system/src/pool_types.rs +++ b/pallets/pool-system/src/pool_types.rs @@ -10,7 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_traits::Seconds; +use cfg_primitives::Seconds; use cfg_types::{epoch::EpochState, pools::TrancheMetadata}; pub use changes::PoolChangeProposal; use frame_support::{ diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index 946977e587..797ba4f7cf 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -10,7 +10,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_traits::{investments::TrancheCurrency as TrancheCurrencyT, Seconds}; +use cfg_primitives::Seconds; +use cfg_traits::investments::TrancheCurrency as TrancheCurrencyT; use cfg_types::{ pools::TrancheMetadata, tokens::{CrossChainTransferability, CustomMetadata},