diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs index 91a1bf6ed5fc8..afa79b8298974 100644 --- a/bin/node-template/pallets/template/src/mock.rs +++ b/bin/node-template/pallets/template/src/mock.rs @@ -21,6 +21,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/alliance/src/mock.rs b/frame/alliance/src/mock.rs index e708d29d529fe..772858153cb04 100644 --- a/frame/alliance/src/mock.rs +++ b/frame/alliance/src/mock.rs @@ -246,6 +246,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub fn new_test_ext() -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); diff --git a/frame/assets/src/mock.rs b/frame/assets/src/mock.rs index 93a87ee6714c6..82af1585837fb 100644 --- a/frame/assets/src/mock.rs +++ b/frame/assets/src/mock.rs @@ -47,6 +47,12 @@ construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + type AccountId = u64; type AssetId = u32; diff --git a/frame/atomic-swap/src/tests.rs b/frame/atomic-swap/src/tests.rs index 081a449ec9a2e..67513e2a973c1 100644 --- a/frame/atomic-swap/src/tests.rs +++ b/frame/atomic-swap/src/tests.rs @@ -25,6 +25,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/aura/src/mock.rs b/frame/aura/src/mock.rs index 7a07fe99ae25d..d67842483d512 100644 --- a/frame/aura/src/mock.rs +++ b/frame/aura/src/mock.rs @@ -46,6 +46,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/authorship/src/lib.rs b/frame/authorship/src/lib.rs index b5568a6acf77c..4b629233676a1 100644 --- a/frame/authorship/src/lib.rs +++ b/frame/authorship/src/lib.rs @@ -123,6 +123,12 @@ mod tests { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/babe/src/mock.rs b/frame/babe/src/mock.rs index b09dc29f6d60a..b358625225283 100644 --- a/frame/babe/src/mock.rs +++ b/frame/babe/src/mock.rs @@ -64,6 +64,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/balances/src/tests_composite.rs b/frame/balances/src/tests_composite.rs index f8a8fdd1851d4..a7a976327e9e7 100644 --- a/frame/balances/src/tests_composite.rs +++ b/frame/balances/src/tests_composite.rs @@ -45,6 +45,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max( diff --git a/frame/balances/src/tests_local.rs b/frame/balances/src/tests_local.rs index 152a5da37410f..8f9d9e2ab2dd4 100644 --- a/frame/balances/src/tests_local.rs +++ b/frame/balances/src/tests_local.rs @@ -46,6 +46,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max( diff --git a/frame/balances/src/tests_reentrancy.rs b/frame/balances/src/tests_reentrancy.rs index 90363140000e8..3192ee3162423 100644 --- a/frame/balances/src/tests_reentrancy.rs +++ b/frame/balances/src/tests_reentrancy.rs @@ -49,6 +49,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max( diff --git a/frame/benchmarking/pov/src/tests.rs b/frame/benchmarking/pov/src/tests.rs index 1100fdc46f813..1a8346ec5e0b4 100644 --- a/frame/benchmarking/pov/src/tests.rs +++ b/frame/benchmarking/pov/src/tests.rs @@ -178,6 +178,11 @@ mod mock { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/bounties/src/tests.rs b/frame/bounties/src/tests.rs index bc59e3a70fd82..254697cc9b54f 100644 --- a/frame/bounties/src/tests.rs +++ b/frame/bounties/src/tests.rs @@ -57,6 +57,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/frame/child-bounties/src/tests.rs b/frame/child-bounties/src/tests.rs index f3415c69df611..b599248a2e4da 100644 --- a/frame/child-bounties/src/tests.rs +++ b/frame/child-bounties/src/tests.rs @@ -58,6 +58,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); pub const MaximumBlockLength: u32 = 2 * 1024; diff --git a/frame/collective/src/tests.rs b/frame/collective/src/tests.rs index 5c90de9f91bf7..77bb9fe5c4b85 100644 --- a/frame/collective/src/tests.rs +++ b/frame/collective/src/tests.rs @@ -49,6 +49,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + mod mock_democracy { pub use pallet::*; #[frame_support::pallet] diff --git a/frame/conviction-voting/src/tests.rs b/frame/conviction-voting/src/tests.rs index 9caa451e0dae8..8013a0810329d 100644 --- a/frame/conviction-voting/src/tests.rs +++ b/frame/conviction-voting/src/tests.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + // Test that a fitlered call can be dispatched. pub struct BaseFilter; impl Contains for BaseFilter { diff --git a/frame/democracy/src/tests.rs b/frame/democracy/src/tests.rs index 41b279035028e..43608de514f0a 100644 --- a/frame/democracy/src/tests.rs +++ b/frame/democracy/src/tests.rs @@ -67,7 +67,13 @@ frame_support::construct_runtime!( } ); -// Test that a fitlered call can be dispatched. +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + +// Test that a filtered call can be dispatched. pub struct BaseFilter; impl Contains for BaseFilter { fn contains(call: &RuntimeCall) -> bool { diff --git a/frame/election-provider-multi-phase/src/mock.rs b/frame/election-provider-multi-phase/src/mock.rs index 347a4f19185f9..65879d20a6388 100644 --- a/frame/election-provider-multi-phase/src/mock.rs +++ b/frame/election-provider-multi-phase/src/mock.rs @@ -65,6 +65,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub(crate) type Balance = u64; pub(crate) type AccountId = u64; pub(crate) type BlockNumber = u64; diff --git a/frame/election-provider-support/src/onchain.rs b/frame/election-provider-support/src/onchain.rs index 483c402fe249c..4de133c9ad25c 100644 --- a/frame/election-provider-support/src/onchain.rs +++ b/frame/election-provider-support/src/onchain.rs @@ -206,6 +206,12 @@ mod tests { } ); + impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } + } + impl frame_system::Config for Runtime { type SS58Prefix = (); type BaseCallFilter = frame_support::traits::Everything; diff --git a/frame/examples/basic/src/tests.rs b/frame/examples/basic/src/tests.rs index 891c7c78628a1..0e04e2697a57e 100644 --- a/frame/examples/basic/src/tests.rs +++ b/frame/examples/basic/src/tests.rs @@ -50,6 +50,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index b454d1e276cc8..11caf8a8ca9e8 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -850,6 +850,12 @@ mod tests { } ); + impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } + } + parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::builder() diff --git a/frame/grandpa/src/mock.rs b/frame/grandpa/src/mock.rs index 7d54966a498a6..31dad57b4b4ae 100644 --- a/frame/grandpa/src/mock.rs +++ b/frame/grandpa/src/mock.rs @@ -63,6 +63,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl_opaque_keys! { pub struct TestSessionKeys { pub grandpa_authority: super::Pallet, diff --git a/frame/identity/src/tests.rs b/frame/identity/src/tests.rs index baca70e2795fc..790f7811af173 100644 --- a/frame/identity/src/tests.rs +++ b/frame/identity/src/tests.rs @@ -48,6 +48,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/indices/src/mock.rs b/frame/indices/src/mock.rs index 6b5373bb43b5a..4cff4afa20708 100644 --- a/frame/indices/src/mock.rs +++ b/frame/indices/src/mock.rs @@ -39,6 +39,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index 8b39a08ce6699..7cfbcb4333586 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -555,6 +555,12 @@ mod tests { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } + parameter_types! { pub static Members: Vec = vec![]; pub static Prime: Option = None; diff --git a/frame/merkle-mountain-range/src/mock.rs b/frame/merkle-mountain-range/src/mock.rs index 3fd44275857c1..1f57a3113ad25 100644 --- a/frame/merkle-mountain-range/src/mock.rs +++ b/frame/merkle-mountain-range/src/mock.rs @@ -44,6 +44,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; diff --git a/frame/message-queue/src/integration_test.rs b/frame/message-queue/src/integration_test.rs index c9e3b2e870fd8..3720451da027d 100644 --- a/frame/message-queue/src/integration_test.rs +++ b/frame/message-queue/src/integration_test.rs @@ -54,6 +54,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/message-queue/src/mock.rs b/frame/message-queue/src/mock.rs index 37e504ac50033..b0af0a927195a 100644 --- a/frame/message-queue/src/mock.rs +++ b/frame/message-queue/src/mock.rs @@ -47,6 +47,13 @@ frame_support::construct_runtime!( MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, } ); + +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/multisig/src/tests.rs b/frame/multisig/src/tests.rs index 13493587caa2b..f449363f492e3 100644 --- a/frame/multisig/src/tests.rs +++ b/frame/multisig/src/tests.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = TestBaseCallFilter; type BlockWeights = (); diff --git a/frame/nfts/src/mock.rs b/frame/nfts/src/mock.rs index f814b209d5f78..269af89b9598f 100644 --- a/frame/nfts/src/mock.rs +++ b/frame/nfts/src/mock.rs @@ -45,6 +45,12 @@ construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index 3d8307c434107..b7735195b944e 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -275,6 +275,12 @@ mod tests { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/nis/src/mock.rs b/frame/nis/src/mock.rs index 585ed2d8b278f..9c8ea5503a247 100644 --- a/frame/nis/src/mock.rs +++ b/frame/nis/src/mock.rs @@ -49,6 +49,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/node-authorization/src/mock.rs b/frame/node-authorization/src/mock.rs index fcf7ff0189332..a122bc6fcd0bc 100644 --- a/frame/node-authorization/src/mock.rs +++ b/frame/node-authorization/src/mock.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type DbWeight = (); diff --git a/frame/nomination-pools/test-staking/src/mock.rs b/frame/nomination-pools/test-staking/src/mock.rs index c67aec0134b07..0f1f5064b691d 100644 --- a/frame/nomination-pools/test-staking/src/mock.rs +++ b/frame/nomination-pools/test-staking/src/mock.rs @@ -200,6 +200,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub fn new_test_ext() -> sp_io::TestExternalities { sp_tracing::try_init_simple(); let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index 63d2b0de34780..0df275c1618ef 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -80,6 +80,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/preimage/src/mock.rs b/frame/preimage/src/mock.rs index d81f5a9c3232c..b0d1f665bf475 100644 --- a/frame/preimage/src/mock.rs +++ b/frame/preimage/src/mock.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); diff --git a/frame/proxy/src/tests.rs b/frame/proxy/src/tests.rs index 0e7db3512f15b..8a0cffb73576b 100644 --- a/frame/proxy/src/tests.rs +++ b/frame/proxy/src/tests.rs @@ -51,6 +51,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = BaseFilter; type BlockWeights = (); diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index d92b053655dc9..1d10521702c59 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -185,6 +185,12 @@ mod tests { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } + parameter_types! { pub BlockLength: limits::BlockLength = limits::BlockLength ::max(2 * 1024); diff --git a/frame/ranked-collective/src/tests.rs b/frame/ranked-collective/src/tests.rs index c11d4877d3577..3c26d42c8283e 100644 --- a/frame/ranked-collective/src/tests.rs +++ b/frame/ranked-collective/src/tests.rs @@ -48,6 +48,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); diff --git a/frame/recovery/src/mock.rs b/frame/recovery/src/mock.rs index 05ca8e6a30a0e..e814935fd1faf 100644 --- a/frame/recovery/src/mock.rs +++ b/frame/recovery/src/mock.rs @@ -45,6 +45,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/referenda/src/mock.rs b/frame/referenda/src/mock.rs index 82ae508d52b6f..5751537ee4fb5 100644 --- a/frame/referenda/src/mock.rs +++ b/frame/referenda/src/mock.rs @@ -53,6 +53,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + // Test that a fitlered call can be dispatched. pub struct BaseFilter; impl Contains for BaseFilter { diff --git a/frame/remark/src/mock.rs b/frame/remark/src/mock.rs index 22467796cf37b..07e99451ab27c 100644 --- a/frame/remark/src/mock.rs +++ b/frame/remark/src/mock.rs @@ -41,6 +41,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/root-offences/src/mock.rs b/frame/root-offences/src/mock.rs index 273fbf614169d..61f15cbf48f8b 100644 --- a/frame/root-offences/src/mock.rs +++ b/frame/root-offences/src/mock.rs @@ -58,6 +58,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + /// Another session handler struct to test on_disabled. pub struct OtherSessionHandler; impl OneSessionHandler for OtherSessionHandler { diff --git a/frame/scored-pool/src/mock.rs b/frame/scored-pool/src/mock.rs index 951871dd83c5c..17996d92a7333 100644 --- a/frame/scored-pool/src/mock.rs +++ b/frame/scored-pool/src/mock.rs @@ -46,6 +46,12 @@ construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub const CandidateDeposit: u64 = 25; } diff --git a/frame/session/src/mock.rs b/frame/session/src/mock.rs index 1138bd9543989..dd26d2bc71efa 100644 --- a/frame/session/src/mock.rs +++ b/frame/session/src/mock.rs @@ -103,6 +103,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub static Validators: Vec = vec![1, 2, 3]; pub static NextValidators: Vec = vec![1, 2, 3]; diff --git a/frame/society/src/mock.rs b/frame/society/src/mock.rs index 24544bf9e82dd..b4b2a3fe3be0d 100644 --- a/frame/society/src/mock.rs +++ b/frame/society/src/mock.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); } diff --git a/frame/state-trie-migration/src/lib.rs b/frame/state-trie-migration/src/lib.rs index 23f73bb56b173..8457f5afaf947 100644 --- a/frame/state-trie-migration/src/lib.rs +++ b/frame/state-trie-migration/src/lib.rs @@ -1082,6 +1082,12 @@ mod mock { } ); + impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } + } + parameter_types! { pub const SS58Prefix: u8 = 42; } diff --git a/frame/sudo/src/mock.rs b/frame/sudo/src/mock.rs index f8a03836f8f0f..897ffe00a9200 100644 --- a/frame/sudo/src/mock.rs +++ b/frame/sudo/src/mock.rs @@ -106,6 +106,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub struct BlockEverything; impl Contains for BlockEverything { fn contains(_: &RuntimeCall) -> bool { diff --git a/frame/support/test/tests/origin.rs b/frame/support/test/tests/origin.rs index f794cd8be1ce0..31cb35ebcb1b5 100644 --- a/frame/support/test/tests/origin.rs +++ b/frame/support/test/tests/origin.rs @@ -167,6 +167,12 @@ frame_support::construct_runtime!( } ); +impl RuntimeOriginTest { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub type Signature = sr25519::Signature; pub type BlockNumber = u64; pub type Header = generic::Header; diff --git a/frame/support/test/tests/pallet.rs b/frame/support/test/tests/pallet.rs index f050b23514eb1..27b817dba8733 100644 --- a/frame/support/test/tests/pallet.rs +++ b/frame/support/test/tests/pallet.rs @@ -668,6 +668,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + // Test that the part `RuntimeCall` is excluded from Example2 and included in Example4. fn _ensure_call_is_correctly_excluded_and_included(call: RuntimeCall) { match call { diff --git a/frame/support/test/tests/storage_layers.rs b/frame/support/test/tests/storage_layers.rs index cff81c0bea2ed..a1c274a78f08f 100644 --- a/frame/support/test/tests/storage_layers.rs +++ b/frame/support/test/tests/storage_layers.rs @@ -125,6 +125,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + #[test] fn storage_layer_basic_commit() { TestExternalities::default().execute_with(|| { diff --git a/frame/system/benchmarking/src/mock.rs b/frame/system/benchmarking/src/mock.rs index a7f28ca30fe87..e633e4d75e097 100644 --- a/frame/system/benchmarking/src/mock.rs +++ b/frame/system/benchmarking/src/mock.rs @@ -37,6 +37,11 @@ frame_support::construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event}, } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; diff --git a/frame/system/src/mock.rs b/frame/system/src/mock.rs index fb230f66a94f7..f44a0c8e5ecfd 100644 --- a/frame/system/src/mock.rs +++ b/frame/system/src/mock.rs @@ -40,6 +40,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); const MAX_BLOCK_WEIGHT: Weight = Weight::from_ref_time(1024).set_proof_size(u64::MAX); diff --git a/frame/timestamp/src/mock.rs b/frame/timestamp/src/mock.rs index e1ba5cd11e615..4485e7ec531ca 100644 --- a/frame/timestamp/src/mock.rs +++ b/frame/timestamp/src/mock.rs @@ -46,6 +46,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/tips/src/tests.rs b/frame/tips/src/tests.rs index cb0b4458c7fba..6b3f1bd48bd92 100644 --- a/frame/tips/src/tests.rs +++ b/frame/tips/src/tests.rs @@ -57,6 +57,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/frame/transaction-payment/asset-tx-payment/src/mock.rs b/frame/transaction-payment/asset-tx-payment/src/mock.rs index 60fb2e6c5e03e..b828c2661c816 100644 --- a/frame/transaction-payment/asset-tx-payment/src/mock.rs +++ b/frame/transaction-payment/asset-tx-payment/src/mock.rs @@ -54,6 +54,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub(crate) static ExtrinsicBaseWeight: Weight = Weight::zero(); } diff --git a/frame/transaction-payment/src/mock.rs b/frame/transaction-payment/src/mock.rs index e214458b3766e..d8bb57d176301 100644 --- a/frame/transaction-payment/src/mock.rs +++ b/frame/transaction-payment/src/mock.rs @@ -48,6 +48,12 @@ frame_support::construct_runtime!( } ); +impl Runtime { + fn runtime_metadata() -> Vec { + Default::default() + } +} + pub(crate) const CALL: &::RuntimeCall = &RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 69 }); diff --git a/frame/transaction-storage/src/mock.rs b/frame/transaction-storage/src/mock.rs index 8764b16c31d8d..942db64f416db 100644 --- a/frame/transaction-storage/src/mock.rs +++ b/frame/transaction-storage/src/mock.rs @@ -47,6 +47,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/treasury/src/tests.rs b/frame/treasury/src/tests.rs index e6a1ea0f543fe..4456b66a37fe2 100644 --- a/frame/treasury/src/tests.rs +++ b/frame/treasury/src/tests.rs @@ -51,6 +51,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/uniques/src/mock.rs b/frame/uniques/src/mock.rs index d6ed5cc5cc23e..810062745ff02 100644 --- a/frame/uniques/src/mock.rs +++ b/frame/uniques/src/mock.rs @@ -45,6 +45,12 @@ construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/utility/src/tests.rs b/frame/utility/src/tests.rs index f9d6a16c1a0d4..26959f47a2ac5 100644 --- a/frame/utility/src/tests.rs +++ b/frame/utility/src/tests.rs @@ -145,6 +145,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::MAX); diff --git a/frame/vesting/src/mock.rs b/frame/vesting/src/mock.rs index da9490bea66c0..af9b21dda4504 100644 --- a/frame/vesting/src/mock.rs +++ b/frame/vesting/src/mock.rs @@ -43,6 +43,12 @@ frame_support::construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; type AccountId = u64; diff --git a/frame/whitelist/src/mock.rs b/frame/whitelist/src/mock.rs index e08c2875aec51..0104b3e960fa3 100644 --- a/frame/whitelist/src/mock.rs +++ b/frame/whitelist/src/mock.rs @@ -49,6 +49,12 @@ construct_runtime!( } ); +impl Test { + fn runtime_metadata() -> Vec { + Default::default() + } +} + impl frame_system::Config for Test { type BaseCallFilter = Nothing; type BlockWeights = ();