1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
use elrond_wasm::types::Address;

elrond_wasm::derive_imports!();

/// Copied from elrond-wasm serialization tests.
#[derive(NestedEncode, NestedDecode, TopEncode, TopDecode, TypeAbi, PartialEq, Debug)]
pub enum ValueState {
    None,
    Pending(Address),
    Committed(Address),
}

impl ValueState {
    pub fn is_available(&self) -> bool {
        matches!(self, ValueState::None)
    }
}