Skip to content

Latest commit

 

History

History
144 lines (60 loc) · 3.76 KB

temp_state.md

File metadata and controls

144 lines (60 loc) · 3.76 KB

Module 0x4::temp_state

This module is used to store temporary states for UTXO and Inscription.

Struct TempState

struct TempState has store

Constants

const ErrorMaxTempStateExceeded: u64 = 1;

const ErrorTempStateNotFound: u64 = 2;

const MAX_TEMP_STATES: u64 = 20;

Function new

public(friend) fun new(): temp_state::TempState

Function add_state

public(friend) fun add_state<T: drop, store>(self: &mut temp_state::TempState, value: T)

Function borrow_state

public(friend) fun borrow_state<T: drop, store>(self: &temp_state::TempState): &T

Function borrow_mut_state

public(friend) fun borrow_mut_state<T: drop, store>(self: &mut temp_state::TempState): &mut T

Function remove_state

public(friend) fun remove_state<T: drop, store>(self: &mut temp_state::TempState): T

Function contains_state

public(friend) fun contains_state<T: drop, store>(self: &temp_state::TempState): bool

Function remove

public(friend) fun remove(self: temp_state::TempState): vector<string::String>