pub enum Hint {
Show 35 variants AllocSegment { dst: CellRef, }, TestLessThan { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, TestLessThanOrEqual { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, DivMod { lhs: ResOperand, rhs: ResOperand, quotient: CellRef, remainder: CellRef, }, Uint256DivMod { dividend_low: ResOperand, dividend_high: ResOperand, divisor_low: ResOperand, divisor_high: ResOperand, quotient0: CellRef, quotient1: CellRef, divisor0: CellRef, divisor1: CellRef, extra0: CellRef, extra1: CellRef, remainder_low: CellRef, remainder_high: CellRef, }, SquareRoot { value: ResOperand, dst: CellRef, }, LinearSplit { value: ResOperand, scalar: ResOperand, max_x: ResOperand, x: CellRef, y: CellRef, }, AllocFelt252Dict { segment_arena_ptr: ResOperand, }, Felt252DictRead { dict_ptr: ResOperand, key: ResOperand, value_dst: CellRef, }, Felt252DictWrite { dict_ptr: ResOperand, key: ResOperand, value: ResOperand, }, GetSegmentArenaIndex { dict_end_ptr: ResOperand, dict_index: CellRef, }, InitSquashData { dict_accesses: ResOperand, ptr_diff: ResOperand, n_accesses: ResOperand, big_keys: CellRef, first_key: CellRef, }, GetCurrentAccessIndex { range_check_ptr: ResOperand, }, ShouldSkipSquashLoop { should_skip_loop: CellRef, }, GetCurrentAccessDelta { index_delta_minus1: CellRef, }, ShouldContinueSquashLoop { should_continue: CellRef, }, AssertCurrentAccessIndicesIsEmpty, AssertAllAccessesUsed { n_used_accesses: CellRef, }, AssertAllKeysUsed, GetNextDictKey { next_key: CellRef, }, AssertLtAssertValidInput { a: ResOperand, b: ResOperand, }, AssertLeFindSmallArcs { range_check_ptr: ResOperand, a: ResOperand, b: ResOperand, }, AssertLeIsFirstArcExcluded { skip_exclude_a_flag: CellRef, }, AssertLeIsSecondArcExcluded { skip_exclude_b_minus_a: CellRef, }, AssertLeAssertThirdArcExcluded, RandomEcPoint { x: CellRef, y: CellRef, }, FieldSqrt { val: ResOperand, sqrt: CellRef, }, SystemCall { system: ResOperand, }, DebugPrint { start: ResOperand, end: ResOperand, }, AllocConstantSize { size: ResOperand, dst: CellRef, }, SetBlockNumber { value: ResOperand, }, SetBlockTimestamp { value: ResOperand, }, SetCallerAddress { value: ResOperand, }, SetContractAddress { value: ResOperand, }, SetSequencerAddress { value: ResOperand, },
}

Variants§

§

AllocSegment

Fields

§

TestLessThan

§

TestLessThanOrEqual

§

DivMod

Fields

§quotient: CellRef
§remainder: CellRef
§

Uint256DivMod

Fields

§dividend_low: ResOperand
§dividend_high: ResOperand
§divisor_low: ResOperand
§divisor_high: ResOperand
§quotient0: CellRef
§quotient1: CellRef
§divisor0: CellRef
§divisor1: CellRef
§extra0: CellRef
§extra1: CellRef
§remainder_low: CellRef
§remainder_high: CellRef

Divides dividend_low<<128+dividend_high by divisor_low<<128+divisor_high. Splits the remainder to 128bit words: remainder_low and remainder_high. Splits the quotient and the divisor to 128bit words. The lower 128 bits of the quotient are written to quotient0 and quotient1. The lower 128 bits of the divisor are written to divisor0 and divisor1. If the divisor is greater than 2^128, the upper 128 bits of the divisor are written to extra0 and extra1. In this case, quotient must be lower than 2^128. Otherwise, the upper 128 bits of the quotient are written to extra0 and extra1.

§

SquareRoot

Fields

§

LinearSplit

Finds some x and y such that x * scalar + y = value and x <= max_x.

§

AllocFelt252Dict

Fields

§segment_arena_ptr: ResOperand

Allocates a new dict segment, and write its start address into the dict_infos segment.

§

Felt252DictRead

Fields

§dict_ptr: ResOperand
§value_dst: CellRef

Retrieves and writes the value corresponding to the given dict and key from the vm dict_manager.

§

Felt252DictWrite

Fields

§dict_ptr: ResOperand

Sets the value corresponding to the key in the vm dict_manager.

§

GetSegmentArenaIndex

Fields

§dict_end_ptr: ResOperand
§dict_index: CellRef

Retrieves the index of the given dict in the dict_infos segment.

§

InitSquashData

Fields

§dict_accesses: ResOperand
§ptr_diff: ResOperand
§n_accesses: ResOperand
§big_keys: CellRef
§first_key: CellRef

Initialized the lists of accesses of each key of a dict as a preparation of squash_dict.

§

GetCurrentAccessIndex

Fields

§range_check_ptr: ResOperand

Retrieves the current index of a dict access to process.

§

ShouldSkipSquashLoop

Fields

§should_skip_loop: CellRef

Writes if the squash_dict loop should be skipped.

§

GetCurrentAccessDelta

Fields

§index_delta_minus1: CellRef

Writes the delta from the current access index to the next one.

§

ShouldContinueSquashLoop

Fields

§should_continue: CellRef

Writes if the squash_dict loop should be continued.

§

AssertCurrentAccessIndicesIsEmpty

Asserts that the current access indices list is empty (after the loop).

§

AssertAllAccessesUsed

Fields

§n_used_accesses: CellRef

Asserts that the number of used accesses is equal to the length of the original accesses list.

§

AssertAllKeysUsed

Asserts that the keys list is empty.

§

GetNextDictKey

Fields

§next_key: CellRef

Writes the next dict key to process.

§

AssertLtAssertValidInput

Asserts that the input represents integers and that a<b.

§

AssertLeFindSmallArcs

Fields

§range_check_ptr: ResOperand

Finds the two small arcs from within [(0,a),(a,b),(b,PRIME)] and writes it to the range_check segment.

§

AssertLeIsFirstArcExcluded

Fields

§skip_exclude_a_flag: CellRef

Writes if the arc (0,a) was excluded.

§

AssertLeIsSecondArcExcluded

Fields

§skip_exclude_b_minus_a: CellRef

Writes if the arc (a,b) was excluded.

§

AssertLeAssertThirdArcExcluded

Asserts that the arc (b, PRIME) was excluded.

§

RandomEcPoint

Fields

Samples a random point on the EC.

§

FieldSqrt

Fields

§sqrt: CellRef

Computes the square root of val, if val is a quadratic residue, and of 3 * val otherwise.

Since 3 is not a quadratic residue, exactly one of val and 3 * val is a quadratic residue (unless val is 0). This allows proving that val is not a quadratic residue.

§

SystemCall

Fields

§system: ResOperand

Represents a hint that triggers a system call.

§

DebugPrint

Fields

Prints the values from start to end. Both must be pointers.

§

AllocConstantSize

Fields

Returns an address with size free locations afterwards.

§

SetBlockNumber

Fields

§

SetBlockTimestamp

Fields

§

SetCallerAddress

Fields

§

SetContractAddress

Fields

§

SetSequencerAddress

Fields

Trait Implementations§

source§

impl Clone for Hint

source§

fn clone(&self) -> Hint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Hint

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Hint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<Hint> for Hint

source§

fn eq(&self, other: &Hint) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Hint

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Hint

source§

impl StructuralEq for Hint

source§

impl StructuralPartialEq for Hint

Auto Trait Implementations§

§

impl RefUnwindSafe for Hint

§

impl Send for Hint

§

impl Sync for Hint

§

impl Unpin for Hint

§

impl UnwindSafe for Hint

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for Twhere T: ?Sized,

source§

fn upcast(&self) -> &T

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,