ic_cdk::api::call

Function call_raw128

Source
pub fn call_raw128<'a, T: AsRef<[u8]> + Send + Sync + 'a>(
    id: Principal,
    method: &str,
    args_raw: T,
    payment: u128,
) -> impl Future<Output = CallResult<Vec<u8>>> + Send + Sync + 'a
Expand description

Performs an asynchronous call to another canister and pay cycles (in u128) at the same time.

Treats arguments and returns as raw bytes. No data serialization and deserialization is performed.

ยงExample

It can be called:

async fn call_add_user() -> Vec<u8>{
    call_raw128(callee_canister(), "add_user", b"abcd", 1_000_000u128).await.unwrap()
}