reply_bytes_with_gas

Function reply_bytes_with_gas 

Source
pub fn reply_bytes_with_gas(
    payload: impl AsRef<[u8]>,
    gas_limit: u64,
    value: u128,
) -> Result<MessageId, Error>
Expand description

Same as reply_bytes, but with an explicit gas limit.

ยงExamples

use gstd::{exec, msg};

#[unsafe(no_mangle)]
extern "C" fn handle() {
    msg::reply_bytes_with_gas(b"PING", exec::gas_available() / 2, 0).expect("Unable to reply");
}