Skip to content

Commit

Permalink
SYS-3313 Make lower-rpc api an independent package (#330)
Browse files Browse the repository at this point in the history
This allows integration directly from avn-parachain repository to all clients that have a dependency, avoiding code replication.
  • Loading branch information
thadouk committed Dec 6, 2023
1 parent f42703a commit e906a1c
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ rust-version = "1.64.0"
members = [
"node",
"node/avn-service",
"node/avn-lower-rpc",
"pallets/*",
"primitives/*",
"runtime/*",
Expand Down
2 changes: 2 additions & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.g

# AvN
avn-service = { path = "avn-service"}
avn-lower-rpc = { path = "avn-lower-rpc"}

pallet-avn = { path = "../pallets/avn", default-features = false }
tiny-bip39 = "0.8.2"
libp2p = "0.46.1"
Expand Down
34 changes: 34 additions & 0 deletions node/avn-lower-rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "avn-lower-rpc"
license = "GPL-3.0"

version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }


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

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
futures = "0.3.21"
log = "0.4.17"
parking_lot = "0.12.1"
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.85"
thiserror = "1.0"
hex = "0.4"
jsonrpsee = { version = "0.16.2", features = ["server"] }

sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }

avn-service = { path = "../avn-service"}
File renamed without changes.
2 changes: 1 addition & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};

pub mod lower_rpc;
use avn_lower_rpc as lower_rpc;

/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpsee::RpcModule<()>;
Expand Down

0 comments on commit e906a1c

Please sign in to comment.