Skip to content

Commit

Permalink
update to Substrate 2.0 (#246)
Browse files Browse the repository at this point in the history
* update to Substrate 2.0

* update for oracle
  • Loading branch information
xlc authored May 26, 2020
1 parent d71912c commit 49eaab9
Show file tree
Hide file tree
Showing 53 changed files with 913 additions and 726 deletions.
1,003 changes: 573 additions & 430 deletions Cargo.lock

Large diffs are not rendered by default.

71 changes: 36 additions & 35 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,40 @@ serde = { version = "1.0.101", features = ["derive"] }
serde_json = "1.0.41"
structopt = "0.3.8"

pallet-transaction-payment-rpc = { version = "2.0.0-alpha.8" }
sc-basic-authorship = { version = "0.8.0-alpha.8" }
sc-chain-spec = { version = "2.0.0-alpha.8" }
sc-cli = { version = "0.8.0-alpha.8" }
sc-client-api = { version = "2.0.0-alpha.8" }
sc-client-db = { version = "0.8.0-alpha.8" }
sc-consensus = { version = "0.8.0-alpha.8" }
sc-consensus-babe = { version = "0.8.0-alpha.8" }
sc-consensus-babe-rpc = { version = "0.8.0-alpha.8" }
sc-consensus-epochs = { version = "0.8.0-alpha.8" }
sc-executor = { version = "0.8.0-alpha.8" }
sc-finality-grandpa = { version = "0.8.0-alpha.8" }
sc-finality-grandpa-rpc = { version = "0.8.0-alpha.8" }
sc-keystore = { version = "2.0.0-alpha.8" }
sc-network = { version = "0.8.0-alpha.8" }
sc-offchain = { version = "2.0.0-alpha.8" }
sc-rpc = { version = "2.0.0-alpha.8" }
sc-service = { version = "0.8.0-alpha.8" }
sc-telemetry = { version = "2.0.0-alpha.8" }
sc-transaction-pool = { version = "2.0.0-alpha.8" }
sp-api = { version = "2.0.0-alpha.8" }
sp-consensus = { version = "0.8.0-alpha.8" }
sp-consensus-babe = { version = "0.8.0-alpha.8" }
sp-core = { version = "2.0.0-alpha.8" }
sp-finality-grandpa = { version = "2.0.0-alpha.8" }
sp-inherents = { version = "2.0.0-alpha.8" }
sp-io = { version = "2.0.0-alpha.8" }
sp-runtime = { version = "2.0.0-alpha.8" }
sp-transaction-pool = { version = "2.0.0-alpha.8" }
substrate-frame-rpc-system = { version = "2.0.0-alpha.8" }
frame-benchmarking-cli = { version = "2.0.0-alpha.8" }
sp-blockchain = { version = "2.0.0-alpha.8" }
frame-benchmarking = { version = "2.0.0-alpha.8" }
pallet-transaction-payment-rpc = { version = "2.0.0-rc1" }
sc-basic-authorship = { version = "0.8.0-rc1" }
sc-chain-spec = { version = "2.0.0-rc1" }
sc-cli = { version = "0.8.0-rc1" }
sc-client-api = { version = "2.0.0-rc1" }
sc-client-db = { version = "0.8.0-rc1" }
sc-consensus = { version = "0.8.0-rc1" }
sc-consensus-babe = { version = "0.8.0-rc1" }
sc-consensus-babe-rpc = { version = "0.8.0-rc1" }
sc-consensus-epochs = { version = "0.8.0-rc1" }
sc-executor = { version = "0.8.0-rc1" }
sc-finality-grandpa = { version = "0.8.0-rc1" }
sc-finality-grandpa-rpc = { version = "0.8.0-rc1" }
sc-keystore = { version = "2.0.0-rc1" }
sc-network = { version = "0.8.0-rc1" }
sc-offchain = { version = "2.0.0-rc1" }
sc-rpc = { version = "2.0.0-rc1" }
sc-rpc-api = { version = "0.8.0-rc1" }
sc-service = { version = "0.8.0-rc1" }
sc-telemetry = { version = "2.0.0-rc1" }
sc-transaction-pool = { version = "2.0.0-rc1" }
sp-api = { version = "2.0.0-rc1" }
sp-consensus = { version = "0.8.0-rc1" }
sp-consensus-babe = { version = "0.8.0-rc1" }
sp-core = { version = "2.0.0-rc1" }
sp-finality-grandpa = { version = "2.0.0-rc1" }
sp-inherents = { version = "2.0.0-rc1" }
sp-io = { version = "2.0.0-rc1" }
sp-runtime = { version = "2.0.0-rc1" }
sp-transaction-pool = { version = "2.0.0-rc1" }
substrate-frame-rpc-system = { version = "2.0.0-rc1" }
frame-benchmarking-cli = { version = "2.0.0-rc1" }
sp-blockchain = { version = "2.0.0-rc1" }
frame-benchmarking = { version = "2.0.0-rc1" }

module-dex-rpc = { path = "modules/dex/rpc" }
module-support = { path = "modules/support" }
Expand All @@ -67,8 +68,8 @@ inspect = { package = "acala-inspect", path = "inspect" }

[build-dependencies]
vergen = "3.0.4"
build-script-utils = { package = "substrate-build-script-utils", version = "2.0.0-alpha.8" }
frame-benchmarking-cli = { version = "2.0.0-alpha.8" }
build-script-utils = { package = "substrate-build-script-utils", version = "2.0.0-rc1" }
frame-benchmarking-cli = { version = "2.0.0-rc1" }

[features]
default = ["wasmtime"]
Expand Down
12 changes: 6 additions & 6 deletions inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2018"
codec = { package = "parity-scale-codec", version = "1.3.0" }
derive_more = "0.99"
log = "0.4.8"
sc-cli = { version = "0.8.0-alpha.8" }
sc-client-api = { version = "2.0.0-alpha.8" }
sc-service = { version = "0.8.0-alpha.8", default-features = false }
sp-blockchain = { version = "2.0.0-alpha.8" }
sp-core = { version = "2.0.0-alpha.8" }
sp-runtime = { version = "2.0.0-alpha.8" }
sc-cli = { version = "0.8.0-rc1" }
sc-client-api = { version = "2.0.0-rc1" }
sc-service = { version = "0.8.0-rc1", default-features = false }
sp-blockchain = { version = "2.0.0-rc1" }
sp-core = { version = "2.0.0-rc1" }
sp-runtime = { version = "2.0.0-rc1" }
structopt = "0.3.8"
18 changes: 9 additions & 9 deletions modules/accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ 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 }
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 }
pallet-transaction-payment = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
pallet-timestamp = { version = "2.0.0-alpha.8", default-features = false }
sp-runtime = { 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 }
sp-std = { version = "2.0.0-rc1", default-features = false }
pallet-transaction-payment = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
pallet-timestamp = { version = "2.0.0-rc1", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
orml-currencies = { path = "../../orml/currencies", default-features = false }
primitives = { package = "module-primitives", path = "../primitives", default-features = false }

[dev-dependencies]
sp-core = { version = "2.0.0-alpha.8", default-features = false }
sp-io = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }

