Function gcore::msg::reply_commit_with_gas

source ·
pub fn reply_commit_with_gas(gas_limit: u64, value: u128) -> Result<MessageId>
Expand description

Same as reply_commit, but with an explicit gas limit.

§Examples

use gcore::{exec, msg};

#[no_mangle]
extern "C" fn handle() {
    msg::reply_push(b"Hello, ").expect("Unable to push");
    msg::reply_push(b", world!").expect("Unable to push");
    msg::reply_commit_with_gas(exec::gas_available() / 2, 0).expect("Unable to commit");
}

§See also

  • reply_push function allows forming a reply message in parts.