pub enum Access {
Show 14 variants
ThisAddress,
ThisContractAddress,
ThisPathway,
PredicateAt,
MutKeys,
PubVarKeys,
RepeatCounter,
DecisionVar,
DecisionVarLen,
State,
StateLen,
PubVar,
PubVarLen,
NumSlots,
}
Expand description
Operations for accessing input data.
Variants§
ThisAddress
0x30
: THIS
Get the content hash of this predicate.
This operation returns a list of words with a length of 4, representing the hash.
§Stack Output
[key]
ThisContractAddress
0x31
: THISC
Get the content hash of the contract this predicate belongs to.
This operation returns a list of words with a length of 4, representing the contract’s hash.
§Stack Output
[key]
ThisPathway
0x32
: PATH
Get the pathway of this predicate.
This operation returns the index of the solution data currently being used to check this predicate.
§Stack Output
[in]
PredicateAt
0x33
: PRED
Get the predicate at solution data pathway.
§Stack Input
[pathway]
§Stack Output
[contract_key_0, contract_key_1, contract_key_2, contract_key_3, predicate_key_0, predicate_key_1, predicate_key_2, predicate_key_3]
MutKeys
0x34
: MKEYS
Push the keys of the proposed state mutations onto the stack.
Note the order is non-deterministic because this is a set.
Returns only total length 0 if there are no mutations.
§Stack Output
[key_0, key_0_len, ...key_N, key_N_len, total_length]
PubVarKeys
0x35
: PKEYS
Push the keys of the pub vars at pathway_id
onto the stack.
Note the order is non-deterministic because this is a set.
Returns only total length 0 if there are no keys.
§Stack Input
[pathway_ix]
§Stack Output
[key_0, key_0_len, ...key_N, key_N_len, total_length]
RepeatCounter
DecisionVar
0x37
: VAR
Access a range of len
words starting from value_ix
within the decision variable located at slot_ix
.
Returns a list of decision words with length equal to the specified len.
§Stack Input
[slot_ix, value_ix, len]
§Stack Output
[word, ...]
The stack output length depends on the value of the len
stack input word.
§Panics
- slot_ix is out of range.
- The range
value_ix..(value_ix + len)
is out of range.
DecisionVarLen
0x38
: VLEN
Get the length of a the decision variable value located at slot_ix
.
§Stack Input
[slot_ix]
§Stack Output
[len]
§Panics
- slot_ix is out of range.
State
0x39
Access a range of words from the state value located in the slot at slot_ix
.
Push len
words from the value onto the stack, starting from the word at value_ix
.
The argument delta false
accesses pre state.
The argument delta true
accesses post state.
§Stack Input
[slot_ix, value_ix, len, delta]
§Stack Output
[word, ...]
The stack output length depends on the value of the len
stack input word.
§Panics
- slot_ix is out of range.
- The range
value_ix..(value_ix + len)
is out of range. - delta is not a boolean.
StateLen
0x3A
: SLEN
Get the length of a state value at a specified slot_ix
.
The argument delta false
accesses pre state.
The argument delta true
accesses post state.
Returns the length of the state value.
§Stack Input
[slot_ix, delta]
§Stack Output
[len]
§Panics
- slot_ix is out of range.
- delta is not a boolean.
PubVar
0x3B
: PVAR
Access a range of public decision variable words at pathway_ix
and key key_0, ...key_N
.
Push words onto the stack starting from the value at value_ix
and continuing for len
words.
§Stack Input
[pathway_ix, key_0, ...key_N, key_len, value_ix, value_len]
§Stack Output
[word, ...]
The stack output length depends on the value of the value_len
stack input word.
§Panics
- pathway_ix is out of range.
- The range
value_ix..(value_ix + len)
is out of range for key.
PubVarLen
0x3C
: PVLEN
Get the length of the value indexed by pathway_ix
and key key_0, ...key_N
.
§Stack Input
[pathway, key_0, ...key_N, key_len]
§Stack Output
[len]
NumSlots
Trait Implementations§
source§impl From<Access> for Constraint
impl From<Access> for Constraint
source§impl Ord for Access
impl Ord for Access
source§impl PartialOrd for Access
impl PartialOrd for Access
source§impl TryFromBytes for Access
impl TryFromBytes for Access
impl Copy for Access
impl Eq for Access
impl StructuralPartialEq for Access
Auto Trait Implementations§
impl Freeze for Access
impl RefUnwindSafe for Access
impl Send for Access
impl Sync for Access
impl Unpin for Access
impl UnwindSafe for Access
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)