Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/hintrunner/hinter/scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func TestScope(t *testing.T) {
sm := DefaultNewScopeManager()

// Assing variable n and get its current value
// Assign variable n and get its current value
err := sm.AssignVariable("n", 3)
require.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion pkg/hintrunner/zero/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ There are four hint blocks in this code. Notice the `excluded` variable is defin
The current solution uses the `HintRunnerContext` structure, which is passed down to the implementation of each hint. This structure contains a `ScopeManager` that will handle all the operations related to scope, such as:
- Creating a new scope: Use method `EnterScope()` when the hint code uses `vm_enter_scope()` method.
- Exiting current scope: Use method `ExitScope()` when the hint uses `vm_exit_scope()` method.
- Variable declaration and assingment: Just like the `excluded` variable in the first hint block of the previous example. Use `AssignVariable()` method.
- Variable declaration and assignment: Just like the `excluded` variable in the first hint block of the previous example. Use `AssignVariable()` method.
- Accessing variable values: Just like the `excluded` variable in the last three hint blocks of the previous example. Use `GetVariableValue()` method.

Check [scope.go](../hinter/scope.go) file for details in the implementation.
2 changes: 1 addition & 1 deletion pkg/hintrunner/zero/zerohint_signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func createDivModSafeDivHinter() (hinter.Hinter, error) {
return newDivModSafeDivHint(), nil
}

// DivModNPackedDivmodV1 hint caculates the division modulo N for packed values
// DivModNPackedDivmodV1 hint calculates the division modulo N for packed values
//
// `newDivModNPackedDivmodV1Hint` takes 2 operanders as arguments
// - `a` is the packed value that will be divided
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (vm *VirtualMachine) getOp1Addr(instruction *asmb.Instruction, op0Addr *mem
// 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
// dstCell value and either op0Cell or op1Cell. This function infers the
// unknow operand as well as the `res` auxiliary value
// unknown operand as well as the `res` auxiliary value
func (vm *VirtualMachine) inferOperand(
instruction *asmb.Instruction, dstAddr *mem.MemoryAddress, op0Addr *mem.MemoryAddress, op1Addr *mem.MemoryAddress,
) (mem.MemoryValue, error) {
Expand Down