Skip to content

Commit

Permalink
integration with jsonrpsee v2 (paritytech#214)
Browse files Browse the repository at this point in the history
* hacky integration with jsonrpsee v2

* stray todos

* fmt

* add http support

* make test build compile

* Update src/rpc.rs

* bring back set_client

* use crates.io version jsonrpsee

* WIP: workaround for embedded subxt client (paritytech#236)

* workaround for embedded subxt client

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* increase default channel size on subxt client

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* remove client tests due to inference problem on From

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* add comments for missing impls

* more verbose errors

* make subscription notifs buffer bigger

* fmt

Co-authored-by: Greg Hill <gregorydhill@outlook.com>
  • Loading branch information
niklasad1 and gregdhill authored Mar 8, 2021
1 parent c4405c4 commit a920e34
Show file tree
Hide file tree
Showing 8 changed files with 391 additions and 205 deletions.
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
default = []
client = ["substrate-subxt-client"]

# enable this feature to run tests which require a local dev chain node
integration-tests = []

[dependencies]
log = "0.4.13"
thiserror = "1.0.23"
futures = "0.3.10"
jsonrpsee = { version = "0.1.0", features = ["ws"] }
jsonrpsee-types = "0.2.0-alpha"
jsonrpsee-ws-client = "0.2.0-alpha"
jsonrpsee-http-client = "0.2.0-alpha"
num-traits = { version = "0.2.14", default-features = false }
serde = { version = "1.0.119", features = ["derive"] }
serde_json = "1.0.61"
Expand All @@ -50,7 +49,7 @@ pallet-staking = "3.0.0"

sp-rpc = { version = "3.0.0", package = "sp-rpc" }
sp-core = { version = "3.0.0", package = "sp-core" }
substrate-subxt-client = { version = "0.6.0", path = "client", optional = true }
substrate-subxt-client = { path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.14.0", path = "proc-macro" }

[dev-dependencies]
Expand All @@ -59,7 +58,7 @@ env_logger = "0.8.2"
frame-system = "3.0.0"
pallet-balances = "3.0.0"
sp-keyring = "3.0.0"
substrate-subxt-client = { version = "0.6.0", path = "client" }
substrate-subxt-client = { path = "client" }
tempdir = "0.3.7"
test-node = { path = "test-node" }
wabt = "0.10.0"
Expand Down
5 changes: 3 additions & 2 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ keywords = ["parity", "substrate", "blockchain"]
async-std = "1.8.0"
futures = { version = "0.3.9", features = ["compat"], package = "futures" }
futures01 = { package = "futures", version = "0.1.29" }
jsonrpsee = "0.1.0"
jsonrpsee-types = "0.2.0-alpha"
jsonrpsee-ws-client = "0.2.0-alpha"
log = "0.4.13"
sc-network = { version = "0.9.0", default-features = false }
sc-client-db = "0.9.0"
Expand All @@ -30,6 +31,6 @@ sc-service = { version = "0.9.0", default-features = false, features = ["wasmtim
[dev-dependencies]
async-std = { version = "1.8.0", features = ["attributes"] }
env_logger = "0.8.2"
substrate-subxt = { path = ".." }
substrate-subxt = { path = "..", features = ["client"] }
tempdir = "0.3.7"
test-node = { path = "../test-node" }
Loading

0 comments on commit a920e34

Please sign in to comment.