Skip to content
130 changes: 65 additions & 65 deletions Cargo.dev.toml

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }

# substrate
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }

# polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.24" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.24" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.24" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.24" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.25" }

# orml
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }

[dev-dependencies]
# substrate
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }

# cumulus
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }

# polkadot
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25" }

# orml
orml-tokens = { path = "../tokens" }
Expand Down
4 changes: 1 addition & 3 deletions asset-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![allow(clippy::large_enum_variant)]
#![allow(clippy::too_many_arguments)]

use frame_support::{pallet_prelude::*, traits::EnsureOriginWithArg, transactional};
use frame_support::{pallet_prelude::*, traits::EnsureOriginWithArg};
use frame_system::pallet_prelude::*;
pub use orml_traits::asset_registry::AssetMetadata;
use orml_traits::asset_registry::AssetProcessor;
Expand Down Expand Up @@ -131,7 +131,6 @@ pub mod module {
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(T::WeightInfo::register_asset())]
#[transactional]
pub fn register_asset(
origin: OriginFor<T>,
metadata: AssetMetadata<T::Balance, T::CustomMetadata>,
Expand All @@ -143,7 +142,6 @@ pub mod module {
}

#[pallet::weight(T::WeightInfo::update_asset())]
#[transactional]
pub fn update_asset(
origin: OriginFor<T>,
asset_id: T::AssetId,
Expand Down
10 changes: 7 additions & 3 deletions asset-registry/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use super::*;
use crate as orml_asset_registry;
use crate::tests::para::{AdminAssetTwo, AssetRegistry, CustomMetadata, Origin, Tokens, TreasuryAccount};
use frame_support::{assert_noop, assert_ok};
use mock::*;
use mock::{para::Call, *};
use orml_traits::MultiCurrency;
use polkadot_parachain::primitives::Sibling;

use sp_runtime::{
traits::{AccountIdConversion, BadOrigin},
traits::{AccountIdConversion, BadOrigin, Dispatchable},
AccountId32,
};
use xcm_simulator::TestExt;
Expand Down Expand Up @@ -346,8 +346,12 @@ fn test_register_duplicate_location_returns_error() {
let metadata = dummy_metadata();

assert_ok!(AssetRegistry::register_asset(Origin::root(), metadata.clone(), None));
let register_asset = Call::AssetRegistry(crate::Call::<para::Runtime>::register_asset {
metadata: metadata.clone(),
asset_id: None,
});
assert_noop!(
AssetRegistry::register_asset(Origin::root(), metadata.clone(), None),
register_asset.dispatch(Origin::root()),
Error::<para::Runtime>::ConflictingLocation
);
});
Expand Down
12 changes: 6 additions & 6 deletions auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
serde = { version = "1.0.136", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }

sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }

orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }

[features]
default = ["std"]
Expand Down
16 changes: 8 additions & 8 deletions authority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
serde = { version = "1.0.136", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }

sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }

[dev-dependencies]
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }

