fix: query actual GMX market count from DataStore instead of hardcoded limit#862
Closed
guibvieira wants to merge 1 commit intomasterfrom
Closed
fix: query actual GMX market count from DataStore instead of hardcoded limit#862guibvieira wants to merge 1 commit intomasterfrom
guibvieira wants to merge 1 commit intomasterfrom
Conversation
…d limit The on-chain getMarkets() call used a hardcoded limit of 115, but the GMX DataStore now contains ~130+ market entries (including swap-only, synthetic, and deprecated markets). Newer markets like SKY were beyond position 115 and silently excluded, causing ValueError when the OrderArgumentParser tried to resolve them. Now queries DataStore.getAddressCount(MARKET_LIST) first (one lightweight storage slot read) then fetches exactly that many markets. This eliminates the recurring need to bump a magic number as GMX lists new markets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
should be fixed with 417e243 |
Contributor
Author
|
can I close this then @Aviksaikat ? |
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.
Summary
getMarkets()call used a hardcoded limit of115, but the GMX DataStore now contains ~130+ entries (including swap-only, synthetic, and deprecated markets). Newer markets (e.g. SKY) were silently excluded, causingValueErrorcrashes whenOrderArgumentParsertried to resolve them.DataStore.getAddressCount(MARKET_LIST)first (one lightweight storage slot read), then fetches exactly that many markets — no more magic numbers to bump.🤖 Generated with Claude Code