Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NethermindEth/cairo-vm-go
/ functions
Functions
1,195 in github.com/NethermindEth/cairo-vm-go
⨍
Functions
1,195
◇
Types & classes
243
↓ 4 callers
Method
RunUntilPc
run until the program counter equals the `pc` parameter
pkg/runner/runner.go:399
↓ 4 callers
Function
SafeDiv
(x, y *big.Int)
pkg/utils/math.go:208
↓ 4 callers
Function
Sha256Compress
(state [8]uint32, w []uint32)
pkg/utils/sha256.go:32
↓ 4 callers
Method
SignedOffset
()
pkg/assembler/grammar.go:170
↓ 4 callers
Function
createProgram
(code string)
pkg/runner/runner_test.go:491
↓ 4 callers
Function
feltAdd
(x, y *fp.Element)
pkg/hintrunner/zero/zerohint_utils_test.go:64
↓ 4 callers
Function
feltToInt64
(felt *fp.Element)
pkg/disasm/utils.go:9
↓ 4 callers
Method
formatOperand1
(inst casmInstruction)
pkg/disasm/casm_formatter.go:83
↓ 4 callers
Method
initializeEntrypoint
( initialPCOffset uint64, arguments []*fp.Element, returnFp *mem.MemoryValue, memory *mem.Memory, stack []mem
pkg/runner/runner.go:309
↓ 4 callers
Function
newAssertNNHint
AssertNN hint asserts that a given value is non-negative within the range `0 <= value % PRIME < range-check builtin bound` `newAssertNNHint` takes 1
pkg/hintrunner/zero/zerohint_math.go:166
↓ 4 callers
Function
newCompareKeccakFullRateInBytesHint
CompareKeccakFullRateInBytes hint compares a value to KECCAK_FULL_RATE_IN_BYTES constant, i.e., 136 `newCompareKeccakFullRateInBytesHint` takes 1 ope
pkg/hintrunner/zero/zerohint_keccak.go:435
↓ 4 callers
Function
newDictSquashCopyDictHint
DictSquashCopyDict hint prepares arguments for creating a new dictionary with `dict_new` by copying the existing one in the context of squashing `new
pkg/hintrunner/zero/zerohint_dictionaries.go:199
↓ 4 callers
Function
newDivModSafeDivHint
DivModSafeDiv hint computes a safe division in the context of the N constant `newDivModSafeDivHint` doesn't take any operander as argument `newDivMo
pkg/hintrunner/zero/zerohint_signature.go:349
↓ 4 callers
Function
newEcDoubleAssignNewYV1Hint
EcDoubleAssignNewYV1 hint computes a new y-coordinate when doubling a point on an elliptic curve This hint is ultimately used for either multiplying a
pkg/hintrunner/zero/zerohint_ec.go:1082
↓ 4 callers
Function
newFastEcAddAssignNewYHint
FastEcAddAssignNewY hint computes a new y-coordinate for fast elliptic curve addition of two different points This hint is ultimately used for either
pkg/hintrunner/zero/zerohint_ec.go:613
↓ 4 callers
Function
newGetPointFromXHint
GetPointFromX hint calculates the y-coordinate of a point on an elliptic curve for a given x-coordinate `newGetPointFromXHint` takes 2 operanders as
pkg/hintrunner/zero/zerohint_signature.go:240
↓ 4 callers
Function
newIs250BitsHint
is250Bits hint checks whether an address is lower than 2**250 or not and it assigns 1 or 0 to `is_250` variable, respectively `newIs250Bits` takes 2
pkg/hintrunner/zero/zerohint_math.go:1257
↓ 4 callers
Function
newIsLeFeltHint
IsLeFelt hint determines if one value is less than or equal to another within a finite field `newIsLeFeltHint` takes 2 operanders as arguments - `a`
pkg/hintrunner/zero/zerohint_math.go:26
↓ 4 callers
Function
newIsNNHint
IsNN hint checks if a value is non-negative within the range `0 <= value % PRIME < range-check builtin bound` `newIsNNHint` takes 1 operander as arg
pkg/hintrunner/zero/zerohint_math.go:415
↓ 4 callers
Function
newSha256AndBlake2sInputHint
Sha256AndBlake2sInput hint writes 1 or 0 at `full_word` address, whether `n_bytes“ is greater than or equal to 4 or not `newSha256AndBlake2sInputHint
pkg/hintrunner/zero/zerohint_others.go:790
↓ 4 callers
Function
newSignedPowHint
SignedPow hint asserts that the value of base is not zero `newSignedPowHint` takes 1 operander as argument - `base` is the value that will be checked
pkg/hintrunner/zero/zerohint_math.go:739
↓ 4 callers
Function
newSplit128Hint
Split128 hint splits a field element value into two 128-bit values, low and high `newSplit128Hint` takes 3 operanders as arguments - `low` and `high`
pkg/hintrunner/zero/zerohint_math.go:1198
↓ 4 callers
Function
newSplit64Hint
Split64 hint splits a field element in the range [0, 2^192) to its low 64-bit and high 128-bit parts `newSplit64Hint` takes 3 operanders as arguments
pkg/hintrunner/zero/zerohint_uint256.go:119
↓ 4 callers
Function
newSquashDictInnerCheckAccessIndexHint
SquashDictInnerCheckAccessIndex hint updates the access index during the dictionary squashing process `newSquashDictInnerCheckAccessIndexHint` takes
pkg/hintrunner/zero/zerohint_dictionaries.go:647
↓ 4 callers
Function
newSquashDictInnerFirstIterationHint
SquashDictInnerFirstIteration hint sets up the first iteration of a loop for dictionary squashing, extracting `current_access_index` from the `current
pkg/hintrunner/zero/zerohint_dictionaries.go:771
↓ 4 callers
Function
newSquashDictInnerNextKeyHint
SquashDictInnerNextKey hint retrieves the next key for processing during dictionary squashing after checking that the array of keys is not empty `new
pkg/hintrunner/zero/zerohint_dictionaries.go:914
↓ 4 callers
Function
newUint256MulDivModHint
Uint256MulDivMod hint multiplies two `uint256` variables, divides the result by another `uint256` variable, and computes the quotient and the remainde
pkg/hintrunner/zero/zerohint_uint256.go:499
↓ 4 callers
Function
newUint256SubHint
Uint256Sub hint computes the difference of two `uint256` variables in the field of integers modulo 2**256. Then it splits the result into `low` and `h
pkg/hintrunner/zero/zerohint_uint256.go:623
↓ 4 callers
Function
newVerifyZeroHint
VerifyZero hint verifies that a packed value is zero modulo the secp256k1 prime and stores in memory the quotient of the modular division of the packe
pkg/hintrunner/zero/zerohint_signature.go:26
↓ 4 callers
Function
parseImmediateInstruction
(casmCode string)
pkg/assembler/assembler_test.go:627
↓ 4 callers
Method
pc
()
pkg/runner/runner.go:578
↓ 4 callers
Function
requireEqualSegments
compare two segments ignoring builtins
pkg/runner/runner_test.go:474
↓ 4 callers
Function
runAndTestFile
(t *testing.T, path string, name string, benchmarkMap map[string][]int, benchmark bool, errorExpected bool, in
integration_tests/cairo1_test.go:18
↓ 4 callers
Function
trimmedSegment
modifies a segment in place to reduce its real length to its effective lenth. It returns the same segment
pkg/runner/runner_test.go:486
↓ 4 callers
Function
zeroDictInScopeEquals
(dictAddress memory.MemoryAddress, expectedData map[memory.MemoryValue]memory.MemoryValue, expectedDefaultValu
pkg/hintrunner/zero/zerohint_utils_test.go:283
↓ 3 callers
Method
AddSignature
* Hint that will call this function looks like this: "hints": { "6": [ { "accessible_scopes": [ "starkwa
pkg/vm/builtins/ecdsa.go:122
↓ 3 callers
Method
AsImmediate
()
pkg/assembler/grammar.go:118
↓ 3 callers
Function
CairoKeccak
(input []uint64, lastInputWord uint64, lastInputNumBytes int)
pkg/utils/keccak.go:47
↓ 3 callers
Function
Divmod
(n, m, p *big.Int)
pkg/hintrunner/utils/math_utils.go:56
↓ 3 callers
Function
EmptyMemoryValueAsFelt
()
pkg/vm/memory/memory_value.go:186
↓ 3 callers
Function
EvaluateRegister
(register string, offset int16)
pkg/hintrunner/zero/hintparser.go:299
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:44
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:111
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:253
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:336
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:410
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:485
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:882
↓ 3 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1469
↓ 3 callers
Method
ExitScope
()
pkg/hintrunner/hinter/scope.go:39
↓ 3 callers
Function
FeltDivRem
(a, b *fp.Element)
pkg/utils/math.go:94
↓ 3 callers
Method
Finalize
(newSize uint64, publicMemoryOffsets []PublicMemoryOffset)
pkg/vm/memory/memory.go:166
↓ 3 callers
Function
GetBaseBig
()
pkg/hintrunner/utils/secp_utils.go:11
↓ 3 callers
Method
GetCellsPerInstance
()
pkg/vm/memory/memory.go:15
↓ 3 callers
Method
IncrementFreeOffset
Given a memory address and a incrementBy, it increments the freeOffset field of dictionary by it.
pkg/hintrunner/hinter/zero_dict.go:126
↓ 3 callers
Function
Int16FromBigInt
(n *big.Int)
pkg/utils/math.go:121
↓ 3 callers
Method
IsFp
()
pkg/assembler/grammar.go:166
↓ 3 callers
Method
JumpTarget
()
pkg/disasm/casm.go:15
↓ 3 callers
Function
KeccakAddU256LE
Little Endian way for Keccak256 KeccakAddU256LE appends the low and high 64-bit words of a U256 value to a keccak input.
pkg/utils/keccak.go:122
↓ 3 callers
Function
KeccakF1600
KeccakF1600 applies the Keccak permutation to a 1600b-wide state represented as a slice of 25 uint64s.
pkg/vm/builtins/keccak_math.go:37
↓ 3 callers
Method
LastIndex
It returns smallest index associated with the smallest key
pkg/hintrunner/hinter/dict.go:177
↓ 3 callers
Function
LoadCairoZeroProgram
(cairoZeroJson *zero.ZeroProgram)
pkg/runner/program.go:27
↓ 3 callers
Function
MemoryValueFromAny
(anyType any)
pkg/vm/memory/memory_value.go:171
↓ 3 callers
Function
NewScopeManager
(globals map[string]any)
pkg/hintrunner/hinter/scope.go:22
↓ 3 callers
Function
NextPowerOfTwo
Given a number returns its closest power of two bigger than the number
pkg/utils/math.go:50
↓ 3 callers
Method
ReadFromAddressAsAddress
Works the same as `ReadFromAddress` but `MemoryValue` is converted to `MemoryAddress` first
pkg/vm/memory/memory.go:368
↓ 3 callers
Method
RelocateMemory
It returns all segments in memory but relocated as a single segment Each element is a pointer to a field element, if the cell was not accessed, nil is
pkg/vm/vm.go:560
↓ 3 callers
Method
RelocationOffsets
It returns all segment offsets and max memory used
pkg/vm/memory/memory.go:420
↓ 3 callers
Method
ResolveAsEcPoint
(valAddr MemoryAddress)
pkg/vm/memory/memory_value.go:430
↓ 3 callers
Function
StringToUint256
This function converts a string to a uint256.Int by taking the byte representation
pkg/utils/keccak_test.go:229
↓ 3 callers
Function
U128Split
U128Split splits a uint128 (represented as a uint256.Int) into two uint64s.
pkg/utils/keccak.go:18
↓ 3 callers
Function
createUint256IntFromBytes
Converts a byte slice into a uint256.Int
pkg/utils/keccak_test.go:242
↓ 3 callers
Function
createVerifyZeroHinter
(resolver hintReferenceResolver)
pkg/hintrunner/zero/zerohint_signature.go:79
↓ 3 callers
Function
ecadd
performs elliptic curve addition over two points. Assumes `x` ordinates are always different
pkg/vm/builtins/ecop.go:189
↓ 3 callers
Method
fillValue
Fills a value in the values table, if exactly one value is missing. Returns 1 on success or if all values are already known. Returns 0 if there is an
pkg/vm/builtins/modulo.go:327
↓ 3 callers
Function
findBiasedOffset
(value int16)
pkg/assembler/instruction.go:436
↓ 3 callers
Method
getCurrentScope
()
pkg/hintrunner/hinter/scope.go:107
↓ 3 callers
Method
inferOperand
when there is an assertion with a substraction or division like : x = y - z the compiler treats it as y = x + z. This means that the VM knows the dstC
pkg/vm/vm.go:305
↓ 3 callers
Method
initializeMainEntrypoint
()
pkg/runner/runner.go:228
↓ 3 callers
Function
newAssertNotZeroHint
AssertNotZero hint asserts that a value is not zero `newAssertNotZeroHint` takes 1 operander as argument - `value` is the value that will be compared
pkg/hintrunner/zero/zerohint_math.go:127
↓ 3 callers
Function
newBigIntPackDivModHint
BigIntPackDivMod hint divides two values modulo a prime number `newBigIntPackDivModHint` takes 3 operanders as arguments - `P` is the prime modulus -
pkg/hintrunner/zero/zerohint_ec.go:2294
↓ 3 callers
Function
newBigIntSafeDivHint
BigIntSafeDiv hint safely divides two numbers and assigns the result based on a condition `newBigIntSafeDivHint` does not take any arguments `newBig
pkg/hintrunner/zero/zerohint_ec.go:2420
↓ 3 callers
Function
newBlockPermutationHint
BlockPermutation hint executes the Keccak block permutation function to a segment of memory `newBlockPermutationHint` takes 1 operander as argument -
pkg/hintrunner/zero/zerohint_keccak.go:479
↓ 3 callers
Function
newCairoKeccakFinalizeHint
CairoKeccakFinalize writes the result of F1600 Keccak permutation padded by __keccak_state_size_felts__ zeros to consecutive memory cells, __block_siz
pkg/hintrunner/zero/zerohint_keccak.go:25
↓ 3 callers
Function
newCompareBytesInWordHint
CompareBytesInWord hint compares a value to BYTES_IN_WORD constant, i.e., 8 `newCompareBytesInWordHint` takes 1 operander as argument - `nBytes` is t
pkg/hintrunner/zero/zerohint_keccak.go:556
↓ 3 callers
Function
newComputeSlopeV1Hint
ComputeSlopeV1 hint computes the slope between two points on the Secp256k1 elliptic curve `newComputeSlopeV1Hint` takes 2 operanders as arguments - `
pkg/hintrunner/zero/zerohint_ec.go:1131
↓ 3 callers
Function
newDictUpdateHint
DictUpdate hint updates the value of given key in a dictionary and asserts the previous value of the key in the dictionary before the update `newDict
pkg/hintrunner/zero/zerohint_dictionaries.go:352
↓ 3 callers
Function
newEcMulInnerHint
(scalar hinter.Reference)
pkg/hintrunner/zero/zerohint_ec.go:1493
↓ 3 callers
Function
newGetHighLenHint
GetHighLen hint calculates the highest bit length between `scalar_u.d2` and `scalar_v.d2`, subtracts 1 from the result, and assigns it to `ids.len_hi`
pkg/hintrunner/zero/zerohint_ec.go:23
↓ 3 callers
Function
newIsZeroNondetHint
IsZeroNondet hint computes whether a value is zero or not `newIsZeroNondetHint` doesn't take any operander as argument `newIsZeroNondetHint` writes
pkg/hintrunner/zero/zerohint_ec.go:1532
↓ 3 callers
Function
newMemContinueHint
(continueTarget hinter.Reference, memset bool)
pkg/hintrunner/zero/zerohint_others.go:17
↓ 3 callers
Function
newNondetElementsOverXHint
NondetElementsOverX hint compares the offset difference between two memory address and writes 1 or 0 at `ap` memory address, depending on whether the
pkg/hintrunner/zero/zerohint_others.go:684
↓ 3 callers
Function
newNormalizeAddressHint
NormalizeAddress hint checks if given addr value is less than ADDR_BOUND or not and writes the result as 1 or 0 to is_small `newNormalizeAddressHint`
pkg/hintrunner/zero/zerohint_others.go:733
↓ 3 callers
Function
newPowHint
Pow hint calculates the least significant bit of the exponent of a number within a prime field `newPowHint` takes 2 operanders as arguments - `locs`
pkg/hintrunner/zero/zerohint_math.go:671
↓ 3 callers
Function
newRandomEcPointHint
RandomEcPoint hint returns a random non-zero point on the STARK curve y^2 = x^3 + alpha * x + beta (mod field_prime). The point is created determinist
pkg/hintrunner/zero/zerohint_ec.go:1740
↓ 3 callers
Function
newSplitFeltHint
SplitFelt hint splits a finite field element into high and low components `newSplitFeltHint` takes 3 operanders as arguments - `low` and `high` are t
pkg/hintrunner/zero/zerohint_math.go:774
↓ 3 callers
Function
newSplitIntAssertRangeHint
SplitIntAssertRange hint asserts that the value to split in `SplitInt` function is zero once there are no more limbs to create `newSplitIntAssertRang
pkg/hintrunner/zero/zerohint_math.go:559
↓ 3 callers
Function
newSquashDictInnerAssertLenKeysHint
SquashDictInnerAssertLenKeys hint asserts that the length of the `keys` descending list is zero during the squashing process `newSquashDictInnerAsser
pkg/hintrunner/zero/zerohint_dictionaries.go:605
↓ 3 callers
Function
newSquashDictInnerContinueLoopHint
SquashDictInnerContinueLoop hint determines if the loop should continue based on remaining access indices `newSquashDictInnerContinueLoopHint` takes
pkg/hintrunner/zero/zerohint_dictionaries.go:724
↓ 3 callers
Function
newSquashDictInnerLenAssertHint
SquashDictInnerAssertLenKeys hint asserts the length of the current access indices for a given key is zero `current_access_indices` is a reversed orde
pkg/hintrunner/zero/zerohint_dictionaries.go:885
← previous
next →
201–300 of 1,195, ranked by callers