[features]
default = ["std"]
Expand Down
4 changes: 2 additions & 2 deletions authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use frame_support::{
pallet_prelude::*,
traits::{
schedule::{DispatchTime, Named as ScheduleNamed, Priority},
EnsureOneOf, EnsureOrigin, Get, IsType, OriginTrait,
EitherOfDiverse, EnsureOrigin, Get, IsType, OriginTrait,
},
weights::{DispatchClass, GetDispatchInfo, Pays},
};
Expand Down Expand Up @@ -394,7 +394,7 @@ pub mod module {
#[pallet::weight(T::WeightInfo::remove_authorized_call())]
pub fn remove_authorized_call(origin: OriginFor<T>, hash: T::Hash) -> DispatchResult {
let root_or_sigend =
EnsureOneOf::<EnsureRoot<T::AccountId>, EnsureSigned<T::AccountId>>::ensure_origin(origin)?;
EitherOfDiverse::<EnsureRoot<T::AccountId>, EnsureSigned<T::AccountId>>::ensure_origin(origin)?;

SavedCalls::<T>::try_mutate_exists(hash, |maybe_call| {
let (_, maybe_caller) = maybe_call.take().ok_or(Error::<T>::CallNotAuthorized)?;
Expand Down
24 changes: 12 additions & 12 deletions bencher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true }
bencher-procedural = { path = "bencher-procedural", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }

sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.24" }
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.24" }
sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.24" }
sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["with-kvdb-rocksdb"], optional = true , branch = "polkadot-v0.9.24" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.24" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.24" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.25" }
sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.25" }
sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.25" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.25" }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions bencher/bencher-procedural/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ edition = "2021"
proc-macro = true

[dependencies]
proc-macro2 = "1.0.6"
quote = "1.0.3"
syn = { version = "1.0.58", features = ["full"] }
proc-macro2 = "1.0.40"
quote = "1.0.18"
syn = { version = "1.0.98", features = ["full"] }

[features]
default = ["std"]
Expand Down
25 changes: 18 additions & 7 deletions bencher/src/bench_ext.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::any::{Any, TypeId};
use hash_db::Hasher;
use sp_externalities::{Extension, ExtensionStore, Externalities};
use sp_externalities::{Extension, ExtensionStore, Externalities, MultiRemovalResults};
use sp_state_machine::{Backend, Ext};
use sp_std::sync::Arc;
use sp_storage::{ChildInfo, StateVersion, TrackedStorageKey};
Expand Down Expand Up @@ -66,19 +66,30 @@ where
self.ext.next_child_storage_key(child_info, key)
}

fn kill_child_storage(&mut self, child_info: &ChildInfo, limit: Option<u32>) -> (bool, u32) {
fn kill_child_storage(
&mut self,
child_info: &ChildInfo,
limit: Option<u32>,
maybe_cursor: Option<&[u8]>,
) -> MultiRemovalResults {
self.tracker.on_kill_child_storage(child_info, limit);
self.ext.kill_child_storage(child_info, limit)
self.ext.kill_child_storage(child_info, limit, maybe_cursor)
}

fn clear_prefix(&mut self, prefix: &[u8], limit: Option<u32>) -> (bool, u32) {
fn clear_prefix(&mut self, prefix: &[u8], limit: Option<u32>, maybe_cursor: Option<&[u8]>) -> MultiRemovalResults {
self.tracker.on_clear_prefix(prefix, limit);
self.ext.clear_prefix(prefix, limit)
self.ext.clear_prefix(prefix, limit, maybe_cursor)
}

fn clear_child_prefix(&mut self, child_info: &ChildInfo, prefix: &[u8], limit: Option<u32>) -> (bool, u32) {
fn clear_child_prefix(
&mut self,
child_info: &ChildInfo,
prefix: &[u8],
limit: Option<u32>,
maybe_cursor: Option<&[u8]>,
) -> MultiRemovalResults {
self.tracker.on_clear_child_prefix(child_info, prefix, limit);
self.ext.clear_child_prefix(child_info, prefix, limit)
self.ext.clear_child_prefix(child_info, prefix, limit, maybe_cursor)
}

fn place_storage(&mut self, key: Vec<u8>, value: Option<Vec<u8>>) {
Expand Down
12 changes: 6 additions & 6 deletions bencher/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ required-features = ["bench"]
serde = { version = "1.0.136", optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.25" }
orml-bencher = { path = "..", default-features = false }
orml-weight-meter = { path = "../../weight-meter", default-features = false }

[dev-dependencies]
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25" }

[features]
default = ["std"]
Expand Down
2 changes: 0 additions & 2 deletions bencher/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub mod pallet {
use frame_support::{
dispatch::{DispatchResult, DispatchResultWithPostInfo},
pallet_prelude::*,
transactional,
};
use frame_system::pallet_prelude::*;

Expand Down Expand Up @@ -59,7 +58,6 @@ pub mod pallet {
}

impl<T: Config> Pallet<T> {
#[transactional]
#[orml_weight_meter::weight(ModuleWeights::<T>::set_foo())]
pub(crate) fn set_foo() -> frame_support::dispatch::DispatchResult {
Value::<T>::put(2);
Expand Down
Loading