Repository navigation
Fix: 4 issues (#1839, #1840, #1841, #1842) - #1992
Open
ochayamary20 wants to merge 1 commit into
Open
ochayamary20 wants to merge 1 commit into
ochayamary20 wants to merge 1 commit into
Conversation
Co-authored-by: Simple Agent <agent@simple.dev>
|
@ochayamary20 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #1839
Closes #1840
Closes #1841
Closes #1842
Issues
#1839 Add a cfg(test) gate around contract test modules in lib.rs
#1840 Validate OracleConfig when a market is created
#1841 Constrain create_market outcome count and label/description lengths
#1842 Validate user address and market id path parameters before cache and RPC use
Summary
The contract already contains partial implementations of the #1840/#1841 checks (validate_oracle_config, MIN_OUTCOMES_PER_MARKET, MAX_DESCRIPTION_BYTES, MAX_OPTION_BYTES, DescriptionTooLong, InvalidOptionLength, InvalidOracleConfig); verify each path returns the correct typed error and add the missing InsufficientOutcomes variant if the single-outcome path still returns InvalidOutcome. For #1839, gate each test module declaration individually rather than with a single catch-all, and verify with
cargo build --releasethat test modules are excluded whilecargo teststill runs the full suite. For #1842, validation must short-circuit before any cache key construction or RPC call; keep the cache key schema and blockchain.rs untouched.Changes