From 19202c74a7725887872dcf734021cf9047bfa939 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Tue, 12 Jan 2021 11:43:23 +1300 Subject: [PATCH 01/21] Update patches. --- Cargo.dev.toml | 36 ++++++++++++++++++------------------ tokens/Cargo.toml | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index a56b54c32..6f71e245d 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -15,21 +15,21 @@ members = [ ] [patch.crates-io] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index bb3cef7fc..68afa7cdf 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -23,8 +23,8 @@ orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = fa sp-core = { version = "2.0.0", default-features = false } pallet-treasury = { version = "2.0.0" } #TODO: use cargo version once `bounties` and `tips` pallets are released. -pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } -pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "2eaeb91bc6d20786aa4ad5f5538c0deac46e14cd" } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } pallet-elections-phragmen = { version = "2.0.0" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 From 0adb476293563b8f8216512b68889c701f7471ad Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Tue, 12 Jan 2021 12:21:20 +1300 Subject: [PATCH 02/21] Update dependencies. --- Cargo.dev.toml | 36 ++++++++++++++++++------------------ tokens/Cargo.toml | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 6f71e245d..2acfdb3c1 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -15,21 +15,21 @@ members = [ ] [patch.crates-io] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 68afa7cdf..a1bddedfa 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -23,8 +23,8 @@ orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = fa sp-core = { version = "2.0.0", default-features = false } pallet-treasury = { version = "2.0.0" } #TODO: use cargo version once `bounties` and `tips` pallets are released. -pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } -pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "c9d93653e567f10867273b0171f3025419795c37" } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } pallet-elections-phragmen = { version = "2.0.0" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 From 349fe491bf15fc801fdd1ef405fc387216cc30e5 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Tue, 12 Jan 2021 14:25:07 +1300 Subject: [PATCH 03/21] Bump dependencies. --- Cargo.dev.toml | 36 +++++++++++++++---------------- auction/Cargo.toml | 12 +++++------ authority/Cargo.toml | 14 ++++++------ benchmarking/Cargo.toml | 16 +++++++------- currencies/Cargo.toml | 14 ++++++------ gradually-update/Cargo.toml | 12 +++++------ nft/Cargo.toml | 12 +++++------ oracle/Cargo.toml | 14 ++++++------ oracle/rpc/Cargo.toml | 6 +++--- oracle/rpc/runtime-api/Cargo.toml | 4 ++-- rewards/Cargo.toml | 12 +++++------ tokens/Cargo.toml | 20 ++++++++--------- traits/Cargo.toml | 8 +++---- utilities/Cargo.toml | 10 ++++----- vesting/Cargo.toml | 14 ++++++------ 15 files changed, 102 insertions(+), 102 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 2acfdb3c1..3725a8588 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -15,21 +15,21 @@ members = [ ] [patch.crates-io] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } diff --git a/auction/Cargo.toml b/auction/Cargo.toml index ea815dc87..e091225a1 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -10,17 +10,17 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 66bf99654..7b5b18321 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -10,18 +10,18 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } -pallet-scheduler = { version = "2.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 [features] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index a4f99e87e..b3fca3c06 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -10,14 +10,14 @@ edition = "2018" [dependencies] paste = "0.1.16" codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-api = { version = "2.0.0", default-features = false } -sp-runtime-interface = { version = "2.0.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } -frame-benchmarking = { version = "2.0.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [dev-dependencies] hex-literal = "0.2.1" diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 256706547..22e73707f 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -10,19 +10,19 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } -pallet-balances = "2.0.0" +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.3.3-dev" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index a29834616..15300e780 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -9,12 +9,12 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } -sp-core = { version = "2.0.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [features] default = ["std"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 96cd44bcb..b9e5aad3c 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -9,15 +9,15 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [dev-dependencies] -sp-io = { version = "2.0.0", default-features = false } -sp-core = { version = "2.0.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index 53733d478..c3a16140b 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -11,19 +11,19 @@ edition = "2018" serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-application-crypto = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 9979255f0..98f23d3da 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -9,7 +9,7 @@ codec = { package = "parity-scale-codec", version = "1.3.0" } jsonrpc-core = "15.0.0" jsonrpc-core-client = "15.0.0" jsonrpc-derive = "15.0.0" -sp-runtime = { version = "2.0.0" } -sp-api = { version = "2.0.0" } -sp-blockchain = { version = "2.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-api = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } orml-oracle-rpc-runtime-api = { path = "runtime-api" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index dc8525487..5abe73dd7 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-api = { default-features = false, version = "2.0.0" } -sp-std = { default-features = false, version = "2.0.0" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } [features] default = ["std"] diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 1738fc474..c9122dd66 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -10,15 +10,15 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 [features] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index a1bddedfa..95e5e0549 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -10,22 +10,22 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } -pallet-treasury = { version = "2.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } #TODO: use cargo version once `bounties` and `tips` pallets are released. -pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "df287fe393d7d4ee3b42b2594c42cac5a24ea2ab" } -pallet-elections-phragmen = { version = "2.0.0" } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 684c39f41..96c2abad7 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } num-traits = { version = "0.2.11", default-features = false } impl-trait-for-tuples = "0.1.3" -frame-support = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index 8a53cdfe7..b2f616d96 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -10,14 +10,14 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [dev-dependencies] serde_json = "1.0.53" -frame-system = { version = "2.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 816ddc654..1d5c30f1b 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -10,16 +10,16 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false } -sp-io = { version = "2.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { version = "2.0.0", default-features = false } -frame-system = { version = "2.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false } -pallet-balances = "2.0.0" +sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 From 52469257de3bfad02cf9c787629090ca9ccced11 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Thu, 14 Jan 2021 10:29:21 +1300 Subject: [PATCH 04/21] Dependencies: use rococo-v1 branch. --- Cargo.dev.toml | 36 +++++++++++++++---------------- auction/Cargo.toml | 12 +++++------ authority/Cargo.toml | 14 ++++++------ benchmarking/Cargo.toml | 16 +++++++------- currencies/Cargo.toml | 14 ++++++------ gradually-update/Cargo.toml | 12 +++++------ nft/Cargo.toml | 12 +++++------ oracle/Cargo.toml | 14 ++++++------ oracle/rpc/Cargo.toml | 6 +++--- oracle/rpc/runtime-api/Cargo.toml | 4 ++-- rewards/Cargo.toml | 12 +++++------ tokens/Cargo.toml | 20 ++++++++--------- traits/Cargo.toml | 8 +++---- utilities/Cargo.toml | 10 ++++----- vesting/Cargo.toml | 14 ++++++------ 15 files changed, 102 insertions(+), 102 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 3725a8588..baffd46d8 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -15,21 +15,21 @@ members = [ ] [patch.crates-io] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } diff --git a/auction/Cargo.toml b/auction/Cargo.toml index e091225a1..71e452812 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -10,17 +10,17 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 7b5b18321..30405d9c1 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -10,18 +10,18 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 [features] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index b3fca3c06..a785f2882 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -10,14 +10,14 @@ edition = "2018" [dependencies] paste = "0.1.16" codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [dev-dependencies] hex-literal = "0.2.1" diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 22e73707f..75f3c163c 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -10,19 +10,19 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.3.3-dev" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 15300e780..10e23a490 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -9,12 +9,12 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [features] default = ["std"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index b9e5aad3c..78e945c01 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -9,15 +9,15 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index c3a16140b..d72d360f7 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -11,19 +11,19 @@ edition = "2018" serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 98f23d3da..3f8959d2d 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -9,7 +9,7 @@ codec = { package = "parity-scale-codec", version = "1.3.0" } jsonrpc-core = "15.0.0" jsonrpc-core-client = "15.0.0" jsonrpc-derive = "15.0.0" -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-api = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml-oracle-rpc-runtime-api = { path = "runtime-api" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index 5abe73dd7..7cee6d99e 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index c9122dd66..5dee6a9f3 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -10,15 +10,15 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 [features] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 95e5e0549..df31c5e59 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -10,22 +10,22 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } #TODO: use cargo version once `bounties` and `tips` pallets are released. -pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 96c2abad7..b74bf5753 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } num-traits = { version = "0.2.11", default-features = false } impl-trait-for-tuples = "0.1.3" -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-utilities = { path = "../utilities", version = "0.3.3-dev", default-features = false } [dev-dependencies] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index b2f616d96..58b22d5f3 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -10,14 +10,14 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [dev-dependencies] serde_json = "1.0.53" -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 1d5c30f1b..1155dfd8f 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -10,16 +10,16 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "8b3e4c86bc5a86570a3091e470011604fb46d324" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } clear_on_drop = { version = "0.2.4", features = ["no_cc"] } # https://github.com/paritytech/substrate/issues/4179 From 5042d18d63c0573eba3a6966f2390bda7c8dc452 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 20 Jan 2021 13:17:45 +1300 Subject: [PATCH 05/21] xtokens and xcm-support module. --- Cargo.dev.toml | 2 + xcm-support/Cargo.toml | 32 +++++ xcm-support/src/lib.rs | 155 +++++++++++++++++++++ xtokens/Cargo.toml | 44 ++++++ xtokens/src/lib.rs | 296 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 529 insertions(+) create mode 100644 xcm-support/Cargo.toml create mode 100644 xcm-support/src/lib.rs create mode 100644 xtokens/Cargo.toml create mode 100644 xtokens/src/lib.rs diff --git a/Cargo.dev.toml b/Cargo.dev.toml index baffd46d8..c7b513314 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -12,6 +12,8 @@ members = [ "vesting", "rewards", "nft", + "xtokens", + "xcm-support", ] [patch.crates-io] diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml new file mode 100644 index 000000000..58d1158ea --- /dev/null +++ b/xcm-support/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "orml-xcm-support" +description = "Crosschain token transfer" +repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xcm-support" +license = "Apache-2.0" +version = "0.3.3-dev" +authors = ["Acala Developers"] +edition = "2018" + +[dependencies] +codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false } + +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false} +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false} + +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false} + +xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } + +orml-traits = { path = "../traits", version = "0.3.3-dev", default-features = false } + +[features] +default = ["std"] +std = [ + "sp-std/std", + "sp-runtime/std", + "frame-support/std", + "xcm/std", + "xcm-executor/std", + "orml-traits/std", +] diff --git a/xcm-support/src/lib.rs b/xcm-support/src/lib.rs new file mode 100644 index 000000000..039d7a44d --- /dev/null +++ b/xcm-support/src/lib.rs @@ -0,0 +1,155 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +use codec::FullCodec; +use sp_runtime::{ + traits::{CheckedConversion, Convert, MaybeSerializeDeserialize, SaturatedConversion}, + DispatchResult, +}; +use sp_std::{ + cmp::{Eq, PartialEq}, + collections::btree_set::BTreeSet, + convert::{TryFrom, TryInto}, + fmt::Debug, + marker::PhantomData, + prelude::*, + result, +}; + +use xcm::v0::{Error, Junction, MultiAsset, MultiLocation, Result}; +use xcm_executor::traits::{FilterAssetLocation, LocationConversion, MatchesFungible, NativeAsset, TransactAsset}; + +use frame_support::{debug, traits::Get}; + +pub trait CurrencyIdConversion { + fn from_asset(asset: &MultiAsset) -> Option; +} + +pub struct MultiCurrencyAdapter( + PhantomData<( + MultiCurrency, + Matcher, + AccountIdConverter, + AccountId, + CurrencyIdConverter, + CurrencyId, + )>, +); + +impl< + MultiCurrency: orml_traits::MultiCurrency, + Matcher: MatchesFungible, + AccountIdConverter: LocationConversion, + AccountId: sp_std::fmt::Debug, + CurrencyIdConverter: CurrencyIdConversion, + CurrencyId: FullCodec + Eq + PartialEq + Copy + MaybeSerializeDeserialize + Debug, + > TransactAsset + for MultiCurrencyAdapter +{ + fn deposit_asset(asset: &MultiAsset, location: &MultiLocation) -> Result { + debug::info!("------------------------------------------------"); + debug::info!(">>> trying deposit. asset: {:?}, location: {:?}", asset, location); + let who = AccountIdConverter::from_location(location).ok_or(())?; + debug::info!("who: {:?}", who); + let currency_id = CurrencyIdConverter::from_asset(asset).ok_or(())?; + debug::info!("currency_id: {:?}", currency_id); + let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); + debug::info!("amount: {:?}", amount); + let balance_amount = amount.try_into().map_err(|_| ())?; + debug::info!("balance amount: {:?}", balance_amount); + MultiCurrency::deposit(currency_id, &who, balance_amount).map_err(|_| ())?; + debug::info!(">>> success deposit."); + debug::info!("------------------------------------------------"); + Ok(()) + } + + fn withdraw_asset(asset: &MultiAsset, location: &MultiLocation) -> result::Result { + debug::info!("------------------------------------------------"); + debug::info!(">>> trying withdraw. asset: {:?}, location: {:?}", asset, location); + let who = AccountIdConverter::from_location(location).ok_or(())?; + debug::info!("who: {:?}", who); + let currency_id = CurrencyIdConverter::from_asset(asset).ok_or(())?; + debug::info!("currency_id: {:?}", currency_id); + let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); + debug::info!("amount: {:?}", amount); + let balance_amount = amount.try_into().map_err(|_| ())?; + debug::info!("balance amount: {:?}", balance_amount); + MultiCurrency::withdraw(currency_id, &who, balance_amount).map_err(|_| ())?; + debug::info!(">>> success withdraw."); + debug::info!("------------------------------------------------"); + Ok(asset.clone()) + } +} + +pub trait XcmHandler { + type Origin; + type Xcm; + fn execute(origin: Self::Origin, xcm: Self::Xcm) -> DispatchResult; +} + +pub struct IsConcreteWithGeneralKey( + PhantomData<(CurrencyId, FromRelayChainBalance)>, +); +impl MatchesFungible + for IsConcreteWithGeneralKey +where + CurrencyId: TryFrom>, + B: TryFrom, + FromRelayChainBalance: Convert, +{ + fn matches_fungible(a: &MultiAsset) -> Option { + if let MultiAsset::ConcreteFungible { id, amount } = a { + if id == &MultiLocation::X1(Junction::Parent) { + // Convert relay chain decimals to local chain + let local_amount = FromRelayChainBalance::convert(*amount); + return CheckedConversion::checked_from(local_amount); + } + if let Some(Junction::GeneralKey(key)) = id.last() { + if TryInto::::try_into(key.clone()).is_ok() { + return CheckedConversion::checked_from(*amount); + } + } + } + None + } +} + +pub struct NativePalletAssetOr(PhantomData); +impl, MultiLocation)>>> FilterAssetLocation for NativePalletAssetOr { + fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { + if NativeAsset::filter_asset_location(asset, origin) { + return true; + } + + // native orml-tokens with a general key + if let MultiAsset::ConcreteFungible { ref id, .. } = asset { + if let Some(Junction::GeneralKey(key)) = id.last() { + return Pairs::get().contains(&(key.clone(), origin.clone())); + } + } + + false + } +} + +pub struct CurrencyIdConverter( + PhantomData, + PhantomData, +); +impl CurrencyIdConversion + for CurrencyIdConverter +where + CurrencyId: TryFrom>, + RelayChainCurrencyId: Get, +{ + fn from_asset(asset: &MultiAsset) -> Option { + if let MultiAsset::ConcreteFungible { id: location, .. } = asset { + if location == &MultiLocation::X1(Junction::Parent) { + return Some(RelayChainCurrencyId::get()); + } + if let Some(Junction::GeneralKey(key)) = location.last() { + return CurrencyId::try_from(key.clone()).ok(); + } + } + None + } +} diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml new file mode 100644 index 000000000..6893a3aa4 --- /dev/null +++ b/xtokens/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "orml-xtokens" +description = "Crosschain token transfer" +repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/tokens" +license = "Apache-2.0" +version = "0.3.3-dev" +authors = ["Acala Developers"] +edition = "2018" + +[dependencies] +serde = { version = "1.0.111", optional = true } +codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } + +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } + +orml-xcm-support = { path = "../xcm-support", version = "0.3.3-dev", default-features = false } + +cumulus-primitives = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1", default-features = false } + +xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } + +[dev-dependencies] +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" } +orml-tokens = { path = "../tokens", version = "0.3.3-dev" } + +[features] +default = ["std"] +std = [ + "serde", + "codec/std", + "sp-runtime/std", + "sp-std/std", + "sp-io/std", + "frame-support/std", + "frame-system/std", + 'orml-xcm-support/std', + "cumulus-primitives/std", + "xcm/std", +] diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs new file mode 100644 index 000000000..892dba990 --- /dev/null +++ b/xtokens/src/lib.rs @@ -0,0 +1,296 @@ +#![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::unused_unit)] + +pub use module::*; + +#[frame_support::pallet] +pub mod module { + use codec::{Decode, Encode}; + use frame_support::{pallet_prelude::*, traits::Get, transactional, Parameter}; + use frame_system::{ensure_signed, pallet_prelude::*}; + use sp_runtime::{ + traits::{AtLeast32BitUnsigned, Convert, MaybeSerializeDeserialize, Member}, + RuntimeDebug, + }; + use sp_std::prelude::*; + + use cumulus_primitives::{relay_chain::Balance as RelayChainBalance, ParaId}; + use orml_xcm_support::XcmHandler; + use xcm::v0::{Junction, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; + + #[derive(Encode, Decode, Eq, PartialEq, Clone, Copy, RuntimeDebug)] + /// Identity of chain. + pub enum ChainId { + /// The relay chain. + RelayChain, + /// A parachain. + ParaChain(ParaId), + } + + #[derive(Encode, Decode, Eq, PartialEq, Clone, RuntimeDebug)] + /// Identity of cross chain currency. + pub struct XCurrencyId { + /// The reserve chain of the currency. For instance, the reserve chain + /// of DOT is Polkadot. + pub chain_id: ChainId, + /// The identity of the currency. + pub currency_id: Vec, + } + + #[cfg(test)] + impl XCurrencyId { + pub fn new(chain_id: ChainId, currency_id: Vec) -> Self { + XCurrencyId { chain_id, currency_id } + } + } + + impl Into for XCurrencyId { + fn into(self) -> MultiLocation { + MultiLocation::X1(Junction::GeneralKey(self.currency_id)) + } + } + + #[pallet::config] + pub trait Config: frame_system::Config { + type Event: From> + IsType<::Event>; + + type Balance: Parameter + + Member + + AtLeast32BitUnsigned + + Default + + Copy + + MaybeSerializeDeserialize + + Into; + + /// Convertor `Balance` to `RelayChainBalance`. + type ToRelayChainBalance: Convert; + + type AccountId32Convert: Convert; + + type RelayChainNetworkId: Get; + + /// Parachain ID. + type ParaId: Get; + + type XcmHandler: XcmHandler; + } + + #[pallet::event] + #[pallet::generate_deposit(fn deposit_event)] + pub enum Event { + /// Transferred to relay chain. \[src, dest, amount\] + TransferredToRelayChain(T::AccountId, T::AccountId, T::Balance), + + /// Transferred to parachain. \[x_currency_id, src, para_id, dest, + /// dest_network, amount\] + TransferredToParachain(XCurrencyId, T::AccountId, ParaId, T::AccountId, NetworkId, T::Balance), + } + + #[pallet::hooks] + impl Hooks for Pallet {} + + #[pallet::pallet] + pub struct Pallet(PhantomData); + + #[pallet::call] + impl Pallet { + /// Transfer relay chain tokens to relay chain. + #[pallet::weight(10)] + #[transactional] + pub fn transfer_to_relay_chain( + origin: OriginFor, + dest: T::AccountId, + amount: T::Balance, + ) -> DispatchResultWithPostInfo { + let who = ensure_signed(origin.clone())?; + + let xcm = Xcm::WithdrawAsset { + assets: vec![MultiAsset::ConcreteFungible { + id: MultiLocation::X1(Junction::Parent), + amount: T::ToRelayChainBalance::convert(amount).into(), + }], + effects: vec![Order::InitiateReserveWithdraw { + assets: vec![MultiAsset::All], + reserve: MultiLocation::X1(Junction::Parent), + effects: vec![Order::DepositAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X1(Junction::AccountId32 { + network: T::RelayChainNetworkId::get(), + id: T::AccountId32Convert::convert(dest.clone()), + }), + }], + }], + }; + + T::XcmHandler::execute(origin, xcm)?; + + Self::deposit_event(Event::::TransferredToRelayChain(who, dest, amount)); + + Ok(().into()) + } + + /// Transfer tokens to parachain. + #[pallet::weight(10)] + pub fn transfer_to_parachain( + origin: OriginFor, + x_currency_id: XCurrencyId, + para_id: ParaId, + dest: T::AccountId, + dest_network: NetworkId, + amount: T::Balance, + ) -> DispatchResultWithPostInfo { + let who = ensure_signed(origin.clone())?; + + if para_id == T::ParaId::get() { + return Ok(().into()); + } + + let xcm = match x_currency_id.chain_id { + ChainId::RelayChain => { + Self::transfer_relay_chain_tokens_to_parachain(para_id, &dest, dest_network.clone(), amount) + } + ChainId::ParaChain(reserve_chain) => { + if T::ParaId::get() == reserve_chain { + Self::transfer_owned_tokens_to_parachain( + x_currency_id.clone(), + para_id, + &dest, + dest_network.clone(), + amount, + ) + } else { + Self::transfer_non_owned_tokens_to_parachain( + reserve_chain, + x_currency_id.clone(), + para_id, + &dest, + dest_network.clone(), + amount, + ) + } + } + }; + + T::XcmHandler::execute(origin, xcm)?; + + Self::deposit_event(Event::::TransferredToParachain( + x_currency_id, + who, + para_id, + dest, + dest_network, + amount, + )); + + Ok(().into()) + } + } + + impl Module { + fn transfer_relay_chain_tokens_to_parachain( + para_id: ParaId, + dest: &T::AccountId, + dest_network: NetworkId, + amount: T::Balance, + ) -> Xcm { + Xcm::WithdrawAsset { + assets: vec![MultiAsset::ConcreteFungible { + id: MultiLocation::X1(Junction::Parent), + amount: T::ToRelayChainBalance::convert(amount).into(), + }], + effects: vec![Order::InitiateReserveWithdraw { + assets: vec![MultiAsset::All], + reserve: MultiLocation::X1(Junction::Parent), + effects: vec![Order::DepositReserveAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X1(Junction::Parachain { id: para_id.into() }), + effects: vec![Order::DepositAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X1(Junction::AccountId32 { + network: dest_network, + id: T::AccountId32Convert::convert(dest.clone()), + }), + }], + }], + }], + } + } + + /// Transfer parachain tokens "owned" by self parachain to another + /// parachain. + /// + /// NOTE - `para_id` must not be self parachain. + fn transfer_owned_tokens_to_parachain( + x_currency_id: XCurrencyId, + para_id: ParaId, + dest: &T::AccountId, + dest_network: NetworkId, + amount: T::Balance, + ) -> Xcm { + Xcm::WithdrawAsset { + assets: vec![MultiAsset::ConcreteFungible { + id: x_currency_id.into(), + amount: amount.into(), + }], + effects: vec![Order::DepositReserveAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), + effects: vec![Order::DepositAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X1(Junction::AccountId32 { + network: dest_network, + id: T::AccountId32Convert::convert(dest.clone()), + }), + }], + }], + } + } + + /// Transfer parachain tokens not "owned" by self chain to another + /// parachain. + fn transfer_non_owned_tokens_to_parachain( + reserve_chain: ParaId, + x_currency_id: XCurrencyId, + para_id: ParaId, + dest: &T::AccountId, + dest_network: NetworkId, + amount: T::Balance, + ) -> Xcm { + let deposit_to_dest = Order::DepositAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X1(Junction::AccountId32 { + network: dest_network, + id: T::AccountId32Convert::convert(dest.clone()), + }), + }; + // If transfer to reserve chain, deposit to `dest` on reserve chain, + // else deposit reserve asset. + let reserve_chain_order = if para_id == reserve_chain { + deposit_to_dest + } else { + Order::DepositReserveAsset { + assets: vec![MultiAsset::All], + dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), + effects: vec![deposit_to_dest], + } + }; + + Xcm::WithdrawAsset { + assets: vec![MultiAsset::ConcreteFungible { + id: x_currency_id.into(), + amount: amount.into(), + }], + effects: vec![Order::InitiateReserveWithdraw { + assets: vec![MultiAsset::All], + reserve: MultiLocation::X2( + Junction::Parent, + Junction::Parachain { + id: reserve_chain.into(), + }, + ), + effects: vec![reserve_chain_order], + }], + } + } + } +} From 9cbff0d3510f33b626c90cb3be26761277141917 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 20 Jan 2021 13:32:01 +1300 Subject: [PATCH 06/21] Fix clippy. --- xcm-support/src/lib.rs | 8 ++------ xtokens/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/xcm-support/src/lib.rs b/xcm-support/src/lib.rs index 039d7a44d..3bd892e94 100644 --- a/xcm-support/src/lib.rs +++ b/xcm-support/src/lib.rs @@ -54,9 +54,7 @@ impl< debug::info!("currency_id: {:?}", currency_id); let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); debug::info!("amount: {:?}", amount); - let balance_amount = amount.try_into().map_err(|_| ())?; - debug::info!("balance amount: {:?}", balance_amount); - MultiCurrency::deposit(currency_id, &who, balance_amount).map_err(|_| ())?; + MultiCurrency::deposit(currency_id, &who, amount).map_err(|_| ())?; debug::info!(">>> success deposit."); debug::info!("------------------------------------------------"); Ok(()) @@ -71,9 +69,7 @@ impl< debug::info!("currency_id: {:?}", currency_id); let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); debug::info!("amount: {:?}", amount); - let balance_amount = amount.try_into().map_err(|_| ())?; - debug::info!("balance amount: {:?}", balance_amount); - MultiCurrency::withdraw(currency_id, &who, balance_amount).map_err(|_| ())?; + MultiCurrency::withdraw(currency_id, &who, amount).map_err(|_| ())?; debug::info!(">>> success withdraw."); debug::info!("------------------------------------------------"); Ok(asset.clone()) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 892dba990..3e5499a3e 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -107,7 +107,7 @@ pub mod module { let xcm = Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { id: MultiLocation::X1(Junction::Parent), - amount: T::ToRelayChainBalance::convert(amount).into(), + amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], @@ -196,7 +196,7 @@ pub mod module { Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { id: MultiLocation::X1(Junction::Parent), - amount: T::ToRelayChainBalance::convert(amount).into(), + amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], From 4f757630035c7986c5a0eba6e751e0013e8ed8b7 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 20 Jan 2021 16:01:31 +1300 Subject: [PATCH 07/21] Xcm execution in xtokens. --- xcm-support/src/lib.rs | 6 ---- xtokens/Cargo.toml | 4 +-- xtokens/src/lib.rs | 75 +++++++++++++++++++++++++++++++----------- 3 files changed, 57 insertions(+), 28 deletions(-) diff --git a/xcm-support/src/lib.rs b/xcm-support/src/lib.rs index 3bd892e94..501f1dd89 100644 --- a/xcm-support/src/lib.rs +++ b/xcm-support/src/lib.rs @@ -76,12 +76,6 @@ impl< } } -pub trait XcmHandler { - type Origin; - type Xcm; - fn execute(origin: Self::Origin, xcm: Self::Xcm) -> DispatchResult; -} - pub struct IsConcreteWithGeneralKey( PhantomData<(CurrencyId, FromRelayChainBalance)>, ); diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 6893a3aa4..8a667595e 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -17,11 +17,10 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -orml-xcm-support = { path = "../xcm-support", version = "0.3.3-dev", default-features = false } - cumulus-primitives = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1", default-features = false } xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } @@ -38,7 +37,6 @@ std = [ "sp-io/std", "frame-support/std", "frame-system/std", - 'orml-xcm-support/std', "cumulus-primitives/std", "xcm/std", ] diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 3e5499a3e..4efb75b9c 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -15,8 +15,8 @@ pub mod module { use sp_std::prelude::*; use cumulus_primitives::{relay_chain::Balance as RelayChainBalance, ParaId}; - use orml_xcm_support::XcmHandler; - use xcm::v0::{Junction, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; + use xcm::v0::{Error as XcmError, ExecuteXcm, Junction, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; + use xcm_executor::traits::LocationConversion; #[derive(Encode, Decode, Eq, PartialEq, Clone, Copy, RuntimeDebug)] /// Identity of chain. @@ -72,7 +72,9 @@ pub mod module { /// Parachain ID. type ParaId: Get; - type XcmHandler: XcmHandler; + type AccountIdConverter: LocationConversion; + + type XcmExecutor: ExecuteXcm; } #[pallet::event] @@ -81,9 +83,30 @@ pub mod module { /// Transferred to relay chain. \[src, dest, amount\] TransferredToRelayChain(T::AccountId, T::AccountId, T::Balance), + /// Transfer to relay chain failed. \[src, dest, amount, error\] + TransferToRelayChainFailed(T::AccountId, T::AccountId, T::Balance, XcmError), + /// Transferred to parachain. \[x_currency_id, src, para_id, dest, /// dest_network, amount\] TransferredToParachain(XCurrencyId, T::AccountId, ParaId, T::AccountId, NetworkId, T::Balance), + + /// Transfer to parachain failed. \[x_currency_id, src, para_id, dest, + /// dest_network, amount, error\] + TransferToParachainFailed( + XCurrencyId, + T::AccountId, + ParaId, + T::AccountId, + NetworkId, + T::Balance, + XcmError, + ), + } + + #[pallet::error] + pub enum Error { + /// Bad location + BadLocation, } #[pallet::hooks] @@ -102,7 +125,7 @@ pub mod module { dest: T::AccountId, amount: T::Balance, ) -> DispatchResultWithPostInfo { - let who = ensure_signed(origin.clone())?; + let who = ensure_signed(origin)?; let xcm = Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { @@ -122,9 +145,12 @@ pub mod module { }], }; - T::XcmHandler::execute(origin, xcm)?; - - Self::deposit_event(Event::::TransferredToRelayChain(who, dest, amount)); + let xcm_origin = + T::AccountIdConverter::try_into_location(who.clone()).map_err(|_| Error::::BadLocation)?; + match T::XcmExecutor::execute_xcm(xcm_origin, xcm) { + Ok(_) => Self::deposit_event(Event::::TransferredToRelayChain(who, dest, amount)), + Err(err) => Self::deposit_event(Event::::TransferToRelayChainFailed(who, dest, amount, err)), + } Ok(().into()) } @@ -139,7 +165,7 @@ pub mod module { dest_network: NetworkId, amount: T::Balance, ) -> DispatchResultWithPostInfo { - let who = ensure_signed(origin.clone())?; + let who = ensure_signed(origin)?; if para_id == T::ParaId::get() { return Ok(().into()); @@ -171,22 +197,33 @@ pub mod module { } }; - T::XcmHandler::execute(origin, xcm)?; - - Self::deposit_event(Event::::TransferredToParachain( - x_currency_id, - who, - para_id, - dest, - dest_network, - amount, - )); + let xcm_origin = + T::AccountIdConverter::try_into_location(who.clone()).map_err(|_| Error::::BadLocation)?; + match T::XcmExecutor::execute_xcm(xcm_origin, xcm) { + Ok(_) => Self::deposit_event(Event::::TransferredToParachain( + x_currency_id, + who, + para_id, + dest, + dest_network, + amount, + )), + Err(err) => Self::deposit_event(Event::::TransferToParachainFailed( + x_currency_id, + who, + para_id, + dest, + dest_network, + amount, + err, + )), + } Ok(().into()) } } - impl Module { + impl Pallet { fn transfer_relay_chain_tokens_to_parachain( para_id: ParaId, dest: &T::AccountId, From ef36c82771f79a002aad42ac05e5968e0ea68ed8 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 20 Jan 2021 16:53:58 +1300 Subject: [PATCH 08/21] Remove unused imports. --- xcm-support/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xcm-support/src/lib.rs b/xcm-support/src/lib.rs index 501f1dd89..1f7e02188 100644 --- a/xcm-support/src/lib.rs +++ b/xcm-support/src/lib.rs @@ -1,10 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::FullCodec; -use sp_runtime::{ - traits::{CheckedConversion, Convert, MaybeSerializeDeserialize, SaturatedConversion}, - DispatchResult, -}; +use sp_runtime::traits::{CheckedConversion, Convert, MaybeSerializeDeserialize, SaturatedConversion}; use sp_std::{ cmp::{Eq, PartialEq}, collections::btree_set::BTreeSet, From 53bd7752f2849a97575b76e230bc83525a1d35d5 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 27 Jan 2021 14:57:50 +1300 Subject: [PATCH 09/21] Remove parent from sibling parachains multi location. --- xtokens/src/lib.rs | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 4efb75b9c..1f5b1be18 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -129,18 +129,19 @@ pub mod module { let xcm = Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: MultiLocation::X1(Junction::Parent), + id: Junction::Parent.into(), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: MultiLocation::X1(Junction::Parent), + reserve: Junction::Parent.into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X1(Junction::AccountId32 { + dest: Junction::AccountId32 { network: T::RelayChainNetworkId::get(), id: T::AccountId32Convert::convert(dest.clone()), - }), + } + .into(), }], }], }; @@ -232,21 +233,22 @@ pub mod module { ) -> Xcm { Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: MultiLocation::X1(Junction::Parent), + id: Junction::Parent.into(), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: MultiLocation::X1(Junction::Parent), + reserve: Junction::Parent.into(), effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X1(Junction::Parachain { id: para_id.into() }), + dest: Junction::Parachain { id: para_id.into() }.into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X1(Junction::AccountId32 { + dest: Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - }), + } + .into(), }], }], }], @@ -271,13 +273,14 @@ pub mod module { }], effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), + dest: Junction::Parachain { id: para_id.into() }.into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X1(Junction::AccountId32 { + dest: Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - }), + } + .into(), }], }], } @@ -295,10 +298,11 @@ pub mod module { ) -> Xcm { let deposit_to_dest = Order::DepositAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X1(Junction::AccountId32 { + dest: Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - }), + } + .into(), }; // If transfer to reserve chain, deposit to `dest` on reserve chain, // else deposit reserve asset. @@ -307,7 +311,7 @@ pub mod module { } else { Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), + dest: Junction::Parachain { id: para_id.into() }.into(), effects: vec![deposit_to_dest], } }; @@ -319,12 +323,10 @@ pub mod module { }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: MultiLocation::X2( - Junction::Parent, - Junction::Parachain { - id: reserve_chain.into(), - }, - ), + reserve: Junction::Parachain { + id: reserve_chain.into(), + } + .into(), effects: vec![reserve_chain_order], }], } From d63027226338557f8527b40add9c098796e1d18c Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 27 Jan 2021 15:00:07 +1300 Subject: [PATCH 10/21] TTransfer to parachain should be transactional. --- xtokens/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 1f5b1be18..92d2eee4e 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -158,6 +158,7 @@ pub mod module { /// Transfer tokens to parachain. #[pallet::weight(10)] + #[transactional] pub fn transfer_to_parachain( origin: OriginFor, x_currency_id: XCurrencyId, From ba1e541caa7aaeab5ee5e751a4c271f39075a62d Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 27 Jan 2021 15:10:20 +1300 Subject: [PATCH 11/21] TODO: revert state on xcm execution failure. --- xtokens/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 92d2eee4e..5da5859ec 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -105,7 +105,7 @@ pub mod module { #[pallet::error] pub enum Error { - /// Bad location + /// Bad location. BadLocation, } @@ -148,6 +148,7 @@ pub mod module { let xcm_origin = T::AccountIdConverter::try_into_location(who.clone()).map_err(|_| Error::::BadLocation)?; + // TODO: revert state on xcm execution failure. match T::XcmExecutor::execute_xcm(xcm_origin, xcm) { Ok(_) => Self::deposit_event(Event::::TransferredToRelayChain(who, dest, amount)), Err(err) => Self::deposit_event(Event::::TransferToRelayChainFailed(who, dest, amount, err)), @@ -201,6 +202,7 @@ pub mod module { let xcm_origin = T::AccountIdConverter::try_into_location(who.clone()).map_err(|_| Error::::BadLocation)?; + // TODO: revert state on xcm execution failure. match T::XcmExecutor::execute_xcm(xcm_origin, xcm) { Ok(_) => Self::deposit_event(Event::::TransferredToParachain( x_currency_id, From 7b97ace9859303ce466e8e421ddd44f9c9839c36 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Fri, 12 Feb 2021 16:55:16 +1300 Subject: [PATCH 12/21] Update sibling parachain location. --- xtokens/src/lib.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 5da5859ec..9ac2dc931 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -15,7 +15,7 @@ pub mod module { use sp_std::prelude::*; use cumulus_primitives::{relay_chain::Balance as RelayChainBalance, ParaId}; - use xcm::v0::{Error as XcmError, ExecuteXcm, Junction, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; + use xcm::v0::{Error as XcmError, ExecuteXcm, Junction::*, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; use xcm_executor::traits::LocationConversion; #[derive(Encode, Decode, Eq, PartialEq, Clone, Copy, RuntimeDebug)] @@ -46,7 +46,7 @@ pub mod module { impl Into for XCurrencyId { fn into(self) -> MultiLocation { - MultiLocation::X1(Junction::GeneralKey(self.currency_id)) + GeneralKey(self.currency_id).into() } } @@ -129,15 +129,15 @@ pub mod module { let xcm = Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: Junction::Parent.into(), + id: Parent.into(), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Junction::Parent.into(), + reserve: Parent.into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: Junction::AccountId32 { + dest: AccountId32 { network: T::RelayChainNetworkId::get(), id: T::AccountId32Convert::convert(dest.clone()), } @@ -236,18 +236,18 @@ pub mod module { ) -> Xcm { Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: Junction::Parent.into(), + id: Parent.into(), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Junction::Parent.into(), + reserve: Parent.into(), effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: Junction::Parachain { id: para_id.into() }.into(), + dest: (Parent, Parachain { id: para_id.into() }).into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: Junction::AccountId32 { + dest: AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), } @@ -276,10 +276,10 @@ pub mod module { }], effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: Junction::Parachain { id: para_id.into() }.into(), + dest: (Parent, Parachain { id: para_id.into() }).into(), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: Junction::AccountId32 { + dest: AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), } @@ -301,7 +301,7 @@ pub mod module { ) -> Xcm { let deposit_to_dest = Order::DepositAsset { assets: vec![MultiAsset::All], - dest: Junction::AccountId32 { + dest: AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), } @@ -314,7 +314,7 @@ pub mod module { } else { Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: Junction::Parachain { id: para_id.into() }.into(), + dest: (Parent, Parachain { id: para_id.into() }).into(), effects: vec![deposit_to_dest], } }; @@ -326,7 +326,7 @@ pub mod module { }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Junction::Parachain { + reserve: Parachain { id: reserve_chain.into(), } .into(), From 06d37423846b986c2fc4880c2427bd2a0e71137d Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Tue, 16 Feb 2021 16:08:38 +1300 Subject: [PATCH 13/21] Bump dependencies. --- auction/Cargo.toml | 2 +- authority/Cargo.toml | 2 +- benchmarking/Cargo.toml | 2 +- currencies/Cargo.toml | 2 +- gradually-update/Cargo.toml | 2 +- nft/Cargo.toml | 2 +- oracle/Cargo.toml | 2 +- oracle/rpc/Cargo.toml | 2 +- oracle/rpc/runtime-api/Cargo.toml | 2 +- rewards/Cargo.toml | 2 +- tokens/Cargo.toml | 2 +- traits/Cargo.toml | 2 +- utilities/Cargo.toml | 2 +- vesting/Cargo.toml | 2 +- xcm-support/Cargo.toml | 2 +- xtokens/Cargo.toml | 6 +++--- xtokens/src/lib.rs | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/auction/Cargo.toml b/auction/Cargo.toml index d30aa9f0b..6383b28dc 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 2afae63da..0b1ca5da4 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index aa9d4a048..55d934476 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] paste = "0.1.16" -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 4819c19eb..1b023b105 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index cf029e301..112718736 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Laminar Developers "] edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 38fb25685..878fdb126 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index df8eddc75..808b41183 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 86fc0a77a..e49e20bc9 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Laminar Developers "] edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.0" } +codec = { package = "parity-scale-codec", version = "2.0.0" } jsonrpc-core = "15.0.0" jsonrpc-core-client = "15.0.0" jsonrpc-derive = "15.0.0" diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index d0e339f47..380a63148 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Laminar Developers "] edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 1149a8771..518c205db 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 85ab1d62c..194161b3c 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/traits/Cargo.toml b/traits/Cargo.toml index bf1560f54..4be085c09 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index baf5d5fe6..5b876fdaa 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index cb811f767..733f14d7c 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index 18a38efa9..a7f5965a3 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Acala Developers"] edition = "2018" [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false} sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false} diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index b1e1938f4..84f103b28 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } @@ -17,7 +17,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -cumulus-primitives = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1", default-features = false } xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } @@ -37,6 +37,6 @@ std = [ "sp-io/std", "frame-support/std", "frame-system/std", - "cumulus-primitives/std", + "cumulus-primitives-core/std", "xcm/std", ] diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 9ac2dc931..1df5959dd 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -14,7 +14,7 @@ pub mod module { }; use sp_std::prelude::*; - use cumulus_primitives::{relay_chain::Balance as RelayChainBalance, ParaId}; + use cumulus_primitives_core::{relay_chain::Balance as RelayChainBalance, ParaId}; use xcm::v0::{Error as XcmError, ExecuteXcm, Junction::*, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; use xcm_executor::traits::LocationConversion; From 727d6ee4e1280994d4ab584c7eb680c55419346f Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Fri, 19 Feb 2021 16:07:13 +1300 Subject: [PATCH 14/21] Update multilocation representation in xtoken. --- xtokens/src/lib.rs | 49 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 1df5959dd..93a92c3d5 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -15,7 +15,7 @@ pub mod module { use sp_std::prelude::*; use cumulus_primitives_core::{relay_chain::Balance as RelayChainBalance, ParaId}; - use xcm::v0::{Error as XcmError, ExecuteXcm, Junction::*, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; + use xcm::v0::{Error as XcmError, ExecuteXcm, Junction, MultiAsset, MultiLocation, NetworkId, Order, Xcm}; use xcm_executor::traits::LocationConversion; #[derive(Encode, Decode, Eq, PartialEq, Clone, Copy, RuntimeDebug)] @@ -46,7 +46,7 @@ pub mod module { impl Into for XCurrencyId { fn into(self) -> MultiLocation { - GeneralKey(self.currency_id).into() + MultiLocation::X1(Junction::GeneralKey(self.currency_id)) } } @@ -129,19 +129,18 @@ pub mod module { let xcm = Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: Parent.into(), + id: MultiLocation::X1(Junction::Parent), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Parent.into(), + reserve: MultiLocation::X1(Junction::Parent), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: AccountId32 { + dest: MultiLocation::X1(Junction::AccountId32 { network: T::RelayChainNetworkId::get(), id: T::AccountId32Convert::convert(dest.clone()), - } - .into(), + }), }], }], }; @@ -236,22 +235,22 @@ pub mod module { ) -> Xcm { Xcm::WithdrawAsset { assets: vec![MultiAsset::ConcreteFungible { - id: Parent.into(), + id: MultiLocation::X1(Junction::Parent), amount: T::ToRelayChainBalance::convert(amount), }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Parent.into(), + reserve: MultiLocation::X1(Junction::Parent), effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: (Parent, Parachain { id: para_id.into() }).into(), + // `dest` is children parachain(of parent). + dest: MultiLocation::X1(Junction::Parachain { id: para_id.into() }), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: AccountId32 { + dest: MultiLocation::X1(Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - } - .into(), + }), }], }], }], @@ -276,14 +275,13 @@ pub mod module { }], effects: vec![Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: (Parent, Parachain { id: para_id.into() }).into(), + dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), effects: vec![Order::DepositAsset { assets: vec![MultiAsset::All], - dest: AccountId32 { + dest: MultiLocation::X1(Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - } - .into(), + }), }], }], } @@ -301,11 +299,10 @@ pub mod module { ) -> Xcm { let deposit_to_dest = Order::DepositAsset { assets: vec![MultiAsset::All], - dest: AccountId32 { + dest: MultiLocation::X1(Junction::AccountId32 { network: dest_network, id: T::AccountId32Convert::convert(dest.clone()), - } - .into(), + }), }; // If transfer to reserve chain, deposit to `dest` on reserve chain, // else deposit reserve asset. @@ -314,7 +311,7 @@ pub mod module { } else { Order::DepositReserveAsset { assets: vec![MultiAsset::All], - dest: (Parent, Parachain { id: para_id.into() }).into(), + dest: MultiLocation::X2(Junction::Parent, Junction::Parachain { id: para_id.into() }), effects: vec![deposit_to_dest], } }; @@ -326,10 +323,12 @@ pub mod module { }], effects: vec![Order::InitiateReserveWithdraw { assets: vec![MultiAsset::All], - reserve: Parachain { - id: reserve_chain.into(), - } - .into(), + reserve: MultiLocation::X2( + Junction::Parent, + Junction::Parachain { + id: reserve_chain.into(), + }, + ), effects: vec![reserve_chain_order], }], } From a038c1ec98377110e52b5864f783fdf558212ee2 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Fri, 5 Mar 2021 22:02:05 +0800 Subject: [PATCH 15/21] fix clippy --- xtokens/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 93a92c3d5..e045c3529 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::from_over_into)] #![allow(clippy::unused_unit)] pub use module::*; From 9298895d4e4632c51864ad63c4cc4b69a55378e1 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Fri, 5 Mar 2021 22:30:29 +0800 Subject: [PATCH 16/21] remove sp-io --- tokens/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index e4da4b102..00c3d2646 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -11,7 +11,6 @@ edition = "2018" serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } From 6592bacb05e9a5d4dad4883ad2926c9b1a9d7721 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Fri, 5 Mar 2021 23:00:15 +0800 Subject: [PATCH 17/21] fix check --- currencies/Cargo.toml | 2 +- tokens/Cargo.toml | 4 ++-- traits/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index bea1119ff..ff45387c7 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } -codec = { package = "parity-scale-codec", version = "2.0.0" } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 00c3d2646..2d50cd60f 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,8 +12,8 @@ serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 37e6d18e3..c2a3a5b76 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -13,7 +13,7 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features = sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -num-traits = { version = "0.2.11" } +num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.1.3" frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } From b6e0f180fbecf12ad5565205a017d8836de666d9 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 10 Mar 2021 11:44:58 +1300 Subject: [PATCH 18/21] Bump dependencies. --- benchmarking/src/lib.rs | 6 +++--- tokens/src/lib.rs | 4 ++-- xcm-support/src/lib.rs | 30 +++++++++++++++--------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/benchmarking/src/lib.rs b/benchmarking/src/lib.rs index d6bcbda56..5a3b8d8d5 100644 --- a/benchmarking/src/lib.rs +++ b/benchmarking/src/lib.rs @@ -859,7 +859,7 @@ macro_rules! impl_benchmark { closure_to_benchmark()?; } else { // Time the extrinsic logic. - frame_support::debug::trace!( + frame_support::log::trace!!( target: "benchmark", "Start Benchmark: {:?}", c ); @@ -872,12 +872,12 @@ macro_rules! impl_benchmark { let elapsed_extrinsic = finish_extrinsic - start_extrinsic; // Commit the changes to get proper write count $crate::benchmarking::commit_db(); - frame_support::debug::trace!( + frame_support::log::trace!!( target: "benchmark", "End Benchmark: {} ns", elapsed_extrinsic ); let read_write_count = $crate::benchmarking::read_write_count(); - frame_support::debug::trace!( + frame_support::log::trace!!( target: "benchmark", "Read/Write Count {:?}", read_write_count ); diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index c993cf95e..717698ff4 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -40,7 +40,7 @@ pub use crate::imbalances::{NegativeImbalance, PositiveImbalance}; use frame_support::{ - ensure, + ensure, log, pallet_prelude::*, traits::{ BalanceStatus as Status, Currency as PalletCurrency, ExistenceRequirement, Get, Imbalance, @@ -456,7 +456,7 @@ impl Pallet { // No providers for the locks. This is impossible under normal circumstances // since the funds that are under the lock will themselves be stored in the // account and therefore will need a reference. - frame_support::debug::warn!( + log::warn!( "Warning: Attempt to introduce lock consumer reference, yet no providers. \ This is unexpected but should be safe." ); diff --git a/xcm-support/src/lib.rs b/xcm-support/src/lib.rs index 1f7e02188..a5d55ed10 100644 --- a/xcm-support/src/lib.rs +++ b/xcm-support/src/lib.rs @@ -15,7 +15,7 @@ use sp_std::{ use xcm::v0::{Error, Junction, MultiAsset, MultiLocation, Result}; use xcm_executor::traits::{FilterAssetLocation, LocationConversion, MatchesFungible, NativeAsset, TransactAsset}; -use frame_support::{debug, traits::Get}; +use frame_support::{log, traits::Get}; pub trait CurrencyIdConversion { fn from_asset(asset: &MultiAsset) -> Option; @@ -43,32 +43,32 @@ impl< for MultiCurrencyAdapter { fn deposit_asset(asset: &MultiAsset, location: &MultiLocation) -> Result { - debug::info!("------------------------------------------------"); - debug::info!(">>> trying deposit. asset: {:?}, location: {:?}", asset, location); + log::info!("------------------------------------------------"); + log::info!(">>> trying deposit. asset: {:?}, location: {:?}", asset, location); let who = AccountIdConverter::from_location(location).ok_or(())?; - debug::info!("who: {:?}", who); + log::info!("who: {:?}", who); let currency_id = CurrencyIdConverter::from_asset(asset).ok_or(())?; - debug::info!("currency_id: {:?}", currency_id); + log::info!("currency_id: {:?}", currency_id); let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); - debug::info!("amount: {:?}", amount); + log::info!("amount: {:?}", amount); MultiCurrency::deposit(currency_id, &who, amount).map_err(|_| ())?; - debug::info!(">>> success deposit."); - debug::info!("------------------------------------------------"); + log::info!(">>> success deposit."); + log::info!("------------------------------------------------"); Ok(()) } fn withdraw_asset(asset: &MultiAsset, location: &MultiLocation) -> result::Result { - debug::info!("------------------------------------------------"); - debug::info!(">>> trying withdraw. asset: {:?}, location: {:?}", asset, location); + log::info!("------------------------------------------------"); + log::info!(">>> trying withdraw. asset: {:?}, location: {:?}", asset, location); let who = AccountIdConverter::from_location(location).ok_or(())?; - debug::info!("who: {:?}", who); + log::info!("who: {:?}", who); let currency_id = CurrencyIdConverter::from_asset(asset).ok_or(())?; - debug::info!("currency_id: {:?}", currency_id); + log::info!("currency_id: {:?}", currency_id); let amount: MultiCurrency::Balance = Matcher::matches_fungible(&asset).ok_or(())?.saturated_into(); - debug::info!("amount: {:?}", amount); + log::info!("amount: {:?}", amount); MultiCurrency::withdraw(currency_id, &who, amount).map_err(|_| ())?; - debug::info!(">>> success withdraw."); - debug::info!("------------------------------------------------"); + log::info!(">>> success withdraw."); + log::info!("------------------------------------------------"); Ok(asset.clone()) } } From e2247358a4447a2416c2211e9f9d342516c2bcf6 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 10 Mar 2021 14:38:33 +1300 Subject: [PATCH 19/21] Fix benchmarking logs. --- benchmarking/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarking/src/lib.rs b/benchmarking/src/lib.rs index 5a3b8d8d5..71c6af4e7 100644 --- a/benchmarking/src/lib.rs +++ b/benchmarking/src/lib.rs @@ -859,7 +859,7 @@ macro_rules! impl_benchmark { closure_to_benchmark()?; } else { // Time the extrinsic logic. - frame_support::log::trace!!( + frame_support::log::trace!( target: "benchmark", "Start Benchmark: {:?}", c ); @@ -872,12 +872,12 @@ macro_rules! impl_benchmark { let elapsed_extrinsic = finish_extrinsic - start_extrinsic; // Commit the changes to get proper write count $crate::benchmarking::commit_db(); - frame_support::log::trace!!( + frame_support::log::trace!( target: "benchmark", "End Benchmark: {} ns", elapsed_extrinsic ); let read_write_count = $crate::benchmarking::read_write_count(); - frame_support::log::trace!!( + frame_support::log::trace!( target: "benchmark", "Read/Write Count {:?}", read_write_count ); From 188f4cc35f520cf0d8fecd8f5a3b77aabd5c198e Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 10 Mar 2021 14:43:58 +1300 Subject: [PATCH 20/21] Dependencies. --- auction/Cargo.toml | 12 ++++++------ authority/Cargo.toml | 16 ++++++++-------- benchmarking/Cargo.toml | 16 ++++++++-------- currencies/Cargo.toml | 14 +++++++------- gradually-update/Cargo.toml | 12 ++++++------ nft/Cargo.toml | 12 ++++++------ oracle/Cargo.toml | 14 +++++++------- oracle/rpc/Cargo.toml | 6 +++--- oracle/rpc/runtime-api/Cargo.toml | 4 ++-- rewards/Cargo.toml | 12 ++++++------ tokens/Cargo.toml | 16 ++++++++-------- traits/Cargo.toml | 8 ++++---- utilities/Cargo.toml | 10 +++++----- vesting/Cargo.toml | 14 +++++++------- xcm-support/Cargo.toml | 6 +++--- xtokens/Cargo.toml | 12 ++++++------ 16 files changed, 92 insertions(+), 92 deletions(-) diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 15572f012..5c568933b 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -10,18 +10,18 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 8c8fab9f7..5d7a393f4 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -10,21 +10,21 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-io = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -pallet-scheduler = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index 2ffa6654d..e2ae5e252 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -11,14 +11,14 @@ edition = "2018" serde = { version = "1.0.111", optional = true } paste = "0.1.16" codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-api = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime-interface = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-benchmarking = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index ff45387c7..a7029ed79 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } @@ -23,8 +23,8 @@ orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-feature funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -pallet-balances = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } [features] diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index e7fb4b2dc..6df11cae4 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-core = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 1fad15e41..1870aa65e 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -10,15 +10,15 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [dev-dependencies] -sp-io = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index 2e1dffdd8..8bd2e9df9 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -10,13 +10,13 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-application-crypto = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } @@ -24,7 +24,7 @@ orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-feature funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index aae95babb..9ab71dbee 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -9,9 +9,9 @@ codec = { package = "parity-scale-codec", version = "2.0.0" } jsonrpc-core = "15.0.0" jsonrpc-core-client = "15.0.0" jsonrpc-derive = "15.0.0" -sp-runtime = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-blockchain = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } orml-oracle-rpc-runtime-api = { path = "runtime-api" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index 974eca45b..3003f32f8 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -sp-api = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 2ab1fb263..fb7c747f6 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -10,17 +10,17 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 2d50cd60f..641eb41b2 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -10,19 +10,19 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-io = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -pallet-treasury = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -pallet-elections-phragmen = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/traits/Cargo.toml b/traits/Cargo.toml index c2a3a5b76..e99c0d48b 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.1.3" -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index 1d5df57c8..955ebc0ec 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -10,16 +10,16 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] serde_json = "1.0.53" -frame-system = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index d6f18bfd4..bb4cdc717 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -10,18 +10,18 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -pallet-balances = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } [features] default = ["std"] diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index a1274d358..0d6f34577 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,10 +10,10 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 2ae68d084..b7e55d118 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.111", optional = true } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } -sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } -frame-support = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } -frame-system = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1", default-features = false } cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "rococo-v1", default-features = false } @@ -23,7 +23,7 @@ xcm = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", de xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1", default-features = false } [dev-dependencies] -sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "rococo-v1" } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "rococo-v1" } orml-tokens = { path = "../tokens", version = "0.4.1-dev" } From 9a3a198b3c381c7e02d2bf1ce332856cc1131d8f Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Wed, 10 Mar 2021 14:51:08 +1300 Subject: [PATCH 21/21] Bump xtokens and xcm-support version. --- xcm-support/Cargo.toml | 2 +- xtokens/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index 0d6f34577..045d9898c 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -3,7 +3,7 @@ name = "orml-xcm-support" description = "Crosschain token transfer" repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xcm-support" license = "Apache-2.0" -version = "0.3.3-dev" +version = "0.4.1-dev" authors = ["Acala Developers"] edition = "2018" diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index b7e55d118..5124431b1 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -3,7 +3,7 @@ name = "orml-xtokens" description = "Crosschain token transfer" repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/tokens" license = "Apache-2.0" -version = "0.3.3-dev" +version = "0.4.1-dev" authors = ["Acala Developers"] edition = "2018"