pub fn promise_return(promise_idx: PromiseIndex)
Expand description
Consider the execution result of promise under promise_idx
as execution result of this
function.
ยงExamples
use near_sdk::env::{promise_create, promise_return};
use near_sdk::serde_json;
use near_sdk::{AccountId, NearToken, Gas};
use std::str::FromStr;
let promise = promise_create(
AccountId::from_str("counter.near").unwrap(),
"increment",
serde_json::json!({
"value": 5
}).to_string().into_bytes().as_slice(),
NearToken::from_yoctonear(0),
Gas::from_tgas(30)
);
promise_return(promise);
More low-level info here: near_vm_runner::logic::VMLogic::promise_return
Example usages: one, two