multiversx_chain_vm/host/context/
tx_result_calls.rs

1use super::{AsyncCallTxData, Promise};
2
3#[derive(Clone, Default, Debug)]
4pub struct TxResultCalls {
5    pub async_call: Option<AsyncCallTxData>,
6    pub promises: Vec<Promise>,
7}
8
9impl TxResultCalls {
10    pub fn empty() -> Self {
11        TxResultCalls {
12            async_call: None,
13            promises: Vec::new(),
14        }
15    }
16
17    pub fn no_calls(&self) -> bool {
18        self.async_call.is_none() && self.promises.is_empty()
19    }
20}