Skip to content

Commit

Permalink
wip: xcm v1
Browse files Browse the repository at this point in the history
  • Loading branch information
GopherJ committed Sep 24, 2021
1 parent f995b5d commit 7db51ce
Show file tree
Hide file tree
Showing 28 changed files with 1,475 additions and 1,424 deletions.
1,902 changes: 952 additions & 950 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ shutdown:

.PHONY: launch
launch: shutdown
docker image pull parallelfinance/polkadot:v0.9.9-1
docker image pull parallelfinance/polkadot:v0.9.10
docker image pull parallelfinance/parallel-dapp:latest
docker image pull parallelfinance/stake-client:latest
parachain-launch generate $(LAUNCH_CONFIG) && (cp -r keystore* output || true) && cp docker-compose.override.yml output && docker-compose -f output/docker-compose.yml -f output/docker-compose.override.yml up -d --build
Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parallelfinance/polkadot:v0.9.9-1
image: parallelfinance/polkadot:v0.9.10
chain: westend-local
runtimeGenesisConfig:
configuration:
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPER-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ make help

### Local Testnet

Polkadot (v0.9.9-1 branch)
Polkadot (v0.9.10 branch)

```
cargo build --release
Expand Down
100 changes: 50 additions & 50 deletions node/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ targets = ['x86_64-unknown-linux-gnu']
[dependencies]
codec = { package = 'parity-scale-codec', version = '2.2.0' }
derive_more = '0.15.0'
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
hex-literal = '0.3.1'
jsonrpc-core = '15.1.0'
log = '0.4.13'
Expand All @@ -25,68 +25,68 @@ primitives = { package = 'parallel-primitives', path = '../../primitives' }

heiko-runtime = { path = '../../runtime/heiko' }
pallet-loans-rpc = { path = '../../pallets/loans/rpc' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
parallel-runtime = { path = '../../runtime/parallel' }
vanilla-runtime = { path = '../../runtime/vanilla' }

sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', features = ['wasmtime'] }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', features = ['wasmtime'] }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }

frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', optional = true }
frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', optional = true }

serde = { version = '1.0.119', features = ['derive'] }
serde_json = '1.0.64'
structopt = '0.3.8'

orml-oracle-rpc = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', default-features = false }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
orml-oracle-rpc = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'sw/xcm-v1', default-features = false }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }

sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }
sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }

cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.9' }
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.10' }

polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.9' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.9' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.9' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.9' }
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.10' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.10' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.10' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.10' }

[build-dependencies]
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10' }

[[bin]]
name = 'parallel'
Expand Down
20 changes: 10 additions & 10 deletions pallets/amm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ targets = ['x86_64-unknown-linux-gnu']

[dependencies]
codec = { package = 'parity-scale-codec', version = '2.0.0', features = ['max-encoded-len'], default-features = false }
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false, optional = true }
frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false, optional = true }
frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }
frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }
pallet-assets = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }
primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false }
serde = { version = '1', features = ['derive'], optional = true }
sp-arithmetic = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9', default-features = false }
sp-arithmetic = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }
sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.10', default-features = false }

[dev-dependencies]
pallet-balances = { branch = 'polkadot-v0.9.9', git = 'https://github.com/paritytech/substrate' }
sp-core = { branch = 'polkadot-v0.9.9', git = 'https://github.com/paritytech/substrate' }
sp-io = { branch = 'polkadot-v0.9.9', git = 'https://github.com/paritytech/substrate' }
pallet-balances = { branch = 'polkadot-v0.9.10', git = 'https://github.com/paritytech/substrate' }
sp-core = { branch = 'polkadot-v0.9.10', git = 'https://github.com/paritytech/substrate' }
sp-io = { branch = 'polkadot-v0.9.10', git = 'https://github.com/paritytech/substrate' }

[features]
default = ['std']
Expand Down
18 changes: 9 additions & 9 deletions pallets/liquid-staking-v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ targets = ['x86_64-unknown-linux-gnu']

[dependencies]
codec = { package = 'parity-scale-codec', version = '2.0.0', features = ['max-encoded-len'], default-features = false }
frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', default-features = false }
pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.9', default-features = false }
frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'sw/xcm-v1', default-features = false }
pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.10', default-features = false }

# parallel pallets
primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false }

[dev-dependencies]
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }
serde = { version = '1' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9', default-features = false }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.10', default-features = false }

[features]
default = ['std']
Expand Down
2 changes: 1 addition & 1 deletion pallets/liquid-staking-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod pallet {
ArithmeticError, FixedPointNumber, FixedPointOperand,
};
use sp_std::vec::Vec;
use xcm::v0::MultiLocation;
use xcm::latest::prelude::*;

use primitives::{EraIndex, Rate, Ratio};

Expand Down
12 changes: 5 additions & 7 deletions pallets/liquid-staking-v2/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup, One},
};

use xcm::v0::{Junction, MultiAsset, MultiLocation};
use xcm::latest::prelude::*;

use primitives::{tokens::*, Balance, Rate, Ratio};

Expand Down Expand Up @@ -117,12 +117,10 @@ pub type UpdateOrigin = EnsureSignedBy<BobOrigin, AccountId>;
parameter_types! {
pub const StakingPalletId: PalletId = PalletId(*b"par/lqsk");
pub const BaseXcmWeight: Weight = 0;
pub const Agent: MultiLocation = MultiLocation::X2(
Junction::Parent,
Junction::AccountId32 {
network: xcm::v0::NetworkId::Any,
id: [0; 32]
});
pub Agent: MultiLocation = MultiLocation::new(1, Junctions::X1(Junction::AccountId32 {
network: xcm::v0::NetworkId::Any,
id: [0; 32]
}));
pub const PeriodBasis: BlockNumber = 5u64;
}

Expand Down
Loading

0 comments on commit 7db51ce

Please sign in to comment.