Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@ scale-info = { version = "2.10.0", default-features = false, features = ["derive
serde = { version = "1.0.214" }
parity-scale-codec = { version = "3.6.12", default-features = false, features = ["max-encoded-len"] }

cumulus-pallet-xcm = { version = "0.19.1", default-features = false }
cumulus-primitives-core = { version = "0.18.1", default-features = false }
frame-benchmarking = { version = "40.0.0", default-features = false }
frame-support = { version = "40.1.0", default-features = false }
frame-system = { version = "40.1.0", default-features = false }
pallet-balances = { version = "41.1.0", default-features = false }
pallet-elections-phragmen = { version = "41.1.0", default-features = false }
pallet-message-queue = { version = "43.1.0", default-features = false }
pallet-preimage = { version = "40.0.0", default-features = false }
pallet-root-testing = { version = "16.0.0", default-features = false }
pallet-scheduler = { version = "41.0.0", default-features = false }
pallet-timestamp = { version = "39.0.0", default-features = false }
pallet-treasury = { version = "39.0.0", default-features = false }
pallet-xcm = { version = "19.1.0", default-features = false }
polkadot-parachain-primitives = { version = "16.1.0", default-features = false }
polkadot-runtime-common = { version = "19.1.0", default-features = false }
polkadot-runtime-parachains = { version = "19.1.0", default-features = false }
sp-api = { version = "36.0.1", default-features = false }
sp-application-crypto = { version = "40.1.0", default-features = false }
sp-arithmetic = { version = "26.1.0", default-features = false }
sp-core = { version = "36.1.0", default-features = false }
sp-io = { version = "40.0.0", default-features = false }
sp-runtime = { version = "41.1.0", default-features = false }
sp-runtime-interface = { version = "29.0.1", default-features = false }
sp-staking = { version = "38.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.20.0", default-features = false }
cumulus-primitives-core = { version = "0.19.0", default-features = false }
frame-benchmarking = { version = "41.0.0", default-features = false }
frame-support = { version = "41.0.0", default-features = false }
frame-system = { version = "41.0.0", default-features = false }
pallet-balances = { version = "42.0.0", default-features = false }
pallet-elections-phragmen = { version = "42.0.0", default-features = false }
pallet-message-queue = { version = "44.0.0", default-features = false }
pallet-preimage = { version = "41.0.0", default-features = false }
pallet-root-testing = { version = "17.0.0", default-features = false }
pallet-scheduler = { version = "42.0.0", default-features = false }
pallet-timestamp = { version = "40.0.0", default-features = false }
pallet-treasury = { version = "40.0.0", default-features = false }
pallet-xcm = { version = "20.1.0", default-features = false }
polkadot-parachain-primitives = { version = "17.0.0", default-features = false }
polkadot-runtime-common = { version = "20.0.0", default-features = false }
polkadot-runtime-parachains = { version = "20.0.1", default-features = false }
sp-api = { version = "37.0.0", default-features = false }
sp-application-crypto = { version = "41.0.0", default-features = false }
sp-arithmetic = { version = "27.0.0", default-features = false }
sp-core = { version = "37.0.0", default-features = false }
sp-io = { version = "41.0.1", default-features = false }
sp-runtime = { version = "42.0.0", default-features = false }
sp-runtime-interface = { version = "30.0.0", default-features = false }
sp-staking = { version = "39.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-storage = { version = "22.0.0", default-features = false }
xcm = { version = "16.1.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "20.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "19.1.0", package = "staging-xcm-executor", default-features = false }
xcm = { version = "17.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "21.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "20.0.0", package = "staging-xcm-executor", default-features = false }

xcm-simulator = { version = "20.0.0" }
xcm-simulator = { version = "21.0.0" }
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check: githooks
./scripts/run.sh check --no-default-features --target=wasm32v1-none
RUSTFLAGS="${RUSTFLAGS:-} --cfg substrate_runtime" ./scripts/run.sh check --no-default-features --target=wasm32v1-none

check-tests: githooks
./scripts/run.sh check --tests
Expand Down
2 changes: 0 additions & 2 deletions asset-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Additional non-standard metadata to store for each asset
type CustomMetadata: Parameter + Member + TypeInfo + MaxEncodedLen;

Expand Down
5 changes: 0 additions & 5 deletions asset-registry/src/mock/para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ parameter_type_with_key! {
}

impl orml_tokens::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type Amount = Amount;
type CurrencyId = CurrencyId;
Expand Down Expand Up @@ -124,7 +123,6 @@ parameter_types! {
}

impl orml_asset_registry::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = ParaAssetId;
type AuthorityOrigin = AssetAuthority;
Expand Down Expand Up @@ -319,7 +317,6 @@ parameter_type_with_key! {
}

impl orml_xtokens::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type CurrencyId = CurrencyId;
type CurrencyIdConvert = CurrencyIdConvert;
Expand All @@ -338,12 +335,10 @@ impl orml_xtokens::Config for Runtime {
}

impl orml_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SovereignOrigin = EnsureRoot<AccountId>;
}

impl orml_xcm_mock_message_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor<XcmConfig>;
}

Expand Down
2 changes: 0 additions & 2 deletions auction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The balance type for bidding.
type Balance: Parameter
+ Member
Expand Down
1 change: 0 additions & 1 deletion auction/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ impl AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> for Handler {
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AuctionId = AuctionId;
type Handler = Handler;
Expand Down
3 changes: 0 additions & 3 deletions authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The outer origin type.
type RuntimeOrigin: From<DelayedOrigin<BlockNumberFor<Self>, <Self as Config>::PalletsOrigin>>
+ IsType<<Self as frame_system::Config>::RuntimeOrigin>
Expand Down
1 change: 0 additions & 1 deletion authority/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ impl AsOriginId<RuntimeOrigin, OriginCaller> for MockAsOriginId {
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type PalletsOrigin = OriginCaller;
type Scheduler = Scheduler;
Expand Down
6 changes: 3 additions & 3 deletions benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
mod tests;

pub use frame_benchmarking::{
benchmarking, whitelisted_caller, BenchmarkBatch, BenchmarkConfig, BenchmarkError, BenchmarkList,
benchmarking, current_time, whitelisted_caller, BenchmarkBatch, BenchmarkConfig, BenchmarkError, BenchmarkList,
BenchmarkMetadata, BenchmarkParameter, BenchmarkRecording, BenchmarkResult, Benchmarking, BenchmarkingSetup,
Recording,
};
Expand Down Expand Up @@ -836,9 +836,9 @@ macro_rules! impl_benchmark {
);

// Time the storage root recalculation.
let start_storage_root = $crate::benchmarking::current_time();
let start_storage_root = $crate::current_time();
$crate::storage_root($crate::StateVersion::V0);
let finish_storage_root = $crate::benchmarking::current_time();
let finish_storage_root = $crate::current_time();
let elapsed_storage_root = finish_storage_root - start_storage_root;

let skip_meta = [ $( stringify!($name_skip_meta).as_ref() ),* ];
Expand Down
1 change: 0 additions & 1 deletion currencies/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ where
}

impl orml_tokens::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type Amount = i64;
type CurrencyId = CurrencyId;
Expand Down
2 changes: 0 additions & 2 deletions gradually-update/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The frequency of updating values between blocks
#[pallet::constant]
type UpdateFrequency: Get<BlockNumberFor<Self>>;
Expand Down
1 change: 0 additions & 1 deletion gradually-update/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impl frame_system::Config for Runtime {
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type UpdateFrequency = ConstU64<10>;
type DispatchOrigin = frame_system::EnsureRoot<AccountId>;
type WeightInfo = ();
Expand Down
2 changes: 0 additions & 2 deletions oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ pub mod module {

#[pallet::config]
pub trait Config<I: 'static = ()>: frame_system::Config {
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Hook on new data received
type OnNewData: OnNewData<Self::AccountId, Self::OracleKey, Self::OracleValue>;

Expand Down
1 change: 0 additions & 1 deletion oracle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ impl SortedMembers<AccountId> for Members {
}

impl Config for Test {
type RuntimeEvent = RuntimeEvent;
type OnNewData = ();
type CombineData = DefaultCombineData<Self, ConstU32<3>, ConstU32<600>>;
type Time = Timestamp;
Expand Down
2 changes: 0 additions & 2 deletions parameters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The key value type for parameters. Usually created by
/// orml_traits::parameters::define_aggregrated_parameters
type AggregratedKeyValue: AggregratedKeyValue;
Expand Down
1 change: 0 additions & 1 deletion parameters/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ impl EnsureOriginWithArg<RuntimeOrigin, RuntimeParametersKey> for EnsureOriginIm
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AggregratedKeyValue = RuntimeParameters;
type AdminOrigin = EnsureOriginImpl;
type WeightInfo = ();
Expand Down
3 changes: 0 additions & 3 deletions payments/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ pub mod pallet {

#[pallet::config]
pub trait Config: frame_system::Config {
/// Because this pallet emits events, it depends on the runtime's
/// definition of an event.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
/// the type of assets this pallet can hold in payment
type Asset: MultiReservableCurrency<Self::AccountId>;
/// Dispute resolution account
Expand Down
2 changes: 0 additions & 2 deletions payments/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ impl orml_tokens::Config for Test {
type Amount = i64;
type Balance = Balance;
type CurrencyId = u32;
type RuntimeEvent = RuntimeEvent;
type ExistentialDeposits = ExistentialDeposits;
type CurrencyHooks = ();
type WeightInfo = ();
Expand Down Expand Up @@ -107,7 +106,6 @@ parameter_types! {
}

impl payment::Config for Test {
type RuntimeEvent = RuntimeEvent;
type Asset = Tokens;
type DisputeResolver = MockDisputeResolver;
type IncentivePercentage = IncentivePercentage;
Expand Down
2 changes: 0 additions & 2 deletions rate-limit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Origin represented Governance.
type GovernanceOrigin: EnsureOrigin<Self::RuntimeOrigin>;

Expand Down
1 change: 0 additions & 1 deletion rate-limit/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ impl pallet_timestamp::Config for Runtime {
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type GovernanceOrigin = EnsureRoot<AccountId>;
type RateLimiterId = RateLimiterId;
type MaxWhitelistFilterCount = ConstU32<3>;
Expand Down
2 changes: 0 additions & 2 deletions tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The balance type
type Balance: frame_support::traits::tokens::Balance;

Expand Down
1 change: 0 additions & 1 deletion tokens/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ where
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type Amount = i64;
type CurrencyId = CurrencyId;
Expand Down
4 changes: 1 addition & 3 deletions unknown-tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ pub mod module {
use super::*;

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
}
pub trait Config: frame_system::Config {}

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
Expand Down
4 changes: 1 addition & 3 deletions unknown-tokens/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ impl frame_system::Config for Runtime {
type Block = Block;
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
}
impl Config for Runtime {}

type Block = frame_system::mocking::MockBlock<Runtime>;

Expand Down
2 changes: 0 additions & 2 deletions vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>>;

#[pallet::constant]
Expand Down
1 change: 0 additions & 1 deletion vesting/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ impl BlockNumberProvider for MockBlockNumberProvider {
}

impl Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = PalletBalances;
type MinVestedTransfer = ConstU64<5>;
type VestedTransferOrigin = EnsureAliceOrBob;
Expand Down
8 changes: 5 additions & 3 deletions xcm-mock-message-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::RuntimeCall>;
}

Expand Down Expand Up @@ -96,11 +95,14 @@ pub mod module {
max_weight,
Weight::zero(),
) {
Outcome::Error { error } => (Err(error), Event::Fail(Some(hash), error)),
Outcome::Error(InstructionError { error, .. }) => (Err(error), Event::Fail(Some(hash), error)),
Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))),
// As far as the caller is concerned, this was dispatched without error, so
// we just report the weight used.
Outcome::Incomplete { used, error } => (Ok(used), Event::Fail(Some(hash), error)),
Outcome::Incomplete {
used,
error: InstructionError { error, .. },
} => (Ok(used), Event::Fail(Some(hash), error)),
}
}
Err(()) => (Err(XcmError::UnhandledXcmVersion), Event::BadVersion(Some(hash))),
Expand Down
2 changes: 0 additions & 2 deletions xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config + pallet_xcm::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The required origin for sending XCM as parachain sovereign.
///
/// Typically root or the majority of collective.
Expand Down
Loading