Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Dec 19, 2023
1 parent 5187281 commit f97c588
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions testing/examples/chain_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

//! Tests for the chain rpc interface functions.
use sp_keyring::AccountKeyring;
use substrate_api_client::{
ac_primitives::AssetRuntimeConfig,
ac_primitives::{DefaultRuntimeConfig, ExtrinsicSigner},
rpc::{HandleSubscription, JsonrpseeClient},
Api, GetChainInfo, SubscribeChain,
};
Expand All @@ -25,7 +26,9 @@ use substrate_api_client::{
async fn main() {
// Setup
let client = JsonrpseeClient::with_default_url().unwrap();
let api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
let mut api = Api::<DefaultRuntimeConfig, _>::new(client).unwrap();
let signer = AccountKeyring::Alice.pair();
api.set_signer(ExtrinsicSigner::<DefaultRuntimeConfig>::new(signer));

// GetChainInfo
let finalized_header_hash = api.get_finalized_head().unwrap().unwrap();
Expand Down

0 comments on commit f97c588

Please sign in to comment.