diff --git a/client/Cargo.toml b/client/Cargo.toml
index a9ca4e830e..3a45c21cf1 100644
--- a/client/Cargo.toml
+++ b/client/Cargo.toml
@@ -16,11 +16,13 @@ keywords = ["parity", "substrate", "blockchain"]
[dependencies]
async-std = { version = "1.8.0", features = ["tokio1"] }
+codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] }
futures = "0.3.9"
jsonrpsee = { version = "0.8.0", features = ["async-client"] }
log = "0.4.13"
-thiserror = "1.0.23"
serde_json = "1"
+subxt = { path = "../subxt" }
+thiserror = "1.0.23"
sc-client-db = { git = "https://github.com/paritytech/substrate.git", tag = "publish-sp-version-v4.0.0" }
sp-keyring = { git = "https://github.com/paritytech/substrate.git", tag = "publish-sp-version-v4.0.0" }
@@ -38,10 +40,6 @@ env_logger = "0.9"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
node-cli = { git = "https://github.com/paritytech/substrate.git", tag = "publish-sp-version-v4.0.0", default-features = false }
tempdir = "0.3.7"
-subxt = { path = "../subxt" }
-# TODO(niklasad1): we should probably generate some other runtime because of the
-# tag i.e. not "master".
-test-runtime = { path = "../test-runtime" }
[patch.crates-io]
sp-core = { git = "https://github.com/paritytech/substrate.git", tag = "publish-sp-version-v4.0.0" }
diff --git a/client/metadata.scale b/client/metadata.scale
new file mode 100644
index 0000000000..f3b1d45b56
Binary files /dev/null and b/client/metadata.scale differ
diff --git a/client/src/lib.rs b/client/src/lib.rs
index 4e5b21eb6b..868ddbd6aa 100644
--- a/client/src/lib.rs
+++ b/client/src/lib.rs
@@ -16,11 +16,12 @@
//! Client for embedding substrate nodes.
-#![deny(missing_docs)]
-
#[cfg(test)]
mod tests;
+#[subxt::subxt(runtime_metadata_path = "metadata.scale")]
+pub mod substrate {}
+
use async_std::task;
use futures::{
channel::mpsc,
diff --git a/client/src/tests.rs b/client/src/tests.rs
index 4ce9a56800..f96bd0e984 100644
--- a/client/src/tests.rs
+++ b/client/src/tests.rs
@@ -15,6 +15,7 @@
// along with subxt. If not, see .
use crate::{
+ substrate,
DatabaseSource,
KeystoreConfig,
Role,
@@ -31,10 +32,6 @@ use subxt::{
PairSigner,
};
use tempdir::TempDir;
-use test_runtime::node_runtime::{
- self,
- system,
-};
#[async_std::test]
pub async fn test_embedded_client() {
@@ -79,7 +76,7 @@ pub async fn test_embedded_client() {
.await
.unwrap();
- let api: node_runtime::RuntimeApi> =
+ let api: substrate::RuntimeApi> =
ext_client.clone().to_runtime_api();
// verify that we can read storage
@@ -103,7 +100,7 @@ pub async fn test_embedded_client() {
.wait_for_finalized_success()
.await
.unwrap()
- .has_event::()
+ .has_event::()
.unwrap();
// verify that we receive events
diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml
index 7479f2c8ef..a73deed4ce 100644
--- a/subxt/Cargo.toml
+++ b/subxt/Cargo.toml
@@ -27,7 +27,6 @@ num-traits = { version = "0.2.14", default-features = false }
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0.64"
thiserror = "1.0.24"
-url = "2.2.1"
subxt-macro = { version = "0.16.0", path = "../macro" }