From 5e0a173036f5a92589c30c2f7847100bfed394bc Mon Sep 17 00:00:00 2001 From: Juan Ignacio Rios Date: Fri, 28 Jun 2024 15:20:46 +0200 Subject: [PATCH 1/2] Whitelist settlements --- runtimes/polimec/src/lib.rs | 10 ++++++++-- runtimes/shared-configuration/src/funding.rs | 8 +++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/runtimes/polimec/src/lib.rs b/runtimes/polimec/src/lib.rs index 18b5a9d2b..d79d9dc69 100644 --- a/runtimes/polimec/src/lib.rs +++ b/runtimes/polimec/src/lib.rs @@ -205,7 +205,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polimec-mainnet"), impl_name: create_runtime_str!("polimec-mainnet"), authoring_version: 1, - spec_version: 0_007_004, + spec_version: 0_007_005, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, @@ -251,7 +251,13 @@ impl Contains for BaseCallFilter { pallet_funding::Call::root_do_remainder_funding { .. } | pallet_funding::Call::root_do_end_funding { .. } | pallet_funding::Call::root_do_project_decision { .. } | - pallet_funding::Call::root_do_start_settlement { .. } + pallet_funding::Call::root_do_start_settlement { .. } | + pallet_funding::Call::settle_successful_evaluation { .. } | + pallet_funding::Call::settle_failed_evaluation { .. } | + pallet_funding::Call::settle_successful_bid { .. } | + pallet_funding::Call::settle_failed_bid { .. } | + pallet_funding::Call::settle_successful_contribution { .. } | + pallet_funding::Call::settle_failed_contribution { .. } ) }, _ => true, diff --git a/runtimes/shared-configuration/src/funding.rs b/runtimes/shared-configuration/src/funding.rs index de75a4e43..87abad78f 100644 --- a/runtimes/shared-configuration/src/funding.rs +++ b/runtimes/shared-configuration/src/funding.rs @@ -17,14 +17,12 @@ use crate::{Balance, BlockNumber}; use frame_support::{parameter_types, PalletId}; use pallet_funding::types::AcceptedFundingAsset; -use parachains_common::AssetIdForTrustBackedAssets; +#[allow(unused)] +use parachains_common::{AssetIdForTrustBackedAssets, HOURS}; use polimec_common::USD_UNIT; use sp_arithmetic::{FixedU128, Percent}; use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec}; -#[cfg(feature = "fast-mode")] -use parachains_common::HOURS; - #[cfg(feature = "instant-mode")] pub const EVALUATION_DURATION: BlockNumber = 3; #[cfg(feature = "fast-mode")] @@ -86,7 +84,7 @@ pub const SUCCESS_TO_SETTLEMENT_TIME: BlockNumber = 4; #[cfg(feature = "fast-mode")] pub const SUCCESS_TO_SETTLEMENT_TIME: BlockNumber = 5 * crate::MINUTES; #[cfg(not(any(feature = "fast-mode", feature = "instant-mode")))] -pub const SUCCESS_TO_SETTLEMENT_TIME: BlockNumber = 4 * crate::DAYS; +pub const SUCCESS_TO_SETTLEMENT_TIME: BlockNumber = 1 * HOURS; pub type ProjectIdentifier = u32; From 4c57ad36bf357f544f6ca2e98a1f336c3b03746b Mon Sep 17 00:00:00 2001 From: Leonardo Razovic <4128940+lrazovic@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:53:49 +0200 Subject: [PATCH 2/2] chore: remove allow unused --- runtimes/shared-configuration/src/funding.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtimes/shared-configuration/src/funding.rs b/runtimes/shared-configuration/src/funding.rs index 87abad78f..d514f1063 100644 --- a/runtimes/shared-configuration/src/funding.rs +++ b/runtimes/shared-configuration/src/funding.rs @@ -17,12 +17,14 @@ use crate::{Balance, BlockNumber}; use frame_support::{parameter_types, PalletId}; use pallet_funding::types::AcceptedFundingAsset; -#[allow(unused)] -use parachains_common::{AssetIdForTrustBackedAssets, HOURS}; +use parachains_common::AssetIdForTrustBackedAssets; use polimec_common::USD_UNIT; use sp_arithmetic::{FixedU128, Percent}; use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec}; +#[cfg(any(feature = "fast-mode", not(any(feature = "fast-mode", feature = "instant-mode"))))] +use parachains_common::HOURS; + #[cfg(feature = "instant-mode")] pub const EVALUATION_DURATION: BlockNumber = 3; #[cfg(feature = "fast-mode")]