Enum Access
Source pub enum Access {
ThisAddress,
ThisContractAddress,
MutKeys,
RepeatCounter,
PredicateData,
PredicateDataLen,
PredicateDataSlots,
PredicateExists,
}
Expand description
Operations for accessing input data.
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]
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]
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]
0x38
: REPC
Access the top repeat counters current value.
§Stack Output
[counter_value]
0x3A
: DATA
Access a range of len
words starting from value_ix
within the
predicate data located at slot_ix
.
Returns a list of predicate data words with length equal to the
specified len.
[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.
0x3B
: DLEN
Get the length of a the predicate data value located at slot_ix
.
[slot_ix]
§Stack Output
[len]
§Panics
0x3C
: DSLT
Get the number of predicate data slots.
§Stack Output
[len]
0x3D
: PEX
Check if a solution to a predicate exists within the same solution
with the hash of the arguments and address.
Returns true
if the predicate exists.
[sha256(arg0len, arg0, argNlen, argN, contract_addr, predicate_addr)]
§Stack Output
[bool]
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
Compares and returns the maximum of two values.
Read more
Compares and returns the minimum of two values.
Read more
Restrict a value to a certain interval.
Read more
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more
The iterator yielding bytes.
Convert the operation to its serialized form in bytes.
The associated Opcode
type.
The opcode
associated with this operation.
Represents any error that might occur while parsing an op from bytes.
Parse a single operation from the given iterator yielding bytes.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dst
.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.