Skip to content

Commit

Permalink
refactor: generic extension crate to de-duplicate code between runtim…
Browse files Browse the repository at this point in the history
…es (#163)
  • Loading branch information
chungquantin authored Aug 13, 2024
1 parent 545bd33 commit 99d0f6d
Show file tree
Hide file tree
Showing 11 changed files with 583 additions and 520 deletions.
17 changes: 17 additions & 0 deletions Cargo.lock

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

26 changes: 16 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ members = [
"pallets/*",
"primitives",
]
exclude = [
"pop-api",
"tests/contracts"
]
exclude = ["pop-api", "tests/contracts"]

resolver = "2"

[workspace.dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
"derive",
] }
hex-literal = "0.4.1"
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
smallvec = "1.11.0"
serde = "1.0.195"
clap = { version = "4.4.18", features = ["derive"] }
Expand All @@ -52,7 +53,8 @@ substrate-build-script-utils = "11.0.0"

# Local
pallet-api = { path = "pallets/api", default-features = false }
pop-runtime-devnet = { path = "runtime/devnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-chain-extension = { path = "./extension", default-features = false }
pop-runtime-devnet = { path = "runtime/devnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-runtime-common = { path = "runtime/common", default-features = false }
pop-primitives = { path = "./primitives", default-features = false }
Expand Down Expand Up @@ -82,7 +84,9 @@ frame-system = { version = "29.0.0", default-features = false }
frame-system-benchmarking = { version = "29.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "27.0.0", default-features = false }
frame-try-runtime = { version = "0.35.0", default-features = false }
pallet-aura = { version = "28.0.0", default-features = false, features = ["experimental"] }
pallet-aura = { version = "28.0.0", default-features = false, features = [
"experimental",
] }
pallet-authorship = { version = "29.0.0", default-features = false }
pallet-assets = { version = "30.0.0", default-features = false }
pallet-balances = { version = "29.0.2", default-features = false }
Expand Down Expand Up @@ -139,7 +143,9 @@ xcm-executor = { package = "staging-xcm-executor", version = "8.0.2", default-fe
# Cumulus
asset-test-utils = { version = "8.0.1", default-features = false }
cumulus-pallet-aura-ext = { version = "0.8.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.8.1", default-features = false, features = ["parameterized-consensus-hook"] }
cumulus-pallet-parachain-system = { version = "0.8.1", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { version = "10.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.8.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.8.0", default-features = false }
Expand All @@ -163,4 +169,4 @@ cumulus-client-service = "0.8.0"
# Paseo
asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
51 changes: 51 additions & 0 deletions extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[package]
name = "pop-chain-extension"
version = "0.1.0"
authors.workspace = true
description.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
edition.workspace = true
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec.workspace = true
log.workspace = true

# Local
pop-primitives.workspace = true

# Substrate
frame-support.workspace = true
frame-system.workspace = true
pallet-contracts.workspace = true
sp-core.workspace = true
sp-runtime.workspace = true
sp-std.workspace = true

[dev-dependencies]
rand = "0.8.5"

[features]
default = ["std"]
std = [
"log/std",
"codec/std",
"frame-support/std",
"frame-system/std",
"pallet-contracts/std",
"pop-primitives/std",
"sp-runtime/std",
"sp-core/std",
"sp-std/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-contracts/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
Loading

0 comments on commit 99d0f6d

Please sign in to comment.