pub fn query_two_canisters(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_a = UniversalCanister::new(&agent).await;
            let canister_b = UniversalCanister::new(&agent).await;
            let arbitrary_bytes = b";ioapusdvzn,x";
            assert_eq!(
                canister_a
                    .query(wasm().inter_query(
                        canister_b.canister_id(),
                        call_args().other_side(wasm().reply_data(arbitrary_bytes)),
                    ))
                    .await
                    .unwrap(),
                arbitrary_bytes
            );
        }
    });
}
/// User queries canister A; canister A queries canister B; B replies to A; A
/// replies to user.
User queries canister A; canister A queries canister B; B replies to A; A
replies to user.
User queries canister A ; canister A queries canister B ; B replies to A ; A replies to user .
pub fn query_two_canisters(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_a = UniversalCanister::new(&agent).await;
            let canister_b = UniversalCanister::new(&agent).await;
            let arbitrary_bytes = b";ioapusdvzn,x";
            assert_eq!(
                canister_a
                    .query(wasm().inter_query(
                        canister_b.canister_id(),
                        call_args().other_side(wasm().reply_data(arbitrary_bytes)),
                    ))
                    .await
                    .unwrap(),
                arbitrary_bytes
            );
        }
    });
}
pub fn query_two_canisters ( 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_a = UniversalCanister :: new ( & agent ) . await ; let canister_b = UniversalCanister :: new ( & agent ) . await ; let arbitrary_bytes = b" " ; assert_eq ! ( canister_a query ( wasm ( ) inter_query ( canister_b canister_id ( ) call_args ( ) other_side ( wasm ( ) reply_data ( arbitrary_bytes ) ) ) ) await unwrap ( ) arbitrary_bytes ) ; } } ) ; }
User queries canister A; canister A queries canister B; B replies to A; A
replies to user.
User queries canister A ; canister A queries canister B ; B replies to A ; A replies to user .
handle
IcHandle
ctx
&ic_fondue::pot::Context
handle
IcHandle
ctx
&ic_fondue::pot::Context