Skip to content

Commit

Permalink
feat: adding evm back (#225)
Browse files Browse the repository at this point in the history
* feat: adding evm back

* refac: removing unused dependencies

* feat: adding dynamic evm fee

* feat: adding back fp account
  • Loading branch information
functor-flow authored Sep 18, 2024
1 parent 11959f4 commit 5fda014
Show file tree
Hide file tree
Showing 13 changed files with 1,347 additions and 932 deletions.
1,738 changes: 894 additions & 844 deletions Cargo.lock

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,49 +32,50 @@ infinite_loop = "deny"
[workspace.dependencies]
# External dependencies
bty = { version = "0.2.0", default-features = false }
clap = "4.4.6"
futures = "0.3.21"
clap = "4.4.6"
hex = "0.4.3"
jsonrpsee = "0.22.2"
lazy_static = "1.4.0"
log = { version = "0.4.21", default-features = false }
ndarray = { version = "0.15.0", default-features = false }
parity-util-mem = "0.11.0"
rand = "0.8"
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
tokio = "1.17.0"
serde = { version = "1.0.145", default-features = false, features = ["derive"] }
serde_bytes = { version = "0.11.8", default-features = false, features = [
"alloc",
] }
serde_json = { version = "1.0.108", default-features = false, features = [
"alloc",
] }
serde_with = { version = "3.1.1", default-features = false, features = [
"macros",
] }
serde-tuple-vec-map = { version = "1.0.1", default-features = false }
smallvec = "1.6.1"
substrate-fixed = { git = 'https://github.com/encointer/substrate-fixed.git', tag = "v0.5.9" }
tokio = "1.17.0"

# Parity Scale Codec
# Parity Substrate
substrate-fixed = { git = 'https://github.com/encointer/substrate-fixed.git', tag = "v0.5.9" }
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
parity-scale-codec = { version = "3.6.5", features = [
"derive",
], default-features = false }

# Frontier dependencies
fp-account = { git = "https://github.com/paritytech/frontier", default-features = false, features = [
# EVM Support
# Frontier
fp-account = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false, features = [
"serde",
] }
fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false, features = [
"serde",
] }
fp-rpc = { git = "https://github.com/paritytech/frontier", default-features = false }
fp-self-contained = { git = "https://github.com/paritytech/frontier", default-features = false, features = [
fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false, features = [
"serde",
] }
pallet-base-fee = { git = "https://github.com/paritytech/frontier", default-features = false }
# Frontier FRAME
pallet-base-fee = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-dynamic-fee = { git = "https://github.com/gztensor/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-evm-chain-id = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.10.1", default-features = false }

# Substrate dependencies
# Substrate Dependencies
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
Expand All @@ -86,7 +87,6 @@ frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.1", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ sc-executor.workspace = true
sc-network.workspace = true
sc-service.workspace = true
sc-telemetry.workspace = true
sc-keystore.workspace = true
sc-transaction-pool.workspace = true
sc-transaction-pool-api.workspace = true
sc-offchain.workspace = true
Expand All @@ -42,7 +41,6 @@ sp-consensus-aura.workspace = true
sc-consensus-grandpa.workspace = true
sp-consensus-grandpa.workspace = true
sc-consensus-manual-seal.workspace = true
sp-consensus.workspace = true
sc-consensus.workspace = true
sc-client-api.workspace = true
sp-runtime.workspace = true
Expand All @@ -55,7 +53,6 @@ pallet-transaction-payment.workspace = true

# These dependencies are used for the subspace's RPCs
jsonrpsee = { workspace = true, features = ["server"] }
sc-rpc.workspace = true
sp-api.workspace = true
sc-rpc-api.workspace = true
sp-blockchain.workspace = true
Expand Down
3 changes: 0 additions & 3 deletions pallets/faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ std = [
try-runtime = ["frame-support/try-runtime"]

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

pallet-subspace = { path = "../subspace", default-features = false }
Expand All @@ -37,8 +36,6 @@ sp-runtime.workspace = true
sp-std.workspace = true
sp-core.workspace = true

substrate-fixed.workspace = true

parity-scale-codec = { workspace = true, default-features = false, features = [
"derive",
] }
Expand Down
1 change: 0 additions & 1 deletion pallets/governance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ try-runtime = ["frame-support/try-runtime"]
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]

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

pallet-governance-api = { path = "../governance/api", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions pallets/governance/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ frame-support.workspace = true

sp-runtime.workspace = true

substrate-fixed.workspace = true

parity-scale-codec = { workspace = true, default-features = false, features = [
"derive",
] }
Expand Down
8 changes: 1 addition & 7 deletions pallets/subnet_emission/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,16 @@ targets = ["x86_64-unknown-linux-gnu"]
[features]
default = ["std"]
std = [
"pallet-balances/std",
"frame-support/std",
"frame-system/std",
"parity-scale-codec/std",
"frame-system/std",
"pallet-subspace/std",
"scale-info/std",
]
try-runtime = ["frame-support/try-runtime"]

[dependencies]
pallet-balances.workspace = true
sp-tracing.workspace = true
sp-io.workspace = true
sp-core.workspace = true
sp-runtime.workspace = true
sp-arithmetic.workspace = true
bty.workspace = true
log.workspace = true

Expand Down
6 changes: 0 additions & 6 deletions pallets/subnet_emission/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ targets = ["x86_64-unknown-linux-gnu"]
[features]

[dependencies]
frame-support.workspace = true

sp-runtime.workspace = true

substrate-fixed.workspace = true

parity-scale-codec = { workspace = true, default-features = false, features = [
"derive",
] }
Expand Down
5 changes: 0 additions & 5 deletions pallets/subspace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"]

[dependencies]
bty.workspace = true
parity-scale-codec.workspace = true
sp-arithmetic.workspace = true
sp-core.workspace = true
pallet-balances.workspace = true
scale-info.workspace = true
frame-benchmarking = { workspace = true, optional = true }
frame-support.workspace = true
Expand All @@ -42,7 +40,6 @@ sp-runtime.workspace = true
sp-std.workspace = true
log.workspace = true
substrate-fixed.workspace = true
pallet-transaction-payment.workspace = true

pallet-subspace-genesis-config.path = "./genesis-config"
pallet-governance-api = { path = "../governance/api", default-features = false }
Expand All @@ -54,5 +51,3 @@ sp-io.workspace = true
sp-version.workspace = true
# Substrate
sp-tracing.workspace = true
parity-util-mem = { workspace = true, features = ['primitive-types'] }
rand.workspace = true
8 changes: 1 addition & 7 deletions pallets/subspace/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { workspace = true, features = ["server", "macros"] }
lazy_static = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
sp-blockchain.workspace = true

# Substrate packages
parity-scale-codec.workspace = true
sp-api.workspace = true
sp-blockchain.workspace = true
sp-runtime.workspace = true
pallet-subspace = { default-features = false, path = "../" }

# local packages
subspace-runtime-api = { path = "./runtime-api", default-features = false }
Expand All @@ -34,5 +29,4 @@ std = [
"sp-api/std",
"sp-runtime/std",
"subspace-runtime-api/std",
"pallet-subspace/std",
]
38 changes: 26 additions & 12 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ pallet-governance = { path = "../pallets/governance", default-features = false }
pallet-faucet = { path = "../pallets/faucet", optional = true, default-features = false }
pallet-subnet-emission = { path = "../pallets/subnet_emission", default-features = false }

log.workspace = true
smallvec.workspace = true
parity-scale-codec.workspace = true
scale-info.workspace = true
serde_json.workspace = true

frame-executive.workspace = true
frame-support.workspace = true
Expand All @@ -31,7 +29,6 @@ frame-try-runtime = { workspace = true, optional = true }
pallet-aura.workspace = true
pallet-balances.workspace = true
pallet-grandpa.workspace = true
pallet-insecure-randomness-collective-flip.workspace = true
pallet-multisig.workspace = true
pallet-sudo.workspace = true
pallet-timestamp.workspace = true
Expand Down Expand Up @@ -62,16 +59,25 @@ frame-system-benchmarking = { workspace = true, optional = true }
# EVM Support

# Frontier
fp-account.workspace = true
fp-rpc.workspace = true
fp-self-contained.workspace = true

fp-account = { workspace = true }
fp-evm = { workspace = true, features = ["serde"] }
fp-rpc = { workspace = true }
fp-self-contained = { workspace = true, features = ["serde"] }
# Frontier FRAME
pallet-base-fee.workspace = true
pallet-base-fee = { workspace = true }
pallet-dynamic-fee = { workspace = true }
pallet-ethereum = { workspace = true }
pallet-evm = { workspace = true }
pallet-evm-chain-id = { workspace = true }
pallet-evm-precompile-modexp = { workspace = true }
pallet-evm-precompile-sha3fips = { workspace = true }
pallet-evm-precompile-simple = { workspace = true }

# Pallets' APIs
subspace-runtime-api = { path = "../pallets/subspace/rpc/runtime-api", default-features = false }
pallet-governance-api = { path = "../pallets/governance/api", default-features = false }
pallet-subnet-emission-api = { path = "../pallets/subnet_emission/api", default-features = false }

[build-dependencies]
substrate-wasm-builder = { workspace = true, optional = true }

Expand All @@ -95,7 +101,6 @@ std = [
"pallet-aura/std",
"pallet-balances/std",
"pallet-grandpa/std",
"pallet-insecure-randomness-collective-flip/std",
"pallet-multisig/std",
"pallet-sudo/std",
"pallet-timestamp/std",
Expand All @@ -115,11 +120,22 @@ std = [
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
"subspace-runtime-api/std",
# EVM
# Frontier
"fp-account/std",
"fp-evm/std",
"fp-rpc/std",
"fp-self-contained/std",
# Frontier FRAME
"pallet-base-fee/std",
"subspace-runtime-api/std",
"pallet-dynamic-fee/std",
"pallet-ethereum/std",
"pallet-evm/std",
"pallet-evm-chain-id/std",
"pallet-evm-precompile-modexp/std",
"pallet-evm-precompile-sha3fips/std",
"pallet-evm-precompile-simple/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
Expand All @@ -135,7 +151,6 @@ runtime-benchmarks = [
"pallet-governance/runtime-benchmarks",
]
try-runtime = [
"fp-self-contained/try-runtime",
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
Expand All @@ -144,7 +159,6 @@ try-runtime = [
"pallet-balances/try-runtime",
"pallet-base-fee/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-insecure-randomness-collective-flip/try-runtime",
"pallet-multisig/try-runtime",
"pallet-governance/try-runtime",
"pallet-subnet-emission/try-runtime",
Expand Down
Loading

0 comments on commit 5fda014

Please sign in to comment.