From 950b982325b903270ae8a069420d82d700dce9a3 Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Fri, 11 Jun 2021 08:06:35 +0200 Subject: [PATCH 1/2] chore: update hydra dependecies - use latest pallets --- Cargo.lock | 31 +++++++++++++++++-------------- node/src/chain_spec.rs | 11 ++++++++++- runtime/Cargo.toml | 11 ++++++----- runtime/src/lib.rs | 4 ++-- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 680a852af6c..50c085f0aea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3094,7 +3094,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hydra-dx-build-script-utils" version = "1.0.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "cargo-lock", "platforms", @@ -4951,7 +4951,7 @@ dependencies = [ [[package]] name = "pallet-asset-registry" version = "3.1.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-support", "frame-system", @@ -5165,8 +5165,8 @@ dependencies = [ [[package]] name = "pallet-exchange" -version = "3.3.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +version = "4.0.0" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-support", "frame-system", @@ -5187,7 +5187,7 @@ dependencies = [ [[package]] name = "pallet-exchange-benchmarking" version = "3.1.1" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-benchmarking", "frame-support", @@ -5358,8 +5358,8 @@ dependencies = [ [[package]] name = "pallet-multi-payment-benchmarking" -version = "3.1.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +version = "4.0.0" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-benchmarking", "frame-support", @@ -5603,18 +5603,21 @@ dependencies = [ [[package]] name = "pallet-transaction-multi-payment" -version = "3.1.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +version = "4.0.0" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-support", "frame-system", "orml-tokens", "orml-traits", "orml-utilities", + "pallet-asset-registry", + "pallet-balances", "pallet-transaction-payment", "parity-scale-codec 2.1.1", "primitive-types 0.8.0", "primitives", + "serde", "sp-api", "sp-core", "sp-runtime", @@ -5742,7 +5745,7 @@ dependencies = [ [[package]] name = "pallet-xyk" version = "1.2.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-benchmarking", "frame-support", @@ -5765,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-xyk-rpc" version = "1.0.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5783,7 +5786,7 @@ dependencies = [ [[package]] name = "pallet-xyk-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "parity-scale-codec 2.1.1", "serde", @@ -7327,8 +7330,8 @@ dependencies = [ [[package]] name = "primitives" -version = "4.1.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#3cf0799c80d80e60db0a55e82911efceb7afc472" +version = "4.2.0" +source = "git+https://github.com/galacticcouncil/HydraDX-node?branch=master#a0dfc3193a6af24fad68dd0183059218031ade93" dependencies = [ "frame-support", "frame-system", diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 95e4b8f404f..a98e9ad53a3 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -3,7 +3,7 @@ use basilisk_runtime::{ AccountId, AssetRegistryConfig, AuraConfig, AuraId, BalancesConfig, CouncilConfig, GenesisConfig, ParachainInfoConfig, Signature, SudoConfig, SystemConfig, TechnicalCommitteeConfig, TokensConfig, CORE_ASSET_ID, - VestingConfig, WASM_BINARY, + VestingConfig, WASM_BINARY, MultiTransactionPaymentConfig, }; use cumulus_primitives_core::ParaId; use hex_literal::hex; @@ -92,6 +92,7 @@ pub fn testnet_parachain_config(para_id: ParaId) -> Result { vec![hex!["30035c21ba9eda780130f2029a80c3e962f56588bc04c36be95a225cb536fb55"].into()], //technical committee vec![hex!["30035c21ba9eda780130f2029a80c3e962f56588bc04c36be95a225cb536fb55"].into()], + hex!["30035c21ba9eda780130f2029a80c3e962f56588bc04c36be95a225cb536fb55"].into(), // SAME AS ROOT ) }, // Bootnodes @@ -161,6 +162,7 @@ pub fn parachain_development_config(para_id: ParaId) -> Result("Bob"), get_account_id_from_seed::("Eve"), ], + get_account_id_from_seed::("Alice"), // SAME AS ROOT ) }, // Bootnodes @@ -223,6 +225,7 @@ pub fn local_parachain_config(para_id: ParaId) -> Result { get_account_id_from_seed::("Bob"), get_account_id_from_seed::("Eve"), ], + get_account_id_from_seed::("Alice"), // SAME AS ROOT ) }, // Bootnodes @@ -251,6 +254,7 @@ fn parachain_genesis( parachain_id: ParaId, council_members: Vec, tech_committee_members: Vec, + tx_fee_payment_account: AccountId, ) -> GenesisConfig { GenesisConfig { frame_system: SystemConfig { @@ -283,6 +287,11 @@ fn parachain_genesis( ], next_asset_id: 5, }, + pallet_transaction_multi_payment: MultiTransactionPaymentConfig { + currencies: vec![], + authorities: vec![], + fallback_account: tx_fee_payment_account, + }, orml_tokens: TokensConfig { endowed_accounts: endowed_accounts .iter() diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 7adb605b433..68636a742c8 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -5,7 +5,7 @@ homepage = 'https://github.com/galacticcouncil/Basilisk-node' license = 'Apache 2.0' name = 'basilisk-runtime' repository = 'https://github.com/galacticcouncil/Basilisk-node' -version = '5.0.0' +version = '6.0.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -25,11 +25,11 @@ trie-db = { version = "0.22.0", default-features = false } # local dependencies pallet-asset-registry = { default-features = false, version = '3.0.0' } -pallet-xyk= { default-features = false, version = '1.0.0' } -pallet-exchange = { default-features = false, version = '3.0.0' } +pallet-xyk= { default-features = false, version = '1.2.0' } +pallet-exchange = { default-features = false, version = '4.0.0' } pallet-exchange-benchmarking = { default-features = false, optional = true, version = '3.0.0' } -pallet-transaction-multi-payment = { default-features = false, version = '3.0.0' } -pallet-multi-payment-benchmarking = { default-features = false, optional = true, version = '3.0.0' } +pallet-transaction-multi-payment = { default-features = false, version = '4.0.0' } +pallet-multi-payment-benchmarking = { default-features = false, optional = true, version = '4.0.0' } primitives = { default-features = false, version = '4.0.0' } pallet-xyk-rpc-runtime-api = { default-features = false, version = '3.0.0' } @@ -142,6 +142,7 @@ std = [ 'pallet-sudo/std', 'pallet-timestamp/std', 'pallet-transaction-payment/std', + "pallet-transaction-multi-payment/std", 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-utility/std', 'pallet-vesting/std', diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index bca4606bdb1..399cf8c5a85 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("basilisk"), impl_name: create_runtime_str!("basilisk"), authoring_version: 1, - spec_version: 5, + spec_version: 6, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -608,7 +608,7 @@ construct_runtime!( AssetRegistry: pallet_asset_registry::{Pallet, Call, Storage, Config}, XYK: pallet_xyk::{Pallet, Call, Storage, Event}, Exchange: pallet_exchange::{Pallet, Call, Storage, Event}, - MultiTransactionPayment: pallet_transaction_multi_payment::{Pallet, Call, Storage, Event}, + MultiTransactionPayment: pallet_transaction_multi_payment::{Pallet, Call, Config, Storage, Event}, } ); From e90f85b54fd5b0f2cc3bdfc028629b2ac8198c30 Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Fri, 11 Jun 2021 08:34:03 +0200 Subject: [PATCH 2/2] update lock file --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 50c085f0aea..a344967e48c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -545,7 +545,7 @@ dependencies = [ [[package]] name = "basilisk-runtime" -version = "5.0.0" +version = "6.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system",