Function gcore::msg::reply_with_gas
source · pub fn reply_with_gas(
payload: &[u8],
gas_limit: u64,
value: u128,
) -> Result<MessageId>
Expand description
Same as reply
, but with an explicit gas limit.
§Examples
use gcore::{exec, msg};
#[no_mangle]
extern "C" fn handle() {
msg::reply_with_gas(b"PING", exec::gas_available() / 2, 0).expect("Unable to reply");
}
§See also
reply_push
function allows forming a reply message in parts.