pub fn promise_batch_action_function_call_weight(
promise_index: PromiseIndex,
function_name: &str,
arguments: &[u8],
amount: NearToken,
gas: Gas,
weight: GasWeight,
)
Expand description
Attach a function call with specific gas weight promise action to the NEAR promise index with the provided promise index.
More info about batching here
ยงExamples
use near_sdk::env::{promise_batch_action_function_call_weight, promise_batch_create};
use near_sdk::serde_json;
use near_sdk::{AccountId, NearToken, Gas, GasWeight};
use std::str::FromStr;
let promise = promise_batch_create(
&AccountId::from_str("counter.near").unwrap()
);
promise_batch_action_function_call_weight(
promise,
"increase",
serde_json::json!({ "value": 5 }).to_string().into_bytes().as_slice(),
NearToken::from_yoctonear(0),
Gas::from_tgas(30),
GasWeight(1)
);
More low-level info here: near_vm_runner::logic::VMLogic::promise_batch_action_function_call_weight