1pub mod command;
2pub mod foundry;
3pub mod utils;
4
5#[cfg(test)]
6mod tests;
7
8pub use blueprint_chain_setup::anvil;
9use blueprint_tangle_extra::util::TxProgressExt;
10use tangle_subxt::subxt::{Config, blocks::ExtrinsicEvents, client::OnlineClientT, tx::TxProgress};
11use tangle_subxt::tangle_testnet_runtime::api::runtime_types::tangle_primitives::services::field::BoundedString;
12
13pub(crate) async fn wait_for_in_block_success<T: Config>(
14 res: TxProgress<T, impl OnlineClientT<T>>,
15) -> ExtrinsicEvents<T> {
16 res.wait_for_in_block()
17 .await
18 .unwrap()
19 .fetch_events()
20 .await
21 .unwrap()
22}
23
24pub(crate) fn decode_bounded_string(bounded_string: &BoundedString) -> String {
26 String::from_utf8_lossy(&bounded_string.0.0).to_string()
27}
28
29pub fn install_crypto_provider() {
43 rustls::crypto::ring::default_provider()
45 .install_default()
46 .expect("Failed to install default rustls crypto provider");
47}