-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KGA-19] dev: use Cairo1Helpers class for 'call_contract' for future-proofness #1625
Conversation
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 |
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
@@ -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
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