From 5dbfde82b54f522a5b9e001264f876fc0b782d8a Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Wed, 5 May 2021 18:24:40 +0200 Subject: [PATCH 1/2] feat: add utility pallet to allow batch txs execution --- Cargo.lock | 17 ++++++++++++++++- Cargo.toml | 1 + runtime/Cargo.toml | 2 ++ runtime/src/lib.rs | 8 ++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index b43fecf17..7113bfc0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "hydra-dx-runtime" -version = "11.1.0" +version = "12.0.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2470,6 +2470,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", + "pallet-utility", "parity-scale-codec 2.1.1", "primitives", "serde", @@ -4747,6 +4748,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-utility" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=rococo-v1#2be8fcc4236d32786c62f6f27a98e7fe7e550807" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec 2.1.1", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "parity-db" version = "0.2.3" diff --git a/Cargo.toml b/Cargo.toml index 2e9b22565..74a957fcd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,6 +78,7 @@ pallet-session = {git = 'https://github.com/paritytech/substrate', branch = 'roc pallet-staking = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} pallet-staking-reward-curve = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} pallet-treasury = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} +pallet-utility = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} sc-authority-discovery = {git = "https://github.com/paritytech/substrate.git", branch = 'rococo-v1'} sc-consensus-babe = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} sc-consensus-babe-rpc = {git = 'https://github.com/paritytech/substrate', branch = 'rococo-v1'} diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index a9b1af2af..3e89cbee8 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -60,6 +60,7 @@ pallet-staking = {default-features = false, version = '3.0.0'} pallet-staking-reward-curve = {default-features = false, version = '3.0.0'} pallet-tips = {default-features = false, version = '=3.0.0'} pallet-treasury = {default-features = false, version = '3.0.0'} +pallet-utility = {default-features = false, version = '3.0.0'} sp-authority-discovery = {default-features = false, version = '3.0.0'} sp-consensus-babe = {default-features = false, version = '0.9.0'} @@ -132,6 +133,7 @@ std = [ 'pallet-randomness-collective-flip/std', 'pallet-scheduler/std', 'pallet-sudo/std', + 'pallet-utility/std', 'pallet-timestamp/std', 'pallet-tips/std', 'pallet-transaction-payment/std', diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 2a1406751..f51fa201e 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -205,6 +205,7 @@ impl Filter for BaseFilter { | Call::Treasury(_) | Call::Identity(_) | Call::Offences(_) + | Call::Utility(_) | Call::Sudo(_) => true, Call::AMM(_) @@ -416,6 +417,12 @@ impl pallet_identity::Config for Runtime { type WeightInfo = (); } +impl pallet_utility::Config for Runtime { + type Event = Event; + type Call = Call; + type WeightInfo = (); +} + /// ORML Configurations impl orml_tokens::Config for Runtime { @@ -990,6 +997,7 @@ construct_runtime!( Offences: pallet_offences::{Pallet, Call, Storage, Event}, Historical: session_historical::{Pallet}, Tips: pallet_tips::{Pallet, Call, Storage, Event}, + Utility: pallet_utility::{Pallet, Call, Event}, // ORML related modules Tokens: orml_tokens::{Pallet, Storage, Call, Event, Config}, From 6f29f93465db88508c99ec19dd5f87749b5ff7ae Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Tue, 18 May 2021 10:14:13 +0200 Subject: [PATCH 2/2] chore: bump runtime version --- runtime/Cargo.toml | 2 +- runtime/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 5f079a6a8..fa4d87803 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -5,7 +5,7 @@ homepage = 'https://github.com/galacticcouncil/hydradx-node' license = 'Apache 2.0' name = 'hydra-dx-runtime' repository = 'https://github.com/galacticcouncil/hydradx-node' -version = '13.0.0' +version = '14.0.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0a974466d..81bed1529 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -148,7 +148,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("hydra-dx"), impl_name: create_runtime_str!("hydra-dx"), authoring_version: 1, - spec_version: 13, + spec_version: 14, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1,