pub async fn forward_call_via_universal_canister(
    sender: &Canister<'_>,
    receiver: &Canister<'_>,
    method: &str,
    payload: Vec<u8>,
) -> bool {
    let universal_canister_payload = universal_canister_argument_builder()
        .call_simple(
            receiver.canister_id(),
            method,
            call_args()
                // "other_side" means "the call argument". There's a reason...
                .other_side(payload)
                .on_reply(
                    universal_canister_argument_builder()
                        .reply_data(UNIVERSAL_CANISTER_YEAH_RESPONSE),
                )
                .on_reject(
                    universal_canister_argument_builder()
                        .reply_data(UNIVERSAL_CANISTER_NOPE_RESPONSE),
                ),
        )
        .build();
    match sender
        .update_("update", bytes, universal_canister_payload)
        .await
        .unwrap()
        .as_slice()
    {
        UNIVERSAL_CANISTER_YEAH_RESPONSE => true,
        UNIVERSAL_CANISTER_NOPE_RESPONSE => false,
        other => panic!(
            "Unexpected response from the universal canister: {:?}",
            other
        ),
    }
}
/// Makes the `sender` call the given method of the
/// `receiver` handler. It is assumed that `sender` is a universal
/// canister.
///
/// Return true if the handler replied, and false if it rejected.
Makes the `sender` call the given method of the
`receiver` handler. It is assumed that `sender` is a universal
canister.

Return true if the handler replied, and false if it rejected.
Makes the ` sender ` call the given method of the ` receiver ` handler . It is assumed that ` sender ` is a universal canister . Return true if the handler replied and false if it rejected .
pub async fn forward_call_via_universal_canister(
    sender: &Canister<'_>,
    receiver: &Canister<'_>,
    method: &str,
    payload: Vec<u8>,
) -> bool {
    let universal_canister_payload = universal_canister_argument_builder()
        .call_simple(
            receiver.canister_id(),
            method,
            call_args()
                // "other_side" means "the call argument". There's a reason...
                .other_side(payload)
                .on_reply(
                    universal_canister_argument_builder()
                        .reply_data(UNIVERSAL_CANISTER_YEAH_RESPONSE),
                )
                .on_reject(
                    universal_canister_argument_builder()
                        .reply_data(UNIVERSAL_CANISTER_NOPE_RESPONSE),
                ),
        )
        .build();
    match sender
        .update_("update", bytes, universal_canister_payload)
        .await
        .unwrap()
        .as_slice()
    {
        UNIVERSAL_CANISTER_YEAH_RESPONSE => true,
        UNIVERSAL_CANISTER_NOPE_RESPONSE => false,
        other => panic!(
            "Unexpected response from the universal canister: {:?}",
            other
        ),
    }
}
pub async fn forward_call_via_universal_canister ( sender : & Canister < ' _ > , receiver : & Canister < ' _ > , method : & str , payload : Vec < u8 > , ) -> bool { let universal_canister_payload = universal_canister_argument_builder ( ) . call_simple ( receiver . canister_id ( ) , method , call_args ( ) // "other_side" means "the call argument". There's a reason... . other_side ( payload ) . on_reply ( universal_canister_argument_builder ( ) . reply_data ( UNIVERSAL_CANISTER_YEAH_RESPONSE ) , ) . on_reject ( universal_canister_argument_builder ( ) . reply_data ( UNIVERSAL_CANISTER_NOPE_RESPONSE ) , ) , ) . build ( ) ; match sender . update_ ( " " , bytes , universal_canister_payload ) . await . unwrap ( ) . as_slice ( ) { UNIVERSAL_CANISTER_YEAH_RESPONSE => true , UNIVERSAL_CANISTER_NOPE_RESPONSE => false , other => panic ! ( " " other ) , } }
Makes the `sender` call the given method of the
`receiver` handler.
Makes the ` sender ` call the given method of the ` receiver ` handler .
sender
&Canister<'_>
receiver
&Canister<'_>
method
&str
payload
Vec<u8>
sender
&Canister<'_>
receiver
&Canister<'_>
method
&str
payload
Vec<u8>