From a2ef39fb78899599787e859bee4f03f3805aa275 Mon Sep 17 00:00:00 2001 From: Nikita Khateev Date: Mon, 20 Nov 2023 18:18:59 +0400 Subject: [PATCH] [10] updates with multisig introduction --- common/Cargo.toml | 12 ------------ common/src/lib.rs | 16 ---------------- runtime/src/lib.rs | 11 +++++++---- 3 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 common/Cargo.toml delete mode 100644 common/src/lib.rs diff --git a/common/Cargo.toml b/common/Cargo.toml deleted file mode 100644 index c760999..0000000 --- a/common/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "common" -version = "0.1.0" -authors = ["Anonymous"] -edition.workspace = true -description = "Logic which is common to all runtimes" -license = "Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false } \ No newline at end of file diff --git a/common/src/lib.rs b/common/src/lib.rs deleted file mode 100644 index fe6aaa9..0000000 --- a/common/src/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -pub use currency::*; - -mod currency { - use polkadot_core_primitives::Balance; - // Unit = the base number of indivisible units for balances - pub const UNIT: Balance = 1_000_000_000_000; - pub const MILLIUNIT: Balance = 1_000_000_000; - pub const MICROUNIT: Balance = 1_000_000; - - /// The existential deposit. Set to 1/10 of the Connected Relay Chain. - pub const EXISTENTIAL_DEPOSIT: Balance = MILLIUNIT; - - pub const fn deposit(items: u32, bytes: u32) -> Balance { - (items as Balance * 20 * UNIT + bytes as Balance * 100 * MILLIUNIT) / 100 - } -} diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 9e2bd8a..2ecf304 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -7,7 +7,6 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); pub mod constants; -use constants::currency::*; mod weights; pub mod xcm_config; @@ -378,9 +377,13 @@ impl InstanceFilter for ProxyType { match self { ProxyType::Any => true, ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }), - ProxyType::CancelProxy => - matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })), - ProxyType::Collator => matches!(c, RuntimeCall::CollatorSelection { .. }), + ProxyType::CancelProxy => matches!( + c, + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) + | RuntimeCall::Multisig { .. } + ), + ProxyType::Collator => + matches!(c, RuntimeCall::CollatorSelection { .. } | RuntimeCall::Multisig { .. }), } } }