This module is used to store temporary states for UTXO and Inscription.
- Struct
TempState
- Constants
- Function
new
- Function
add_state
- Function
borrow_state
- Function
borrow_mut_state
- Function
remove_state
- Function
contains_state
- Function
remove
use 0x1::string;
use 0x1::vector;
use 0x2::bag;
use 0x2::type_info;
struct TempState has store
const ErrorMaxTempStateExceeded: u64 = 1;
const ErrorTempStateNotFound: u64 = 2;
const MAX_TEMP_STATES: u64 = 20;
public(friend) fun new(): temp_state::TempState
public(friend) fun add_state<T: drop, store>(self: &mut temp_state::TempState, value: T)
public(friend) fun borrow_state<T: drop, store>(self: &temp_state::TempState): &T
public(friend) fun borrow_mut_state<T: drop, store>(self: &mut temp_state::TempState): &mut T
public(friend) fun remove_state<T: drop, store>(self: &mut temp_state::TempState): T
public(friend) fun contains_state<T: drop, store>(self: &temp_state::TempState): bool
public(friend) fun remove(self: temp_state::TempState): vector<string::String>