Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Aug 5, 2024
1 parent ae9d070 commit 6a790fa
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion libs/traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ try-runtime = [
"cfg-primitives/try-runtime",
"sp-runtime/try-runtime",
"cfg-mocks/try-runtime",
"cfg-utils/try-runtime",
]
5 changes: 3 additions & 2 deletions pallets/block-rewards/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pallets/block-rewards/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
6 changes: 4 additions & 2 deletions pallets/pool-fees/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -157,7 +159,7 @@ pub mod pallet {
type PalletId: Get<PalletId>;

/// Fetching method for the time of the current block
type Time: TimeAsSecs;
type Time: UnixTimeSecs;

type WeightInfo: WeightInfo;
}
Expand Down
5 changes: 3 additions & 2 deletions pallets/pool-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -320,7 +321,7 @@ pub mod pallet {
Fulfillment = FulfillmentWithPrice<Self::BalanceRatio>,
>;

type Time: TimeAsSecs;
type Time: UnixTimeSecs;

/// Add pool fees
type PoolFees: PoolFeesMutate<
Expand Down
2 changes: 1 addition & 1 deletion pallets/pool-system/src/pool_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
3 changes: 2 additions & 1 deletion pallets/pool-system/src/tranches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 6a790fa

Please sign in to comment.