Function gstd::msg::reply_bytes_with_gas
source · pub fn reply_bytes_with_gas(
payload: impl AsRef<[u8]>,
gas_limit: u64,
value: u128,
) -> Result<MessageId>
Expand description
Same as reply_bytes
, but with an explicit gas limit.
§Examples
use gstd::{exec, msg};
#[no_mangle]
extern "C" fn handle() {
msg::reply_bytes_with_gas(b"PING", exec::gas_available() / 2, 0).expect("Unable to reply");
}