-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
ASSERT_LE_FELT+
hints (#240)
* Add IdsManager.GetConst * Integrate into logic * Add utils to help with fetching constants * Add SetupConstantsForTest * Add comments * Guard error case * Fix typo * Fix util * Add hint code * Implement FeltFromBigInt * Implement ASSERT_LE_FELT hint * Add comment * Add test * Add the 3 assert_le_felt_exclued hints * Add tests * Fix identifier * Add integration test * Fix type const in tests * Fix typo * Fix test * Fix bug * Remove debug print * Fix test name * Format files --------- Co-authored-by: Mariano Nicolini <[email protected]>
- Loading branch information
1 parent
ecf7a77
commit 6f45961
Showing
9 changed files
with
327 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
%builtins range_check | ||
from starkware.cairo.common.math import assert_le_felt | ||
|
||
func main{range_check_ptr: felt}() { | ||
assert_le_felt(1, 2); | ||
assert_le_felt(-2, -1); | ||
assert_le_felt(2, -1); | ||
return (); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.