Skip to content

Commit

Permalink
squashed
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Nov 22, 2024
1 parent 7c5224c commit 06e289c
Show file tree
Hide file tree
Showing 10 changed files with 4,468 additions and 21 deletions.
35 changes: 14 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ members = [
"substrate/frame/revive/mock-network",
"substrate/frame/revive/proc-macro",
"substrate/frame/revive/rpc",
"substrate/frame/revive/rpc/codegen",
"substrate/frame/revive/uapi",
"substrate/frame/root-offences",
"substrate/frame/root-testing",
Expand Down Expand Up @@ -556,13 +557,7 @@ default-members = [
[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }
# `substrate_runtime` is a common `cfg` condition name used in the repo.
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(build_opt_level, values("3"))',
'cfg(build_profile, values("debug", "release"))',
'cfg(enable_alloc_error_handler)',
'cfg(fuzzing)',
'cfg(substrate_runtime)',
] }
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(build_opt_level, values("3"))', 'cfg(build_profile, values("debug", "release"))', 'cfg(enable_alloc_error_handler)', 'cfg(fuzzing)', 'cfg(substrate_runtime)'] }

[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
Expand Down Expand Up @@ -637,7 +632,7 @@ bitvec = { version = "1.0.1", default-features = false }
blake2 = { version = "0.10.4", default-features = false }
blake2b_simd = { version = "1.0.2", default-features = false }
blake3 = { version = "1.5" }
bounded-collections = { version = "0.2.2", default-features = false }
bounded-collections = { version = "0.2.0", default-features = false }
bounded-vec = { version = "0.7" }
bp-asset-hub-rococo = { path = "bridges/chains/chain-asset-hub-rococo", default-features = false }
bp-asset-hub-westend = { path = "bridges/chains/chain-asset-hub-westend", default-features = false }
Expand Down Expand Up @@ -683,7 +678,6 @@ cid = { version = "0.9.0" }
clap = { version = "4.5.13" }
clap-num = { version = "1.0.2" }
clap_complete = { version = "4.5.13" }
cmd_lib = { version = "1.9.5" }
coarsetime = { version = "0.1.22" }
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
collectives-westend-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend" }
Expand Down Expand Up @@ -742,7 +736,7 @@ derive_more = { version = "0.99.17", default-features = false }
digest = { version = "0.10.3", default-features = false }
directories = { version = "5.0.1" }
dlmalloc = { version = "0.2.4" }
docify = { version = "0.2.9" }
docify = { version = "0.2.8" }
dyn-clonable = { version = "0.9.0" }
dyn-clone = { version = "1.0.16" }
ed25519-dalek = { version = "2.1", default-features = false }
Expand All @@ -754,7 +748,7 @@ enumn = { version = "0.1.13" }
env_logger = { version = "0.11.2" }
environmental = { version = "1.1.4", default-features = false }
equivocation-detector = { path = "bridges/relays/equivocation" }
ethabi = { version = "2.0.0", default-features = false, package = "ethabi-decode" }
ethabi = { version = "1.0.0", default-features = false, package = "ethabi-decode" }
ethbloom = { version = "0.14.1", default-features = false }
ethereum-types = { version = "0.15.1", default-features = false }
exit-future = { version = "0.2.0" }
Expand Down Expand Up @@ -792,7 +786,7 @@ frame-system-rpc-runtime-api = { path = "substrate/frame/system/rpc/runtime-api"
frame-try-runtime = { path = "substrate/frame/try-runtime", default-features = false }
fs4 = { version = "0.7.0" }
fs_extra = { version = "1.3.0" }
futures = { version = "0.3.31" }
futures = { version = "0.3.30" }
futures-channel = { version = "0.3.23" }
futures-timer = { version = "3.0.2" }
futures-util = { version = "0.3.30", default-features = false }
Expand Down Expand Up @@ -848,7 +842,7 @@ linked-hash-map = { version = "0.5.4" }
linked_hash_set = { version = "0.1.4" }
linregress = { version = "0.5.1" }
lite-json = { version = "0.2.0", default-features = false }
litep2p = { version = "0.8.1", features = ["websocket"] }
litep2p = { version = "0.7.0", features = ["websocket"] }
log = { version = "0.4.22", default-features = false }
macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
Expand Down Expand Up @@ -1094,9 +1088,7 @@ polkavm-derive = "0.9.1"
polkavm-linker = "0.9.2"
portpicker = { version = "0.1.1" }
pretty_assertions = { version = "1.3.0" }
primitive-types = { version = "0.13.1", default-features = false, features = [
"num-traits",
] }
primitive-types = { version = "0.13.1", default-features = false, features = ["num-traits"] }
proc-macro-crate = { version = "3.0.0" }
proc-macro-warning = { version = "1.0.0", default-features = false }
proc-macro2 = { version = "1.0.86" }
Expand Down Expand Up @@ -1205,11 +1197,12 @@ seccompiler = { version = "0.4.0" }
secp256k1 = { version = "0.28.0", default-features = false }
secrecy = { version = "0.8.0", default-features = false }
separator = { version = "0.4.1" }
serde = { version = "1.0.214", default-features = false }
serde = { version = "1.0.210", default-features = false }
serde-big-array = { version = "0.3.2" }
serde_derive = { version = "1.0.117" }
serde_json = { version = "1.0.132", default-features = false }
serde_yaml = { version = "0.9" }
serial_test = { version = "2.0.0" }
sha1 = { version = "0.10.6" }
sha2 = { version = "0.10.7", default-features = false }
sha3 = { version = "0.10.0", default-features = false }
Expand Down Expand Up @@ -1316,9 +1309,9 @@ substrate-test-runtime-client = { path = "substrate/test-utils/runtime/client" }
substrate-test-runtime-transaction-pool = { path = "substrate/test-utils/runtime/transaction-pool" }
substrate-test-utils = { path = "substrate/test-utils" }
substrate-wasm-builder = { path = "substrate/utils/wasm-builder", default-features = false }
subxt = { version = "0.38", default-features = false }
subxt-signer = { version = "0.38" }
syn = { version = "2.0.87" }
subxt = { version = "0.37", default-features = false }
subxt-signer = { version = "0.37" }
syn = { version = "2.0.82" }
sysinfo = { version = "0.30" }
tar = { version = "0.4" }
tempfile = { version = "3.8.1" }
Expand Down Expand Up @@ -1387,7 +1380,7 @@ xcm-procedural = { path = "polkadot/xcm/procedural", default-features = false }
xcm-runtime-apis = { path = "polkadot/xcm/xcm-runtime-apis", default-features = false }
xcm-simulator = { path = "polkadot/xcm/xcm-simulator", default-features = false }
zeroize = { version = "1.7.0", default-features = false }
zombienet-sdk = { version = "0.2.15" }
zombienet-sdk = { version = "0.2.13" }
zstd = { version = "0.12.4", default-features = false }

[profile.release]
Expand Down
13 changes: 13 additions & 0 deletions prdoc/pr_5926.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: "[pallet-revive] add codegen for Ethereum RPC API"

doc:
- audience: Runtime Dev
description: |
Add codegen crate for generating Ethereum RPC methods and types from the spec.

crates:
- name: pallet-revive-rpc-codegen
bump: patch
18 changes: 18 additions & 0 deletions substrate/frame/revive/rpc/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "pallet-revive-rpc-codegen"
version = "0.1.0"
edition.workspace = true
publish = false

[dependencies]
Inflector = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
anyhow = { workspace = true }

[dev-dependencies]
pretty_assertions.workspace = true

[features]
default = ["std"]
std = ["anyhow/std", "serde/std", "serde_json/std"]
5 changes: 5 additions & 0 deletions substrate/frame/revive/rpc/codegen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Generates the Ethereum JSON-RPC API from the official specification.

- See <https://github.com/ethereum/execution-apis>
- See building instructions to re-generate the openrpc.json <https://github.com/ethereum/execution-apis?tab=readme-ov-file#building>
- Include fixes from <https://github.com/ethereum/execution-apis/pull/552>
Loading

0 comments on commit 06e289c

Please sign in to comment.