Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Deduplicate with latest workspace feature (#252)
Browse files Browse the repository at this point in the history
* Part 1

* Part 2

* Part 3

* Format

* Fix review
  • Loading branch information
boundless-forest authored Feb 21, 2023
1 parent cdb9277 commit 8037970
Show file tree
Hide file tree
Showing 17 changed files with 298 additions and 194 deletions.
30 changes: 18 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,49 @@ members = [
"primitives/*",
"runtime-common",
]

[workspace.dependencies]
# crates.io
array-bytes = { version = "6.0" }
bitvec = { version = "1", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "3.3", default-features = false, features = ["derive"] }
finality-grandpa = { version = "0.16", default-features = false }
scale-info = { version = "2.3", default-features = false, features = ["derive"] }
serde = { version = "1.0" }
num-traits = { version = "0.2", default-features = false }

# darwinia
bp-header-chain = { default-features = false, path = "primitives/header-chain" }
bp-messages = { default-features = false, path = "primitives/messages" }
bp-message-dispatch = { default-features = false, path = "primitives/message-dispatch" }
bp-parachains = { default-features = false, path = "primitives/parachains" }
bp-polkadot-core = { default-features = false, path = "primitives/polkadot-core" }
bp-runtime = { default-features = false, path = "primitives/runtime" }
bp-test-utils = { default-features = false, path = "primitives/test-utils" }
pallet-bridge-dispatch = { default-features = false, path = "modules/dispatch" }
pallet-bridge-grandpa = { default-features = false, path = "modules/grandpa" }
pallet-bridge-messages = { default-features = false, path = "modules/messages" }
pallet-bridge-parachains = { default-features = false, path = "modules/parachains" }
pallet-fee-market = { default-features = false, path = "modules/fee-market" }

# moonbeam
account = { default-features = false, git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.37" }

# substrate
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-root-testing = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-finality-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-state-machine = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
26 changes: 15 additions & 11 deletions modules/dispatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,35 @@ version = "0.1.0"

[dependencies]
# crates.io
codec = { package = "parity-scale-codec", version = "3.1", default-features = false }
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", workspace = true }
scale-info = { workspace = true }

# darwinia-network
bp-message-dispatch = { default-features = false, path = "../../primitives/message-dispatch" }
bp-runtime = { default-features = false, path = "../../primitives/runtime" }
bp-message-dispatch = { workspace = true }
bp-runtime = { workspace = true }

# paritytech
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
pallet-root-testing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-root-testing = { workspace = true }
sp-io = { workspace = true }

[features]
default = ["std"]
std = [
# crates.io
"codec/std",
"scale-info/std",

# darwinia-network
"bp-message-dispatch/std",
"bp-runtime/std",

# paritytech
"frame-support/std",
"frame-system/std",
Expand Down
34 changes: 19 additions & 15 deletions modules/fee-market/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ version = "0.1.0"

[dependencies]
# crates.io
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", workspace = true }
scale-info = { workspace = true }

# paritytech
frame-benchmarking = { optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-timestamp = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

# darwinia-bridges-substrate
bp-messages = { default-features = false, path = "../../primitives/messages" }
bp-runtime = { default-features = false, path = "../../primitives/runtime" }
bp-messages = { workspace = true }
bp-runtime = { workspace = true }

[dev-dependencies]
bitvec = { version = "1" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-bridge-messages = { path = "../messages" }
bitvec = { workspace = true }
pallet-balances = { workspace = true, features = ["std"] }
pallet-bridge-messages = { workspace = true }

[features]
default = ["std"]
Expand All @@ -38,6 +40,7 @@ std = [
# crates.io
"codec/std",
"scale-info/std",

# paritytech
"frame-support/std",
"frame-system/std",
Expand All @@ -46,6 +49,7 @@ std = [
"sp-io/std",
"sp-std/std",
"sp-runtime/std",

# darwinia-bridges-substrate
"bp-messages/std",
"bp-runtime/std",
Expand Down
38 changes: 21 additions & 17 deletions modules/grandpa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@ version = "0.1.0"

[dependencies]
# crates.io
codec = { package = "parity-scale-codec", version = "3.1", default-features = false }
finality-grandpa = { version = "0.16", default-features = false }
num-traits = { version = "0.2", default-features = false }
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
serde = { version = "1.0", optional = true }
codec = { package = "parity-scale-codec", workspace = true }
finality-grandpa = { workspace = true }
num-traits = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }

# darwinia-network
bp-header-chain = { default-features = false, path = "../../primitives/header-chain" }
bp-runtime = { default-features = false, path = "../../primitives/runtime" }
bp-test-utils = { optional = true, default-features = false, path = "../../primitives/test-utils" }
bp-header-chain = { workspace = true }
bp-runtime = { workspace = true }
bp-test-utils = { workspace = true, optional = true }

# paritytech
frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-finality-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-finality-grandpa = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
sp-trie = { workspace = true }

[dev-dependencies]
# paritytech
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { workspace = true }
sp-io = { workspace = true }

[features]
default = ["std"]
Expand All @@ -39,10 +41,12 @@ std = [
"num-traits/std",
"scale-info/std",
"serde",

# darwinia-network
"bp-header-chain/std",
"bp-runtime/std",
"bp-test-utils/std",

# paritytech
"frame-support/std",
"frame-system/std",
Expand Down
38 changes: 21 additions & 17 deletions modules/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,31 @@ version = "0.1.0"

[dependencies]
# crates.io
bitvec = { version = "1", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "3.1", default-features = false }
num-traits = { version = "0.2", default-features = false }
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
bitvec = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true }
num-traits = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true, features = ["derive"] }

# darwinia-network
bp-message-dispatch = { default-features = false, path = "../../primitives/message-dispatch" }
bp-messages = { default-features = false, path = "../../primitives/messages" }
bp-runtime = { default-features = false, path = "../../primitives/runtime" }
bp-message-dispatch = { workspace = true }
bp-messages = { workspace = true }
bp-runtime = { workspace = true }

# paritytech
frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
# darwinia-network
bp-test-utils = { path = "../../primitives/test-utils" }
bp-test-utils = { workspace = true }
# paritytech
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { workspace = true, features = ["std"] }
sp-io = { workspace = true }

[features]
default = ["std"]
Expand All @@ -40,10 +42,12 @@ std = [
"num-traits/std",
"scale-info/std",
"serde",

# darwinia-network
"bp-message-dispatch/std",
"bp-messages/std",
"bp-runtime/std",

# paritytech
"frame-support/std",
"frame-system/std",
Expand Down
Loading

0 comments on commit 8037970

Please sign in to comment.