[features]
Expand Down
11 changes: 4 additions & 7 deletions modules/accounts/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
#![cfg(test)]

use super::*;
use frame_support::{impl_outer_dispatch, impl_outer_origin, parameter_types};
use frame_support::{impl_outer_dispatch, impl_outer_origin, parameter_types, weights::IdentityFee};
use sp_core::H256;
use sp_runtime::{
testing::Header,
traits::{ConvertInto, IdentityLookup},
Perbill,
};
use sp_runtime::{testing::Header, traits::IdentityLookup, Perbill};

pub type AccountId = u64;
pub type BlockNumber = u64;
Expand Down Expand Up @@ -67,6 +63,7 @@ impl system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}

impl orml_tokens::Trait for Runtime {
Expand Down Expand Up @@ -124,7 +121,7 @@ impl pallet_transaction_payment::Trait for Runtime {
type Currency = PalletBalances;
type OnTransactionPayment = ();
type TransactionByteFee = TransactionByteFee;
type WeightToFee = ConvertInto;
type WeightToFee = IdentityFee<u64>;
type FeeMultiplierUpdate = ();
}

Expand Down
10 changes: 5 additions & 5 deletions modules/airdrop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ 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 }
frame-support = { version = "2.0.0-alpha.8", default-features = false }
frame-system = { version = "2.0.0-alpha.8", default-features = false }
sp-runtime = { 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 }
primitives = { package = "module-primitives", path = "../primitives", default-features = false }

[dev-dependencies]
sp-core = { version = "2.0.0-alpha.8", default-features = false }
sp-io = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }

[features]
default = ["std"]
Expand Down
1 change: 1 addition & 0 deletions modules/airdrop/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}
pub type System = system::Module<Runtime>;

Expand Down
14 changes: 7 additions & 7 deletions modules/auction_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ 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 }
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-io = { version = "2.0.0-alpha.8", default-features = false }
sp-runtime = { 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 }
sp-std = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
utilities = { path = "../../utilities", default-features = false }
primitives = { package = "module-primitives", path = "../primitives", default-features = false }

[dev-dependencies]
sp-core = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
orml-auction = { path = "../../orml/auction", default-features = false }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp_treasury", default-features = false }

Expand Down
18 changes: 9 additions & 9 deletions modules/auction_manager/benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ authors = ["Acala Developers"]
edition = "2018"

