Function piecrust_uplink::call_raw_with_limit
source ยท pub fn call_raw_with_limit(
contract: ContractId,
fn_name: &str,
fn_arg: &[u8],
gas_limit: u64
) -> Result<RawResult, ContractError>
Available on crate feature
abi
only.Expand description
Calls the function with name fn_name
of the given contract
using
fn_arg
as argument, allowing it to spend the given gas_limit
.
A gas limit of 0
is equivalent to using call_raw
, and will use the
default behavior - i.e. the called contract gets 93%
of the remaining gas.
If the gas limit given is above or equal the remaining amount, the default behavior will be used instead.