diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index 264a66ccd41524da4cfebf67b3a1aa0d4488afc7..a415df97ab253593b75c6c95dc6571c71dbba53a 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -29,7 +29,7 @@ mod benchmarking; use frame_support::traits::{tokens::ExistenceRequirement, Currency}; use sp_arithmetic::{ - per_things::Permill, + per_things::Perbill, traits::{One, Saturating, Zero}, }; use sp_runtime::traits::StaticLookup; @@ -71,7 +71,7 @@ pub mod pallet { type MembersIds: Get<Vec<<Self as frame_system::Config>::AccountId>>; #[pallet::constant] /// Square of the money growth rate per ud reevaluation period - type SquareMoneyGrowthRate: Get<Permill>; + type SquareMoneyGrowthRate: Get<Perbill>; #[pallet::constant] /// Universal dividend creation period type UdCreationPeriod: Get<Self::BlockNumber>; @@ -250,7 +250,7 @@ pub mod pallet { } fn reeval_ud_formula( ud_t: BalanceOf<T>, - c_square: Permill, + c_square: Perbill, monetary_mass: BalanceOf<T>, mut members_count: BalanceOf<T>, count_uds_beetween_two_reevals: BalanceOf<T>, // =(dt/udFrequency) diff --git a/pallets/universal-dividend/src/mock.rs b/pallets/universal-dividend/src/mock.rs index 6c48595d82bd51d7166acabff892f12f40f736fd..63738dcd57126b252752246dadd99e7746072418 100644 --- a/pallets/universal-dividend/src/mock.rs +++ b/pallets/universal-dividend/src/mock.rs @@ -97,7 +97,7 @@ impl pallet_balances::Config for Test { parameter_types! { pub const MembersCount: u64 = 3; - pub const SquareMoneyGrowthRate: Permill = Permill::from_percent(10); + pub const SquareMoneyGrowthRate: Perbill = Perbill::from_percent(10); pub const UdCreationPeriod: BlockNumber = 2; pub const UdReevalPeriod: BlockNumber = 8; } diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs index 128b59b276849e5ea11319ef400e86412e653758..fa7e5e98d3f8c3e5aaa6cf054c0104fa9bc4d73c 100644 --- a/runtime/g1/src/parameters.rs +++ b/runtime/g1/src/parameters.rs @@ -18,7 +18,7 @@ use common_runtime::constants::*; use common_runtime::{Balance, BlockNumber}; use frame_support::parameter_types; use frame_support::weights::constants::WEIGHT_PER_SECOND; -use sp_arithmetic::Permill; +use sp_arithmetic::Perbill; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -83,7 +83,7 @@ frame_support::parameter_types! { // Universal dividend parameter_types! { // 0.002_381_440 = 0.0488^2 - pub const SquareMoneyGrowthRate: Permill = Permill::from_parts(2_381_440); + pub const SquareMoneyGrowthRate: Perbill = Perbill::from_parts(2_381_440); pub const UdCreationPeriod: BlockNumber = DAYS; pub const UdReevalPeriod: BlockNumber = 2_620_800; // 86400 * 182 / 6 } diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs index d65b17ccaccec55dd20ea1d462446d8a272aa275..229c8eb2542c547f258ad471661a138b90e9eb24 100644 --- a/runtime/gdev/src/parameters.rs +++ b/runtime/gdev/src/parameters.rs @@ -18,7 +18,7 @@ use common_runtime::constants::*; use common_runtime::{Balance, BlockNumber}; use frame_support::parameter_types; use frame_support::weights::constants::WEIGHT_PER_SECOND; -use sp_arithmetic::Permill; +use sp_arithmetic::Perbill; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -81,7 +81,7 @@ frame_support::parameter_types! { // Universal dividend parameter_types! { // 0.002_381_440 = 0.0488^2 - pub const SquareMoneyGrowthRate: Permill = Permill::from_parts(2_381_440); + pub const SquareMoneyGrowthRate: Perbill = Perbill::from_parts(2_381_440); } // Multisig diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs index ef26b0f20e40c46cdfa0417a792086a69694b284..5b1a0f76fee35e6749fd1d4a9ccc0f638b7496fd 100644 --- a/runtime/gtest/src/parameters.rs +++ b/runtime/gtest/src/parameters.rs @@ -18,7 +18,7 @@ use common_runtime::constants::*; use common_runtime::{Balance, BlockNumber}; use frame_support::parameter_types; use frame_support::weights::constants::WEIGHT_PER_SECOND; -use sp_arithmetic::Permill; +use sp_arithmetic::Perbill; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -83,7 +83,7 @@ frame_support::parameter_types! { // Universal dividend parameter_types! { // 0.002_381_440 = 0.0488^2 - pub const SquareMoneyGrowthRate: Permill = Permill::from_parts(2_381_440); + pub const SquareMoneyGrowthRate: Perbill = Perbill::from_parts(2_381_440); pub const UdCreationPeriod: BlockNumber = DAYS; pub const UdFirstReeval: BlockNumber = 2 * DAYS; pub const UdReevalPeriod: BlockNumber = 100_800; // 86400 * 7 / 6