From 15a6b39f38e7dc98b487ea974647491312f5b763 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 15 Nov 2023 09:49:25 +0100 Subject: [PATCH 01/15] move fees logic to its own module --- runtime/common/src/fees.rs | 243 +++++++++++++++++++++++++++++++ runtime/common/src/lib.rs | 90 +----------- runtime/common/src/tests/mock.rs | 132 ----------------- runtime/common/src/tests/mod.rs | 50 ------- 4 files changed, 244 insertions(+), 271 deletions(-) create mode 100644 runtime/common/src/fees.rs delete mode 100644 runtime/common/src/tests/mock.rs delete mode 100644 runtime/common/src/tests/mod.rs diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs new file mode 100644 index 0000000000..ff25996ca9 --- /dev/null +++ b/runtime/common/src/fees.rs @@ -0,0 +1,243 @@ +use cfg_primitives::{ + constants::{CENTI_CFG, TREASURY_FEE_RATIO}, + types::Balance, +}; +use frame_support::{ + traits::{Currency, Imbalance, OnUnbalanced}, + weights::{ + constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients, + WeightToFeePolynomial, + }, +}; +use smallvec::smallvec; +use sp_arithmetic::Perbill; + +pub type NegativeImbalance = as Currency< + ::AccountId, +>>::NegativeImbalance; + +struct ToAuthor(sp_std::marker::PhantomData); +impl OnUnbalanced> for ToAuthor +where + R: pallet_balances::Config + pallet_authorship::Config, +{ + fn on_nonzero_unbalanced(amount: NegativeImbalance) { + if let Some(author) = >::author() { + >::resolve_creating(&author, amount); + } + } +} + +pub struct DealWithFees(sp_std::marker::PhantomData); +impl OnUnbalanced> for DealWithFees +where + R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config, + pallet_treasury::Pallet: OnUnbalanced>, +{ + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(fees) = fees_then_tips.next() { + // for fees, split the destination + let (treasury_amount, mut author_amount) = fees.ration( + TREASURY_FEE_RATIO.deconstruct(), + (Perbill::one() - TREASURY_FEE_RATIO).deconstruct(), + ); + if let Some(tips) = fees_then_tips.next() { + // for tips, if any, 100% to author + tips.merge_into(&mut author_amount); + } + + use pallet_treasury::Pallet as Treasury; + as OnUnbalanced<_>>::on_unbalanced(treasury_amount); + as OnUnbalanced<_>>::on_unbalanced(author_amount); + } + } +} + +/// Handles converting a weight scalar to a fee value, based on the scale +/// and granularity of the node's balance type. +/// +/// This should typically create a mapping between the following ranges: +/// - [0, frame_system::MaximumBlockWeight] +/// - [Balance::min, Balance::max] +/// +/// Yet, it can be used for any other sort of change to weight-fee. Some +/// examples being: +/// - Setting it to `0` will essentially disable the weight fee. +/// - Setting it to `1` will cause the literal `#[weight = x]` values to be +/// charged. +pub struct WeightToFee; +impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + + fn polynomial() -> WeightToFeeCoefficients { + let p = CENTI_CFG; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec!(WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }) + } +} + +#[cfg(test)] +mod test { + use cfg_primitives::{AccountId, TREASURY_FEE_RATIO}; + use frame_support::{ + parameter_types, + traits::{Currency, FindAuthor}, + PalletId, + }; + use sp_core::{ConstU64, H256}; + use sp_io::TestExternalities; + use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, + Perbill, + }; + use sp_std::convert::{TryFrom, TryInto}; + + use super::*; + + type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; + type Block = frame_system::mocking::MockBlock; + + const TEST_ACCOUNT: AccountId = AccountId::new([1; 32]); + + frame_support::construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Authorship: pallet_authorship::{Pallet, Storage}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, + } + ); + + parameter_types! { + pub const BlockHashCount: u64 = 250; + } + + impl frame_system::Config for Runtime { + type AccountData = pallet_balances::AccountData; + type AccountId = AccountId; + type BaseCallFilter = frame_support::traits::Everything; + type BlockHashCount = BlockHashCount; + type BlockLength = (); + type BlockNumber = u64; + type BlockWeights = (); + type DbWeight = (); + type Hash = H256; + type Hashing = BlakeTwo256; + type Header = Header; + type Index = u64; + type Lookup = IdentityLookup; + type MaxConsumers = frame_support::traits::ConstU32<16>; + type OnKilledAccount = (); + type OnNewAccount = (); + type OnSetCode = (); + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type SS58Prefix = (); + type SystemWeightInfo = (); + type Version = (); + } + + impl pallet_balances::Config for Runtime { + type AccountStore = System; + type Balance = u64; + type DustRemoval = (); + type ExistentialDeposit = ConstU64<1>; + type FreezeIdentifier = (); + type HoldIdentifier = (); + type MaxFreezes = (); + type MaxHolds = frame_support::traits::ConstU32<1>; + type MaxLocks = (); + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + } + + parameter_types! { + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const MaxApprovals: u32 = 100; + } + + impl pallet_treasury::Config for Runtime { + type ApproveOrigin = frame_system::EnsureRoot; + type Burn = (); + type BurnDestination = (); + type Currency = pallet_balances::Pallet; + type MaxApprovals = MaxApprovals; + type OnSlash = (); + type PalletId = TreasuryPalletId; + type ProposalBond = (); + type ProposalBondMaximum = (); + type ProposalBondMinimum = (); + type RejectOrigin = frame_system::EnsureRoot; + type RuntimeEvent = RuntimeEvent; + type SpendFunds = (); + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type SpendPeriod = (); + type WeightInfo = (); + } + + pub struct OneAuthor; + impl FindAuthor for OneAuthor { + fn find_author<'a, I>(_: I) -> Option + where + I: 'a, + { + Some(TEST_ACCOUNT) + } + } + impl pallet_authorship::Config for Runtime { + type EventHandler = (); + type FindAuthor = OneAuthor; + } + + fn new_test_ext() -> TestExternalities { + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + + pallet_balances::GenesisConfig::::default() + .assimilate_storage(&mut t) + .unwrap(); + + TestExternalities::new(t) + } + + #[test] + fn test_fees_and_tip_split() { + new_test_ext().execute_with(|| { + const FEE: u64 = 10; + const TIP: u64 = 20; + + let fee = Balances::issue(FEE); + let tip = Balances::issue(TIP); + + assert_eq!(Balances::free_balance(Treasury::account_id()), 0); + assert_eq!(Balances::free_balance(TEST_ACCOUNT), 0); + + DealWithFees::on_unbalanceds(vec![fee, tip].into_iter()); + + assert_eq!( + Balances::free_balance(Treasury::account_id()), + TREASURY_FEE_RATIO * FEE + ); + assert_eq!( + Balances::free_balance(TEST_ACCOUNT), + TIP + (Perbill::one() - TREASURY_FEE_RATIO) * FEE + ); + }); + } +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index a53eb904fa..766e7fddba 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -15,12 +15,10 @@ #![cfg_attr(not(feature = "std"), no_std)] -#[cfg(test)] -mod tests; - pub mod account_conversion; pub mod apis; pub mod evm; +pub mod fees; pub mod gateway; pub mod migrations; pub mod oracle; @@ -91,92 +89,6 @@ pub mod xcm_fees { } } -pub mod fees { - use cfg_primitives::{ - constants::{CENTI_CFG, TREASURY_FEE_RATIO}, - types::Balance, - }; - use frame_support::{ - traits::{Currency, Imbalance, OnUnbalanced}, - weights::{ - constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients, - WeightToFeePolynomial, - }, - }; - use smallvec::smallvec; - use sp_arithmetic::Perbill; - - pub type NegativeImbalance = as Currency< - ::AccountId, - >>::NegativeImbalance; - - struct ToAuthor(sp_std::marker::PhantomData); - impl OnUnbalanced> for ToAuthor - where - R: pallet_balances::Config + pallet_authorship::Config, - { - fn on_nonzero_unbalanced(amount: NegativeImbalance) { - if let Some(author) = >::author() { - >::resolve_creating(&author, amount); - } - } - } - - pub struct DealWithFees(sp_std::marker::PhantomData); - impl OnUnbalanced> for DealWithFees - where - R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config, - pallet_treasury::Pallet: OnUnbalanced>, - { - fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { - if let Some(fees) = fees_then_tips.next() { - // for fees, split the destination - let (treasury_amount, mut author_amount) = fees.ration( - TREASURY_FEE_RATIO.deconstruct(), - (Perbill::one() - TREASURY_FEE_RATIO).deconstruct(), - ); - if let Some(tips) = fees_then_tips.next() { - // for tips, if any, 100% to author - tips.merge_into(&mut author_amount); - } - - use pallet_treasury::Pallet as Treasury; - as OnUnbalanced<_>>::on_unbalanced(treasury_amount); - as OnUnbalanced<_>>::on_unbalanced(author_amount); - } - } - } - - /// Handles converting a weight scalar to a fee value, based on the scale - /// and granularity of the node's balance type. - /// - /// This should typically create a mapping between the following ranges: - /// - [0, frame_system::MaximumBlockWeight] - /// - [Balance::min, Balance::max] - /// - /// Yet, it can be used for any other sort of change to weight-fee. Some - /// examples being: - /// - Setting it to `0` will essentially disable the weight fee. - /// - Setting it to `1` will cause the literal `#[weight = x]` values to - /// be charged. - pub struct WeightToFee; - impl WeightToFeePolynomial for WeightToFee { - type Balance = Balance; - - fn polynomial() -> WeightToFeeCoefficients { - let p = CENTI_CFG; - let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); - - smallvec!(WeightToFeeCoefficient { - degree: 1, - negative: false, - coeff_frac: Perbill::from_rational(p % q, q), - coeff_integer: p / q, - }) - } - } -} - /// AssetRegistry's AssetProcessor pub mod asset_registry { use cfg_primitives::types::{AccountId, Balance}; diff --git a/runtime/common/src/tests/mock.rs b/runtime/common/src/tests/mock.rs deleted file mode 100644 index 73a2a001e7..0000000000 --- a/runtime/common/src/tests/mock.rs +++ /dev/null @@ -1,132 +0,0 @@ -use cfg_primitives::AccountId; -use frame_support::{parameter_types, traits::FindAuthor, PalletId}; -use sp_core::{ConstU64, H256}; -use sp_io::TestExternalities; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; -use sp_std::convert::{TryFrom, TryInto}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; -type Block = frame_system::mocking::MockBlock; -const TEST_ACCOUNT: AccountId = AccountId::new([1; 32]); - -frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, - } -); - -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - -impl frame_system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = BlockHashCount; - type BlockLength = (); - type BlockNumber = u64; - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; - type Lookup = IdentityLookup; - type MaxConsumers = frame_support::traits::ConstU32<16>; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = (); - type SystemWeightInfo = (); - type Version = (); -} - -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = u64; - type DustRemoval = (); - type ExistentialDeposit = ConstU64<1>; - type FreezeIdentifier = (); - type HoldIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - -parameter_types! { - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - pub const MaxApprovals: u32 = 100; -} - -impl pallet_treasury::Config for Runtime { - type ApproveOrigin = frame_system::EnsureRoot; - type Burn = (); - type BurnDestination = (); - type Currency = pallet_balances::Pallet; - type MaxApprovals = MaxApprovals; - type OnSlash = (); - type PalletId = TreasuryPalletId; - type ProposalBond = (); - type ProposalBondMaximum = (); - type ProposalBondMinimum = (); - type RejectOrigin = frame_system::EnsureRoot; - type RuntimeEvent = RuntimeEvent; - type SpendFunds = (); - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; - type SpendPeriod = (); - type WeightInfo = (); -} - -pub struct OneAuthor; -impl FindAuthor for OneAuthor { - fn find_author<'a, I>(_: I) -> Option - where - I: 'a, - { - Some(TEST_ACCOUNT) - } -} -impl pallet_authorship::Config for Runtime { - type EventHandler = (); - type FindAuthor = OneAuthor; -} - -pub struct TestExternalitiesBuilder {} - -impl Default for TestExternalitiesBuilder { - fn default() -> Self { - Self {} - } -} - -impl TestExternalitiesBuilder { - pub(crate) fn build(self) -> TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - pallet_balances::GenesisConfig::::default() - .assimilate_storage(&mut t) - .unwrap(); - - TestExternalities::new(t) - } -} diff --git a/runtime/common/src/tests/mod.rs b/runtime/common/src/tests/mod.rs deleted file mode 100644 index 48464a8c23..0000000000 --- a/runtime/common/src/tests/mod.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// This file is part of Centrifuge chain project. - -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). - -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -use cfg_primitives::{AccountId, TREASURY_FEE_RATIO}; -use frame_support::traits::{Currency, OnUnbalanced}; -use mock::*; -use sp_runtime::Perbill; - -use super::fees::*; - -mod mock; - -const TEST_ACCOUNT: AccountId = AccountId::new([1; 32]); - -#[test] -fn test_fees_and_tip_split() { - TestExternalitiesBuilder::default() - .build() - .execute_with(|| { - const FEE: u64 = 10; - const TIP: u64 = 20; - - let fee = Balances::issue(FEE); - let tip = Balances::issue(TIP); - - assert_eq!(Balances::free_balance(Treasury::account_id()), 0); - assert_eq!(Balances::free_balance(TEST_ACCOUNT), 0); - - DealWithFees::on_unbalanceds(vec![fee, tip].into_iter()); - - assert_eq!( - Balances::free_balance(Treasury::account_id()), - TREASURY_FEE_RATIO * FEE - ); - assert_eq!( - Balances::free_balance(TEST_ACCOUNT), - TIP + (Perbill::one() - TREASURY_FEE_RATIO) * FEE - ); - }); -} From 99c816d07e6e7275fc6f37313cc18a5829ebb3f7 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 15 Nov 2023 14:06:21 +0100 Subject: [PATCH 02/15] runtime-common with exporting list and using workspace features --- Cargo.lock | 48 ++++- Cargo.toml | 145 +++++++++++++++ runtime/common/Cargo.toml | 381 +++++++++++++++++++++++++++----------- runtime/common/src/lib.rs | 73 ++++++++ 4 files changed, 543 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b99ac1256..33977b45f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11379,7 +11379,12 @@ dependencies = [ "cfg-traits", "cfg-types", "cfg-utils", - "fp-self-contained", + "chainbridge", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", "frame-support", "frame-system", "hex-literal 0.3.4", @@ -11388,13 +11393,26 @@ dependencies = [ "orml-oracle", "orml-tokens", "orml-traits", + "orml-xcm", + "orml-xtokens", "pallet-anchors", + "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-base-fee", + "pallet-block-rewards", + "pallet-bridge", + "pallet-claims", + "pallet-collator-allowlist", + "pallet-collator-selection", "pallet-collective", + "pallet-crowdloan-claim", + "pallet-crowdloan-reward", "pallet-data-collector", + "pallet-democracy", + "pallet-elections-phragmen", "pallet-ethereum", + "pallet-ethereum-transaction", "pallet-evm", "pallet-evm-chain-id", "pallet-evm-precompile-blake2", @@ -11403,13 +11421,41 @@ dependencies = [ "pallet-evm-precompile-modexp", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", + "pallet-fees", + "pallet-foreign-investments", + "pallet-identity", + "pallet-interest-accrual", "pallet-investments", + "pallet-keystore", "pallet-liquidity-pools", "pallet-liquidity-pools-gateway", + "pallet-liquidity-rewards", "pallet-loans", + "pallet-membership", + "pallet-migration-manager", + "pallet-multisig", + "pallet-nft", + "pallet-nft-sales", + "pallet-order-book", + "pallet-permissions", + "pallet-pool-registry", "pallet-pool-system", + "pallet-preimage", + "pallet-proxy", "pallet-restricted-tokens", + "pallet-rewards", + "pallet-scheduler", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transfer-allowlist", "pallet-treasury", + "pallet-uniques", + "pallet-utility", + "pallet-vesting", + "pallet-xcm", + "pallet-xcm-transactor", "parachain-info", "parity-scale-codec 3.6.5", "polkadot-parachain", diff --git a/Cargo.toml b/Cargo.toml index ee4e4fe92c..4f13744abd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,8 +71,153 @@ members = [ ] [workspace.dependencies] +hex-literal = { version = "0.3.4", default-features = false } +smallvec = "1.6.1" +serde = { version = "1.0.119", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } +log = "0.4" + +# Parachain +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } + +# polkadot dependencies +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } + +# Primitives +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } + +# Frame +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ + "tuples-96", +], branch = "polkadot-v0.9.43" } # tuples feature can be remove on 0.9.42 +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } + +# Substrate pallets +pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } + +# Orml +orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" } +# Frontier +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } + +# Chainbridge +chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } + +# Moonbeam +xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } + +# Centrifuge pallets +axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } +liquidity-pools-gateway-routers = { path = "pallets/liquidity-pools-gateway/routers", default-features = false } +pallet-anchors = { path = "pallets/anchors", default-features = false } +pallet-block-rewards = { path = "pallets/block-rewards", default-features = false } +pallet-bridge = { path = "pallets/bridge", default-features = false } +pallet-claims = { path = "pallets/claims", default-features = false } +pallet-collator-allowlist = { path = "pallets/collator-allowlist", default-features = false } +pallet-crowdloan-claim = { path = "pallets/crowdloan-claim", default-features = false } +pallet-crowdloan-reward = { path = "pallets/crowdloan-reward", default-features = false } +pallet-data-collector = { path = "pallets/data-collector", default-features = false } +pallet-ethereum-transaction = { path = "pallets/ethereum-transaction", default-features = false } +pallet-fees = { path = "pallets/fees", default-features = false } +pallet-foreign-investments = { path = "pallets/foreign-investments", default-features = false } +pallet-interest-accrual = { path = "pallets/interest-accrual", default-features = false } +pallet-investments = { path = "pallets/investments", default-features = false } +pallet-keystore = { path = "pallets/keystore", default-features = false } +pallet-liquidity-pools = { path = "pallets/liquidity-pools", default-features = false } +pallet-liquidity-pools-gateway = { path = "pallets/liquidity-pools-gateway", default-features = false } +pallet-liquidity-rewards = { path = "pallets/liquidity-rewards", default-features = false } +pallet-loans = { path = "pallets/loans", default-features = false } +pallet-migration-manager = { path = "pallets/migration", default-features = false } +pallet-nft = { path = "pallets/nft", default-features = false } +pallet-nft-sales = { path = "pallets/nft-sales", default-features = false } +pallet-order-book = { path = "pallets/order-book", default-features = false } +pallet-permissions = { path = "pallets/permissions", default-features = false } +pallet-pool-registry = { path = "pallets/pool-registry", default-features = false } +pallet-pool-system = { path = "pallets/pool-system", default-features = false } +pallet-restricted-tokens = { path = "pallets/restricted-tokens", default-features = false } +pallet-rewards = { path = "pallets/rewards", default-features = false } +pallet-transfer-allowlist = { path = "pallets/transfer-allowlist", default-features = false } + +# Centrifuge libs +cfg-primitives = { path = "libs/primitives", default-features = false } +cfg-traits = { path = "libs/traits", default-features = false } +cfg-types = { path = "libs/types", default-features = false } +cfg-utils = { path = "libs/utils", default-features = false } + + [dependencies] # third-party dependencies async-trait = "0.1" diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 7c2542b97c..e7769616d3 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -8,137 +8,222 @@ homepage = "https://centrifuge.io/" repository = "https://github.com/centrifuge/centrifuge-chain" [dependencies] -hex-literal = { version = "0.3.4", default-features = false } -serde = { version = "1.0.119" } -smallvec = "1.6.1" +hex-literal = { workspace = true } +serde = { workspace = true } +smallvec = { workspace = true } +codec = { package = "parity-scale-codec", workspace = true } +scale-info = { workspace = true } -# Substrate dependencies -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +frame-support = { workspace = true } +frame-system = { workspace = true } -# Polkadot dependencies -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +sp-api = { workspace = true } +sp-arithmetic = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -# ORML dependencies -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +polkadot-parachain = { workspace = true } +xcm = { workspace = true } +xcm-executor = { workspace = true } -# Frontier dependencies -pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# Orml +orml-traits = { workspace = true } -# There is a bug in the frontier repo that adds pallet-ethereum without a try-runtime dependency -# for this crate which makes our compilation fail with the i_know_what_i_am_doing error. -# It seem fixed in 0.9.39, and this dependency can be removed from this file safely. -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# Frontier +pallet-evm-precompile-blake2 = { workspace = true } +pallet-evm-precompile-bn128 = { workspace = true } +pallet-evm-precompile-dispatch = { workspace = true } +pallet-evm-precompile-modexp = { workspace = true } +pallet-evm-precompile-sha3fips = { workspace = true } +pallet-evm-precompile-simple = { workspace = true } -# Moonbeam dependencies -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +# Moonbeam +xcm-primitives = { workspace = true } -# Local Dependencies -axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } -cfg-primitives = { path = "../../libs/primitives", default-features = false } -cfg-traits = { path = "../../libs/traits", default-features = false } -cfg-types = { path = "../../libs/types", default-features = false } -cfg-utils = { path = "../../libs/utils", default-features = false } -pallet-anchors = { path = "../../pallets/anchors", default-features = false } -pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } -pallet-investments = { path = "../../pallets/investments", default-features = false } -pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } -pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } -pallet-loans = { path = "../../pallets/loans", default-features = false } -pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } -pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } +# Local +cfg-primitives = { workspace = true } +cfg-traits = { workspace = true } +cfg-types = { workspace = true } +cfg-utils = { workspace = true } # Used for migrations -log = "0.4" -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +log = { workspace = true } +sp-io = { workspace = true } + +# Pallets in the export list +axelar-gateway-precompile = { workspace = true } +chainbridge = {workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +orml-asset-registry = { workspace = true } +orml-oracle = { workspace = true } +orml-tokens = { workspace = true } +orml-xcm = { workspace = true } +orml-xtokens = { workspace = true } +pallet-anchors = { workspace = true } +pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-base-fee = { workspace = true } +pallet-block-rewards = { workspace = true } +pallet-bridge = { workspace = true } +pallet-claims = { workspace = true } +pallet-collator-allowlist = { workspace = true } +pallet-collator-selection = { workspace = true } +pallet-collective = { workspace = true } +pallet-crowdloan-claim = { workspace = true } +pallet-crowdloan-reward = { workspace = true } +pallet-data-collector = { workspace = true } +pallet-democracy = { workspace = true } +pallet-elections-phragmen = { workspace = true } +pallet-ethereum = { workspace = true } +pallet-ethereum-transaction = { workspace = true } +pallet-evm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-fees = { workspace = true } +pallet-foreign-investments = { workspace = true } +pallet-identity = { workspace = true } +pallet-interest-accrual = { workspace = true } +pallet-investments = { workspace = true } +pallet-keystore = { workspace = true } +pallet-liquidity-pools = { workspace = true } +pallet-liquidity-pools-gateway = { workspace = true } +pallet-liquidity-rewards = { workspace = true } +pallet-loans = { workspace = true } +pallet-membership = { workspace = true } +pallet-migration-manager = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nft = { workspace = true } +pallet-nft-sales = { workspace = true } +pallet-order-book = { workspace = true } +pallet-permissions = { workspace = true } +pallet-pool-registry = { workspace = true } +pallet-pool-system = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-restricted-tokens = { workspace = true } +pallet-rewards = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transfer-allowlist = { workspace = true } +pallet-treasury = { workspace = true } +pallet-uniques = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-transactor = { workspace = true } +parachain-info = { workspace = true } +#fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } [dev-dependencies] -cfg-mocks = { path = "../../libs/mocks", features = ["runtime-benchmarks", "std"] } -hex-literal = "0.3.4" -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" } +cfg-mocks = { path = "../../libs/mocks", features = ["std"] } [features] default = ["std"] std = [ - "axelar-gateway-precompile/std", "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "cfg-utils/std", "codec/std", - "fp-self-contained/std", - "frame-support/std", "frame-support/std", "frame-system/std", "log/std", + "orml-traits/std", + "polkadot-parachain/std", + "scale-info/std", + "serde/std", + "sp-api/std", + "sp-arithmetic/std", + "sp-core/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", + #"fp-self-contained/std", + + # Pallet exporting list + "axelar-gateway-precompile/std", + "chainbridge/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", "orml-asset-registry/std", "orml-oracle/std", "orml-tokens/std", - "orml-traits/std", + "orml-xcm/std", + "orml-xtokens/std", "pallet-anchors/std", + "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", "pallet-base-fee/std", + "pallet-block-rewards/std", + "pallet-bridge/std", + "pallet-claims/std", + "pallet-collator-allowlist/std", + "pallet-collator-selection/std", + "pallet-collective/std", + "pallet-crowdloan-claim/std", + "pallet-crowdloan-reward/std", "pallet-data-collector/std", + "pallet-democracy/std", + "pallet-elections-phragmen/std", "pallet-ethereum/std", - "pallet-evm-chain-id/std", - "pallet-evm-precompile-blake2/std", - "pallet-evm-precompile-bn128/std", - "pallet-evm-precompile-dispatch/std", - "pallet-evm-precompile-modexp/std", - "pallet-evm-precompile-sha3fips/std", - "pallet-evm-precompile-simple/std", + "pallet-ethereum-transaction/std", "pallet-evm/std", + "pallet-evm-chain-id/std", + "pallet-fees/std", + "pallet-foreign-investments/std", + "pallet-identity/std", + "pallet-interest-accrual/std", "pallet-investments/std", - "pallet-liquidity-pools-gateway/std", + "pallet-keystore/std", "pallet-liquidity-pools/std", + "pallet-liquidity-pools-gateway/std", + "pallet-liquidity-rewards/std", "pallet-loans/std", + "pallet-membership/std", + "pallet-migration-manager/std", + "pallet-multisig/std", + "pallet-nft/std", + "pallet-nft-sales/std", + "pallet-order-book/std", + "pallet-permissions/std", + "pallet-pool-registry/std", "pallet-pool-system/std", + "pallet-preimage/std", + "pallet-proxy/std", "pallet-restricted-tokens/std", + "pallet-rewards/std", + "pallet-scheduler/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment/std", + "pallet-transfer-allowlist/std", "pallet-treasury/std", + "pallet-uniques/std", + "pallet-utility/std", + "pallet-vesting/std", + "pallet-xcm/std", + "pallet-xcm-transactor/std", "parachain-info/std", - "polkadot-parachain/std", - "scale-info/std", - "serde/std", - "sp-api/std", - "sp-arithmetic/std", - "sp-core/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", ] runtime-benchmarks = [ - "axelar-gateway-precompile/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", "cfg-mocks/runtime-benchmarks", "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", @@ -146,58 +231,148 @@ runtime-benchmarks = [ "cfg-utils/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks", + + # Pallet exporting list + "axelar-gateway-precompile/runtime-benchmarks", + "chainbridge/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", "orml-asset-registry/runtime-benchmarks", "orml-tokens/runtime-benchmarks", + "orml-xtokens/runtime-benchmarks", "pallet-anchors/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-block-rewards/runtime-benchmarks", + "pallet-bridge/runtime-benchmarks", + "pallet-claims/runtime-benchmarks", + "pallet-collator-allowlist/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-crowdloan-claim/runtime-benchmarks", + "pallet-crowdloan-reward/runtime-benchmarks", "pallet-data-collector/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", + "pallet-elections-phragmen/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", + "pallet-ethereum-transaction/runtime-benchmarks", "pallet-evm/runtime-benchmarks", + "pallet-fees/runtime-benchmarks", + "pallet-foreign-investments/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-interest-accrual/runtime-benchmarks", "pallet-investments/runtime-benchmarks", - "pallet-liquidity-pools-gateway/runtime-benchmarks", + "pallet-keystore/runtime-benchmarks", "pallet-liquidity-pools/runtime-benchmarks", + "pallet-liquidity-pools-gateway/runtime-benchmarks", + "pallet-liquidity-rewards/runtime-benchmarks", "pallet-loans/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-migration-manager/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-nft/runtime-benchmarks", + "pallet-nft-sales/runtime-benchmarks", + "pallet-order-book/runtime-benchmarks", + "pallet-permissions/runtime-benchmarks", + "pallet-pool-registry/runtime-benchmarks", "pallet-pool-system/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", "pallet-restricted-tokens/runtime-benchmarks", + "pallet-rewards/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-transfer-allowlist/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", -] - -on-chain-release-build = [ - "sp-api/disable-logging", + "pallet-uniques/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", ] try-runtime = [ - "axelar-gateway-precompile/try-runtime", + "sp-runtime/try-runtime", "cfg-mocks/try-runtime", "cfg-primitives/try-runtime", "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "cfg-utils/try-runtime", - "fp-self-contained/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", + + # Pallet exporting list + "axelar-gateway-precompile/try-runtime", + "chainbridge/try-runtime", + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", "orml-asset-registry/try-runtime", "orml-oracle/try-runtime", "orml-tokens/try-runtime", + "orml-xcm/try-runtime", + "orml-xtokens/try-runtime", "pallet-anchors/try-runtime", + "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-base-fee/try-runtime", + "pallet-block-rewards/try-runtime", + "pallet-bridge/try-runtime", + "pallet-claims/try-runtime", + "pallet-collator-allowlist/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-collective/try-runtime", + "pallet-crowdloan-claim/try-runtime", + "pallet-crowdloan-reward/try-runtime", "pallet-data-collector/try-runtime", + "pallet-democracy/try-runtime", + "pallet-elections-phragmen/try-runtime", "pallet-ethereum/try-runtime", - "pallet-evm-chain-id/try-runtime", + "pallet-ethereum-transaction/try-runtime", "pallet-evm/try-runtime", + "pallet-evm-chain-id/try-runtime", + "pallet-fees/try-runtime", + "pallet-foreign-investments/try-runtime", + "pallet-identity/try-runtime", + "pallet-interest-accrual/try-runtime", "pallet-investments/try-runtime", - "pallet-liquidity-pools-gateway/try-runtime", + "pallet-keystore/try-runtime", "pallet-liquidity-pools/try-runtime", + "pallet-liquidity-pools-gateway/try-runtime", + "pallet-liquidity-rewards/try-runtime", "pallet-loans/try-runtime", + "pallet-membership/try-runtime", + "pallet-migration-manager/try-runtime", + "pallet-multisig/try-runtime", + "pallet-nft/try-runtime", + "pallet-nft-sales/try-runtime", + "pallet-order-book/try-runtime", + "pallet-permissions/try-runtime", + "pallet-pool-registry/try-runtime", "pallet-pool-system/try-runtime", + "pallet-preimage/try-runtime", + "pallet-proxy/try-runtime", "pallet-restricted-tokens/try-runtime", + "pallet-rewards/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-transfer-allowlist/try-runtime", "pallet-treasury/try-runtime", + "pallet-uniques/try-runtime", + "pallet-utility/try-runtime", + "pallet-vesting/try-runtime", + "pallet-xcm/try-runtime", + "pallet-xcm-transactor/try-runtime", "parachain-info/try-runtime", - "sp-runtime/try-runtime", +] +on-chain-release-build = [ + "sp-api/disable-logging", ] diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 766e7fddba..9c6ba2f9a8 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -30,6 +30,79 @@ use orml_traits::GetByKey; use sp_runtime::traits::Get; use sp_std::marker::PhantomData; +pub mod reexport { + pub mod pallets { + pub use axelar_gateway_precompile; + pub use chainbridge; + pub use cumulus_pallet_aura_ext; + pub use cumulus_pallet_dmp_queue; + pub use cumulus_pallet_parachain_system; + pub use cumulus_pallet_xcm; + pub use cumulus_pallet_xcmp_queue; + pub use orml_asset_registry; + pub use orml_oracle; + pub use orml_tokens; + pub use orml_xcm; + pub use orml_xtokens; + pub use pallet_anchors; + pub use pallet_aura; + pub use pallet_authorship; + pub use pallet_balances; + pub use pallet_base_fee; + pub use pallet_block_rewards; + pub use pallet_bridge; + pub use pallet_claims; + pub use pallet_collator_allowlist; + pub use pallet_collator_selection; + pub use pallet_collective; + pub use pallet_crowdloan_claim; + pub use pallet_crowdloan_reward; + pub use pallet_data_collector; + pub use pallet_democracy; + pub use pallet_elections_phragmen; + pub use pallet_ethereum; + pub use pallet_ethereum_transaction; + pub use pallet_evm; + pub use pallet_evm_chain_id; + pub use pallet_fees; + pub use pallet_foreign_investments; + pub use pallet_identity; + pub use pallet_interest_accrual; + pub use pallet_investments; + pub use pallet_keystore; + pub use pallet_liquidity_pools; + pub use pallet_liquidity_pools_gateway; + pub use pallet_liquidity_rewards; + pub use pallet_loans; + pub use pallet_membership; + pub use pallet_migration_manager; + pub use pallet_multisig; + pub use pallet_nft; + pub use pallet_nft_sales; + pub use pallet_order_book; + pub use pallet_permissions; + pub use pallet_pool_registry; + pub use pallet_pool_system; + pub use pallet_preimage; + pub use pallet_proxy; + pub use pallet_restricted_tokens; + pub use pallet_rewards; + pub use pallet_scheduler; + pub use pallet_session; + pub use pallet_sudo; + pub use pallet_timestamp; + pub use pallet_transaction_payment; + pub use pallet_transfer_allowlist; + pub use pallet_treasury; + pub use pallet_uniques; + pub use pallet_utility; + pub use pallet_vesting; + pub use pallet_xcm; + pub use pallet_xcm_transactor; + pub use parachain_info; + } +} + #[macro_export] macro_rules! production_or_benchmark { ($production:expr, $benchmark:expr) => {{ From 11d016b6593000f950b5e0ad6fa63b1eedb60f27 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 15 Nov 2023 14:31:33 +0100 Subject: [PATCH 03/15] polish runtime-common --- Cargo.toml | 10 ++++++++++ runtime/common/Cargo.toml | 21 ++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4f13744abd..fda551bcfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,6 +70,14 @@ members = [ "runtime/integration-tests", ] +[workspace.package] +authors = ["Centrifuge "] +edition = "2021" +license = "LGPL-3.0" +homepage = "https://centrifuge.io/" +repository = "https://github.com/centrifuge/centrifuge-chain" +documentation = "https://github.com/centrifuge/centrifuge-chain" + [workspace.dependencies] hex-literal = { version = "0.3.4", default-features = false } smallvec = "1.6.1" @@ -217,6 +225,8 @@ cfg-traits = { path = "libs/traits", default-features = false } cfg-types = { path = "libs/types", default-features = false } cfg-utils = { path = "libs/utils", default-features = false } +# Testing +cfg-mocks = { path = "libs/mocks", default-features = false } [dependencies] # third-party dependencies diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index e7769616d3..d15d348dd6 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "runtime-common" version = "1.0.0" -authors = ["Centrifuge "] -edition = "2021" -license = "LGPL-3.0" -homepage = "https://centrifuge.io/" -repository = "https://github.com/centrifuge/centrifuge-chain" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true [dependencies] hex-literal = { workspace = true } @@ -120,10 +121,9 @@ pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } parachain-info = { workspace = true } -#fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } [dev-dependencies] -cfg-mocks = { path = "../../libs/mocks", features = ["std"] } +cfg-mocks = { workspace = true } [features] default = ["std"] @@ -132,6 +132,7 @@ std = [ "cfg-traits/std", "cfg-types/std", "cfg-utils/std", + "cfg-mocks/std", "codec/std", "frame-support/std", "frame-system/std", @@ -150,7 +151,6 @@ std = [ "xcm-executor/std", "xcm-primitives/std", "xcm/std", - #"fp-self-contained/std", # Pallet exporting list "axelar-gateway-precompile/std", @@ -224,11 +224,11 @@ std = [ ] runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", - "cfg-mocks/runtime-benchmarks", "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "cfg-utils/runtime-benchmarks", + "cfg-mocks/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -294,12 +294,11 @@ runtime-benchmarks = [ ] try-runtime = [ "sp-runtime/try-runtime", - "cfg-mocks/try-runtime", - "cfg-primitives/try-runtime", "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "cfg-utils/try-runtime", + "cfg-mocks/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", From e307302e68bc39076e06310ec7dc813fba608b94 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 16 Nov 2023 18:23:40 +0100 Subject: [PATCH 04/15] updating development-runtime --- Cargo.lock | 5 - Cargo.toml | 11 +- runtime/development/Cargo.toml | 866 ++++++++++++++++++--------------- runtime/development/src/lib.rs | 2 +- 4 files changed, 494 insertions(+), 390 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 33977b45f7..748193f7c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2745,7 +2745,6 @@ dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", - "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -2753,13 +2752,10 @@ dependencies = [ "cumulus-primitives-utility", "fp-rpc", "fp-self-contained", - "frame-benchmarking", "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", "frame-system-rpc-runtime-api", - "frame-try-runtime", "getrandom 0.2.10", "hex", "hex-literal 0.3.4", @@ -2792,7 +2788,6 @@ dependencies = [ "pallet-ethereum-transaction", "pallet-evm", "pallet-evm-chain-id", - "pallet-evm-precompile-dispatch", "pallet-fees", "pallet-foreign-investments", "pallet-identity", diff --git a/Cargo.toml b/Cargo.toml index fda551bcfe..4f5b0f4735 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,12 +79,15 @@ repository = "https://github.com/centrifuge/centrifuge-chain" documentation = "https://github.com/centrifuge/centrifuge-chain" [workspace.dependencies] -hex-literal = { version = "0.3.4", default-features = false } +hex-literal = { version = "0.3.4" } +hex = { version = "0.4.3", default_features = false } smallvec = "1.6.1" serde = { version = "1.0.119", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } log = "0.4" +getrandom = { version = "0.2", features = ["js"] } +static_assertions = "1.1.0" # Parachain cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } @@ -127,7 +130,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", default- frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ "tuples-96", -], branch = "polkadot-v0.9.43" } # tuples feature can be remove on 0.9.42 +], branch = "polkadot-v0.9.43" } # Check when tuples-96 can be removed frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } @@ -184,6 +187,7 @@ pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/f chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } # Moonbeam +moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } @@ -225,6 +229,9 @@ cfg-traits = { path = "libs/traits", default-features = false } cfg-types = { path = "libs/types", default-features = false } cfg-utils = { path = "libs/utils", default-features = false } +# runtimes +runtime-common = { path = "runtime/common", default-features = false } + # Testing cfg-mocks = { path = "libs/mocks", default-features = false } diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 6eb25b893e..baf04f29b8 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -1,152 +1,228 @@ [package] name = "development-runtime" version = "0.10.32" -authors = ["Centrifuge "] -edition = "2021" build = "build.rs" -license = "LGPL-3.0" -homepage = "https://centrifuge.io/" -repository = "https://github.com/centrifuge/centrifuge-chain" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true [dependencies] -# third-party dependencies -codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } -getrandom = { version = "0.2", features = ["js"] } -hex = { version = "0.4.3", default_features = false } -hex-literal = { version = "0.3.4", optional = true } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.119", optional = true } -static_assertions = "1.1.0" +codec = { package = "parity-scale-codec", workspace = true } +getrandom = { workspace = true } +hex = { workspace = true } +hex-literal = { workspace = true, optional = true } +scale-info = { workspace = true } +serde = { workspace = true } +static_assertions = { workspace = true } -# parachain -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +sp-api = { workspace = true } +sp-runtime = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } + +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-executive = { workspace = true } -# polkadot dependencies -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } -# primitives -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-parachain = { workspace = true } -# frame dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ - "tuples-96", -], branch = "polkadot-v0.9.43" } # tuples feature can be remove on 0.9.42 -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } +xcm-primitives = { workspace = true } -# orml pallets -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } -# frontier pallets -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true } -cfg-primitives = { path = "../../libs/primitives", default-features = false } -cfg-traits = { path = "../../libs/traits", default-features = false } -cfg-types = { path = "../../libs/types", default-features = false } -runtime-common = { path = "../common", default-features = false } +moonbeam-relay-encoder = { workspace = true } -# bridge pallets -chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } +cfg-primitives = { workspace = true } +cfg-traits = { workspace = true } +cfg-types = { workspace = true } +runtime-common = { workspace = true } +liquidity-pools-gateway-routers = { workspace = true } -# our custom pallets -axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } -liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers", default-features = false } -pallet-anchors = { path = "../../pallets/anchors", default-features = false } -pallet-block-rewards = { path = "../../pallets/block-rewards", default-features = false } -pallet-bridge = { path = "../../pallets/bridge", default-features = false } -pallet-claims = { path = "../../pallets/claims", default-features = false } -pallet-collator-allowlist = { path = "../../pallets/collator-allowlist", default-features = false } -pallet-crowdloan-claim = { path = "../../pallets/crowdloan-claim", default-features = false } -pallet-crowdloan-reward = { path = "../../pallets/crowdloan-reward", default-features = false } -pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } -pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction", default-features = false } -pallet-fees = { path = "../../pallets/fees", default-features = false } -pallet-foreign-investments = { path = "../../pallets/foreign-investments", default-features = false } -pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } -pallet-investments = { path = "../../pallets/investments", default-features = false } -pallet-keystore = { path = "../../pallets/keystore", default-features = false } -pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } -pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } -pallet-liquidity-rewards = { path = "../../pallets/liquidity-rewards", default-features = false } -pallet-loans = { path = "../../pallets/loans", default-features = false } -pallet-migration-manager = { path = "../../pallets/migration", default-features = false } -pallet-nft = { path = "../../pallets/nft", default-features = false } -pallet-nft-sales = { path = "../../pallets/nft-sales", default-features = false } -pallet-order-book = { path = "../../pallets/order-book", default-features = false } -pallet-permissions = { path = "../../pallets/permissions", default-features = false } -pallet-pool-registry = { path = "../../pallets/pool-registry", default-features = false } -pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } -pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } -pallet-rewards = { path = "../../pallets/rewards", default-features = false } -pallet-transfer-allowlist = { path = "../../pallets/transfer-allowlist", default-features = false } +# Pallet list +axelar-gateway-precompile = { workspace = true } +chainbridge = {workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +orml-asset-registry = { workspace = true } +orml-oracle = { workspace = true } +orml-tokens = { workspace = true } +orml-xcm = { workspace = true } +orml-xtokens = { workspace = true } +pallet-anchors = { workspace = true } +pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-base-fee = { workspace = true } +pallet-block-rewards = { workspace = true } +pallet-bridge = { workspace = true } +pallet-claims = { workspace = true } +pallet-collator-allowlist = { workspace = true } +pallet-collator-selection = { workspace = true } +pallet-collective = { workspace = true } +pallet-crowdloan-claim = { workspace = true } +pallet-crowdloan-reward = { workspace = true } +pallet-data-collector = { workspace = true } +pallet-democracy = { workspace = true } +pallet-elections-phragmen = { workspace = true } +pallet-ethereum = { workspace = true } +pallet-ethereum-transaction = { workspace = true } +pallet-evm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-fees = { workspace = true } +pallet-foreign-investments = { workspace = true } +pallet-identity = { workspace = true } +pallet-interest-accrual = { workspace = true } +pallet-investments = { workspace = true } +pallet-keystore = { workspace = true } +pallet-liquidity-pools = { workspace = true } +pallet-liquidity-pools-gateway = { workspace = true } +pallet-liquidity-rewards = { workspace = true } +pallet-loans = { workspace = true } +pallet-membership = { workspace = true } +pallet-migration-manager = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nft = { workspace = true } +pallet-nft-sales = { workspace = true } +pallet-order-book = { workspace = true } +pallet-permissions = { workspace = true } +pallet-pool-registry = { workspace = true } +pallet-pool-system = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-restricted-tokens = { workspace = true } +pallet-rewards = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transfer-allowlist = { workspace = true } +pallet-treasury = { workspace = true } +pallet-uniques = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-transactor = { workspace = true } +parachain-info = { workspace = true } -# LiquidityPools 3rd-party dependencies -moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +# parachain +#cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +#cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +#cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.43" } +#cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +#cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +#parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +# +## polkadot dependencies +#pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +# +## frame dependencies +#frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } +#frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } +#frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } +#pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } +#pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +#pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# +## orml pallets +#orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +#orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +# +## frontier pallets +#pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +#pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +#pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +#pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +#pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# +## bridge pallets +#chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } +# +## our custom pallets +#axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } +#pallet-anchors = { path = "../../pallets/anchors", default-features = false } +#pallet-block-rewards = { path = "../../pallets/block-rewards", default-features = false } +#pallet-bridge = { path = "../../pallets/bridge", default-features = false } +#pallet-claims = { path = "../../pallets/claims", default-features = false } +#pallet-collator-allowlist = { path = "../../pallets/collator-allowlist", default-features = false } +#pallet-crowdloan-claim = { path = "../../pallets/crowdloan-claim", default-features = false } +#pallet-crowdloan-reward = { path = "../../pallets/crowdloan-reward", default-features = false } +#pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } +#pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction", default-features = false } +#pallet-fees = { path = "../../pallets/fees", default-features = false } +#pallet-foreign-investments = { path = "../../pallets/foreign-investments", default-features = false } +#pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } +#pallet-investments = { path = "../../pallets/investments", default-features = false } +#pallet-keystore = { path = "../../pallets/keystore", default-features = false } +#pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } +#pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } +#pallet-liquidity-rewards = { path = "../../pallets/liquidity-rewards", default-features = false } +#pallet-loans = { path = "../../pallets/loans", default-features = false } +#pallet-migration-manager = { path = "../../pallets/migration", default-features = false } +#pallet-nft = { path = "../../pallets/nft", default-features = false } +#pallet-nft-sales = { path = "../../pallets/nft-sales", default-features = false } +#pallet-order-book = { path = "../../pallets/order-book", default-features = false } +#pallet-permissions = { path = "../../pallets/permissions", default-features = false } +#pallet-pool-registry = { path = "../../pallets/pool-registry", default-features = false } +#pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } +#pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } +#pallet-rewards = { path = "../../pallets/rewards", default-features = false } +#pallet-transfer-allowlist = { path = "../../pallets/transfer-allowlist", default-features = false } +# +## LiquidityPools 3rd-party dependencies +#moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +#pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } @@ -156,284 +232,309 @@ default = ["std"] instant-voting = [] fast-runtime = [] std = [ - "axelar-gateway-precompile/std", - "cfg-primitives/std", - "cfg-traits/std", - "cfg-types/std", - "chainbridge/std", - "chainbridge/std", "codec/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "cumulus-primitives-utility/std", - "fp-rpc/std", - "fp-rpc/std", - "fp-self-contained/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", "getrandom/std", "hex/std", - "liquidity-pools-gateway-routers/std", - "moonbeam-relay-encoder/std", - "moonbeam-relay-encoder/std", - "orml-asset-registry/std", - "orml-oracle/std", - "orml-tokens/std", - "orml-traits/std", - "orml-xcm-support/std", - "orml-xcm/std", - "orml-xtokens/std", - "pallet-anchors/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-base-fee/std", - "pallet-block-rewards/std", - "pallet-bridge/std", - "pallet-claims/std", - "pallet-collator-allowlist/std", - "pallet-collator-selection/std", - "pallet-collective/std", - "pallet-crowdloan-claim/std", - "pallet-crowdloan-reward/std", - "pallet-data-collector/std", - "pallet-democracy/std", - "pallet-elections-phragmen/std", - "pallet-ethereum-transaction/std", - "pallet-ethereum/std", - "pallet-evm-chain-id/std", - "pallet-evm-precompile-dispatch/std", - "pallet-evm/std", - "pallet-fees/std", - "pallet-foreign-investments/std", - "pallet-identity/std", - "pallet-interest-accrual/std", - "pallet-investments/std", - "pallet-keystore/std", - "pallet-liquidity-pools-gateway/std", - "pallet-liquidity-pools/std", - "pallet-liquidity-rewards/std", - "pallet-loans/std", - "pallet-membership/std", - "pallet-migration-manager/std", - "pallet-multisig/std", - "pallet-nft-sales/std", - "pallet-nft/std", - "pallet-order-book/std", - "pallet-permissions/std", - "pallet-pool-registry/std", - "pallet-pool-system/std", - "pallet-preimage/std", - "pallet-proxy/std", - "pallet-restricted-tokens/std", - "pallet-rewards/std", - "pallet-scheduler/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-transfer-allowlist/std", - "pallet-treasury/std", - "pallet-uniques/std", - "pallet-utility/std", - "pallet-vesting/std", - "pallet-xcm-transactor/std", - "parachain-info/std", - "polkadot-parachain/std", - "polkadot-runtime-common/std", - "runtime-common/std", "scale-info/std", - "serde", "sp-api/std", + "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", - "sp-runtime/std", "sp-session/std", "sp-std/std", "sp-transaction-pool/std", "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "cfg-primitives/std", + "cfg-traits/std", + "cfg-types/std", + "runtime-common/std", +# "axelar-gateway-precompile/std", +# "cfg-primitives/std", +# "cfg-traits/std", +# "cfg-types/std", +# "chainbridge/std", +# "chainbridge/std", +# "cumulus-pallet-aura-ext/std", +# "cumulus-pallet-dmp-queue/std", +# "cumulus-pallet-parachain-system/std", +# "cumulus-pallet-session-benchmarking/std", +# "cumulus-pallet-xcm/std", +# "cumulus-pallet-xcmp-queue/std", +# "cumulus-primitives-core/std", +# "cumulus-primitives-timestamp/std", +# "cumulus-primitives-utility/std", +# "fp-rpc/std", +# "fp-rpc/std", +# "fp-self-contained/std", +# "fp-self-contained/std", +# "frame-benchmarking/std", +# "frame-executive/std", +# "frame-support/std", +# +# "frame-system-rpc-runtime-api/std", +# "frame-system/std", +# "frame-try-runtime/std", +# "getrandom/std", +# "liquidity-pools-gateway-routers/std", +# "moonbeam-relay-encoder/std", +# "moonbeam-relay-encoder/std", +# "orml-asset-registry/std", +# "orml-oracle/std", +# "orml-tokens/std", +# "orml-traits/std", +# "orml-xcm-support/std", +# "orml-xcm/std", +# "orml-xtokens/std", +# "pallet-anchors/std", +# "pallet-aura/std", +# "pallet-authorship/std", +# "pallet-balances/std", +# "pallet-base-fee/std", +# "pallet-block-rewards/std", +# "pallet-bridge/std", +# "pallet-claims/std", +# "pallet-collator-allowlist/std", +# "pallet-collator-selection/std", +# "pallet-collective/std", +# "pallet-crowdloan-claim/std", +# "pallet-crowdloan-reward/std", +# "pallet-data-collector/std", +# "pallet-democracy/std", +# "pallet-elections-phragmen/std", +# "pallet-ethereum-transaction/std", +# "pallet-ethereum/std", +# "pallet-evm-chain-id/std", +# "pallet-evm-precompile-dispatch/std", +# "pallet-evm/std", +# "pallet-fees/std", +# "pallet-foreign-investments/std", +# "pallet-identity/std", +# "pallet-interest-accrual/std", +# "pallet-investments/std", +# "pallet-keystore/std", +# "pallet-liquidity-pools-gateway/std", +# "pallet-liquidity-pools/std", +# "pallet-liquidity-rewards/std", +# "pallet-loans/std", +# "pallet-membership/std", +# "pallet-migration-manager/std", +# "pallet-multisig/std", +# "pallet-nft-sales/std", +# "pallet-nft/std", +# "pallet-order-book/std", +# "pallet-permissions/std", +# "pallet-pool-registry/std", +# "pallet-pool-system/std", +# "pallet-preimage/std", +# "pallet-proxy/std", +# "pallet-restricted-tokens/std", +# "pallet-rewards/std", +# "pallet-scheduler/std", +# "pallet-session/std", +# "pallet-sudo/std", +# "pallet-timestamp/std", +# "pallet-transaction-payment-rpc-runtime-api/std", +# "pallet-transaction-payment/std", +# "pallet-transfer-allowlist/std", +# "pallet-treasury/std", +# "pallet-uniques/std", +# "pallet-utility/std", +# "pallet-vesting/std", +# "pallet-xcm-transactor/std", +# "parachain-info/std", +# "polkadot-parachain/std", +# "polkadot-runtime-common/std", +# "runtime-common/std", +# "sp-block-builder/std", +# "sp-consensus-aura/std", +# "sp-core/std", +# "sp-inherents/std", +# "sp-io/std", +# "sp-offchain/std", +# "sp-runtime/std", +# "sp-session/std", +# "sp-std/std", +# "sp-transaction-pool/std", +# "sp-version/std", +# "xcm-builder/std", +# "xcm-executor/std", +# "xcm-primitives/std", +# "xcm/std", ] runtime-benchmarks = [ - "axelar-gateway-precompile/runtime-benchmarks", + "hex-literal", + "sp-runtime/runtime-benchmarks", "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", - "chainbridge/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "liquidity-pools-gateway-routers/runtime-benchmarks", - "orml-asset-registry/runtime-benchmarks", - "orml-tokens/runtime-benchmarks", - "orml-xtokens/runtime-benchmarks", - "pallet-anchors/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-block-rewards/runtime-benchmarks", - "pallet-bridge/runtime-benchmarks", - "pallet-claims/runtime-benchmarks", - "pallet-collator-allowlist/runtime-benchmarks", - "pallet-collator-selection/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-crowdloan-claim/runtime-benchmarks", - "pallet-crowdloan-reward/runtime-benchmarks", - "pallet-data-collector/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-elections-phragmen/runtime-benchmarks", - "pallet-ethereum-transaction/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-fees/runtime-benchmarks", - "pallet-foreign-investments/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-interest-accrual/runtime-benchmarks", - "pallet-investments/runtime-benchmarks", - "pallet-keystore/runtime-benchmarks", - "pallet-liquidity-pools-gateway/runtime-benchmarks", - "pallet-liquidity-pools/runtime-benchmarks", - "pallet-liquidity-rewards/runtime-benchmarks", - "pallet-loans/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", - "pallet-migration-manager/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-nft-sales/runtime-benchmarks", - "pallet-order-book/runtime-benchmarks", - "pallet-permissions/runtime-benchmarks", - "pallet-pool-registry/runtime-benchmarks", - "pallet-pool-system/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-restricted-tokens/runtime-benchmarks", - "pallet-rewards/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-transfer-allowlist/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-uniques/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-vesting/runtime-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", +# "axelar-gateway-precompile/runtime-benchmarks", +# "cfg-primitives/runtime-benchmarks", +# "cfg-traits/runtime-benchmarks", +# "cfg-types/runtime-benchmarks", +# "chainbridge/runtime-benchmarks", +# "cumulus-pallet-parachain-system/runtime-benchmarks", +# "cumulus-pallet-session-benchmarking/runtime-benchmarks", +# "cumulus-pallet-xcmp-queue/runtime-benchmarks", +# "frame-benchmarking/runtime-benchmarks", +# "frame-support/runtime-benchmarks", +# "frame-system-benchmarking/runtime-benchmarks", +# "frame-system/runtime-benchmarks", +# "liquidity-pools-gateway-routers/runtime-benchmarks", +# "orml-asset-registry/runtime-benchmarks", +# "orml-tokens/runtime-benchmarks", +# "orml-xtokens/runtime-benchmarks", +# "pallet-anchors/runtime-benchmarks", +# "pallet-balances/runtime-benchmarks", +# "pallet-block-rewards/runtime-benchmarks", +# "pallet-bridge/runtime-benchmarks", +# "pallet-claims/runtime-benchmarks", +# "pallet-collator-allowlist/runtime-benchmarks", +# "pallet-collator-selection/runtime-benchmarks", +# "pallet-collective/runtime-benchmarks", +# "pallet-crowdloan-claim/runtime-benchmarks", +# "pallet-crowdloan-reward/runtime-benchmarks", +# "pallet-data-collector/runtime-benchmarks", +# "pallet-democracy/runtime-benchmarks", +# "pallet-elections-phragmen/runtime-benchmarks", +# "pallet-ethereum-transaction/runtime-benchmarks", +# "pallet-ethereum/runtime-benchmarks", +# "pallet-evm/runtime-benchmarks", +# "pallet-fees/runtime-benchmarks", +# "pallet-foreign-investments/runtime-benchmarks", +# "pallet-identity/runtime-benchmarks", +# "pallet-interest-accrual/runtime-benchmarks", +# "pallet-investments/runtime-benchmarks", +# "pallet-keystore/runtime-benchmarks", +# "pallet-liquidity-pools-gateway/runtime-benchmarks", +# "pallet-liquidity-pools/runtime-benchmarks", +# "pallet-liquidity-rewards/runtime-benchmarks", +# "pallet-loans/runtime-benchmarks", +# "pallet-membership/runtime-benchmarks", +# "pallet-migration-manager/runtime-benchmarks", +# "pallet-multisig/runtime-benchmarks", +# "pallet-nft-sales/runtime-benchmarks", +# "pallet-order-book/runtime-benchmarks", +# "pallet-permissions/runtime-benchmarks", +# "pallet-pool-registry/runtime-benchmarks", +# "pallet-pool-system/runtime-benchmarks", +# "pallet-preimage/runtime-benchmarks", +# "pallet-proxy/runtime-benchmarks", +# "pallet-restricted-tokens/runtime-benchmarks", +# "pallet-rewards/runtime-benchmarks", +# "pallet-scheduler/runtime-benchmarks", +# "pallet-sudo/runtime-benchmarks", +# "pallet-timestamp/runtime-benchmarks", +# "pallet-transfer-allowlist/runtime-benchmarks", +# "pallet-treasury/runtime-benchmarks", +# "pallet-uniques/runtime-benchmarks", +# "pallet-utility/runtime-benchmarks", +# "pallet-vesting/runtime-benchmarks", +# "pallet-xcm-transactor/runtime-benchmarks", +# "pallet-xcm/runtime-benchmarks", +# "polkadot-parachain/runtime-benchmarks", +# "polkadot-runtime-common/runtime-benchmarks", +# "runtime-common/runtime-benchmarks", +# "sp-runtime/runtime-benchmarks", +# "xcm-builder/runtime-benchmarks", +# "xcm-executor/runtime-benchmarks", +# "xcm-primitives/runtime-benchmarks", ] try-runtime = [ - "axelar-gateway-precompile/try-runtime", - "cfg-primitives/try-runtime", + "sp-runtime/try-runtime", "cfg-primitives/try-runtime", "cfg-traits/try-runtime", - "cfg-traits/try-runtime", "cfg-types/try-runtime", - "chainbridge/try-runtime", - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "fp-self-contained/try-runtime", - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "liquidity-pools-gateway-routers/try-runtime", - "orml-asset-registry/try-runtime", - "orml-oracle/try-runtime", - "orml-tokens/try-runtime", - "orml-xcm/try-runtime", - "orml-xtokens/try-runtime", - "pallet-anchors/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-base-fee/try-runtime", - "pallet-block-rewards/try-runtime", - "pallet-bridge/try-runtime", - "pallet-claims/try-runtime", - "pallet-collator-allowlist/try-runtime", - "pallet-collator-selection/try-runtime", - "pallet-collective/try-runtime", - "pallet-crowdloan-claim/try-runtime", - "pallet-crowdloan-reward/try-runtime", - "pallet-data-collector/try-runtime", - "pallet-democracy/try-runtime", - "pallet-elections-phragmen/try-runtime", - "pallet-ethereum-transaction/try-runtime", - "pallet-ethereum/try-runtime", - "pallet-evm-chain-id/try-runtime", - "pallet-evm/try-runtime", - "pallet-fees/try-runtime", - "pallet-foreign-investments/try-runtime", - "pallet-identity/try-runtime", - "pallet-interest-accrual/try-runtime", - "pallet-investments/try-runtime", - "pallet-keystore/try-runtime", - "pallet-liquidity-pools-gateway/try-runtime", - "pallet-liquidity-pools/try-runtime", - "pallet-liquidity-rewards/try-runtime", - "pallet-loans/try-runtime", - "pallet-membership/try-runtime", - "pallet-migration-manager/try-runtime", - "pallet-multisig/try-runtime", - "pallet-nft-sales/try-runtime", - "pallet-nft/try-runtime", - "pallet-order-book/try-runtime", - "pallet-permissions/try-runtime", - "pallet-pool-registry/try-runtime", - "pallet-pool-system/try-runtime", - "pallet-preimage/try-runtime", - "pallet-proxy/try-runtime", - "pallet-restricted-tokens/try-runtime", - "pallet-rewards/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-transfer-allowlist/try-runtime", - "pallet-treasury/try-runtime", - "pallet-uniques/try-runtime", - "pallet-utility/try-runtime", - "pallet-vesting/try-runtime", - "pallet-xcm-transactor/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", "runtime-common/try-runtime", - "sp-runtime/try-runtime", +# "axelar-gateway-precompile/try-runtime", +# "cfg-primitives/try-runtime", +# "cfg-primitives/try-runtime", +# "cfg-traits/try-runtime", +# "cfg-traits/try-runtime", +# "cfg-types/try-runtime", +# "chainbridge/try-runtime", +# "cumulus-pallet-aura-ext/try-runtime", +# "cumulus-pallet-dmp-queue/try-runtime", +# "cumulus-pallet-parachain-system/try-runtime", +# "cumulus-pallet-xcm/try-runtime", +# "cumulus-pallet-xcmp-queue/try-runtime", +# "fp-self-contained/try-runtime", +# "fp-self-contained/try-runtime", +# "frame-executive/try-runtime", +# "frame-support/try-runtime", +# "frame-system/try-runtime", +# "frame-try-runtime", +# "liquidity-pools-gateway-routers/try-runtime", +# "orml-asset-registry/try-runtime", +# "orml-oracle/try-runtime", +# "orml-tokens/try-runtime", +# "orml-xcm/try-runtime", +# "orml-xtokens/try-runtime", +# "pallet-anchors/try-runtime", +# "pallet-aura/try-runtime", +# "pallet-authorship/try-runtime", +# "pallet-balances/try-runtime", +# "pallet-base-fee/try-runtime", +# "pallet-block-rewards/try-runtime", +# "pallet-bridge/try-runtime", +# "pallet-claims/try-runtime", +# "pallet-collator-allowlist/try-runtime", +# "pallet-collator-selection/try-runtime", +# "pallet-collective/try-runtime", +# "pallet-crowdloan-claim/try-runtime", +# "pallet-crowdloan-reward/try-runtime", +# "pallet-data-collector/try-runtime", +# "pallet-democracy/try-runtime", +# "pallet-elections-phragmen/try-runtime", +# "pallet-ethereum-transaction/try-runtime", +# "pallet-ethereum/try-runtime", +# "pallet-evm-chain-id/try-runtime", +# "pallet-evm/try-runtime", +# "pallet-fees/try-runtime", +# "pallet-foreign-investments/try-runtime", +# "pallet-identity/try-runtime", +# "pallet-interest-accrual/try-runtime", +# "pallet-investments/try-runtime", +# "pallet-keystore/try-runtime", +# "pallet-liquidity-pools-gateway/try-runtime", +# "pallet-liquidity-pools/try-runtime", +# "pallet-liquidity-rewards/try-runtime", +# "pallet-loans/try-runtime", +# "pallet-membership/try-runtime", +# "pallet-migration-manager/try-runtime", +# "pallet-multisig/try-runtime", +# "pallet-nft-sales/try-runtime", +# "pallet-nft/try-runtime", +# "pallet-order-book/try-runtime", +# "pallet-permissions/try-runtime", +# "pallet-pool-registry/try-runtime", +# "pallet-pool-system/try-runtime", +# "pallet-preimage/try-runtime", +# "pallet-proxy/try-runtime", +# "pallet-restricted-tokens/try-runtime", +# "pallet-rewards/try-runtime", +# "pallet-scheduler/try-runtime", +# "pallet-session/try-runtime", +# "pallet-sudo/try-runtime", +# "pallet-timestamp/try-runtime", +# "pallet-transaction-payment/try-runtime", +# "pallet-transfer-allowlist/try-runtime", +# "pallet-treasury/try-runtime", +# "pallet-uniques/try-runtime", +# "pallet-utility/try-runtime", +# "pallet-vesting/try-runtime", +# "pallet-xcm-transactor/try-runtime", +# "pallet-xcm/try-runtime", +# "parachain-info/try-runtime", +# "polkadot-runtime-common/try-runtime", +# "runtime-common/try-runtime", +# "sp-runtime/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain @@ -441,4 +542,5 @@ try-runtime = [ # to make it smaller like logging for example. on-chain-release-build = [ "sp-api/disable-logging", + "runtime-common/on-chain-release-build", ] diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 19e314dd37..e826c70794 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -2107,7 +2107,7 @@ impl_runtime_apis! { } fn metadata_at_version(version: u32) -> Option { Runtime::metadata_at_version(version) } - fn metadata_versions() -> frame_benchmarking::Vec { Runtime::metadata_versions() } + fn metadata_versions() -> sp_std::vec::Vec { Runtime::metadata_versions() } } impl sp_block_builder::BlockBuilder for Runtime { From 497621064c59d06ff6d1c539d8b1685c487972d3 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 16 Nov 2023 18:45:29 +0100 Subject: [PATCH 05/15] fix development compilation issue --- runtime/development/Cargo.toml | 93 +--------------------------------- 1 file changed, 2 insertions(+), 91 deletions(-) diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index baf04f29b8..b14cc789fb 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -133,97 +133,6 @@ pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } parachain-info = { workspace = true } -# parachain -#cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -#cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -#cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -#cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -#cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -#parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -# -## polkadot dependencies -#pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -# -## frame dependencies -#frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -#frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -#frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -#pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } -#pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -#pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# -## orml pallets -#orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -#orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -# -## frontier pallets -#pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -#pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -#pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -#pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -#pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -# -## bridge pallets -#chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } -# -## our custom pallets -#axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } -#pallet-anchors = { path = "../../pallets/anchors", default-features = false } -#pallet-block-rewards = { path = "../../pallets/block-rewards", default-features = false } -#pallet-bridge = { path = "../../pallets/bridge", default-features = false } -#pallet-claims = { path = "../../pallets/claims", default-features = false } -#pallet-collator-allowlist = { path = "../../pallets/collator-allowlist", default-features = false } -#pallet-crowdloan-claim = { path = "../../pallets/crowdloan-claim", default-features = false } -#pallet-crowdloan-reward = { path = "../../pallets/crowdloan-reward", default-features = false } -#pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } -#pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction", default-features = false } -#pallet-fees = { path = "../../pallets/fees", default-features = false } -#pallet-foreign-investments = { path = "../../pallets/foreign-investments", default-features = false } -#pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } -#pallet-investments = { path = "../../pallets/investments", default-features = false } -#pallet-keystore = { path = "../../pallets/keystore", default-features = false } -#pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } -#pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } -#pallet-liquidity-rewards = { path = "../../pallets/liquidity-rewards", default-features = false } -#pallet-loans = { path = "../../pallets/loans", default-features = false } -#pallet-migration-manager = { path = "../../pallets/migration", default-features = false } -#pallet-nft = { path = "../../pallets/nft", default-features = false } -#pallet-nft-sales = { path = "../../pallets/nft-sales", default-features = false } -#pallet-order-book = { path = "../../pallets/order-book", default-features = false } -#pallet-permissions = { path = "../../pallets/permissions", default-features = false } -#pallet-pool-registry = { path = "../../pallets/pool-registry", default-features = false } -#pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } -#pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } -#pallet-rewards = { path = "../../pallets/rewards", default-features = false } -#pallet-transfer-allowlist = { path = "../../pallets/transfer-allowlist", default-features = false } -# -## LiquidityPools 3rd-party dependencies -#moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -#pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } - [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } @@ -252,6 +161,8 @@ std = [ "cfg-traits/std", "cfg-types/std", "runtime-common/std", + "frame-system-rpc-runtime-api/std", + "pallet-transaction-payment-rpc-runtime-api/std", # "axelar-gateway-precompile/std", # "cfg-primitives/std", # "cfg-traits/std", From 942c706b8f07223a537f3cbb784a55b56be6c484 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Mon, 20 Nov 2023 11:47:44 +0100 Subject: [PATCH 06/15] development using workspace dependencies --- Cargo.lock | 4 + runtime/common/Cargo.toml | 36 +-- runtime/development/Cargo.toml | 530 ++++++++++++++++----------------- 3 files changed, 284 insertions(+), 286 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 748193f7c6..3a5895b08c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2745,6 +2745,7 @@ dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -2752,10 +2753,13 @@ dependencies = [ "cumulus-primitives-utility", "fp-rpc", "fp-self-contained", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", + "frame-try-runtime", "getrandom 0.2.10", "hex", "hex-literal 0.3.4", diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index d15d348dd6..cab32b5ad7 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -14,6 +14,7 @@ serde = { workspace = true } smallvec = { workspace = true } codec = { package = "parity-scale-codec", workspace = true } scale-info = { workspace = true } +log = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -23,15 +24,14 @@ sp-arithmetic = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } +sp-io = { workspace = true } polkadot-parachain = { workspace = true } xcm = { workspace = true } xcm-executor = { workspace = true } -# Orml orml-traits = { workspace = true } -# Frontier pallet-evm-precompile-blake2 = { workspace = true } pallet-evm-precompile-bn128 = { workspace = true } pallet-evm-precompile-dispatch = { workspace = true } @@ -39,7 +39,6 @@ pallet-evm-precompile-modexp = { workspace = true } pallet-evm-precompile-sha3fips = { workspace = true } pallet-evm-precompile-simple = { workspace = true } -# Moonbeam xcm-primitives = { workspace = true } # Local @@ -48,10 +47,6 @@ cfg-traits = { workspace = true } cfg-types = { workspace = true } cfg-utils = { workspace = true } -# Used for migrations -log = { workspace = true } -sp-io = { workspace = true } - # Pallets in the export list axelar-gateway-precompile = { workspace = true } chainbridge = {workspace = true } @@ -128,15 +123,12 @@ cfg-mocks = { workspace = true } [features] default = ["std"] std = [ - "cfg-primitives/std", - "cfg-traits/std", - "cfg-types/std", - "cfg-utils/std", - "cfg-mocks/std", "codec/std", + "log/std", + + # Substrate related "frame-support/std", "frame-system/std", - "log/std", "orml-traits/std", "polkadot-parachain/std", "scale-info/std", @@ -152,6 +144,13 @@ std = [ "xcm-primitives/std", "xcm/std", + # Locals + "cfg-primitives/std", + "cfg-traits/std", + "cfg-types/std", + "cfg-utils/std", + "cfg-mocks/std", + # Pallet exporting list "axelar-gateway-precompile/std", "chainbridge/std", @@ -223,16 +222,19 @@ std = [ "parachain-info/std", ] runtime-benchmarks = [ + # Substrate related "sp-runtime/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks", + + # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "cfg-utils/runtime-benchmarks", "cfg-mocks/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", # Pallet exporting list "axelar-gateway-precompile/runtime-benchmarks", diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index b14cc789fb..dbab7ce768 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -15,7 +15,7 @@ getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true, optional = true } scale-info = { workspace = true } -serde = { workspace = true } +serde = { workspace = true, optional = true } static_assertions = { workspace = true } sp-api = { workspace = true } @@ -34,11 +34,15 @@ sp-version = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking frame-executive = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-try-runtime = { workspace = true, optional = true } # For try-runtime cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking pallet-transaction-payment-rpc-runtime-api = { workspace = true } polkadot-runtime-common = { workspace = true } @@ -57,6 +61,7 @@ fp-self-contained = { workspace = true } moonbeam-relay-encoder = { workspace = true } +# Locals cfg-primitives = { workspace = true } cfg-traits = { workspace = true } cfg-types = { workspace = true } @@ -145,6 +150,9 @@ std = [ "getrandom/std", "hex/std", "scale-info/std", + "serde/std", + + # Substrate related "sp-api/std", "sp-runtime/std", "sp-block-builder/std", @@ -157,295 +165,279 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "frame-support/std", + "frame-system/std", + "frame-system-rpc-runtime-api/std", + "frame-executive/std", + "frame-try-runtime?/std", + "frame-system-benchmarking?/std", + "frame-benchmarking?/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "cumulus-pallet-session-benchmarking?/std", + "xcm/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "orml-traits/std", + "orml-xcm-support/std", + "fp-rpc/std", + "fp-self-contained/std", + "moonbeam-relay-encoder/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "polkadot-runtime-common/std", + "polkadot-parachain/std", + + # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", - "frame-system-rpc-runtime-api/std", - "pallet-transaction-payment-rpc-runtime-api/std", -# "axelar-gateway-precompile/std", -# "cfg-primitives/std", -# "cfg-traits/std", -# "cfg-types/std", -# "chainbridge/std", -# "chainbridge/std", -# "cumulus-pallet-aura-ext/std", -# "cumulus-pallet-dmp-queue/std", -# "cumulus-pallet-parachain-system/std", -# "cumulus-pallet-session-benchmarking/std", -# "cumulus-pallet-xcm/std", -# "cumulus-pallet-xcmp-queue/std", -# "cumulus-primitives-core/std", -# "cumulus-primitives-timestamp/std", -# "cumulus-primitives-utility/std", -# "fp-rpc/std", -# "fp-rpc/std", -# "fp-self-contained/std", -# "fp-self-contained/std", -# "frame-benchmarking/std", -# "frame-executive/std", -# "frame-support/std", -# -# "frame-system-rpc-runtime-api/std", -# "frame-system/std", -# "frame-try-runtime/std", -# "getrandom/std", -# "liquidity-pools-gateway-routers/std", -# "moonbeam-relay-encoder/std", -# "moonbeam-relay-encoder/std", -# "orml-asset-registry/std", -# "orml-oracle/std", -# "orml-tokens/std", -# "orml-traits/std", -# "orml-xcm-support/std", -# "orml-xcm/std", -# "orml-xtokens/std", -# "pallet-anchors/std", -# "pallet-aura/std", -# "pallet-authorship/std", -# "pallet-balances/std", -# "pallet-base-fee/std", -# "pallet-block-rewards/std", -# "pallet-bridge/std", -# "pallet-claims/std", -# "pallet-collator-allowlist/std", -# "pallet-collator-selection/std", -# "pallet-collective/std", -# "pallet-crowdloan-claim/std", -# "pallet-crowdloan-reward/std", -# "pallet-data-collector/std", -# "pallet-democracy/std", -# "pallet-elections-phragmen/std", -# "pallet-ethereum-transaction/std", -# "pallet-ethereum/std", -# "pallet-evm-chain-id/std", -# "pallet-evm-precompile-dispatch/std", -# "pallet-evm/std", -# "pallet-fees/std", -# "pallet-foreign-investments/std", -# "pallet-identity/std", -# "pallet-interest-accrual/std", -# "pallet-investments/std", -# "pallet-keystore/std", -# "pallet-liquidity-pools-gateway/std", -# "pallet-liquidity-pools/std", -# "pallet-liquidity-rewards/std", -# "pallet-loans/std", -# "pallet-membership/std", -# "pallet-migration-manager/std", -# "pallet-multisig/std", -# "pallet-nft-sales/std", -# "pallet-nft/std", -# "pallet-order-book/std", -# "pallet-permissions/std", -# "pallet-pool-registry/std", -# "pallet-pool-system/std", -# "pallet-preimage/std", -# "pallet-proxy/std", -# "pallet-restricted-tokens/std", -# "pallet-rewards/std", -# "pallet-scheduler/std", -# "pallet-session/std", -# "pallet-sudo/std", -# "pallet-timestamp/std", -# "pallet-transaction-payment-rpc-runtime-api/std", -# "pallet-transaction-payment/std", -# "pallet-transfer-allowlist/std", -# "pallet-treasury/std", -# "pallet-uniques/std", -# "pallet-utility/std", -# "pallet-vesting/std", -# "pallet-xcm-transactor/std", -# "parachain-info/std", -# "polkadot-parachain/std", -# "polkadot-runtime-common/std", -# "runtime-common/std", -# "sp-block-builder/std", -# "sp-consensus-aura/std", -# "sp-core/std", -# "sp-inherents/std", -# "sp-io/std", -# "sp-offchain/std", -# "sp-runtime/std", -# "sp-session/std", -# "sp-std/std", -# "sp-transaction-pool/std", -# "sp-version/std", -# "xcm-builder/std", -# "xcm-executor/std", -# "xcm-primitives/std", -# "xcm/std", + "liquidity-pools-gateway-routers/std", + + # Pallet list + "axelar-gateway-precompile/std", + "chainbridge/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "orml-asset-registry/std", + "orml-oracle/std", + "orml-tokens/std", + "orml-xcm/std", + "orml-xtokens/std", + "pallet-anchors/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-base-fee/std", + "pallet-block-rewards/std", + "pallet-bridge/std", + "pallet-claims/std", + "pallet-collator-allowlist/std", + "pallet-collator-selection/std", + "pallet-collective/std", + "pallet-crowdloan-claim/std", + "pallet-crowdloan-reward/std", + "pallet-data-collector/std", + "pallet-democracy/std", + "pallet-elections-phragmen/std", + "pallet-ethereum/std", + "pallet-ethereum-transaction/std", + "pallet-evm/std", + "pallet-evm-chain-id/std", + "pallet-fees/std", + "pallet-foreign-investments/std", + "pallet-identity/std", + "pallet-interest-accrual/std", + "pallet-investments/std", + "pallet-keystore/std", + "pallet-liquidity-pools/std", + "pallet-liquidity-pools-gateway/std", + "pallet-liquidity-rewards/std", + "pallet-loans/std", + "pallet-membership/std", + "pallet-migration-manager/std", + "pallet-multisig/std", + "pallet-nft/std", + "pallet-nft-sales/std", + "pallet-order-book/std", + "pallet-permissions/std", + "pallet-pool-registry/std", + "pallet-pool-system/std", + "pallet-preimage/std", + "pallet-proxy/std", + "pallet-restricted-tokens/std", + "pallet-rewards/std", + "pallet-scheduler/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment/std", + "pallet-transfer-allowlist/std", + "pallet-treasury/std", + "pallet-uniques/std", + "pallet-utility/std", + "pallet-vesting/std", + "pallet-xcm/std", + "pallet-xcm-transactor/std", + "parachain-info/std", ] runtime-benchmarks = [ + # Enabling optional "hex-literal", + "frame-system-benchmarking/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + + # Substrate related "sp-runtime/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "polkadot-parachain/runtime-benchmarks", + + # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", -# "axelar-gateway-precompile/runtime-benchmarks", -# "cfg-primitives/runtime-benchmarks", -# "cfg-traits/runtime-benchmarks", -# "cfg-types/runtime-benchmarks", -# "chainbridge/runtime-benchmarks", -# "cumulus-pallet-parachain-system/runtime-benchmarks", -# "cumulus-pallet-session-benchmarking/runtime-benchmarks", -# "cumulus-pallet-xcmp-queue/runtime-benchmarks", -# "frame-benchmarking/runtime-benchmarks", -# "frame-support/runtime-benchmarks", -# "frame-system-benchmarking/runtime-benchmarks", -# "frame-system/runtime-benchmarks", -# "liquidity-pools-gateway-routers/runtime-benchmarks", -# "orml-asset-registry/runtime-benchmarks", -# "orml-tokens/runtime-benchmarks", -# "orml-xtokens/runtime-benchmarks", -# "pallet-anchors/runtime-benchmarks", -# "pallet-balances/runtime-benchmarks", -# "pallet-block-rewards/runtime-benchmarks", -# "pallet-bridge/runtime-benchmarks", -# "pallet-claims/runtime-benchmarks", -# "pallet-collator-allowlist/runtime-benchmarks", -# "pallet-collator-selection/runtime-benchmarks", -# "pallet-collective/runtime-benchmarks", -# "pallet-crowdloan-claim/runtime-benchmarks", -# "pallet-crowdloan-reward/runtime-benchmarks", -# "pallet-data-collector/runtime-benchmarks", -# "pallet-democracy/runtime-benchmarks", -# "pallet-elections-phragmen/runtime-benchmarks", -# "pallet-ethereum-transaction/runtime-benchmarks", -# "pallet-ethereum/runtime-benchmarks", -# "pallet-evm/runtime-benchmarks", -# "pallet-fees/runtime-benchmarks", -# "pallet-foreign-investments/runtime-benchmarks", -# "pallet-identity/runtime-benchmarks", -# "pallet-interest-accrual/runtime-benchmarks", -# "pallet-investments/runtime-benchmarks", -# "pallet-keystore/runtime-benchmarks", -# "pallet-liquidity-pools-gateway/runtime-benchmarks", -# "pallet-liquidity-pools/runtime-benchmarks", -# "pallet-liquidity-rewards/runtime-benchmarks", -# "pallet-loans/runtime-benchmarks", -# "pallet-membership/runtime-benchmarks", -# "pallet-migration-manager/runtime-benchmarks", -# "pallet-multisig/runtime-benchmarks", -# "pallet-nft-sales/runtime-benchmarks", -# "pallet-order-book/runtime-benchmarks", -# "pallet-permissions/runtime-benchmarks", -# "pallet-pool-registry/runtime-benchmarks", -# "pallet-pool-system/runtime-benchmarks", -# "pallet-preimage/runtime-benchmarks", -# "pallet-proxy/runtime-benchmarks", -# "pallet-restricted-tokens/runtime-benchmarks", -# "pallet-rewards/runtime-benchmarks", -# "pallet-scheduler/runtime-benchmarks", -# "pallet-sudo/runtime-benchmarks", -# "pallet-timestamp/runtime-benchmarks", -# "pallet-transfer-allowlist/runtime-benchmarks", -# "pallet-treasury/runtime-benchmarks", -# "pallet-uniques/runtime-benchmarks", -# "pallet-utility/runtime-benchmarks", -# "pallet-vesting/runtime-benchmarks", -# "pallet-xcm-transactor/runtime-benchmarks", -# "pallet-xcm/runtime-benchmarks", -# "polkadot-parachain/runtime-benchmarks", -# "polkadot-runtime-common/runtime-benchmarks", -# "runtime-common/runtime-benchmarks", -# "sp-runtime/runtime-benchmarks", -# "xcm-builder/runtime-benchmarks", -# "xcm-executor/runtime-benchmarks", -# "xcm-primitives/runtime-benchmarks", + "liquidity-pools-gateway-routers/runtime-benchmarks", + + # Pallet list + "axelar-gateway-precompile/runtime-benchmarks", + "chainbridge/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "orml-asset-registry/runtime-benchmarks", + "orml-tokens/runtime-benchmarks", + "orml-xtokens/runtime-benchmarks", + "pallet-anchors/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-block-rewards/runtime-benchmarks", + "pallet-bridge/runtime-benchmarks", + "pallet-claims/runtime-benchmarks", + "pallet-collator-allowlist/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-crowdloan-claim/runtime-benchmarks", + "pallet-crowdloan-reward/runtime-benchmarks", + "pallet-data-collector/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", + "pallet-elections-phragmen/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-ethereum-transaction/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-fees/runtime-benchmarks", + "pallet-foreign-investments/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-interest-accrual/runtime-benchmarks", + "pallet-investments/runtime-benchmarks", + "pallet-keystore/runtime-benchmarks", + "pallet-liquidity-pools/runtime-benchmarks", + "pallet-liquidity-pools-gateway/runtime-benchmarks", + "pallet-liquidity-rewards/runtime-benchmarks", + "pallet-loans/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-migration-manager/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-nft/runtime-benchmarks", + "pallet-nft-sales/runtime-benchmarks", + "pallet-order-book/runtime-benchmarks", + "pallet-permissions/runtime-benchmarks", + "pallet-pool-registry/runtime-benchmarks", + "pallet-pool-system/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-restricted-tokens/runtime-benchmarks", + "pallet-rewards/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-transfer-allowlist/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-uniques/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", ] try-runtime = [ + # Enabling optional + "frame-try-runtime/try-runtime", + + # Substrate related "sp-runtime/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-executive/try-runtime", + "fp-self-contained/try-runtime", + "polkadot-runtime-common/try-runtime", + + # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", -# "axelar-gateway-precompile/try-runtime", -# "cfg-primitives/try-runtime", -# "cfg-primitives/try-runtime", -# "cfg-traits/try-runtime", -# "cfg-traits/try-runtime", -# "cfg-types/try-runtime", -# "chainbridge/try-runtime", -# "cumulus-pallet-aura-ext/try-runtime", -# "cumulus-pallet-dmp-queue/try-runtime", -# "cumulus-pallet-parachain-system/try-runtime", -# "cumulus-pallet-xcm/try-runtime", -# "cumulus-pallet-xcmp-queue/try-runtime", -# "fp-self-contained/try-runtime", -# "fp-self-contained/try-runtime", -# "frame-executive/try-runtime", -# "frame-support/try-runtime", -# "frame-system/try-runtime", -# "frame-try-runtime", -# "liquidity-pools-gateway-routers/try-runtime", -# "orml-asset-registry/try-runtime", -# "orml-oracle/try-runtime", -# "orml-tokens/try-runtime", -# "orml-xcm/try-runtime", -# "orml-xtokens/try-runtime", -# "pallet-anchors/try-runtime", -# "pallet-aura/try-runtime", -# "pallet-authorship/try-runtime", -# "pallet-balances/try-runtime", -# "pallet-base-fee/try-runtime", -# "pallet-block-rewards/try-runtime", -# "pallet-bridge/try-runtime", -# "pallet-claims/try-runtime", -# "pallet-collator-allowlist/try-runtime", -# "pallet-collator-selection/try-runtime", -# "pallet-collective/try-runtime", -# "pallet-crowdloan-claim/try-runtime", -# "pallet-crowdloan-reward/try-runtime", -# "pallet-data-collector/try-runtime", -# "pallet-democracy/try-runtime", -# "pallet-elections-phragmen/try-runtime", -# "pallet-ethereum-transaction/try-runtime", -# "pallet-ethereum/try-runtime", -# "pallet-evm-chain-id/try-runtime", -# "pallet-evm/try-runtime", -# "pallet-fees/try-runtime", -# "pallet-foreign-investments/try-runtime", -# "pallet-identity/try-runtime", -# "pallet-interest-accrual/try-runtime", -# "pallet-investments/try-runtime", -# "pallet-keystore/try-runtime", -# "pallet-liquidity-pools-gateway/try-runtime", -# "pallet-liquidity-pools/try-runtime", -# "pallet-liquidity-rewards/try-runtime", -# "pallet-loans/try-runtime", -# "pallet-membership/try-runtime", -# "pallet-migration-manager/try-runtime", -# "pallet-multisig/try-runtime", -# "pallet-nft-sales/try-runtime", -# "pallet-nft/try-runtime", -# "pallet-order-book/try-runtime", -# "pallet-permissions/try-runtime", -# "pallet-pool-registry/try-runtime", -# "pallet-pool-system/try-runtime", -# "pallet-preimage/try-runtime", -# "pallet-proxy/try-runtime", -# "pallet-restricted-tokens/try-runtime", -# "pallet-rewards/try-runtime", -# "pallet-scheduler/try-runtime", -# "pallet-session/try-runtime", -# "pallet-sudo/try-runtime", -# "pallet-timestamp/try-runtime", -# "pallet-transaction-payment/try-runtime", -# "pallet-transfer-allowlist/try-runtime", -# "pallet-treasury/try-runtime", -# "pallet-uniques/try-runtime", -# "pallet-utility/try-runtime", -# "pallet-vesting/try-runtime", -# "pallet-xcm-transactor/try-runtime", -# "pallet-xcm/try-runtime", -# "parachain-info/try-runtime", -# "polkadot-runtime-common/try-runtime", -# "runtime-common/try-runtime", -# "sp-runtime/try-runtime", + "liquidity-pools-gateway-routers/try-runtime", + + # Pallet list + "axelar-gateway-precompile/try-runtime", + "chainbridge/try-runtime", + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "orml-asset-registry/try-runtime", + "orml-oracle/try-runtime", + "orml-tokens/try-runtime", + "orml-xcm/try-runtime", + "orml-xtokens/try-runtime", + "pallet-anchors/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-base-fee/try-runtime", + "pallet-block-rewards/try-runtime", + "pallet-bridge/try-runtime", + "pallet-claims/try-runtime", + "pallet-collator-allowlist/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-collective/try-runtime", + "pallet-crowdloan-claim/try-runtime", + "pallet-crowdloan-reward/try-runtime", + "pallet-data-collector/try-runtime", + "pallet-democracy/try-runtime", + "pallet-elections-phragmen/try-runtime", + "pallet-ethereum/try-runtime", + "pallet-ethereum-transaction/try-runtime", + "pallet-evm/try-runtime", + "pallet-evm-chain-id/try-runtime", + "pallet-fees/try-runtime", + "pallet-foreign-investments/try-runtime", + "pallet-identity/try-runtime", + "pallet-interest-accrual/try-runtime", + "pallet-investments/try-runtime", + "pallet-keystore/try-runtime", + "pallet-liquidity-pools/try-runtime", + "pallet-liquidity-pools-gateway/try-runtime", + "pallet-liquidity-rewards/try-runtime", + "pallet-loans/try-runtime", + "pallet-membership/try-runtime", + "pallet-migration-manager/try-runtime", + "pallet-multisig/try-runtime", + "pallet-nft/try-runtime", + "pallet-nft-sales/try-runtime", + "pallet-order-book/try-runtime", + "pallet-permissions/try-runtime", + "pallet-pool-registry/try-runtime", + "pallet-pool-system/try-runtime", + "pallet-preimage/try-runtime", + "pallet-proxy/try-runtime", + "pallet-restricted-tokens/try-runtime", + "pallet-rewards/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-transfer-allowlist/try-runtime", + "pallet-treasury/try-runtime", + "pallet-uniques/try-runtime", + "pallet-utility/try-runtime", + "pallet-vesting/try-runtime", + "pallet-xcm/try-runtime", + "pallet-xcm-transactor/try-runtime", + "parachain-info/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain From f00039a0f515490256f5751629a4630056aa13f9 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Mon, 20 Nov 2023 12:07:08 +0100 Subject: [PATCH 07/15] altair using workspace dependencies --- Cargo.lock | 10 +- runtime/altair/Cargo.toml | 452 ++++++++++++++++++--------------- runtime/altair/src/lib.rs | 2 +- runtime/development/Cargo.toml | 8 +- 4 files changed, 263 insertions(+), 209 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a5895b08c..875c0d56d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,6 +197,7 @@ dependencies = [ "cfg-primitives", "cfg-traits", "cfg-types", + "chainbridge", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -215,6 +216,8 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "getrandom 0.2.10", + "hex", "hex-literal 0.3.4", "liquidity-pools-gateway-routers", "log", @@ -232,6 +235,8 @@ dependencies = [ "pallet-balances", "pallet-base-fee", "pallet-block-rewards", + "pallet-bridge", + "pallet-claims", "pallet-collator-allowlist", "pallet-collator-selection", "pallet-collective", @@ -244,7 +249,6 @@ dependencies = [ "pallet-ethereum-transaction", "pallet-evm", "pallet-evm-chain-id", - "pallet-evm-precompile-dispatch", "pallet-fees", "pallet-foreign-investments", "pallet-identity", @@ -258,6 +262,7 @@ dependencies = [ "pallet-membership", "pallet-migration-manager", "pallet-multisig", + "pallet-nft", "pallet-nft-sales", "pallet-order-book", "pallet-permissions", @@ -269,9 +274,11 @@ dependencies = [ "pallet-rewards", "pallet-scheduler", "pallet-session", + "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-transfer-allowlist", "pallet-treasury", "pallet-uniques", "pallet-utility", @@ -290,6 +297,7 @@ dependencies = [ "sp-consensus-aura", "sp-core", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 1ce5bbbe50..0ba2b3e86d 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -1,179 +1,213 @@ [package] name = "altair-runtime" version = "0.10.34" -authors = ["Centrifuge "] -edition = "2021" build = "build.rs" -license = "LGPL-3.0" -homepage = "https://centrifuge.io/" -repository = "https://github.com/centrifuge/centrifuge-chain" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true [dependencies] -# third-party dependencies -codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } -hex-literal = { version = "0.3.4", optional = true } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.119", optional = true } -static_assertions = "1.1.0" +codec = { package = "parity-scale-codec", workspace = true } +getrandom = { workspace = true } +hex = { workspace = true } +hex-literal = { workspace = true, optional = true } +scale-info = { workspace = true } +serde = { workspace = true, optional = true } +static_assertions = { workspace = true } +log = { workspace = true } -# parachain -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +sp-api = { workspace = true } +sp-runtime = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } -# polkadot dependencies -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-executive = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-try-runtime = { workspace = true, optional = true } # For try-runtime -# primitives -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking -# frame dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ - "tuples-96", -], branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-parachain = { workspace = true } -# orml pallets -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } +xcm-primitives = { workspace = true } -# frontier pallets -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } -# our custom pallets -axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } -cfg-primitives = { path = "../../libs/primitives", default-features = false } -cfg-traits = { path = "../../libs/traits", default-features = false } -cfg-types = { path = "../../libs/types", default-features = false } -liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers", default-features = false } -pallet-anchors = { path = "../../pallets/anchors", default-features = false } -pallet-block-rewards = { path = "../../pallets/block-rewards", default-features = false } -pallet-collator-allowlist = { path = "../../pallets/collator-allowlist", default-features = false } -pallet-crowdloan-claim = { path = "../../pallets/crowdloan-claim", default-features = false } -pallet-crowdloan-reward = { path = "../../pallets/crowdloan-reward", default-features = false } -pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } -pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction", default-features = false } -pallet-fees = { path = "../../pallets/fees", default-features = false } -pallet-foreign-investments = { path = "../../pallets/foreign-investments", default-features = false } -pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } -pallet-investments = { path = "../../pallets/investments", default-features = false } -pallet-keystore = { path = "../../pallets/keystore", default-features = false } -pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } -pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } -pallet-liquidity-rewards = { path = "../../pallets/liquidity-rewards", default-features = false } -pallet-loans = { path = "../../pallets/loans", default-features = false } -pallet-migration-manager = { path = "../../pallets/migration", default-features = false } -pallet-nft-sales = { path = "../../pallets/nft-sales", default-features = false } -pallet-order-book = { path = "../../pallets/order-book", default-features = false } -pallet-permissions = { path = "../../pallets/permissions", default-features = false } -pallet-pool-registry = { path = "../../pallets/pool-registry", default-features = false } -pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } -pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } -pallet-rewards = { path = "../../pallets/rewards", default-features = false } -runtime-common = { path = "../common", default-features = false } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true } -# LiquidityPools 3rd-party dependencies -moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +moonbeam-relay-encoder = { workspace = true } + +# Locals +cfg-primitives = { workspace = true } +cfg-traits = { workspace = true } +cfg-types = { workspace = true } +runtime-common = { workspace = true } +liquidity-pools-gateway-routers = { workspace = true } + +# Pallet list +axelar-gateway-precompile = { workspace = true } +chainbridge = {workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +orml-asset-registry = { workspace = true } +orml-oracle = { workspace = true } +orml-tokens = { workspace = true } +orml-xcm = { workspace = true } +orml-xtokens = { workspace = true } +pallet-anchors = { workspace = true } +pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-base-fee = { workspace = true } +pallet-block-rewards = { workspace = true } +pallet-bridge = { workspace = true } +pallet-claims = { workspace = true } +pallet-collator-allowlist = { workspace = true } +pallet-collator-selection = { workspace = true } +pallet-collective = { workspace = true } +pallet-crowdloan-claim = { workspace = true } +pallet-crowdloan-reward = { workspace = true } +pallet-data-collector = { workspace = true } +pallet-democracy = { workspace = true } +pallet-elections-phragmen = { workspace = true } +pallet-ethereum = { workspace = true } +pallet-ethereum-transaction = { workspace = true } +pallet-evm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-fees = { workspace = true } +pallet-foreign-investments = { workspace = true } +pallet-identity = { workspace = true } +pallet-interest-accrual = { workspace = true } +pallet-investments = { workspace = true } +pallet-keystore = { workspace = true } +pallet-liquidity-pools = { workspace = true } +pallet-liquidity-pools-gateway = { workspace = true } +pallet-liquidity-rewards = { workspace = true } +pallet-loans = { workspace = true } +pallet-membership = { workspace = true } +pallet-migration-manager = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nft = { workspace = true } +pallet-nft-sales = { workspace = true } +pallet-order-book = { workspace = true } +pallet-permissions = { workspace = true } +pallet-pool-registry = { workspace = true } +pallet-pool-system = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-restricted-tokens = { workspace = true } +pallet-rewards = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transfer-allowlist = { workspace = true } +pallet-treasury = { workspace = true } +pallet-uniques = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-transactor = { workspace = true } +parachain-info = { workspace = true } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } [features] default = ["std"] + std = [ - "axelar-gateway-precompile/std", - "cfg-primitives/std", - "cfg-traits/std", - "cfg-types/std", "codec/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", + "getrandom/std", + "hex/std", + "scale-info/std", + "serde/std", + "log/std", + + # Substrate related + "sp-api/std", + "sp-runtime/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "frame-support/std", + "frame-system/std", + "frame-system-rpc-runtime-api/std", + "frame-executive/std", + "frame-try-runtime?/std", + "frame-system-benchmarking?/std", + "frame-benchmarking?/std", "cumulus-primitives-core/std", "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", + "cumulus-pallet-session-benchmarking?/std", + "xcm/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "orml-traits/std", + "orml-xcm-support/std", "fp-rpc/std", "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", + "moonbeam-relay-encoder/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "polkadot-runtime-common/std", + "polkadot-parachain/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", + # Locals + "cfg-primitives/std", + "cfg-traits/std", + "cfg-types/std", + "runtime-common/std", "liquidity-pools-gateway-routers/std", - "log/std", - "moonbeam-relay-encoder/std", + + # Pallet list + "axelar-gateway-precompile/std", + "chainbridge/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", "orml-asset-registry/std", "orml-oracle/std", "orml-tokens/std", - "orml-traits/std", - "orml-xcm-support/std", "orml-xcm/std", "orml-xtokens/std", "pallet-anchors/std", @@ -182,6 +216,8 @@ std = [ "pallet-balances/std", "pallet-base-fee/std", "pallet-block-rewards/std", + "pallet-bridge/std", + "pallet-claims/std", "pallet-collator-allowlist/std", "pallet-collator-selection/std", "pallet-collective/std", @@ -190,24 +226,24 @@ std = [ "pallet-data-collector/std", "pallet-democracy/std", "pallet-elections-phragmen/std", - "pallet-ethereum-transaction/std", "pallet-ethereum/std", - "pallet-evm-chain-id/std", - "pallet-evm-precompile-dispatch/std", + "pallet-ethereum-transaction/std", "pallet-evm/std", + "pallet-evm-chain-id/std", "pallet-fees/std", "pallet-foreign-investments/std", "pallet-identity/std", "pallet-interest-accrual/std", "pallet-investments/std", "pallet-keystore/std", - "pallet-liquidity-pools-gateway/std", "pallet-liquidity-pools/std", + "pallet-liquidity-pools-gateway/std", "pallet-liquidity-rewards/std", "pallet-loans/std", "pallet-membership/std", "pallet-migration-manager/std", "pallet-multisig/std", + "pallet-nft/std", "pallet-nft-sales/std", "pallet-order-book/std", "pallet-permissions/std", @@ -219,56 +255,56 @@ std = [ "pallet-rewards/std", "pallet-scheduler/std", "pallet-session/std", + "pallet-sudo/std", "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-transfer-allowlist/std", "pallet-treasury/std", "pallet-uniques/std", "pallet-utility/std", "pallet-vesting/std", + "pallet-xcm/std", "pallet-xcm-transactor/std", "parachain-info/std", - "polkadot-parachain/std", - "polkadot-runtime-common/std", - "runtime-common/std", - "scale-info/std", - "serde/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", ] + runtime-benchmarks = [ - "axelar-gateway-precompile/runtime-benchmarks", + # Enabling optional + "hex-literal", + "frame-system-benchmarking/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + + # Substrate related + "sp-runtime/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "polkadot-parachain/runtime-benchmarks", + + # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", + "runtime-common/runtime-benchmarks", + "liquidity-pools-gateway-routers/runtime-benchmarks", + + # Pallet list + "axelar-gateway-precompile/runtime-benchmarks", + "chainbridge/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "liquidity-pools-gateway-routers/runtime-benchmarks", "orml-asset-registry/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", "pallet-anchors/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-block-rewards/runtime-benchmarks", + "pallet-bridge/runtime-benchmarks", + "pallet-claims/runtime-benchmarks", "pallet-collator-allowlist/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", @@ -277,9 +313,8 @@ runtime-benchmarks = [ "pallet-data-collector/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", - "pallet-ethereum-transaction/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", + "pallet-ethereum-transaction/runtime-benchmarks", "pallet-evm/runtime-benchmarks", "pallet-fees/runtime-benchmarks", "pallet-foreign-investments/runtime-benchmarks", @@ -287,13 +322,14 @@ runtime-benchmarks = [ "pallet-interest-accrual/runtime-benchmarks", "pallet-investments/runtime-benchmarks", "pallet-keystore/runtime-benchmarks", - "pallet-liquidity-pools-gateway/runtime-benchmarks", "pallet-liquidity-pools/runtime-benchmarks", + "pallet-liquidity-pools-gateway/runtime-benchmarks", "pallet-liquidity-rewards/runtime-benchmarks", "pallet-loans/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-migration-manager/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", + "pallet-nft/runtime-benchmarks", "pallet-nft-sales/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", @@ -304,40 +340,44 @@ runtime-benchmarks = [ "pallet-restricted-tokens/runtime-benchmarks", "pallet-rewards/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-transfer-allowlist/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", ] try-runtime = [ - "axelar-gateway-precompile/try-runtime", - "cfg-primitives/try-runtime", + # Enabling optional + "frame-try-runtime/try-runtime", + + # Substrate related + "sp-runtime/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-executive/try-runtime", + "fp-self-contained/try-runtime", + "polkadot-runtime-common/try-runtime", + + # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", - "cfg-traits/try-runtime", "cfg-types/try-runtime", + "runtime-common/try-runtime", + "liquidity-pools-gateway-routers/try-runtime", + + # Pallet list + "axelar-gateway-precompile/try-runtime", + "chainbridge/try-runtime", "cumulus-pallet-aura-ext/try-runtime", "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "liquidity-pools-gateway-routers/try-runtime", "orml-asset-registry/try-runtime", "orml-oracle/try-runtime", "orml-tokens/try-runtime", @@ -349,6 +389,8 @@ try-runtime = [ "pallet-balances/try-runtime", "pallet-base-fee/try-runtime", "pallet-block-rewards/try-runtime", + "pallet-bridge/try-runtime", + "pallet-claims/try-runtime", "pallet-collator-allowlist/try-runtime", "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", @@ -357,23 +399,24 @@ try-runtime = [ "pallet-data-collector/try-runtime", "pallet-democracy/try-runtime", "pallet-elections-phragmen/try-runtime", - "pallet-ethereum-transaction/try-runtime", "pallet-ethereum/try-runtime", - "pallet-evm-chain-id/try-runtime", + "pallet-ethereum-transaction/try-runtime", "pallet-evm/try-runtime", + "pallet-evm-chain-id/try-runtime", "pallet-fees/try-runtime", "pallet-foreign-investments/try-runtime", "pallet-identity/try-runtime", "pallet-interest-accrual/try-runtime", "pallet-investments/try-runtime", "pallet-keystore/try-runtime", - "pallet-liquidity-pools-gateway/try-runtime", "pallet-liquidity-pools/try-runtime", + "pallet-liquidity-pools-gateway/try-runtime", "pallet-liquidity-rewards/try-runtime", "pallet-loans/try-runtime", "pallet-membership/try-runtime", "pallet-migration-manager/try-runtime", "pallet-multisig/try-runtime", + "pallet-nft/try-runtime", "pallet-nft-sales/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", @@ -382,22 +425,20 @@ try-runtime = [ "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", "pallet-restricted-tokens/try-runtime", - "pallet-restricted-tokens/try-runtime", "pallet-rewards/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", + "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-transfer-allowlist/try-runtime", "pallet-treasury/try-runtime", "pallet-uniques/try-runtime", "pallet-utility/try-runtime", "pallet-vesting/try-runtime", - "pallet-xcm-transactor/try-runtime", "pallet-xcm/try-runtime", + "pallet-xcm-transactor/try-runtime", "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", - "runtime-common/try-runtime", - "sp-runtime/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain @@ -405,6 +446,7 @@ try-runtime = [ # to make it smaller like logging for example. on-chain-release-build = [ "sp-api/disable-logging", + "runtime-common/on-chain-release-build", ] # Set timing constants (e.g. session period) to faster versions to speed up testing. diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index d8e0b62f98..16809071a1 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1980,7 +1980,7 @@ impl_runtime_apis! { } fn metadata_at_version(version: u32) -> Option { Runtime::metadata_at_version(version) } - fn metadata_versions() -> frame_benchmarking::Vec { Runtime::metadata_versions() } + fn metadata_versions() -> sp_std::vec::Vec { Runtime::metadata_versions() } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index dbab7ce768..843b78c45b 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -143,8 +143,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran [features] default = ["std"] -instant-voting = [] -fast-runtime = [] + std = [ "codec/std", "getrandom/std", @@ -447,3 +446,8 @@ on-chain-release-build = [ "sp-api/disable-logging", "runtime-common/on-chain-release-build", ] + +# Set timing constants (e.g. session period) to faster versions to speed up testing. +fast-runtime = [] + +instant-voting = [] From ee24e9ebbedc0529029a11736628ae549224bd76 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Mon, 20 Nov 2023 12:10:53 +0100 Subject: [PATCH 08/15] build dependencies --- Cargo.toml | 5 ++++- runtime/altair/Cargo.toml | 2 +- runtime/development/Cargo.toml | 4 +--- runtime/integration-tests/Cargo.toml | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4f5b0f4735..13cd71ded9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -229,12 +229,15 @@ cfg-traits = { path = "libs/traits", default-features = false } cfg-types = { path = "libs/types", default-features = false } cfg-utils = { path = "libs/utils", default-features = false } -# runtimes +# Runtimes runtime-common = { path = "runtime/common", default-features = false } # Testing cfg-mocks = { path = "libs/mocks", default-features = false } +# Build dependencies +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } + [dependencies] # third-party dependencies async-trait = "0.1" diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 0ba2b3e86d..971c0cb8b4 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -140,7 +140,7 @@ pallet-xcm-transactor = { workspace = true } parachain-info = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-wasm-builder = { workspace = true } [features] default = ["std"] diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 843b78c45b..fe092fbd22 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -139,7 +139,7 @@ pallet-xcm-transactor = { workspace = true } parachain-info = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-wasm-builder = { workspace = true } [features] default = ["std"] @@ -449,5 +449,3 @@ on-chain-release-build = [ # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] - -instant-voting = [] diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index e3fcd8915b..ea8d41d608 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -140,7 +140,6 @@ pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", bra [features] default = [ "runtime-development", - "development-runtime/instant-voting", ] fast-runtime = ["development-runtime/fast-runtime"] std = [ From af3465e1217416a4abe50f900874568fa0608e94 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Mon, 20 Nov 2023 12:17:58 +0100 Subject: [PATCH 09/15] centrifuge using workspace dependencies --- Cargo.lock | 6 +- runtime/centrifuge/Cargo.toml | 443 ++++++++++++++++++---------------- 2 files changed, 242 insertions(+), 207 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 875c0d56d5..0c6b5641b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1165,6 +1165,8 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "getrandom 0.2.10", + "hex", "hex-literal 0.3.4", "liquidity-pools-gateway-routers", "log", @@ -1196,7 +1198,6 @@ dependencies = [ "pallet-ethereum-transaction", "pallet-evm", "pallet-evm-chain-id", - "pallet-evm-precompile-dispatch", "pallet-fees", "pallet-foreign-investments", "pallet-identity", @@ -1211,6 +1212,7 @@ dependencies = [ "pallet-migration-manager", "pallet-multisig", "pallet-nft", + "pallet-nft-sales", "pallet-order-book", "pallet-permissions", "pallet-pool-registry", @@ -1221,9 +1223,11 @@ dependencies = [ "pallet-rewards", "pallet-scheduler", "pallet-session", + "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-transfer-allowlist", "pallet-treasury", "pallet-uniques", "pallet-utility", diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index 1d63f1f64a..87e52d69a9 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -1,184 +1,213 @@ [package] name = "centrifuge-runtime" version = "0.10.23" -authors = ["Centrifuge "] -edition = "2021" build = "build.rs" -license = "LGPL-3.0" -homepage = "https://centrifuge.io/" -repository = "https://github.com/centrifuge/centrifuge-chain" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true [dependencies] -# third-party dependencies -codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } -hex-literal = { version = "0.3.4", default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.119", optional = true } -static_assertions = "1.1.0" +codec = { package = "parity-scale-codec", workspace = true } +getrandom = { workspace = true } +hex = { workspace = true } +hex-literal = { workspace = true, optional = true } +scale-info = { workspace = true } +serde = { workspace = true, optional = true } +static_assertions = { workspace = true } +log = { workspace = true } -# parachain -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +sp-api = { workspace = true } +sp-runtime = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } -# polkadot dependencies -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-executive = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-try-runtime = { workspace = true, optional = true } # For try-runtime -# primitives -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking -# frame dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["tuples-96"], branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"], branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-parachain = { workspace = true } -# Orml pallets -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } +xcm-primitives = { workspace = true } -# frontier pallets -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } -# Our pallets and modules -axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } -cfg-primitives = { path = "../../libs/primitives", default-features = false } -cfg-traits = { path = "../../libs/traits", default-features = false } -cfg-types = { path = "../../libs/types", default-features = false } -liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers", default-features = false } -pallet-anchors = { path = "../../pallets/anchors", default-features = false } -pallet-block-rewards = { path = "../../pallets/block-rewards", default-features = false } -pallet-bridge = { path = "../../pallets/bridge", default-features = false } -pallet-claims = { path = "../../pallets/claims", default-features = false } -pallet-collator-allowlist = { path = "../../pallets/collator-allowlist", default-features = false } -pallet-crowdloan-claim = { path = "../../pallets/crowdloan-claim", default-features = false } -pallet-crowdloan-reward = { path = "../../pallets/crowdloan-reward", default-features = false } -pallet-data-collector = { path = "../../pallets/data-collector", default-features = false } -pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction", default-features = false } -pallet-fees = { path = "../../pallets/fees", default-features = false } -pallet-foreign-investments = { path = "../../pallets/foreign-investments", default-features = false } -pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } -pallet-investments = { path = "../../pallets/investments", default-features = false } -pallet-keystore = { path = "../../pallets/keystore", default-features = false } -pallet-liquidity-pools = { path = "../../pallets/liquidity-pools", default-features = false } -pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway", default-features = false } -pallet-liquidity-rewards = { path = "../../pallets/liquidity-rewards", default-features = false } -pallet-loans = { path = "../../pallets/loans", default-features = false } -pallet-migration-manager = { path = "../../pallets/migration", default-features = false } -pallet-nft = { path = "../../pallets/nft", default-features = false } -pallet-order-book = { path = "../../pallets/order-book", default-features = false } -pallet-permissions = { path = "../../pallets/permissions", default-features = false } -pallet-pool-registry = { path = "../../pallets/pool-registry", default-features = false } -pallet-pool-system = { path = "../../pallets/pool-system", default-features = false } -pallet-restricted-tokens = { path = "../../pallets/restricted-tokens", default-features = false } -pallet-rewards = { path = "../../pallets/rewards", default-features = false } -runtime-common = { path = "../common", default-features = false } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true } -# LiquidityPools 3rd-party dependencies -moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +moonbeam-relay-encoder = { workspace = true } -# bridge pallets -chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } +# Locals +cfg-primitives = { workspace = true } +cfg-traits = { workspace = true } +cfg-types = { workspace = true } +runtime-common = { workspace = true } +liquidity-pools-gateway-routers = { workspace = true } + +# Pallet list +axelar-gateway-precompile = { workspace = true } +chainbridge = {workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +orml-asset-registry = { workspace = true } +orml-oracle = { workspace = true } +orml-tokens = { workspace = true } +orml-xcm = { workspace = true } +orml-xtokens = { workspace = true } +pallet-anchors = { workspace = true } +pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-base-fee = { workspace = true } +pallet-block-rewards = { workspace = true } +pallet-bridge = { workspace = true } +pallet-claims = { workspace = true } +pallet-collator-allowlist = { workspace = true } +pallet-collator-selection = { workspace = true } +pallet-collective = { workspace = true } +pallet-crowdloan-claim = { workspace = true } +pallet-crowdloan-reward = { workspace = true } +pallet-data-collector = { workspace = true } +pallet-democracy = { workspace = true } +pallet-elections-phragmen = { workspace = true } +pallet-ethereum = { workspace = true } +pallet-ethereum-transaction = { workspace = true } +pallet-evm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-fees = { workspace = true } +pallet-foreign-investments = { workspace = true } +pallet-identity = { workspace = true } +pallet-interest-accrual = { workspace = true } +pallet-investments = { workspace = true } +pallet-keystore = { workspace = true } +pallet-liquidity-pools = { workspace = true } +pallet-liquidity-pools-gateway = { workspace = true } +pallet-liquidity-rewards = { workspace = true } +pallet-loans = { workspace = true } +pallet-membership = { workspace = true } +pallet-migration-manager = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nft = { workspace = true } +pallet-nft-sales = { workspace = true } +pallet-order-book = { workspace = true } +pallet-permissions = { workspace = true } +pallet-pool-registry = { workspace = true } +pallet-pool-system = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-restricted-tokens = { workspace = true } +pallet-rewards = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transfer-allowlist = { workspace = true } +pallet-treasury = { workspace = true } +pallet-uniques = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-transactor = { workspace = true } +parachain-info = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-wasm-builder = { workspace = true } [features] default = ["std"] + std = [ - "axelar-gateway-precompile/std", + "codec/std", + "getrandom/std", + "hex/std", + "scale-info/std", + "serde/std", + "log/std", + + # Substrate related + "sp-api/std", + "sp-runtime/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "frame-support/std", + "frame-system/std", + "frame-system-rpc-runtime-api/std", + "frame-executive/std", + "frame-try-runtime?/std", + "frame-system-benchmarking?/std", + "frame-benchmarking?/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "cumulus-pallet-session-benchmarking?/std", + "xcm/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "orml-traits/std", + "orml-xcm-support/std", + "fp-rpc/std", + "fp-self-contained/std", + "moonbeam-relay-encoder/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "polkadot-runtime-common/std", + "polkadot-parachain/std", + + # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", + "runtime-common/std", + "liquidity-pools-gateway-routers/std", + + # Pallet list + "axelar-gateway-precompile/std", "chainbridge/std", - "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "cumulus-primitives-utility/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", - "liquidity-pools-gateway-routers/std", - "log/std", - "moonbeam-relay-encoder/std", "orml-asset-registry/std", "orml-oracle/std", "orml-tokens/std", - "orml-traits/std", - "orml-xcm-support/std", "orml-xcm/std", "orml-xtokens/std", "pallet-anchors/std", @@ -197,25 +226,25 @@ std = [ "pallet-data-collector/std", "pallet-democracy/std", "pallet-elections-phragmen/std", - "pallet-ethereum-transaction/std", "pallet-ethereum/std", - "pallet-evm-chain-id/std", - "pallet-evm-precompile-dispatch/std", + "pallet-ethereum-transaction/std", "pallet-evm/std", + "pallet-evm-chain-id/std", "pallet-fees/std", "pallet-foreign-investments/std", "pallet-identity/std", "pallet-interest-accrual/std", "pallet-investments/std", "pallet-keystore/std", - "pallet-liquidity-pools-gateway/std", "pallet-liquidity-pools/std", + "pallet-liquidity-pools-gateway/std", "pallet-liquidity-rewards/std", "pallet-loans/std", "pallet-membership/std", "pallet-migration-manager/std", "pallet-multisig/std", "pallet-nft/std", + "pallet-nft-sales/std", "pallet-order-book/std", "pallet-permissions/std", "pallet-pool-registry/std", @@ -226,53 +255,48 @@ std = [ "pallet-rewards/std", "pallet-scheduler/std", "pallet-session/std", + "pallet-sudo/std", "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-transfer-allowlist/std", "pallet-treasury/std", "pallet-uniques/std", "pallet-utility/std", "pallet-vesting/std", - "pallet-xcm-transactor/std", "pallet-xcm/std", + "pallet-xcm-transactor/std", "parachain-info/std", - "polkadot-parachain/std", - "polkadot-runtime-common/std", - "runtime-common/std", - "scale-info/std", - "serde", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", ] runtime-benchmarks = [ - "axelar-gateway-precompile/runtime-benchmarks", + # Enabling optional + "hex-literal", + "frame-system-benchmarking/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + + # Substrate related + "sp-runtime/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "polkadot-parachain/runtime-benchmarks", + + # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", + "runtime-common/runtime-benchmarks", + "liquidity-pools-gateway-routers/runtime-benchmarks", + + # Pallet list + "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "liquidity-pools-gateway-routers/runtime-benchmarks", "orml-asset-registry/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", @@ -289,8 +313,8 @@ runtime-benchmarks = [ "pallet-data-collector/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", - "pallet-ethereum-transaction/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", + "pallet-ethereum-transaction/runtime-benchmarks", "pallet-evm/runtime-benchmarks", "pallet-fees/runtime-benchmarks", "pallet-foreign-investments/runtime-benchmarks", @@ -298,14 +322,15 @@ runtime-benchmarks = [ "pallet-interest-accrual/runtime-benchmarks", "pallet-investments/runtime-benchmarks", "pallet-keystore/runtime-benchmarks", - "pallet-liquidity-pools-gateway/runtime-benchmarks", "pallet-liquidity-pools/runtime-benchmarks", + "pallet-liquidity-pools-gateway/runtime-benchmarks", "pallet-liquidity-rewards/runtime-benchmarks", "pallet-loans/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-migration-manager/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nft/runtime-benchmarks", + "pallet-nft-sales/runtime-benchmarks", "pallet-order-book/runtime-benchmarks", "pallet-permissions/runtime-benchmarks", "pallet-pool-registry/runtime-benchmarks", @@ -315,39 +340,44 @@ runtime-benchmarks = [ "pallet-restricted-tokens/runtime-benchmarks", "pallet-rewards/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-transfer-allowlist/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", ] try-runtime = [ - "axelar-gateway-precompile/try-runtime", + # Enabling optional + "frame-try-runtime/try-runtime", + + # Substrate related + "sp-runtime/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-executive/try-runtime", + "fp-self-contained/try-runtime", + "polkadot-runtime-common/try-runtime", + + # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", + "runtime-common/try-runtime", + "liquidity-pools-gateway-routers/try-runtime", + + # Pallet list + "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", "cumulus-pallet-aura-ext/try-runtime", "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "liquidity-pools-gateway-routers/try-runtime", "orml-asset-registry/try-runtime", "orml-oracle/try-runtime", "orml-tokens/try-runtime", @@ -369,24 +399,25 @@ try-runtime = [ "pallet-data-collector/try-runtime", "pallet-democracy/try-runtime", "pallet-elections-phragmen/try-runtime", - "pallet-ethereum-transaction/try-runtime", "pallet-ethereum/try-runtime", - "pallet-evm-chain-id/try-runtime", + "pallet-ethereum-transaction/try-runtime", "pallet-evm/try-runtime", + "pallet-evm-chain-id/try-runtime", "pallet-fees/try-runtime", "pallet-foreign-investments/try-runtime", "pallet-identity/try-runtime", "pallet-interest-accrual/try-runtime", "pallet-investments/try-runtime", "pallet-keystore/try-runtime", - "pallet-liquidity-pools-gateway/try-runtime", "pallet-liquidity-pools/try-runtime", + "pallet-liquidity-pools-gateway/try-runtime", "pallet-liquidity-rewards/try-runtime", "pallet-loans/try-runtime", "pallet-membership/try-runtime", "pallet-migration-manager/try-runtime", "pallet-multisig/try-runtime", "pallet-nft/try-runtime", + "pallet-nft-sales/try-runtime", "pallet-order-book/try-runtime", "pallet-permissions/try-runtime", "pallet-pool-registry/try-runtime", @@ -397,18 +428,17 @@ try-runtime = [ "pallet-rewards/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", + "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-transfer-allowlist/try-runtime", "pallet-treasury/try-runtime", "pallet-uniques/try-runtime", "pallet-utility/try-runtime", "pallet-vesting/try-runtime", - "pallet-xcm-transactor/try-runtime", "pallet-xcm/try-runtime", + "pallet-xcm-transactor/try-runtime", "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", - "runtime-common/try-runtime", - "sp-runtime/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain @@ -416,6 +446,7 @@ try-runtime = [ # to make it smaller like logging for example. on-chain-release-build = [ "sp-api/disable-logging", + "runtime-common/on-chain-release-build", ] # Set timing constants (e.g. session period) to faster versions to speed up testing. From ea3cd17003e73f78fbf8b03bb14a20db7eaf9432 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 22 Nov 2023 17:05:41 +0100 Subject: [PATCH 10/15] integration tests with workspace dependencies --- Cargo.lock | 36 ++- Cargo.toml | 75 +++-- runtime/centrifuge/Cargo.toml | 3 +- runtime/centrifuge/src/lib.rs | 2 +- runtime/integration-tests/Cargo.toml | 466 ++++++++++++++------------- 5 files changed, 327 insertions(+), 255 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c6b5641b9..e94b5dadd7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1094,7 +1094,6 @@ dependencies = [ "polkadot-primitives", "polkadot-service", "runtime-common", - "runtime-integration-tests", "sc-basic-authorship", "sc-chain-spec", "sc-cli", @@ -4222,7 +4221,6 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-inprocess-interface", - "frame-benchmarking", "frame-support", "frame-system", "fudge-companion", @@ -11495,7 +11493,12 @@ dependencies = [ "cfg-traits", "cfg-types", "cfg-utils", + "chainbridge", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", @@ -11503,7 +11506,6 @@ dependencies = [ "ethabi 16.0.0", "ethereum", "fp-self-contained", - "frame-benchmarking", "frame-support", "frame-system", "fudge", @@ -11518,40 +11520,64 @@ dependencies = [ "orml-oracle", "orml-tokens", "orml-traits", + "orml-xcm", "orml-xtokens", + "pallet-anchors", "pallet-aura", "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-beefy", + "pallet-base-fee", "pallet-block-rewards", + "pallet-bridge", + "pallet-claims", + "pallet-collator-allowlist", "pallet-collator-selection", "pallet-collective", + "pallet-crowdloan-claim", + "pallet-crowdloan-reward", + "pallet-data-collector", "pallet-democracy", + "pallet-elections-phragmen", "pallet-ethereum", "pallet-ethereum-transaction", "pallet-evm", "pallet-evm-chain-id", + "pallet-fees", "pallet-foreign-investments", "pallet-grandpa", + "pallet-identity", "pallet-im-online", + "pallet-interest-accrual", "pallet-investments", + "pallet-keystore", "pallet-liquidity-pools", "pallet-liquidity-pools-gateway", + "pallet-liquidity-rewards", "pallet-loans", - "pallet-message-queue", + "pallet-membership", + "pallet-migration-manager", + "pallet-multisig", + "pallet-nft", + "pallet-nft-sales", "pallet-order-book", "pallet-permissions", "pallet-pool-registry", "pallet-pool-system", "pallet-preimage", + "pallet-proxy", "pallet-restricted-tokens", "pallet-rewards", + "pallet-scheduler", "pallet-session", + "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", + "pallet-transfer-allowlist", "pallet-treasury", "pallet-uniques", + "pallet-utility", + "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", "parachain-info", diff --git a/Cargo.toml b/Cargo.toml index 13cd71ded9..87324aa043 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,8 +88,14 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive" log = "0.4" getrandom = { version = "0.2", features = ["js"] } static_assertions = "1.1.0" - -# Parachain +lazy_static = "1.4.0" +thiserror = "1.0.30" +tokio = { version = "1.15", features = ["macros"] } +tracing-subscriber = "0.2" +ethabi = { version = "16.0", default-features = false } +ethereum = { version = "0.14.0", default-features = false } + +# Cumulus cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } @@ -99,22 +105,41 @@ cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", def cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } + pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" } -# polkadot dependencies +# Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } + xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -# Primitives +rococo-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +kusama-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } + +# Substrate +node-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sc-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sc-client-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false ,branch = "polkadot-v0.9.43" } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } @@ -124,8 +149,8 @@ sp-session = { git = "https://github.com/paritytech/substrate", default-features sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } - -# Frame +sp-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ @@ -135,8 +160,9 @@ frame-system = { git = "https://github.com/paritytech/substrate", default-featur frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } - -# Substrate pallets +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } @@ -167,7 +193,6 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" } # Frontier fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } @@ -183,14 +208,19 @@ pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/f pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -# Chainbridge -chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } - # Moonbeam moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +# Centrifuge organization +fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } +fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } +chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" } + +# Foss3 +mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" } + # Centrifuge pallets axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } liquidity-pools-gateway-routers = { path = "pallets/liquidity-pools-gateway/routers", default-features = false } @@ -228,12 +258,13 @@ cfg-primitives = { path = "libs/primitives", default-features = false } cfg-traits = { path = "libs/traits", default-features = false } cfg-types = { path = "libs/types", default-features = false } cfg-utils = { path = "libs/utils", default-features = false } +cfg-mocks = { path = "libs/mocks", default-features = false } -# Runtimes +# Centrifuge uuntimes runtime-common = { path = "runtime/common", default-features = false } - -# Testing -cfg-mocks = { path = "libs/mocks", default-features = false } +development-runtime = { path = "runtime/development", default-features = false } +altair-runtime = { path = "runtime/altair", default-features = false } +centrifuge-runtime = { path = "runtime/centrifuge", default-features = false } # Build dependencies substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } @@ -323,7 +354,7 @@ runtime-common = { path = "runtime/common" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "polkadot-v0.9.43" } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "polkadot-v0.9.43" } # integration testing -runtime-integration-tests = { path = "runtime/integration-tests", optional = true, default-features = false } +#runtime-integration-tests = { path = "runtime/integration-tests", optional = true, default-features = false } # xcm xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } @@ -387,7 +418,7 @@ std = [ "pallet-pool-system/std", "polkadot-primitives/std", "runtime-common/std", - "runtime-integration-tests/std", + #"runtime-integration-tests/std", "sc-executor/std", "sc-service/rocksdb", "serde/std", @@ -426,7 +457,7 @@ runtime-benchmarks = [ "polkadot-primitives/runtime-benchmarks", "polkadot-service/runtime-benchmarks", "runtime-common/runtime-benchmarks", - "runtime-integration-tests/runtime-benchmarks", + #"runtime-integration-tests/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] @@ -456,7 +487,7 @@ fast-runtime = [ "altair-runtime/fast-runtime", "centrifuge-runtime/fast-runtime", "development-runtime/fast-runtime", - "runtime-integration-tests/fast-runtime", + #"runtime-integration-tests/fast-runtime", ] # diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index 87e52d69a9..0202e04e8a 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -13,7 +13,7 @@ documentation.workspace = true codec = { package = "parity-scale-codec", workspace = true } getrandom = { workspace = true } hex = { workspace = true } -hex-literal = { workspace = true, optional = true } +hex-literal = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, optional = true } static_assertions = { workspace = true } @@ -270,7 +270,6 @@ std = [ runtime-benchmarks = [ # Enabling optional - "hex-literal", "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 37787deb79..69b9da5ae9 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -2017,7 +2017,7 @@ impl_runtime_apis! { } fn metadata_at_version(version: u32) -> Option { Runtime::metadata_at_version(version) } - fn metadata_versions() -> frame_benchmarking::Vec { Runtime::metadata_versions() } + fn metadata_versions() -> sp_std::vec::Vec { Runtime::metadata_versions() } } impl sp_block_builder::BlockBuilder for Runtime { diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index ea8d41d608..c87e45683f 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -1,248 +1,264 @@ [package] name = "runtime-integration-tests" version = "0.1.0" -authors = ["Centrifuge "] -edition = "2021" -license = "LGPL-3.0" -homepage = "https://centrifuge.io/" -repository = "https://github.com/centrifuge/centrifuge-chain" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] } -fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } -fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" } -lazy_static = "1.4.0" -serde = { version = "1.0.119" } -thiserror = "1.0.30" -tokio = { version = "1.15", features = ["macros"] } -tracing-subscriber = "0.2" +codec = { package = "parity-scale-codec", workspace = true } +fudge = { workspace = true } +fudge-core = { workspace = true } +lazy_static = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +tracing-subscriber = { workspace = true } +getrandom = { workspace = true } +hex = { workspace = true } +ethabi = { workspace = true, features = ["std"] } +ethereum = { workspace = true, features = ["std"] } -# Substrate -## Substrate-Frame -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +node-primitives = { workspace = true, features = ["std"] } +sc-client-api = { workspace = true } +sc-executor = { workspace = true, features = ["std"] } +sc-service = { workspace = true, features = ["rocksdb", "test-helpers"] } +sc-block-builder = { workspace = true } -## Substrate-Primitives -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -#sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-api = { workspace = true, features = ["std"] } +sp-runtime = { workspace = true, features = ["std"] } +sp-block-builder = { workspace = true, features = ["std"] } +sp-consensus-aura = { workspace = true, features = ["std"] } +sp-consensus-babe = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = ["std"] } +sp-inherents = { workspace = true, features = ["std"] } +sp-io = { workspace = true, features = ["std"] } +sp-std = { workspace = true, features = ["std"] } +sp-timestamp = { workspace = true, features = ["std"] } +sp-tracing = { workspace = true, features = ["std"] } +sp-consensus-beefy = { workspace = true, features = ["std"] } +sp-consensus-slots = { workspace = true, features = ["std"] } +sp-transaction-pool = { workspace = true, features = ["std"] } -## Substrate-Client -node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -#sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech/substrate", features = ["rocksdb", "test-helpers"], branch = "polkadot-v0.9.43" } +frame-support = { workspace = true, features = ["std"] } +frame-system = { workspace = true, features = ["std"] } -# Polkadot -kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -rococo-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +cumulus-primitives-core = { workspace = true, features = ["std"] } +cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } +cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } -# Cumulus -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +rococo-runtime = { workspace = true, features = ["std"] } +kusama-runtime = { workspace = true, features = ["std"] } +polkadot-runtime = { workspace = true, features = ["std"] } +polkadot-runtime-common = { workspace = true, features = ["std"] } +polkadot-runtime-parachains = { workspace = true, features = ["std"] } +polkadot-parachain = { workspace = true, features = ["std"] } +polkadot-core-primitives = { workspace = true, features = ["std"] } +polkadot-primitives = { workspace = true, features = ["std"] } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +pallet-im-online = { workspace = true, features = ["std"] } +pallet-babe = { workspace = true, features = ["std"] } +pallet-grandpa = { workspace = true, features = ["std"] } -# Orml pallets -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +xcm = { workspace = true, features = ["std"] } +xcm-executor = { workspace = true, features = ["std"] } -# Local -altair-runtime = { path = "../altair" } -centrifuge-runtime = { path = "../centrifuge" } -cfg-primitives = { path = "../../libs/primitives" } -cfg-traits = { path = "../../libs/traits" } -development-runtime = { path = "../development" } -runtime-common = { path = "../common" } +orml-traits = { workspace = true, features = ["std"] } -[dev-dependencies] -getrandom = { version = "0.2", features = ["js"] } -hex = { version = "0.4.3", default_features = false } +fp-self-contained = { workspace = true, features = ["std"] } -cfg-traits = { path = "../../libs/traits" } -cfg-types = { path = "../../libs/types" } -cfg-utils = { path = "../../libs/utils" } +# Locals +cfg-primitives = { workspace = true, features = ["std"] } +cfg-traits = { workspace = true, features = ["std"] } +cfg-types = { workspace = true, features = ["std"] } +cfg-utils = { workspace = true, features = ["std"] } +runtime-common = { workspace = true, features = ["std"] } +development-runtime = { workspace = true, features = ["std"] } +altair-runtime = { workspace = true, features = ["std"] } +centrifuge-runtime = { workspace = true, features = ["std"] } +liquidity-pools-gateway-routers = { workspace = true, features = ["std"] } -ethabi = { version = "16.0", default-features = false } -ethereum = { version = "0.14.0", default-features = false } +# Pallet list +axelar-gateway-precompile = { workspace = true, features = ["std"] } +chainbridge = {workspace = true, features = ["std"] } +cumulus-pallet-aura-ext = { workspace = true, features = ["std"] } +cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] } +cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } +cumulus-pallet-xcm = { workspace = true, features = ["std"] } +cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] } +orml-asset-registry = { workspace = true, features = ["std"] } +orml-oracle = { workspace = true, features = ["std"] } +orml-tokens = { workspace = true, features = ["std"] } +orml-xcm = { workspace = true, features = ["std"] } +orml-xtokens = { workspace = true, features = ["std"] } +pallet-anchors = { workspace = true, features = ["std"] } +pallet-aura = { workspace = true, features = ["std"] } +pallet-authorship = { workspace = true, features = ["std"] } +pallet-balances = { workspace = true, features = ["std"] } +pallet-base-fee = { workspace = true, features = ["std"] } +pallet-block-rewards = { workspace = true, features = ["std"] } +pallet-bridge = { workspace = true, features = ["std"] } +pallet-claims = { workspace = true, features = ["std"] } +pallet-collator-allowlist = { workspace = true, features = ["std"] } +pallet-collator-selection = { workspace = true, features = ["std"] } +pallet-collective = { workspace = true, features = ["std"] } +pallet-crowdloan-claim = { workspace = true, features = ["std"] } +pallet-crowdloan-reward = { workspace = true, features = ["std"] } +pallet-data-collector = { workspace = true, features = ["std"] } +pallet-democracy = { workspace = true, features = ["std"] } +pallet-elections-phragmen = { workspace = true, features = ["std"] } +pallet-ethereum = { workspace = true, features = ["std"] } +pallet-ethereum-transaction = { workspace = true, features = ["std"] } +pallet-evm = { workspace = true, features = ["std"] } +pallet-evm-chain-id = { workspace = true, features = ["std"] } +pallet-fees = { workspace = true, features = ["std"] } +pallet-foreign-investments = { workspace = true, features = ["std"] } +pallet-identity = { workspace = true, features = ["std"] } +pallet-interest-accrual = { workspace = true, features = ["std"] } +pallet-investments = { workspace = true, features = ["std"] } +pallet-keystore = { workspace = true, features = ["std"] } +pallet-liquidity-pools = { workspace = true, features = ["std"] } +pallet-liquidity-pools-gateway = { workspace = true, features = ["std"] } +pallet-liquidity-rewards = { workspace = true, features = ["std"] } +pallet-loans = { workspace = true, features = ["std"] } +pallet-membership = { workspace = true, features = ["std"] } +pallet-migration-manager = { workspace = true, features = ["std"] } +pallet-multisig = { workspace = true, features = ["std"] } +pallet-nft = { workspace = true, features = ["std"] } +pallet-nft-sales = { workspace = true, features = ["std"] } +pallet-order-book = { workspace = true, features = ["std"] } +pallet-permissions = { workspace = true, features = ["std"] } +pallet-pool-registry = { workspace = true, features = ["std"] } +pallet-pool-system = { workspace = true, features = ["std"] } +pallet-preimage = { workspace = true, features = ["std"] } +pallet-proxy = { workspace = true, features = ["std"] } +pallet-restricted-tokens = { workspace = true, features = ["std"] } +pallet-rewards = { workspace = true, features = ["std"] } +pallet-scheduler = { workspace = true, features = ["std"] } +pallet-session = { workspace = true, features = ["std"] } +pallet-sudo = { workspace = true, features = ["std"] } +pallet-timestamp = { workspace = true, features = ["std"] } +pallet-transaction-payment = { workspace = true, features = ["std"] } +pallet-transfer-allowlist = { workspace = true, features = ["std"] } +pallet-treasury = { workspace = true, features = ["std"] } +pallet-uniques = { workspace = true, features = ["std"] } +pallet-utility = { workspace = true, features = ["std"] } +pallet-vesting = { workspace = true, features = ["std"] } +pallet-xcm = { workspace = true, features = ["std"] } +pallet-xcm-transactor = { workspace = true, features = ["std"] } +parachain-info = { workspace = true, features = ["std"] } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } - -axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile" } -liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers" } -pallet-block-rewards = { path = "../../pallets/block-rewards" } -pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction" } -pallet-foreign-investments = { path = "../../pallets/foreign-investments" } -pallet-investments = { path = "../../pallets/investments" } -pallet-liquidity-pools = { path = "../../pallets/liquidity-pools" } -pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway" } -pallet-loans = { path = "../../pallets/loans" } -pallet-order-book = { path = "../../pallets/order-book" } -pallet-permissions = { path = "../../pallets/permissions" } -pallet-pool-registry = { path = "../../pallets/pool-registry" } -pallet-pool-system = { path = "../../pallets/pool-system" } -pallet-restricted-tokens = { path = "../../pallets/restricted-tokens" } -pallet-rewards = { path = "../../pallets/rewards" } - -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = true, branch = "release-v0.9.43" } - -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# # Substrate +# ## Substrate-Frame +# frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } +# frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# +# ## Substrate-Primitives +# sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# #sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43" } +# sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +# sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# +# ## Substrate-Client +# node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# #sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sc-service = { git = "https://github.com/paritytech/substrate", features = ["rocksdb", "test-helpers"], branch = "polkadot-v0.9.43" } +# +# # Polkadot +# kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# rococo-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +# +# # Cumulus +# cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# +# parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +# +# # Orml pallets +# orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } +# orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +# orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +# orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +# orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +# +# ethabi = { version = "16.0", default-features = false } +# ethereum = { version = "0.14.0", default-features = false } +# +# pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } +# +# axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile" } +# liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers" } +# pallet-block-rewards = { path = "../../pallets/block-rewards" } +# pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction" } +# pallet-foreign-investments = { path = "../../pallets/foreign-investments" } +# pallet-investments = { path = "../../pallets/investments" } +# pallet-liquidity-pools = { path = "../../pallets/liquidity-pools" } +# pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway" } +# pallet-loans = { path = "../../pallets/loans" } +# pallet-order-book = { path = "../../pallets/order-book" } +# pallet-permissions = { path = "../../pallets/permissions" } +# pallet-pool-registry = { path = "../../pallets/pool-registry" } +# pallet-pool-system = { path = "../../pallets/pool-system" } +# pallet-restricted-tokens = { path = "../../pallets/restricted-tokens" } +# pallet-rewards = { path = "../../pallets/rewards" } +# +# pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } +# sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +# sp-std = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" } +# xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = true, branch = "release-v0.9.43" } +# +# pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } [features] default = [ "runtime-development", ] -fast-runtime = ["development-runtime/fast-runtime"] -std = [ - "altair-runtime/std", - "centrifuge-runtime/std", - "cfg-primitives/std", - "codec/std", - "cumulus-pallet-parachain-system/std", - "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", - "cumulus-test-relay-sproof-builder/std", - "development-runtime/std", - "ethabi/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-support/std", - "frame-system/std", - "getrandom/std", - "kusama-runtime/std", - "node-primitives/std", - "orml-asset-registry/std", - "orml-oracle/std", - "orml-tokens/std", - "orml-traits/std", - "orml-xtokens/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-democracy/std", - "pallet-beefy/std", - "pallet-foreign-investments/std", - "pallet-investments/std", - "pallet-message-queue/std", - "pallet-order-book/std", - "pallet-preimage/std", - "pallet-timestamp/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-uniques/std", - "pallet-xcm/std", - "parachain-info/std", - "polkadot-core-primitives/std", - "polkadot-parachain/std", - "polkadot-primitives/std", - "polkadot-runtime-common/std", - "polkadot-runtime-parachains/std", - "polkadot-runtime/std", - "rococo-runtime/std", - "runtime-common/std", - "sc-executor/std", - "serde/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-consensus-babe/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-runtime/std", - "sp-timestamp/std", - "sp-tracing/std", - "sp-transaction-pool/std", - "xcm/std", -] - -runtime-benchmarks = [ - "altair-runtime/runtime-benchmarks", - "centrifuge-runtime/runtime-benchmarks", - "cfg-primitives/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "default", - "development-runtime/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "fudge/runtime-benchmarks", - "kusama-runtime/runtime-benchmarks", - "orml-asset-registry/runtime-benchmarks", - "orml-tokens/runtime-benchmarks", - "orml-xtokens/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-foreign-investments/runtime-benchmarks", - "pallet-investments/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-order-book/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-uniques/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "polkadot-runtime-parachains/runtime-benchmarks", - "polkadot-runtime/runtime-benchmarks", - "rococo-runtime/runtime-benchmarks", - "runtime-common/runtime-benchmarks", - "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] runtime-development = [] -runtime-altair = [] -runtime-centrifuge = [] + +fast-runtime = ["development-runtime/fast-runtime"] From ec705926f7c6e36dccc7fe031cb9bec326e8f902 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 22 Nov 2023 17:18:08 +0100 Subject: [PATCH 11/15] fix integration testing --- runtime/development/Cargo.toml | 3 + runtime/integration-tests/Cargo.toml | 107 +----------------- .../integration-tests/src/utils/extrinsics.rs | 2 - 3 files changed, 4 insertions(+), 108 deletions(-) diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index fe092fbd22..2c5217ead9 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -447,5 +447,8 @@ on-chain-release-build = [ "runtime-common/on-chain-release-build", ] +# Used by integration testing +instant-voting = [] + # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index c87e45683f..1b468c5102 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -151,114 +151,9 @@ pallet-xcm = { workspace = true, features = ["std"] } pallet-xcm-transactor = { workspace = true, features = ["std"] } parachain-info = { workspace = true, features = ["std"] } -# # Substrate -# ## Substrate-Frame -# frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } -# frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# -# ## Substrate-Primitives -# sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# #sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v0.9.43" } -# sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -# sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# -# ## Substrate-Client -# node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# #sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sc-service = { git = "https://github.com/paritytech/substrate", features = ["rocksdb", "test-helpers"], branch = "polkadot-v0.9.43" } -# -# # Polkadot -# kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# rococo-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -# -# # Cumulus -# cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -# cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -# cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -# cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -# -# parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } -# -# # Orml pallets -# orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" } -# orml-oracle = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -# orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -# orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -# orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } -# -# ethabi = { version = "16.0", default-features = false } -# ethereum = { version = "0.14.0", default-features = false } -# -# pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -# pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -# pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" } -# -# axelar-gateway-precompile = { path = "../../pallets/liquidity-pools-gateway/axelar-gateway-precompile" } -# liquidity-pools-gateway-routers = { path = "../../pallets/liquidity-pools-gateway/routers" } -# pallet-block-rewards = { path = "../../pallets/block-rewards" } -# pallet-ethereum-transaction = { path = "../../pallets/ethereum-transaction" } -# pallet-foreign-investments = { path = "../../pallets/foreign-investments" } -# pallet-investments = { path = "../../pallets/investments" } -# pallet-liquidity-pools = { path = "../../pallets/liquidity-pools" } -# pallet-liquidity-pools-gateway = { path = "../../pallets/liquidity-pools-gateway" } -# pallet-loans = { path = "../../pallets/loans" } -# pallet-order-book = { path = "../../pallets/order-book" } -# pallet-permissions = { path = "../../pallets/permissions" } -# pallet-pool-registry = { path = "../../pallets/pool-registry" } -# pallet-pool-system = { path = "../../pallets/pool-system" } -# pallet-restricted-tokens = { path = "../../pallets/restricted-tokens" } -# pallet-rewards = { path = "../../pallets/rewards" } -# -# pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" } -# sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -# sp-std = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" } -# xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = true, branch = "release-v0.9.43" } -# -# pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } - [features] default = [ - "runtime-development", + "development-runtime/instant-voting" ] -runtime-development = [] fast-runtime = ["development-runtime/fast-runtime"] diff --git a/runtime/integration-tests/src/utils/extrinsics.rs b/runtime/integration-tests/src/utils/extrinsics.rs index 84ec5819c8..54d2c792c6 100644 --- a/runtime/integration-tests/src/utils/extrinsics.rs +++ b/runtime/integration-tests/src/utils/extrinsics.rs @@ -151,8 +151,6 @@ fn signed_extra_relay(nonce: RelayIndex) -> RelaySignedExtra { frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), - #[cfg(not(feature = "runtime-development"))] - polkadot_runtime_common::claims::PrevalidateAttests::::new(), ) } From 9fcd29e1fb4bc50491afac8b721c2fb0e180690f Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 23 Nov 2023 07:26:58 +0100 Subject: [PATCH 12/15] taplo fmt --- Cargo.toml | 4 +--- runtime/altair/Cargo.toml | 20 ++++++++-------- runtime/centrifuge/Cargo.toml | 20 ++++++++-------- runtime/common/Cargo.toml | 10 ++++---- runtime/development/Cargo.toml | 18 +++++++------- runtime/integration-tests/Cargo.toml | 36 ++++++++++++++-------------- 6 files changed, 53 insertions(+), 55 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87324aa043..5149b998e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,11 +113,9 @@ parachain-info = { git = "https://github.com/paritytech/cumulus", default-featur # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } - xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } - rococo-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } kusama-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } polkadot-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } @@ -137,7 +135,7 @@ sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-featu sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false ,branch = "polkadot-v0.9.43" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 971c0cb8b4..94b46ff52e 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -14,40 +14,40 @@ codec = { package = "parity-scale-codec", workspace = true } getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true, optional = true } +log = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, optional = true } static_assertions = { workspace = true } -log = { workspace = true } sp-api = { workspace = true } -sp-runtime = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } +sp-runtime = { workspace = true } sp-session = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-executive = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-executive = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-try-runtime = { workspace = true, optional = true } # For try-runtime +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } # For try-runtime +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-runtime-common = { workspace = true } polkadot-parachain = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } @@ -66,12 +66,12 @@ moonbeam-relay-encoder = { workspace = true } cfg-primitives = { workspace = true } cfg-traits = { workspace = true } cfg-types = { workspace = true } -runtime-common = { workspace = true } liquidity-pools-gateway-routers = { workspace = true } +runtime-common = { workspace = true } # Pallet list axelar-gateway-precompile = { workspace = true } -chainbridge = {workspace = true } +chainbridge = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index 0202e04e8a..a08abe9119 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -14,40 +14,40 @@ codec = { package = "parity-scale-codec", workspace = true } getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } +log = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, optional = true } static_assertions = { workspace = true } -log = { workspace = true } sp-api = { workspace = true } -sp-runtime = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } +sp-runtime = { workspace = true } sp-session = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-executive = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-executive = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-try-runtime = { workspace = true, optional = true } # For try-runtime +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } # For try-runtime +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-runtime-common = { workspace = true } polkadot-parachain = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } @@ -66,12 +66,12 @@ moonbeam-relay-encoder = { workspace = true } cfg-primitives = { workspace = true } cfg-traits = { workspace = true } cfg-types = { workspace = true } -runtime-common = { workspace = true } liquidity-pools-gateway-routers = { workspace = true } +runtime-common = { workspace = true } # Pallet list axelar-gateway-precompile = { workspace = true } -chainbridge = {workspace = true } +chainbridge = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index cab32b5ad7..d7d76cdc15 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -9,12 +9,12 @@ repository.workspace = true documentation.workspace = true [dependencies] +codec = { package = "parity-scale-codec", workspace = true } hex-literal = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } serde = { workspace = true } smallvec = { workspace = true } -codec = { package = "parity-scale-codec", workspace = true } -scale-info = { workspace = true } -log = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -22,9 +22,9 @@ frame-system = { workspace = true } sp-api = { workspace = true } sp-arithmetic = { workspace = true } sp-core = { workspace = true } +sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -sp-io = { workspace = true } polkadot-parachain = { workspace = true } xcm = { workspace = true } @@ -49,7 +49,7 @@ cfg-utils = { workspace = true } # Pallets in the export list axelar-gateway-precompile = { workspace = true } -chainbridge = {workspace = true } +chainbridge = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 2c5217ead9..397cd27a90 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -19,34 +19,34 @@ serde = { workspace = true, optional = true } static_assertions = { workspace = true } sp-api = { workspace = true } -sp-runtime = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } +sp-runtime = { workspace = true } sp-session = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } # For benchmarking +frame-executive = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } frame-system-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-executive = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } # For benchmarking -frame-try-runtime = { workspace = true, optional = true } # For try-runtime +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } # For try-runtime +cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true, optional = true } # For benchmarking pallet-transaction-payment-rpc-runtime-api = { workspace = true } -polkadot-runtime-common = { workspace = true } polkadot-parachain = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } @@ -65,12 +65,12 @@ moonbeam-relay-encoder = { workspace = true } cfg-primitives = { workspace = true } cfg-traits = { workspace = true } cfg-types = { workspace = true } -runtime-common = { workspace = true } liquidity-pools-gateway-routers = { workspace = true } +runtime-common = { workspace = true } # Pallet list axelar-gateway-precompile = { workspace = true } -chainbridge = {workspace = true } +chainbridge = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 1b468c5102..3094845c8e 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -10,37 +10,37 @@ documentation.workspace = true [dependencies] codec = { package = "parity-scale-codec", workspace = true } +ethabi = { workspace = true, features = ["std"] } +ethereum = { workspace = true, features = ["std"] } fudge = { workspace = true } fudge-core = { workspace = true } +getrandom = { workspace = true } +hex = { workspace = true } lazy_static = { workspace = true } serde = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } tracing-subscriber = { workspace = true } -getrandom = { workspace = true } -hex = { workspace = true } -ethabi = { workspace = true, features = ["std"] } -ethereum = { workspace = true, features = ["std"] } node-primitives = { workspace = true, features = ["std"] } +sc-block-builder = { workspace = true } sc-client-api = { workspace = true } sc-executor = { workspace = true, features = ["std"] } sc-service = { workspace = true, features = ["rocksdb", "test-helpers"] } -sc-block-builder = { workspace = true } sp-api = { workspace = true, features = ["std"] } -sp-runtime = { workspace = true, features = ["std"] } sp-block-builder = { workspace = true, features = ["std"] } sp-consensus-aura = { workspace = true, features = ["std"] } sp-consensus-babe = { workspace = true, features = ["std"] } +sp-consensus-beefy = { workspace = true, features = ["std"] } +sp-consensus-slots = { workspace = true, features = ["std"] } sp-core = { workspace = true, features = ["std"] } sp-inherents = { workspace = true, features = ["std"] } sp-io = { workspace = true, features = ["std"] } +sp-runtime = { workspace = true, features = ["std"] } sp-std = { workspace = true, features = ["std"] } sp-timestamp = { workspace = true, features = ["std"] } sp-tracing = { workspace = true, features = ["std"] } -sp-consensus-beefy = { workspace = true, features = ["std"] } -sp-consensus-slots = { workspace = true, features = ["std"] } sp-transaction-pool = { workspace = true, features = ["std"] } frame-support = { workspace = true, features = ["std"] } @@ -50,18 +50,18 @@ cumulus-primitives-core = { workspace = true, features = ["std"] } cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } -rococo-runtime = { workspace = true, features = ["std"] } kusama-runtime = { workspace = true, features = ["std"] } +polkadot-core-primitives = { workspace = true, features = ["std"] } +polkadot-parachain = { workspace = true, features = ["std"] } +polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime = { workspace = true, features = ["std"] } polkadot-runtime-common = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } -polkadot-parachain = { workspace = true, features = ["std"] } -polkadot-core-primitives = { workspace = true, features = ["std"] } -polkadot-primitives = { workspace = true, features = ["std"] } +rococo-runtime = { workspace = true, features = ["std"] } -pallet-im-online = { workspace = true, features = ["std"] } pallet-babe = { workspace = true, features = ["std"] } pallet-grandpa = { workspace = true, features = ["std"] } +pallet-im-online = { workspace = true, features = ["std"] } xcm = { workspace = true, features = ["std"] } xcm-executor = { workspace = true, features = ["std"] } @@ -71,19 +71,19 @@ orml-traits = { workspace = true, features = ["std"] } fp-self-contained = { workspace = true, features = ["std"] } # Locals +altair-runtime = { workspace = true, features = ["std"] } +centrifuge-runtime = { workspace = true, features = ["std"] } cfg-primitives = { workspace = true, features = ["std"] } cfg-traits = { workspace = true, features = ["std"] } cfg-types = { workspace = true, features = ["std"] } cfg-utils = { workspace = true, features = ["std"] } -runtime-common = { workspace = true, features = ["std"] } development-runtime = { workspace = true, features = ["std"] } -altair-runtime = { workspace = true, features = ["std"] } -centrifuge-runtime = { workspace = true, features = ["std"] } liquidity-pools-gateway-routers = { workspace = true, features = ["std"] } +runtime-common = { workspace = true, features = ["std"] } # Pallet list axelar-gateway-precompile = { workspace = true, features = ["std"] } -chainbridge = {workspace = true, features = ["std"] } +chainbridge = { workspace = true, features = ["std"] } cumulus-pallet-aura-ext = { workspace = true, features = ["std"] } cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] } cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } @@ -153,7 +153,7 @@ parachain-info = { workspace = true, features = ["std"] } [features] default = [ - "development-runtime/instant-voting" + "development-runtime/instant-voting", ] fast-runtime = ["development-runtime/fast-runtime"] From 969283bf6c522d7d678df1caa6bebe47037a0ac3 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 23 Nov 2023 07:40:10 +0100 Subject: [PATCH 13/15] remove old template --- scripts/runtime-weight-template.hbs | 47 ----------------------------- 1 file changed, 47 deletions(-) delete mode 100644 scripts/runtime-weight-template.hbs diff --git a/scripts/runtime-weight-template.hbs b/scripts/runtime-weight-template.hbs deleted file mode 100644 index b4b436d761..0000000000 --- a/scripts/runtime-weight-template.hbs +++ /dev/null @@ -1,47 +0,0 @@ -//! Autogenerated weights for {{pallet}} -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} -//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` -//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} - -// Executed Command: -{{#each args as |arg|~}} -// {{arg}} -{{/each}} - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; -use {{pallet}}::weights::WeightInfo; - -/// Weights for {{pallet}} using the Substrate node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl WeightInfo for SubstrateWeight { - {{~#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}}) - {{~#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}} as u64)) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64)) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}}as u64))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64)) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64))) - {{~/each}} - } - {{~/each}} -} \ No newline at end of file From 2503670d887a0a4ca77e4861d1155c19f957ebe8 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 23 Nov 2023 08:44:26 +0100 Subject: [PATCH 14/15] remove pallet exporting list --- runtime/common/src/lib.rs | 73 --------------------------------------- 1 file changed, 73 deletions(-) diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 9c6ba2f9a8..766e7fddba 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -30,79 +30,6 @@ use orml_traits::GetByKey; use sp_runtime::traits::Get; use sp_std::marker::PhantomData; -pub mod reexport { - pub mod pallets { - pub use axelar_gateway_precompile; - pub use chainbridge; - pub use cumulus_pallet_aura_ext; - pub use cumulus_pallet_dmp_queue; - pub use cumulus_pallet_parachain_system; - pub use cumulus_pallet_xcm; - pub use cumulus_pallet_xcmp_queue; - pub use orml_asset_registry; - pub use orml_oracle; - pub use orml_tokens; - pub use orml_xcm; - pub use orml_xtokens; - pub use pallet_anchors; - pub use pallet_aura; - pub use pallet_authorship; - pub use pallet_balances; - pub use pallet_base_fee; - pub use pallet_block_rewards; - pub use pallet_bridge; - pub use pallet_claims; - pub use pallet_collator_allowlist; - pub use pallet_collator_selection; - pub use pallet_collective; - pub use pallet_crowdloan_claim; - pub use pallet_crowdloan_reward; - pub use pallet_data_collector; - pub use pallet_democracy; - pub use pallet_elections_phragmen; - pub use pallet_ethereum; - pub use pallet_ethereum_transaction; - pub use pallet_evm; - pub use pallet_evm_chain_id; - pub use pallet_fees; - pub use pallet_foreign_investments; - pub use pallet_identity; - pub use pallet_interest_accrual; - pub use pallet_investments; - pub use pallet_keystore; - pub use pallet_liquidity_pools; - pub use pallet_liquidity_pools_gateway; - pub use pallet_liquidity_rewards; - pub use pallet_loans; - pub use pallet_membership; - pub use pallet_migration_manager; - pub use pallet_multisig; - pub use pallet_nft; - pub use pallet_nft_sales; - pub use pallet_order_book; - pub use pallet_permissions; - pub use pallet_pool_registry; - pub use pallet_pool_system; - pub use pallet_preimage; - pub use pallet_proxy; - pub use pallet_restricted_tokens; - pub use pallet_rewards; - pub use pallet_scheduler; - pub use pallet_session; - pub use pallet_sudo; - pub use pallet_timestamp; - pub use pallet_transaction_payment; - pub use pallet_transfer_allowlist; - pub use pallet_treasury; - pub use pallet_uniques; - pub use pallet_utility; - pub use pallet_vesting; - pub use pallet_xcm; - pub use pallet_xcm_transactor; - pub use parachain_info; - } -} - #[macro_export] macro_rules! production_or_benchmark { ($production:expr, $benchmark:expr) => {{ From bd5f34ac2df583095a15fc927997f5b502538b7a Mon Sep 17 00:00:00 2001 From: lemunozm Date: Thu, 23 Nov 2023 11:45:02 +0100 Subject: [PATCH 15/15] fix doc link --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5149b998e0..ae24600f11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,7 @@ edition = "2021" license = "LGPL-3.0" homepage = "https://centrifuge.io/" repository = "https://github.com/centrifuge/centrifuge-chain" -documentation = "https://github.com/centrifuge/centrifuge-chain" +documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" [workspace.dependencies] hex-literal = { version = "0.3.4" }