From 74f532ac28dce15c15e7d576c074a58eba658c08 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 12 Aug 2022 13:04:20 +0000 Subject: [PATCH] fix(runtime): add missing config keys --- --- a/runtime/common/config/substrate.rs +++ b/runtime/common/config/substrate.rs @@ -154,6 +154,7 @@ } impl pallet_transaction_payment::Config for Runtime { + type Event = Event; type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type LengthToFee = ConstantMultiplier; type OperationalFeeMultiplier = OperationalFeeMultiplier; --- a/runtime/common/construct_runtime/mod.rs +++ b/runtime/common/construct_runtime/mod.rs @@ -27,6 +27,8 @@ NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic { + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned} = 20, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, @@ -36,10 +38,9 @@ Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 30, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 33, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 34, Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 35, - System: frame_system::{Pallet, Call, Storage, Config, Event} = 36, Vesting: orml_vesting::{Pallet, Storage, Call, Event, Config} = 37, // Vesting: pallet_vesting::{Pallet, Call, Config, Storage, Event} = 37, // Contracts: pallet_contracts::{Pallet, Call, Storage, Event} = 38, --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -48,7 +48,7 @@ spec_version: 924012, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, state_version: 0, }; --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -48,7 +48,7 @@ spec_version: 924012, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, state_version: 0, }; --- a/runtime/tests/src/lib.rs +++ b/runtime/tests/src/lib.rs @@ -60,13 +60,16 @@ NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Unique: pallet_unique::{Pallet, Call, Storage}, - Balances: pallet_balances::{Pallet, Call, Storage}, + System: frame_system, + Unique: pallet_unique::{Pallet, Call, Storage, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Event}, Common: pallet_common::{Pallet, Storage, Event}, Fungible: pallet_fungible::{Pallet, Storage}, Refungible: pallet_refungible::{Pallet, Storage}, Nonfungible: pallet_nonfungible::{Pallet, Storage}, + Structure: pallet_structure::{Pallet, Storage, Event}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, + Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin}, EVM: pallet_evm::{Pallet, Config, Call, Storage, Event}, } ); @@ -77,6 +80,7 @@ } impl system::Config for Test { + type Event = Event; type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); @@ -90,7 +94,6 @@ type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = (); type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -109,10 +112,10 @@ } //frame_system::Module; impl pallet_balances::Config for Test { + type Event = Event; type AccountStore = System; type Balance = u64; type DustRemoval = (); - type Event = (); type ExistentialDeposit = ExistentialDeposit; type WeightInfo = (); type MaxLocks = MaxLocks; @@ -125,6 +128,7 @@ } impl pallet_transaction_payment::Config for Test { + type Event = Event; type OnChargeTransaction = CurrencyAdapter, ()>; type LengthToFee = IdentityFee; type WeightToFee = IdentityFee; @@ -197,8 +201,13 @@ pub BlockGasLimit: U256 = 0u32.into(); } +impl pallet_ethereum::Config for Test { + type Event = Event; + type StateRoot = pallet_ethereum::IntermediateStateRoot; +} + impl pallet_evm::Config for Test { - type Event = (); + type Event = Event; type FeeCalculator = (); type GasWeightMapping = (); type CallOrigin = EnsureAddressNever; @@ -221,7 +230,7 @@ impl pallet_common::Config for Test { type WeightInfo = (); - type Event = (); + type Event = Event; type Currency = Balances; type CollectionCreationPrice = CollectionCreationPrice; type TreasuryAccountId = TreasuryAccountId; @@ -240,7 +249,7 @@ impl pallet_structure::Config for Test { type WeightInfo = (); - type Event = (); + type Event = Event; type Call = Call; } impl pallet_fungible::Config for Test { --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -48,7 +48,7 @@ spec_version: 924012, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, state_version: 0, }; -- gitstuff