diff --git a/Cargo.lock b/Cargo.lock index f31f9a6ee9..0d708521b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5254,7 +5254,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/bifrost-finance/open-runtime-module-library?rev=3229e4d662b12e9a3f98a56c75a6d74e73bc204c#3229e4d662b12e9a3f98a56c75a6d74e73bc204c" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?rev=650ef607d023e4537d3f2932baa5e50bc3a349cb#650ef607d023e4537d3f2932baa5e50bc3a349cb" dependencies = [ "frame-support", "frame-system", @@ -5270,7 +5270,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/bifrost-finance/open-runtime-module-library?rev=3229e4d662b12e9a3f98a56c75a6d74e73bc204c#3229e4d662b12e9a3f98a56c75a6d74e73bc204c" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?rev=650ef607d023e4537d3f2932baa5e50bc3a349cb#650ef607d023e4537d3f2932baa5e50bc3a349cb" dependencies = [ "frame-support", "frame-system", @@ -5285,7 +5285,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/bifrost-finance/open-runtime-module-library?rev=3229e4d662b12e9a3f98a56c75a6d74e73bc204c#3229e4d662b12e9a3f98a56c75a6d74e73bc204c" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?rev=650ef607d023e4537d3f2932baa5e50bc3a349cb#650ef607d023e4537d3f2932baa5e50bc3a349cb" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5302,7 +5302,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/bifrost-finance/open-runtime-module-library?rev=3229e4d662b12e9a3f98a56c75a6d74e73bc204c#3229e4d662b12e9a3f98a56c75a6d74e73bc204c" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?rev=650ef607d023e4537d3f2932baa5e50bc3a349cb#650ef607d023e4537d3f2932baa5e50bc3a349cb" dependencies = [ "frame-support", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index 16d45c2a6e..69ac5ada6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -192,6 +192,6 @@ zenlink-protocol = { git = "ssh://git@github.com/bifrost-finance/Zenlink-DEX-Mod zenlink-protocol-rpc = { git = "ssh://git@github.com/bifrost-finance/Zenlink-DEX-Module", branch = "polkadot-v0.9.8" } zenlink-protocol-runtime-api = { git = "ssh://git@github.com/bifrost-finance/Zenlink-DEX-Module", branch = "polkadot-v0.9.8" } -orml-traits = { git = "https://github.com/bifrost-finance/open-runtime-module-library", rev = "3229e4d662b12e9a3f98a56c75a6d74e73bc204c" } -orml-currencies = {git = "https://github.com/bifrost-finance/open-runtime-module-library", rev = "3229e4d662b12e9a3f98a56c75a6d74e73bc204c" } -orml-tokens = { git = "https://github.com/bifrost-finance/open-runtime-module-library", rev = "3229e4d662b12e9a3f98a56c75a6d74e73bc204c" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "650ef607d023e4537d3f2932baa5e50bc3a349cb" } +orml-currencies = {git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "650ef607d023e4537d3f2932baa5e50bc3a349cb" } +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "650ef607d023e4537d3f2932baa5e50bc3a349cb" } diff --git a/node/service/src/chain_spec/bifrost.rs b/node/service/src/chain_spec/bifrost.rs index 2e8612f9f8..9ce7c71131 100644 --- a/node/service/src/chain_spec/bifrost.rs +++ b/node/service/src/chain_spec/bifrost.rs @@ -57,7 +57,7 @@ pub fn bifrost_genesis( }, balances: BalancesConfig { balances }, indices: IndicesConfig { indices: vec![] }, - treasury: Default::default(), + // treasury: Default::default(), sudo: SudoConfig { key: root_key.clone() }, parachain_info: ParachainInfoConfig { parachain_id: id }, collator_selection: CollatorSelectionConfig { diff --git a/pallets/bancor/src/mock.rs b/pallets/bancor/src/mock.rs index 6f1c175456..c82ade5af5 100644 --- a/pallets/bancor/src/mock.rs +++ b/pallets/bancor/src/mock.rs @@ -105,6 +105,7 @@ impl orml_tokens::Config for Test { type Amount = i128; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; diff --git a/pallets/bid/src/mock.rs b/pallets/bid/src/mock.rs index 2aaa20fa37..8a8e287f44 100644 --- a/pallets/bid/src/mock.rs +++ b/pallets/bid/src/mock.rs @@ -48,7 +48,7 @@ construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event}, Currencies: orml_currencies::{Pallet, Call, Storage, Event}, Assets: orml_tokens::{Pallet, Storage, Event}, - Balances: balances::{Pallet, Call, Storage, Event}, + Balances: balances::{Pallet, Call, Storage, Event}, Bid: pallet_bid::{Pallet, Call, Storage, Event}, } ); @@ -124,6 +124,7 @@ impl orml_tokens::Config for Test { type Amount = i128; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = (); diff --git a/pallets/flexible-fee/src/mock.rs b/pallets/flexible-fee/src/mock.rs index bef0c5a2ce..91b7a00667 100644 --- a/pallets/flexible-fee/src/mock.rs +++ b/pallets/flexible-fee/src/mock.rs @@ -161,6 +161,7 @@ impl orml_tokens::Config for Test { type Amount = i128; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; diff --git a/pallets/minter-reward/src/mock.rs b/pallets/minter-reward/src/mock.rs index 74b84fbd30..5350b6cdb0 100644 --- a/pallets/minter-reward/src/mock.rs +++ b/pallets/minter-reward/src/mock.rs @@ -143,6 +143,7 @@ impl orml_tokens::Config for Runtime { type Amount = i128; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = (); diff --git a/pallets/salp/src/mock.rs b/pallets/salp/src/mock.rs index bf96e24baf..b0cd356230 100644 --- a/pallets/salp/src/mock.rs +++ b/pallets/salp/src/mock.rs @@ -128,6 +128,7 @@ impl orml_tokens::Config for Test { type Amount = Amount; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; diff --git a/pallets/vsbond-auction/src/mock.rs b/pallets/vsbond-auction/src/mock.rs index e0c3f4c460..4d7546bbbc 100644 --- a/pallets/vsbond-auction/src/mock.rs +++ b/pallets/vsbond-auction/src/mock.rs @@ -91,6 +91,7 @@ impl orml_tokens::Config for Test { type Amount = Amount; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; diff --git a/pallets/vtoken-mint/src/mock.rs b/pallets/vtoken-mint/src/mock.rs index 35a153715c..128a362309 100644 --- a/pallets/vtoken-mint/src/mock.rs +++ b/pallets/vtoken-mint/src/mock.rs @@ -145,6 +145,7 @@ impl orml_tokens::Config for Runtime { type Amount = i128; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = (); diff --git a/runtime/asgard/src/lib.rs b/runtime/asgard/src/lib.rs index 020971e68f..3dde2028a1 100644 --- a/runtime/asgard/src/lib.rs +++ b/runtime/asgard/src/lib.rs @@ -899,6 +899,7 @@ impl orml_tokens::Config for Runtime { type Amount = Amount; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; diff --git a/runtime/bifrost/src/lib.rs b/runtime/bifrost/src/lib.rs index 2f1a0b634d..939ea2d6ef 100644 --- a/runtime/bifrost/src/lib.rs +++ b/runtime/bifrost/src/lib.rs @@ -40,7 +40,6 @@ use frame_system::limits::{BlockLength, BlockWeights}; pub use pallet_balances::Call as BalancesCall; pub use pallet_timestamp::Call as TimestampCall; use sp_api::impl_runtime_apis; -use sp_arithmetic::Percent; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -147,16 +146,10 @@ pub struct CallFilter; impl Filter for CallFilter { fn filter(c: &Call) -> bool { match *c { - Call::Balances(pallet_balances::Call::::transfer(..)) => false, - Call::Balances(pallet_balances::Call::::transfer_keep_alive(..)) => false, - Call::Vesting(pallet_vesting::Call::::vest(..)) => false, - Call::Vesting(pallet_vesting::Call::::vest_other(..)) => false, - Call::Vesting(pallet_vesting::Call::::vested_transfer(..)) => false, - Call::Tokens(orml_tokens::Call::::transfer(..)) => false, - Call::Tokens(orml_tokens::Call::::transfer_all(..)) => false, - Call::Currencies(orml_currencies::Call::::transfer(..)) => false, - Call::Currencies(orml_currencies::Call::::transfer_native_currency(..)) => - false, + Call::Balances(_) => false, + Call::Vesting(_) => false, + Call::Tokens(_) => false, + Call::Currencies(_) => false, _ => true, } } @@ -542,6 +535,7 @@ impl orml_tokens::Config for Runtime { type Amount = Amount; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks; @@ -549,54 +543,56 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 50 * DOLLARS; - pub const SpendPeriod: BlockNumber = 6 * DAYS; - pub const Burn: Permill = Permill::from_perthousand(2); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(20); - pub const TipReportDepositBase: Balance = 1 * DOLLARS; - pub const DataDepositPerByte: Balance = 10 * CENTS; - pub const BountyDepositBase: Balance = 1 * DOLLARS; - pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const MaximumReasonLength: u32 = 16384; - pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); - pub const BountyValueMinimum: Balance = 10 * DOLLARS; - pub const MaxApprovals: u32 = 100; -} - -impl pallet_treasury::Config for Runtime { - type ApproveOrigin = EnsureRoot; - type Burn = Burn; - type BurnDestination = Treasury; - type Currency = Balances; - type Event = Event; - type MaxApprovals = MaxApprovals; - type OnSlash = Treasury; - type PalletId = TreasuryPalletId; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type RejectOrigin = EnsureRoot; - type SpendFunds = Bounties; - type SpendPeriod = SpendPeriod; - type WeightInfo = weights::pallet_treasury::WeightInfo; -} - -impl pallet_bounties::Config for Runtime { - type BountyCuratorDeposit = BountyCuratorDeposit; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type BountyValueMinimum = BountyValueMinimum; - type DataDepositPerByte = DataDepositPerByte; - type Event = Event; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_bounties::WeightInfo; -} +// orml runtime end + +// parameter_types! { +// pub const ProposalBond: Permill = Permill::from_percent(5); +// pub const ProposalBondMinimum: Balance = 50 * DOLLARS; +// pub const SpendPeriod: BlockNumber = 6 * DAYS; +// pub const Burn: Permill = Permill::from_perthousand(2); +// pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); +// +// pub const TipCountdown: BlockNumber = 1 * DAYS; +// pub const TipFindersFee: Percent = Percent::from_percent(20); +// pub const TipReportDepositBase: Balance = 1 * DOLLARS; +// pub const DataDepositPerByte: Balance = 10 * CENTS; +// pub const BountyDepositBase: Balance = 1 * DOLLARS; +// pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; +// pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; +// pub const MaximumReasonLength: u32 = 16384; +// pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); +// pub const BountyValueMinimum: Balance = 10 * DOLLARS; +// pub const MaxApprovals: u32 = 100; +// } +// +// impl pallet_treasury::Config for Runtime { +// type ApproveOrigin = EnsureRoot; +// type Burn = Burn; +// type BurnDestination = Treasury; +// type Currency = Balances; +// type Event = Event; +// type MaxApprovals = MaxApprovals; +// type OnSlash = Treasury; +// type PalletId = TreasuryPalletId; +// type ProposalBond = ProposalBond; +// type ProposalBondMinimum = ProposalBondMinimum; +// type RejectOrigin = EnsureRoot; +// type SpendFunds = Bounties; +// type SpendPeriod = SpendPeriod; +// type WeightInfo = weights::pallet_treasury::WeightInfo; +// } +// +// impl pallet_bounties::Config for Runtime { +// type BountyCuratorDeposit = BountyCuratorDeposit; +// type BountyDepositBase = BountyDepositBase; +// type BountyDepositPayoutDelay = BountyDepositPayoutDelay; +// type BountyUpdatePeriod = BountyUpdatePeriod; +// type BountyValueMinimum = BountyValueMinimum; +// type DataDepositPerByte = DataDepositPerByte; +// type Event = Event; +// type MaximumReasonLength = MaximumReasonLength; +// type WeightInfo = weights::pallet_bounties::WeightInfo; +// } construct_runtime! { pub enum Runtime where @@ -628,8 +624,8 @@ construct_runtime! { // Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 30, // Council: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 31, // TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 32, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 36, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 37, + // Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 36, + // Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 37, // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 40, diff --git a/runtime/dev/src/lib.rs b/runtime/dev/src/lib.rs index 41d7401d15..889cd3a7b4 100644 --- a/runtime/dev/src/lib.rs +++ b/runtime/dev/src/lib.rs @@ -869,6 +869,7 @@ impl orml_tokens::Config for Runtime { type Amount = Amount; type Balance = Balance; type CurrencyId = CurrencyId; + type DustRemovalWhitelist = (); type Event = Event; type ExistentialDeposits = ExistentialDeposits; type MaxLocks = MaxLocks;