[dependencies]
sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
sp-std = { 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-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-rc1", default-features = false }
frame-system = { version = "2.0.0-rc1", default-features = false }
frame-benchmarking = { version = "2.0.0-rc1", default-features = false }
orml-auction = { path = "../../../orml/auction", default-features = false }
orml-oracle = { path = "../../../orml/oracle", default-features = false }
orml-traits = { path = "../../../orml/traits", default-features = false }
Expand All @@ -22,12 +22,12 @@ auction-manager = { package = "module-auction-manager", path = "../../auction_ma
[dev-dependencies]
serde = { version = "1.0.101" }
codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
sp-core = { version = "2.0.0-alpha.8", default-features = false }
sp-io = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
orml-currencies = { path = "../../../orml/currencies", default-features = false }
orml-tokens = { path = "../../../orml/tokens", default-features = false }
pallet-timestamp = { version = "2.0.0-alpha.8" }
pallet-timestamp = { version = "2.0.0-rc1" }

[features]
default = ["std"]
Expand Down
1 change: 1 addition & 0 deletions modules/auction_manager/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl frame_system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}

impl orml_tokens::Trait for Runtime {
Expand Down
1 change: 1 addition & 0 deletions modules/auction_manager/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}
pub type System = system::Module<Runtime>;

Expand Down
16 changes: 8 additions & 8 deletions modules/cdp_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.101", optional = true }
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false }
frame-support = { 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 }
sp-application-crypto = { version = "2.0.0-alpha.8", default-features = false }
sp-runtime = { 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 }
sp-std = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
sp-application-crypto = { version = "2.0.0-rc1", default-features = false }
sp-runtime = { version = "2.0.0-rc1", default-features = false }
frame-system = { version = "2.0.0-rc1", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
loans = { package = "module-loans", path = "../loans", default-features = false }
primitives = { package = "module-primitives", path = "../primitives", default-features = false }
utilities = { path = "../../utilities", default-features = false }

[dev-dependencies]
sp-core = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
orml-currencies = { path = "../../orml/currencies", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
dex = { package = "module-dex", path = "../dex", default-features = false }
Expand Down
18 changes: 9 additions & 9 deletions modules/cdp_engine/benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ authors = ["Acala Developers"]
edition = "2018"

[dependencies]
sp-runtime = { version = "2.0.0-alpha.8", default-features = false }
sp-std = { 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-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-rc1", default-features = false }
frame-system = { version = "2.0.0-rc1", default-features = false }
frame-benchmarking = { version = "2.0.0-rc1", default-features = false }
orml-oracle = { path = "../../../orml/oracle", default-features = false }
orml-traits = { path = "../../../orml/traits", default-features = false }
prices = { package = "module-prices", path = "../../prices", default-features = false }
Expand All @@ -22,13 +22,13 @@ dex = { package = "module-dex", path = "../../dex", default-features = false }
[dev-dependencies]
serde = { version = "1.0.101" }
codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
sp-core = { version = "2.0.0-alpha.8", default-features = false }
sp-io = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
orml-currencies = { path = "../../../orml/currencies", default-features = false }
orml-tokens = { path = "../../../orml/tokens", default-features = false }
cdp-treasury = { package = "module-cdp-treasury", path = "../../cdp_treasury", default-features = false }
pallet-timestamp = { version = "2.0.0-alpha.8" }
pallet-timestamp = { version = "2.0.0-rc1" }

[features]
default = ["std"]
Expand Down
1 change: 1 addition & 0 deletions modules/cdp_engine/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl frame_system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}

impl orml_tokens::Trait for Runtime {
Expand Down
1 change: 1 addition & 0 deletions modules/cdp_engine/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}
pub type System = system::Module<Runtime>;

Expand Down
16 changes: 8 additions & 8 deletions modules/cdp_treasury/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ 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 }
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-rc1", 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 }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "module-primitives", path = "../primitives", default-features = false }
frame-benchmarking = { version = "2.0.0-alpha.8", default-features = false, optional = true }
frame-benchmarking = { version = "2.0.0-rc1", default-features = false, optional = true }

[dev-dependencies]
sp-core = { version = "2.0.0-alpha.8", default-features = false }
sp-io = { version = "2.0.0-alpha.8", default-features = false }
pallet-balances = { version = "2.0.0-alpha.8", default-features = false }
sp-core = { version = "2.0.0-rc1", default-features = false }
sp-io = { version = "2.0.0-rc1", default-features = false }
pallet-balances = { version = "2.0.0-rc1", default-features = false }
orml-currencies = { path = "../../orml/currencies", default-features = false }
orml-auction = { path = "../../orml/auction", default-features = false }
dex = { package = "module-dex", path = "../dex", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions modules/cdp_treasury/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl system::Trait for Runtime {
type DbWeight = ();
type BlockExecutionWeight = ();
type ExtrinsicBaseWeight = ();
type MaximumExtrinsicWeight = ();
}
pub type System = system::Module<Runtime>;

Expand Down
Loading

0 comments on commit 49eaab9

Please sign in to comment.