difftreelog
merge master
in: master
10 files changed
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -155,13 +155,13 @@
location:
V0(X2(Parent, Parachain(PARA_ID)))
metadata:
- name OPL
- symbol OPL
+ name QTZ
+ symbol QTZ
decimals 18
minimalBalance 1
```
-### Next, we can send tokens from Opal to Karura:
+### Next, we can send tokens from Quartz to Karura:
```
polkadotXcm -> reserveTransferAssets
dest:
@@ -179,7 +179,7 @@
The result will be displayed in ChainState
tokens -> accounts
-### To send tokens from Karura to Opal:
+### To send tokens from Karura to Quartz:
```
xtokens -> transfer
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+// Original License
use std::sync::Arc;
use codec::Decode;
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
-
// std
use std::sync::Arc;
use std::sync::Mutex;
pallets/scheduler/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-// Original license
+// Original license:
// This file is part of Substrate.
// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -216,11 +216,15 @@
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
pub const Version: RuntimeVersion = VERSION;
- pub const SS58Prefix: u8 = 42;
+ /*
+ 255 - Quartz
+ 42 - Opal
+ */
+ pub const SS58Prefix: u8 = 255;
}
parameter_types! {
- pub const ChainId: u64 = 8882;
+ pub const ChainId: u64 = 8881;
}
pub struct FixedFee;
tests/flipper-src/lib.rsdiffbeforeafterboth--- a/tests/flipper-src/lib.rs
+++ b/tests/flipper-src/lib.rs
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-// Original license
+// Original License
// Copyright 2018-2020 Parity Technologies (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
tests/ink-types-node-runtime/src/calls.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Original license18// Copyright 2019 Parity Technologies (UK) Ltd.19// This file is part of ink!.20//21// ink! is free software: you can redistribute it and/or modify22// it under the terms of the GNU General Public License as published by23// the Free Software Foundation, either version 3 of the License, or24// (at your option) any later version.25//26// ink! is distributed in the hope that it will be useful,27// but WITHOUT ANY WARRANTY; without even the implied warranty of28// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the29// GNU General Public License for more details.30//31// You should have received a copy of the GNU General Public License32// along with ink!. If not, see <http://www.gnu.org/licenses/>.3334use ink_core::env::EnvTypes;35use scale::{Codec, Decode, Encode};36use pallet_indices::address::Address;37use sp_runtime::traits::Member;38use crate::{AccountId, AccountIndex, Balance, NodeRuntimeTypes};3940/// Default runtime Call type, a subset of the runtime Call module variants41///42/// The codec indices of the modules *MUST* match those in the concrete runtime.43#[derive(Encode, Decode)]44#[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))]45pub enum Call {46 #[codec(index = "5")]47 Balances(Balances<NodeRuntimeTypes, AccountIndex>),48}4950impl From<Balances<NodeRuntimeTypes, AccountIndex>> for Call {51 fn from(balances_call: Balances<NodeRuntimeTypes, AccountIndex>) -> Call {52 Call::Balances(balances_call)53 }54}55/// Generic Balance Call, could be used with other runtimes56#[derive(Encode, Decode, Clone, PartialEq, Eq)]57pub enum Balances<T, AccountIndex>58where59 T: EnvTypes,60 T::AccountId: Member + Codec,61 AccountIndex: Member + Codec,62{63 #[allow(non_camel_case_types)]64 #[codec(index = "3")]65 transfer(T::AccountId, #[codec(compact)] T::Balance),66 #[allow(non_camel_case_types)]67 #[codec(index = "6")]68 set_balance(69 Address<T::AccountId, AccountIndex>,70 #[codec(compact)] T::Balance,71 #[codec(compact)] T::Balance,72 ),73}7475/// Construct a `Balances::transfer` call76pub fn transfer_balance(account: AccountId, balance: Balance) -> Call {77 Balances::<NodeRuntimeTypes, AccountIndex>::transfer(account, balance).into()78}79 80#[cfg(test)]81mod tests {82 use crate::{calls, AccountIndex, NodeRuntimeTypes};83 use super::Call;8485 use node_runtime::{self, Runtime};86 use pallet_indices::address;87 use scale::{Decode, Encode};888990 #[test]91 fn call_balance_transfer() {92 let balance = 10_000;93 let account_index = 0;9495 let contract_address = calls::Address::Index(account_index);96 let contract_transfer =97 calls::Balances::<NodeRuntimeTypes, AccountIndex>::transfer(contract_address, balance);98 let contract_call = Call::Balances(contract_transfer);99100 let srml_address = address::Address::Index(account_index);101 let srml_transfer = node_runtime::BalancesCall::<Runtime>::transfer(srml_address, balance);102 let srml_call = node_runtime::Call::Balances(srml_transfer);103104 let contract_call_encoded = contract_call.encode();105 let srml_call_encoded = srml_call.encode();106107 assert_eq!(srml_call_encoded, contract_call_encoded);108109 let srml_call_decoded: node_runtime::Call =110 Decode::decode(&mut contract_call_encoded.as_slice())111 .expect("Balances transfer call decodes to srml type");112 let srml_call_encoded = srml_call_decoded.encode();113 let contract_call_decoded: Call = Decode::decode(&mut srml_call_encoded.as_slice())114 .expect("Balances transfer call decodes back to contract type");115 assert!(contract_call == contract_call_decoded);116 }117}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Original License18// Copyright 2019 Parity Technologies (UK) Ltd.19// This file is part of ink!.20//21// ink! is free software: you can redistribute it and/or modify22// it under the terms of the GNU General Public License as published by23// the Free Software Foundation, either version 3 of the License, or24// (at your option) any later version.25//26// ink! is distributed in the hope that it will be useful,27// but WITHOUT ANY WARRANTY; without even the implied warranty of28// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the29// GNU General Public License for more details.30//31// You should have received a copy of the GNU General Public License32// along with ink!. If not, see <http://www.gnu.org/licenses/>.3334use ink_core::env::EnvTypes;35use scale::{Codec, Decode, Encode};36use pallet_indices::address::Address;37use sp_runtime::traits::Member;38use crate::{AccountId, AccountIndex, Balance, NodeRuntimeTypes};3940/// Default runtime Call type, a subset of the runtime Call module variants41///42/// The codec indices of the modules *MUST* match those in the concrete runtime.43#[derive(Encode, Decode)]44#[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))]45pub enum Call {46 #[codec(index = "5")]47 Balances(Balances<NodeRuntimeTypes, AccountIndex>),48}4950impl From<Balances<NodeRuntimeTypes, AccountIndex>> for Call {51 fn from(balances_call: Balances<NodeRuntimeTypes, AccountIndex>) -> Call {52 Call::Balances(balances_call)53 }54}55/// Generic Balance Call, could be used with other runtimes56#[derive(Encode, Decode, Clone, PartialEq, Eq)]57pub enum Balances<T, AccountIndex>58where59 T: EnvTypes,60 T::AccountId: Member + Codec,61 AccountIndex: Member + Codec,62{63 #[allow(non_camel_case_types)]64 #[codec(index = "3")]65 transfer(T::AccountId, #[codec(compact)] T::Balance),66 #[allow(non_camel_case_types)]67 #[codec(index = "6")]68 set_balance(69 Address<T::AccountId, AccountIndex>,70 #[codec(compact)] T::Balance,71 #[codec(compact)] T::Balance,72 ),73}7475/// Construct a `Balances::transfer` call76pub fn transfer_balance(account: AccountId, balance: Balance) -> Call {77 Balances::<NodeRuntimeTypes, AccountIndex>::transfer(account, balance).into()78}79 80#[cfg(test)]81mod tests {82 use crate::{calls, AccountIndex, NodeRuntimeTypes};83 use super::Call;8485 use node_runtime::{self, Runtime};86 use pallet_indices::address;87 use scale::{Decode, Encode};888990 #[test]91 fn call_balance_transfer() {92 let balance = 10_000;93 let account_index = 0;9495 let contract_address = calls::Address::Index(account_index);96 let contract_transfer =97 calls::Balances::<NodeRuntimeTypes, AccountIndex>::transfer(contract_address, balance);98 let contract_call = Call::Balances(contract_transfer);99100 let srml_address = address::Address::Index(account_index);101 let srml_transfer = node_runtime::BalancesCall::<Runtime>::transfer(srml_address, balance);102 let srml_call = node_runtime::Call::Balances(srml_transfer);103104 let contract_call_encoded = contract_call.encode();105 let srml_call_encoded = srml_call.encode();106107 assert_eq!(srml_call_encoded, contract_call_encoded);108109 let srml_call_decoded: node_runtime::Call =110 Decode::decode(&mut contract_call_encoded.as_slice())111 .expect("Balances transfer call decodes to srml type");112 let srml_call_encoded = srml_call_decoded.encode();113 let contract_call_decoded: Call = Decode::decode(&mut srml_call_encoded.as_slice())114 .expect("Balances transfer call decodes back to contract type");115 assert!(contract_call == contract_call_decoded);116 }117}tests/ink-types-node-runtime/src/lib.rsdiffbeforeafterboth--- a/tests/ink-types-node-runtime/src/lib.rs
+++ b/tests/ink-types-node-runtime/src/lib.rs
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-// Original license
+// Original License
// Copyright 2018-2019 Parity Technologies (UK) Ltd.
// This file is part of ink!.
//
tests/loadtester-src/lib.rsdiffbeforeafterboth--- a/tests/loadtester-src/lib.rs
+++ b/tests/loadtester-src/lib.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+// Original License
#![cfg_attr(not(feature = "std"), no_std)]
use ink_lang as ink;
tests/src/xcmTransfer.test.tsdiffbeforeafterboth--- a/tests/src/xcmTransfer.test.ts
+++ b/tests/src/xcmTransfer.test.ts
@@ -34,7 +34,7 @@
const KARURA_CHAIN = 2000;
const KARURA_PORT = '9946';
-describe('Integration test: Exchanging OPL with Karura', () => {
+describe('Integration test: Exchanging QTZ with Karura', () => {
let alice: IKeyringPair;
before(async () => {
@@ -60,8 +60,8 @@
const metadata =
{
- name: 'OPL',
- symbol: 'OPL',
+ name: 'QTZ',
+ symbol: 'QTZ',
decimals: 18,
minimalBalance: 1,
};
@@ -74,7 +74,7 @@
}, karuraApiOptions);
});
- it('Should connect and send OPL to Karura', async () => {
+ it('Should connect and send QTZ to Karura', async () => {
let balanceOnKaruraBefore: bigint;
await usingApi(async (api) => {
@@ -141,7 +141,7 @@
}, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
});
- it('Should connect to Karura and send OPL back', async () => {
+ it('Should connect to Karura and send QTZ back', async () => {
let balanceBefore: bigint;
await usingApi(async (api) => {