This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 326
[KGA-19] dev: use Cairo1Helpers class for 'call_contract' for future-proofness #1625
Merged
Conversation
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
obatirou
reviewed
Nov 19, 2024
Tests not passing |
@obatirou need to merge ssj first |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1625 +/- ##
=======================================
- Coverage 64.0% 63.8% -0.2%
=======================================
Files 44 44
Lines 8363 8346 -17
=======================================
- Hits 5354 5331 -23
- Misses 3009 3015 +6 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
all good @obatirou |
obatirou
approved these changes
Nov 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but ressources for ssj are not passing
3docSec
reviewed
Nov 25, 2024
@@ -332,6 +332,5 @@ func execute_starknet_call{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range | |||
to: felt, function_selector: felt, calldata_len: felt, calldata: felt* | |||
) -> (retdata_len: felt, retdata: felt*, success: felt) { | |||
Ownable.assert_only_owner(); | |||
let (retdata_len, retdata) = call_contract(to, function_selector, calldata_len, calldata); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call_contract
could be removed from the imports at L15
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uses a call to the Cairo1Helpers class to access the "new" call_contract syscall, that will in the future have the ability to gracefully handle failed contract calls.
NOTE: The change implemented in the following PR does not fix [KGA-19] (code-423n4/2024-09-kakarot-findings#49) because the Starknet network does not allow handling failed calls yet.
Attention to reviewer: The change to the Cairo1Helpers class needs to be merged in kakarot-ssj first. Discussion can be made here