chore: partial read for asset balances#129
Open
RoeeGross wants to merge 1 commit into
Open
Conversation
86c720e to
ddb1d9e
Compare
MohammadNassar1
approved these changes
Nov 19, 2025
MohammadNassar1
left a comment
Contributor
There was a problem hiding this comment.
@MohammadNassar1 reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @remollemo)
ddb1d9e to
ef5365e
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Introduce syscall-based partial read access for
Option<AssetBalance>and switchget_synthetic_balanceto use it for efficient balance retrieval.core/types/position.cairo):OptionAssetBalanceReadAccessTraitwith syscall-based partial reads (read,is_some/is_none,get_balance,get_funding_index,get_version).OptionAssetBalanceOffsetenum with offset mapping for storage access.core/components/positions/positions.cairo):get_synthetic_balanceto useOptionAssetBalanceReadAccessTrait::get_balanceon the iterable map entry pointer instead of reading the fullOption<AssetBalance>.IterableMapTrait.Written by Cursor Bugbot for commit ef5365e. This will update automatically on new commits. Configure here.
This change is