mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
pre-generate metadata
This commit is contained in:
+3
-2
@@ -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,
|
||||
|
||||
+3
-6
@@ -15,6 +15,7 @@
|
||||
// along with subxt. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<DefaultConfig, DefaultExtra<_>> =
|
||||
let api: substrate::RuntimeApi<DefaultConfig, DefaultExtra<_>> =
|
||||
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::<system::events::ExtrinsicSuccess>()
|
||||
.has_event::<substrate::system::events::ExtrinsicSuccess>()
|
||||
.unwrap();
|
||||
|
||||
// verify that we receive events
|
||||
|
||||
Reference in New Issue
Block a user