Function promise_results_count

Source
pub fn promise_results_count() -> u64
Expand description

If the current function is invoked by a callback we can access the execution results of the promises that caused the callback. This function returns the number of complete and incomplete callbacks.

ยงExamples

use near_sdk::env::promise_results_count;

assert_eq!(promise_results_count(), 0);

More low-level info here: near_vm_runner::logic::VMLogic::promise_results_count See example of usage here