pub fn simple_query(handle: IcHandle, ctx: &ic_fondue::pot::Context) {
    let mut rng = ctx.rng.clone();
    let rt = tokio::runtime::Runtime::new().expect("Could not create tokio runtime.");
    rt.block_on({
        async move {
            let endpoint = get_random_node_endpoint(&handle, &mut rng);
            endpoint.assert_ready(ctx).await;
            let agent = assert_create_agent(endpoint.url.as_str()).await;
            let canister = UniversalCanister::new(&agent).await;
            let arbitrary_bytes = b"l49sdk";
            assert_eq!(
                canister
                    .query(wasm().reply_data(arbitrary_bytes))
                    .await
                    .unwrap(),
                arbitrary_bytes
            );
        }
    });
}
/// User queries canister A; A replies to user.
User queries canister A; A replies to user.
User queries canister A ; A replies to user .
pub fn simple_query(handle: IcHandle, ctx: &ic_fondue::pot::Context) {
    let mut rng = ctx.rng.clone();
    let rt = tokio::runtime::Runtime::new().expect("Could not create tokio runtime.");
    rt.block_on({
        async move {
            let endpoint = get_random_node_endpoint(&handle, &mut rng);
            endpoint.assert_ready(ctx).await;
            let agent = assert_create_agent(endpoint.url.as_str()).await;
            let canister = UniversalCanister::new(&agent).await;
            let arbitrary_bytes = b"l49sdk";
            assert_eq!(
                canister
                    .query(wasm().reply_data(arbitrary_bytes))
                    .await
                    .unwrap(),
                arbitrary_bytes
            );
        }
    });
}
pub fn simple_query ( handle : IcHandle , ctx : & ic_fondue :: pot :: Context ) { let mut rng = ctx . rng . clone ( ) ; let rt = tokio :: runtime :: Runtime :: new ( ) . expect ( " " ) ; rt . block_on ( { async move { let endpoint = get_random_node_endpoint ( & handle , & mut rng ) ; endpoint . assert_ready ( ctx ) . await ; let agent = assert_create_agent ( endpoint . url . as_str ( ) ) . await ; let canister = UniversalCanister :: new ( & agent ) . await ; let arbitrary_bytes = b" " ; assert_eq ! ( canister query ( wasm ( ) reply_data ( arbitrary_bytes ) ) await unwrap ( ) arbitrary_bytes ) ; } } ) ; }
User queries canister A; A replies to user.
User queries canister A ; A replies to user .
handle
IcHandle
ctx
&ic_fondue::pot::Context
handle
IcHandle
ctx
&ic_fondue::pot::Context