-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add EXCESS_BALANCE
hint
#1777
Add EXCESS_BALANCE
hint
#1777
Conversation
|
Benchmark Results for unmodified programs 🚀
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1777 +/- ##
==========================================
+ Coverage 94.77% 94.84% +0.07%
==========================================
Files 101 102 +1
Lines 39056 40053 +997
==========================================
+ Hits 37015 37990 +975
- Misses 2041 2063 +22 ☔ View full report in Codecov by Sentry. |
|
||
// Apply data type conversions | ||
let apply_conversion = | ||
|k: &MaybeRelocatable, v: &MaybeRelocatable| -> Option<(String, Decimal)> { |
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.
nice!
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!
@@ -184,6 +184,12 @@ pub enum HintError { | |||
NPairBitsTooLowM, | |||
#[error("{0}")] | |||
SyscallError(Box<str>), | |||
#[error("excess_balance_func: Failed to fetch {0} dictionary. It is either missing or has unexpected data types")] | |||
ExcessBalanceFailedToFecthDict(Box<str>), |
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.
ExcessBalanceFailedToFecthDict -> ExcessBalanceFailedToFetchDict
Small typo in Fetch
* WIP * Add MarginParams * Impl imf * Start excess_balance fn * Add TODO comment * refactor + handle errors * Remove unused error * Finish implementing hint * Handle error * Fix var names * Setup hint test * Fix test * Fix test * Fix test * Fix test values * Fix * Update * Fix * Use constants * Remove unwrap * Remove allow * Remove unused feature * Add failure test case * Fix test values * Add no-std imports * Add no-std imports * Add hint code * Add changelog entry * Use checked arithmetic operations
* Add `EXCESS_BALANCE` hint (#1777) * WIP * Add MarginParams * Impl imf * Start excess_balance fn * Add TODO comment * refactor + handle errors * Remove unused error * Finish implementing hint * Handle error * Fix var names * Setup hint test * Fix test * Fix test * Fix test * Fix test values * Fix * Update * Fix * Use constants * Remove unwrap * Remove allow * Remove unused feature * Add failure test case * Fix test values * Add no-std imports * Add no-std imports * Add hint code * Add changelog entry * Use checked arithmetic operations * lock flamegraph dep * Lock more dependencies * fix * Lock more dependencies * Update Rust version to 1.74.1 (#1605) * Update rust version to 1.74.1 * cargo fmt -all * Update Makefile * cargo clippy --fix * fix cargo clippy * restore fuzzer/Cargo.lock --------- Co-authored-by: Pedro Fontana <[email protected]> * Apply clippy * fmt * Remove cairo1-run * Revert "Remove cairo1-run" This reverts commit ef5d214. * Remove changes to cairo1-run crate --------- Co-authored-by: Pedro Fontana <[email protected]> Co-authored-by: Pedro Fontana <[email protected]>
Implements hint: