Function gcore::msg::send_with_gas

source ·
pub fn send_with_gas(
    destination: ActorId,
    payload: &[u8],
    gas_limit: u64,
    value: u128,
) -> Result<MessageId>
Expand description

Same as send, but with an explicit gas limit.

§Examples

use gcore::msg;

#[no_mangle]
extern "C" fn handle() {
    let id: [u8; 32] = core::array::from_fn(|i| i as u8);
    msg::send_with_gas(id.into(), b"HELLO", 5_000_000, 42).expect("Unable to send");
}

§See also