pub fn send_commit_with_gas(
    handle: MessageHandle,
    destination: ActorId,
    gas_limit: u64,
    value: u128
) -> Result<MessageId>
Expand description

Same as send_commit, but with an explicit gas limit.

§Examples

use gcore::msg;

#[no_mangle]
extern "C" fn handle() {
    let msg_handle = msg::send_init().expect("Unable to init");
    msg::send_push(msg_handle, b"Hello,").expect("Unable to push");
    msg::send_push(msg_handle, b" world!").expect("Unable to push");
    msg::send_commit_with_gas(msg_handle, msg::source(), 10_000_000, 42)
        .expect("Unable to commit");
}

§See also

  • send function allows sending a message in one step.
  • send_push, send_init functions allows forming a message to send in parts.