From 21d9890fe5484abdf5f80762fcf73e5ad1e6cb22 Mon Sep 17 00:00:00 2001
From: Xiliang Chen <xlchen1291@gmail.com>
Date: Tue, 26 May 2020 14:00:25 +1200
Subject: [PATCH] update to Substrate 2.0 (#181)

---
 auction/Cargo.toml                | 12 ++++++------
 auction/src/mock.rs               |  1 +
 benchmarking/Cargo.toml           | 16 ++++++++--------
 benchmarking/src/tests.rs         |  1 +
 currencies/Cargo.toml             | 14 +++++++-------
 currencies/src/mock.rs            |  1 +
 gradually-update/Cargo.toml       | 12 ++++++------
 gradually-update/src/mock.rs      |  1 +
 oracle/Cargo.toml                 | 14 +++++++-------
 oracle/rpc/Cargo.toml             |  6 +++---
 oracle/rpc/runtime-api/Cargo.toml |  4 ++--
 oracle/src/mock.rs                |  1 +
 prices/Cargo.toml                 | 12 ++++++------
 schedule-update/Cargo.toml        | 14 +++++++-------
 schedule-update/src/mock.rs       |  1 +
 tokens/Cargo.toml                 | 12 ++++++------
 tokens/src/mock.rs                |  1 +
 traits/Cargo.toml                 |  8 ++++----
 utilities/Cargo.toml              | 12 ++++++------
 utilities/src/linked_item.rs      |  1 +
 vesting/Cargo.toml                | 14 +++++++-------
 vesting/src/mock.rs               |  1 +
 22 files changed, 84 insertions(+), 75 deletions(-)

diff --git a/auction/Cargo.toml b/auction/Cargo.toml
index 752d48b..89ebdf4 100644
--- a/auction/Cargo.toml
+++ b/auction/Cargo.toml
@@ -10,17 +10,17 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 orml-traits = { path = "../traits", version = "0.1.0", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/auction/src/mock.rs b/auction/src/mock.rs
index 5f836de..7331f41 100644
--- a/auction/src/mock.rs
+++ b/auction/src/mock.rs
@@ -62,6 +62,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 
 pub struct Handler;
diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml
index f456fe1..4dbe25c 100644
--- a/benchmarking/Cargo.toml
+++ b/benchmarking/Cargo.toml
@@ -11,14 +11,14 @@ edition = "2018"
 linregress = "0.1"
 paste = "0.1"
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-api = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime-interface = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
-frame-benchmarking = { version = "2.0.0-alpha.8", default-features = false }
+sp-api = { version = "2.0.0-rc1", default-features = false }
+sp-runtime-interface = { version = "2.0.0-rc1", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
+frame-benchmarking = { version = "2.0.0-rc1", default-features = false }
 
 [features]
 default = [ "std" ]
diff --git a/benchmarking/src/tests.rs b/benchmarking/src/tests.rs
index f837ac2..5e2ffab 100644
--- a/benchmarking/src/tests.rs
+++ b/benchmarking/src/tests.rs
@@ -77,6 +77,7 @@ impl frame_system::Trait for Test {
 	type AccountData = ();
 	type OnNewAccount = ();
 	type OnKilledAccount = ();
+	type MaximumExtrinsicWeight = ();
 }
 
 impl Trait for Test {
diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml
index 94204d1..8ba5279 100644
--- a/currencies/Cargo.toml
+++ b/currencies/Cargo.toml
@@ -10,18 +10,18 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 orml-traits = { path = "../traits", version = "0.1.0", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
-pallet-balances = { version = "2.0.0-alpha.8" }
+sp-core = { version = "2.0.0-rc1", default-features = false }
+pallet-balances = { version = "2.0.0-rc1" }
 tokens = { package = "orml-tokens", path = "../tokens" }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
diff --git a/currencies/src/mock.rs b/currencies/src/mock.rs
index d6176c6..e333b8d 100644
--- a/currencies/src/mock.rs
+++ b/currencies/src/mock.rs
@@ -62,6 +62,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 pub type System = system::Module<Runtime>;
 
diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml
index e09d450..63c72e4 100644
--- a/gradually-update/Cargo.toml
+++ b/gradually-update/Cargo.toml
@@ -10,12 +10,12 @@ edition = "2018"
 [dependencies]
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
 
 [dev-dependencies]
 orml-utilities = { path = "../utilities", default-features = false }
diff --git a/gradually-update/src/mock.rs b/gradually-update/src/mock.rs
index dc85162..6963593 100644
--- a/gradually-update/src/mock.rs
+++ b/gradually-update/src/mock.rs
@@ -60,6 +60,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 pub type System = system::Module<Runtime>;
 
diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml
index aff8bc4..1149d7f 100644
--- a/oracle/Cargo.toml
+++ b/oracle/Cargo.toml
@@ -11,19 +11,19 @@ edition = "2018"
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
 
-sp-application-crypto = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-application-crypto = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 orml-traits = { path = "../traits", version = "0.1.0", default-features = false }
 orml-utilities = { path = "../utilities", version = "0.1.0", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml
index 44dfc29..111e2a8 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 = "14.0.5"
 jsonrpc-core-client = "14.0.5"
 jsonrpc-derive = "14.0.5"
-sp-runtime = { version = "2.0.0-alpha.8" }
-sp-api = { version = "2.0.0-alpha.8" }
-sp-blockchain = { version = "2.0.0-alpha.8" }
+sp-runtime = { version = "2.0.0-rc1" }
+sp-api = { version = "2.0.0-rc1" }
+sp-blockchain = { version = "2.0.0-rc1" }
 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 c5e7027..47a0a2c 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-alpha.8" }
-sp-std = { default-features = false, version = "2.0.0-alpha.8" }
+sp-api = { default-features = false, version = "2.0.0-rc1" }
+sp-std = { default-features = false, version = "2.0.0-rc1" }
 
 [features]
 default = ["std"]
diff --git a/oracle/src/mock.rs b/oracle/src/mock.rs
index 30bce7d..a9f7f59 100644
--- a/oracle/src/mock.rs
+++ b/oracle/src/mock.rs
@@ -60,6 +60,7 @@ impl frame_system::Trait for Test {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 
 thread_local! {
diff --git a/prices/Cargo.toml b/prices/Cargo.toml
index 9789a44..317a66a 100644
--- a/prices/Cargo.toml
+++ b/prices/Cargo.toml
@@ -10,18 +10,18 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 orml-traits = { path = "../traits", version = "0.1.0", default-features = false }
 orml-utilities = { path = "../utilities", version = "0.1.0", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/schedule-update/Cargo.toml b/schedule-update/Cargo.toml
index bb30174..484b70b 100644
--- a/schedule-update/Cargo.toml
+++ b/schedule-update/Cargo.toml
@@ -10,15 +10,15 @@ edition = "2018"
 [dependencies]
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
 
 [dev-dependencies]
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
-pallet-balances = { version = "2.0.0-alpha.8" }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
+pallet-balances = { version = "2.0.0-rc1" }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/schedule-update/src/mock.rs b/schedule-update/src/mock.rs
index 894cfd1..5b79004 100644
--- a/schedule-update/src/mock.rs
+++ b/schedule-update/src/mock.rs
@@ -67,6 +67,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 pub type System = frame_system::Module<Runtime>;
 
diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml
index c601018..8764c92 100644
--- a/tokens/Cargo.toml
+++ b/tokens/Cargo.toml
@@ -10,18 +10,18 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 orml-traits = { path = "../traits", version = "0.1.0", default-features = false }
 orml-utilities = { path = "../utilities", version = "0.1.0", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs
index 9f22023..1b7a41b 100644
--- a/tokens/src/mock.rs
+++ b/tokens/src/mock.rs
@@ -60,6 +60,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 pub type System = system::Module<Runtime>;
 
diff --git a/traits/Cargo.toml b/traits/Cargo.toml
index 55fafc0..4c3bb16 100644
--- a/traits/Cargo.toml
+++ b/traits/Cargo.toml
@@ -10,12 +10,12 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", 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-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
 
 [dev-dependencies]
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml
index 43e2386..a2642b9 100644
--- a/utilities/Cargo.toml
+++ b/utilities/Cargo.toml
@@ -10,13 +10,13 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-core = { version = "2.0.0-rc1", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
 
 [dev-dependencies]
 serde_json = "1.0.41"
diff --git a/utilities/src/linked_item.rs b/utilities/src/linked_item.rs
index fdc2dae..553f39e 100644
--- a/utilities/src/linked_item.rs
+++ b/utilities/src/linked_item.rs
@@ -219,6 +219,7 @@ mod tests {
 		type DbWeight = ();
 		type BlockExecutionWeight = ();
 		type ExtrinsicBaseWeight = ();
+		type MaximumExtrinsicWeight = ();
 	}
 
 	type TestLinkedList = LinkedList<TestItem, Key, Value>;
diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml
index 3f88f6d..560431a 100644
--- a/vesting/Cargo.toml
+++ b/vesting/Cargo.toml
@@ -10,16 +10,16 @@ edition = "2018"
 [dependencies]
 serde = { version = "1.0.101", optional = true }
 codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
-sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
-sp-io = { version = "2.0.0-alpha.8", default-features = false }
-sp-std = { version = "2.0.0-alpha.8", default-features = false }
+sp-runtime = { version = "2.0.0-rc1", default-features = false }
+sp-io = { version = "2.0.0-rc1", default-features = false }
+sp-std = { version = "2.0.0-rc1", default-features = false }
 
-frame-support = { version = "2.0.0-alpha.8", default-features = false }
-frame-system = { version = "2.0.0-alpha.8", default-features = false }
+frame-support = { version = "2.0.0-rc1", default-features = false }
+frame-system = { version = "2.0.0-rc1", default-features = false }
 
 [dev-dependencies]
-sp-core = { version = "2.0.0-alpha.8", default-features = false }
-pallet-balances = { version = "2.0.0-alpha.8" }
+sp-core = { version = "2.0.0-rc1", default-features = false }
+pallet-balances = { version = "2.0.0-rc1" }
 
 clear_on_drop = { version = "0.2.3", features = ["no_cc"] }	# https://github.com/paritytech/substrate/issues/4179
 
diff --git a/vesting/src/mock.rs b/vesting/src/mock.rs
index e706ba9..f9e6668 100644
--- a/vesting/src/mock.rs
+++ b/vesting/src/mock.rs
@@ -58,6 +58,7 @@ impl frame_system::Trait for Runtime {
 	type DbWeight = ();
 	type BlockExecutionWeight = ();
 	type ExtrinsicBaseWeight = ();
+	type MaximumExtrinsicWeight = ();
 }
 pub type System = system::Module<Runtime>;
 
-- 
GitLab