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
reply_with_gas
function sends a reply with an explicit gas limit.send_init
,send_push
,send_commit_with_gas
functions allow forming a message to send in parts with an explicit gas limit.