forked from foundry-rs/foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update base #2
Merged
Merged
Update base #2
Conversation
This file contains 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
* feat(cheatcodes): restrict cheatcodes on precompiles * chore: exclude address(0) from precompiles check * chore: fix test * chore: add revert tests
* feat(tests): add statefulFuzz alias to invariant * chore: tests
… erroring (#4826) * init start change prank * testChangePrank * revert startChangePrank and change startPrank to overwrite existing prank instead of erroring as per review suggestion * add tests for prank0 after prank1 and prank1 after prank0 * fmt * add error if prank is not used at least once before overwritten as per suggestion * fmt * unit test for startPrank0 - and startPrank1 - * fix * remove clones by only updating prank after first time applied * fmt * more readable names * chore: fix/add tests, use ensure util * chore: add missing edge case test --------- Co-authored-by: Matthias Seitz <[email protected]> Co-authored-by: evalir <[email protected]>
* Parse FuzzConfig from string (brief impl) Unit tests * ConfParser trait is able to extract configurations out of a structured text Unit tests * cargo +nightly fmt * FuzzConfig implements ConfParser trait Unit tests * InvariantConfig implements ConfParser trait Unit tests * Parsing logic optimized Meaningful e2e test * Configurations can be parsed from project compilation output * E2E tests for inline configuration load * - ConfParser: parse fn is now try_merge - TestOptions struct extended to track test specific configs - Tests * Since TestOptions is no more Copy => TEST_OPTS constant is now a function * Inline config matcher uses stripped file prefixes to identify contracts * TestOptionsBuilder docs * Inline fuzz configs are applied during fuzz test execution + E2E tests * Inline invariant configs are applied during fuzz test execution + E2E tests + Docs * typos * Docs typo * cargo +nightly fmt * Added test for block comments * Renamed ConfParser to InlineConfigParser * Use NodeType enum to match condition * Use helper type to describe the HashMap key * Misconfigured line number added to the error - Need UNIT TESTS * Added very descriptive context to the parse error + unit test * Emphasis on the "Invalid" keyword * Big refactoring. Design is cleaner and more appropriate. It allows better validation flexibility. Need to fix tests * natspec unit tests * Refactor Unit tests InvariantConfig + FuzzConfig * Noisy comment test * Use meaningful names * Profile validation implemented + Unit tests * Given a natspec, extract current profile configs + Unit tests * TestOptions instantiated with new validation rules - NEED TESTS * Integration tests working * Integration tests docs and typos * Utility function to get all available profiles in config - unit tests * try update PR * Punctuation in config/src/inline/conf_parser.rs Co-authored-by: evalir <[email protected]> * Punctuation in config/src/inline/conf_parser.rs Co-authored-by: evalir <[email protected]> * review: docs in cli/src/cmd/forge/test/mod.rs * review: naming convention in InlineConfigParser * review: test renaming suggestion Co-authored-by: evalir <[email protected]> * review: test renaming suggestion Co-authored-by: evalir <[email protected]> * review: test renaming suggestion Co-authored-by: evalir <[email protected]> * review: docs punctuation Co-authored-by: evalir <[email protected]> * review: docs Co-authored-by: evalir <[email protected]> * review: function internal utils function renaming + docs * review: get_fn_docs unit tests * review: test renaming suggestion Co-authored-by: evalir <[email protected]> * review: clarify intent * review: document functions * review: applied case typos * FIX CI: Available profiles fallback to vec![current_profile] in case the foundry.toml path cannot be resolved * cargo +nightly fmt * review: case typo * review: remove double quotes from src line * review: removed duplicated error msg; removed row:col:len detail (it was not accurate) * fix CI --------- Co-authored-by: evalir <[email protected]>
* improving docs generation by adding homepage to config * comments * remove comments * chore: rizz up as per comments * chore: skip serializing if empty * chore: fix if --------- Co-authored-by: Enrique Ortiz <[email protected]>
* chore: add tests to test proper behavior * fix(cheatcodes): properly handle all cases for expectCall * chore: allow too many arguments * chore: store calldata as a vec instead of bytes to avoid interior mutability lint * chore: more clippy * chore: add more docs and abstract signature
* chore: add new expect emit logic * feat: handle expect emits on the next immediate call and error appropiately * chore: tests * chore: simplify errors * chore: remove unused actual count * chore: clippy * chore: remove unneeded test artifacts * chore: ignore STATICCALLs * chore: fix additive behavior * chore: add more tests * chore: lint * chore: be able to match in between events rather than strictly full-sequences * chore: clippy * chore: lint expect emit * chore: simplify if
* - add try_shrinking config in [invariant], default true, tries to reduce number of calls in scenario to min - when set to false test will just error with the original number of calls in scenario * Add comment * Improve option name: shrink_sequence * Changes after request: proper way to fix warnings * add shrink-sequence to valid config keys for the parser --------- Co-authored-by: Matthias Seitz <[email protected]> Co-authored-by: Enrique Ortiz <[email protected]>
* Script: ensure prevrandao is set, even if no mixHash in response * Update evm/src/executor/fork/init.rs Co-authored-by: DaniPopes <[email protected]> * Update evm/src/executor/fork/init.rs Co-authored-by: evalir <[email protected]> * Update evm/src/executor/fork/init.rs * chore: ensure prevrandao is set --------- Co-authored-by: 0xCalibur <[email protected]> Co-authored-by: evalir <[email protected]> Co-authored-by: DaniPopes <[email protected]>
* chore: add changelog * chore: remove brackets from changes that still have not been done * chore: evm version change
* Fix link in CHANGELOG.md * Really fix it this time
ape-dev-cs
pushed a commit
that referenced
this pull request
Oct 16, 2023
* fuzz single refactor * add struct docs * Update crates/evm/src/fuzz/mod.rs Co-authored-by: DaniPopes <[email protected]> * add docs and move types to types.rs * fmt * add new debugger args type * add minimal debugger-refactor changes * finish him! * fmt * remove TODO * minimal diff * apply review suggestions * add TODO * looks better * make ContractSources wrapper * add more docki docs * write file_id docs! --------- Co-authored-by: DaniPopes <[email protected]>
ape-dev-cs
pushed a commit
that referenced
this pull request
Oct 16, 2023
* feat: use alloy revm branch * fuzz/mod migrated * progress * progress, fmt * fix imdb * feat: cheatcodes compile * feat: fork backend compiles * feat: trace * fuzz * anvil progress * chore: mem, fmt * chore: db.rs * chore: it lives * fix test * chore: clippy * workin * main backend stuff migrated * chore: add glue on other crates * chore: make executor use alloy types * add glue for executor migration * chore: use workspace alloy * chore: undo revm bump changes * chore: remove unneded prefix * chore: fix fork fixture * chore: uncomment tests * chore: switch to up-to-date revm * chore: clippy * (#2) Alloy Migration: Migrate non-cheatcode inspectors (foundry-rs#5770) * feat: migrate non-cheatcode inspectors * fix: properly create both create and create2 addresses * chore: clippy * (foundry-rs#3) Alloy Migration: migrate fork-adjacent files to alloy primitives (foundry-rs#5771) * chore: use create2_from_code * borrow it brah * chore: use from word * chore: drop to_be_bytes * fmt * chore: use from_word on both palces * chore: use address::random * chore: make failure slot b256 * chore: use address::random * chore: fix indexes * chore: use contract.hash * chore: do not collect * chore: use display on alloy nums * use + operator * chore: unwrap bytes and replace import * chore: Into:: -> ::from * chore: fix test * chore: use alloy imports * chore: switch to alloy typesd * chore: fix test
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.
Motivation
Solution