-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(forge): allow --verifier custom
option (#9311)
#6
Conversation
* feat(forge): allow `--verifier custom` option * Changes after review: add description of custom verifier, reorg err message, add custom verifier api key * Fix descriptions * Update crates/verify/src/provider.rs Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> --------- Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Reviewer's Guide by SourceryThis PR adds support for custom verification providers by introducing a new No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @Dargon789 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add tests for the custom verifier functionality to ensure it works as expected
- The PR description is empty - please fill out the motivation and solution sections to help reviewers understand the context and purpose of these changes
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
* begin api and rough comments * impl cheatcode * add check for eoa * fix eoa check on each prank call * add to assets * prank compiling * delegate call working, storage not upating * delegate call working, some tidy up * add prank2 calls * impl remaining tests * formatting * forge fmt * add pranks to cheatcodes.json * run cargo cheats * If verbosity level is 1 or higher, it shows dirty files. * Fix, add EOA prank test * Revert "If verbosity level is 1 or higher, it shows dirty files." This reverts commit d03ac1d. * Fix test * apply on extdelegatecall --------- Co-authored-by: mgiagante <251503-mgiagante@users.noreply.gitlab.com> Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Head branch was pushed to by a user without write access
…9321) * add --sizes and --names JSON compatibility + generalize report kind * add additional json output tests * fix feedback nit
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.
feat(forge): allow --verifier custom option (foundry-rs#9311) #6
* test: enhance tests * update ws url * Assert json unordered * Update crates/test-utils/src/util.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Changes after review * Fix rpc url test --------- Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com> Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Locking 40 packages to latest compatible versions Updating allocator-api2 v0.2.19 -> v0.2.20 Updating alloy-dyn-abi v0.8.11 -> v0.8.12 Updating alloy-json-abi v0.8.11 -> v0.8.12 Updating alloy-primitives v0.8.11 -> v0.8.12 Updating alloy-sol-macro v0.8.11 -> v0.8.12 Updating alloy-sol-macro-expander v0.8.11 -> v0.8.12 Updating alloy-sol-macro-input v0.8.11 -> v0.8.12 Updating alloy-sol-type-parser v0.8.11 -> v0.8.12 Updating alloy-sol-types v0.8.11 -> v0.8.12 Updating aws-sdk-sts v1.49.0 -> v1.50.0 Updating axum v0.7.7 -> v0.7.9 Updating bstr v1.10.0 -> v1.11.0 Updating cc v1.1.37 -> v1.2.1 Updating clap v4.5.20 -> v4.5.21 Updating clap_builder v4.5.20 -> v4.5.21 Updating clap_complete v4.5.37 -> v4.5.38 Updating clap_lex v0.7.2 -> v0.7.3 Updating comfy-table v7.1.1 -> v7.1.3 Updating cpufeatures v0.2.14 -> v0.2.15 Removing crossterm v0.27.0 Adding diff v0.1.13 Updating flate2 v1.0.34 -> v1.0.35 Updating indicatif v0.17.8 -> v0.17.9 Adding indoc v2.0.5 Updating instability v0.3.2 -> v0.3.3 Removing instant v0.1.13 Updating libc v0.2.162 -> v0.2.164 Adding pretty_assertions v1.4.1 Updating quinn v0.11.5 -> v0.11.6 Updating quinn-proto v0.11.8 -> v0.11.9 Updating regex-automata v0.4.8 -> v0.4.9 Updating rustix v0.38.39 -> v0.38.40 Updating rustls v0.23.16 -> v0.23.17 Updating scc v2.2.4 -> v2.2.5 Updating serde v1.0.214 -> v1.0.215 Updating serde_derive v1.0.214 -> v1.0.215 Updating syn-solidity v0.8.11 -> v0.8.12 Removing thiserror v1.0.68 Adding thiserror v1.0.69 (available: v2.0.3) Adding thiserror v2.0.3 Removing thiserror-impl v1.0.68 Adding thiserror-impl v1.0.69 Adding thiserror-impl v2.0.3 Adding web-time v1.1.0 note: pass `--verbose` to see 44 unchanged dependencies behind latest Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Head branch was pushed to by a user without write access
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.
update cargo.lock
Head branch was pushed to by a user without write access
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.
feat(forge): allow --verifier custom option (foundry-rs#9311) #6
test
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.
test again
* feat(cast storage): allow ugly printing of layout Prior to this change, `cast storage $ADDRESS --rpc-url $RPC_URL --etherscan-api-key $ETHERSCAN_API_KEY` always provided a prettified output. This change adds a `--pretty` flag to `cast storage` which defaults to `true` thus retaining backwards compatibility. Passing `--pretty=false` to `cast storage` results in the json output of the storage layout being produced instead. * fix: remove default value from help text The default value is accessible via `cast storage --help` * fix(cast storage): provide output json path * test(cast): add storage_layout_simple_json test * fix(cast storage): use `--json` flag to ugly print * fix(cast storage): include values in json mode * fix(cast-storage): quiet compilation in all cases * chore: cargo clippy * use fixtures, assert JSON * only quiet if JSON mode, avoid unnecessary warning (if you pass an API key you already expect to fetch remote, very likely default) --------- Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
Head branch was pushed to by a user without write access
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.
crates file test
…les to compile (#9325) * If verbosity level is 1 or higher, it shows dirty files. * Adds verbose message variant for compilation. * Removing `if..else` statement to always display `self.send_msg`. * Changes order of messages. * Removes semicolons and adds comment on message order. * Removes verbose variant in favor of the already existing variant. * nits, sort the dirty files list and prefix with - * Raises verbosity level to 5+ * Update crates/common/src/term.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --------- Co-authored-by: mgiagante <251503-mgiagante@users.noreply.gitlab.com> Co-authored-by: zerosnacks <zerosnacks@protonmail.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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.
review cargo.lock new update forge test
Head branch was pushed to by a user without write access
Locking 36 packages to latest compatible versions Updating async-compression v0.4.17 -> v0.4.18 Updating bytemuck v1.19.0 -> v1.20.0 Updating const-hex v1.13.1 -> v1.13.2 Adding core-foundation v0.10.0 Updating cpufeatures v0.2.15 -> v0.2.16 Updating h2 v0.4.6 -> v0.4.7 Updating hyper v1.5.0 -> v1.5.1 Updating impl-trait-for-tuples v0.2.2 -> v0.2.3 Updating interprocess v2.2.1 -> v2.2.2 Updating itoa v1.0.11 -> v1.0.13 Updating litemap v0.7.3 -> v0.7.4 Updating op-alloy-consensus v0.6.5 -> v0.6.8 Updating op-alloy-rpc-types v0.6.5 -> v0.6.8 Updating portable-atomic v1.9.0 -> v1.10.0 Updating proc-macro2 v1.0.89 -> v1.0.92 Updating quick-junit v0.5.0 -> v0.5.1 Updating quick-xml v0.36.2 -> v0.37.1 Updating rustix v0.38.40 -> v0.38.41 Updating rustls v0.23.17 -> v0.23.18 Updating rustls-native-certs v0.8.0 -> v0.8.1 Updating scale-info v2.11.5 -> v2.11.6 Updating scale-info-derive v2.11.5 -> v2.11.6 Updating schannel v0.1.26 -> v0.1.27 Adding security-framework v3.0.1 Updating semver-parser v0.10.2 -> v0.10.3 Updating syn v2.0.87 -> v2.0.89 Updating sync_wrapper v1.0.1 -> v1.0.2 Updating unicode-ident v1.0.13 -> v1.0.14 Updating url v2.5.3 -> v2.5.4 Updating wasmtimer v0.4.0 -> v0.4.1 Updating webpki-roots v0.26.6 -> v0.26.7 Updating yoke v0.7.4 -> v0.7.5 Updating yoke-derive v0.7.4 -> v0.7.5 Updating zerofrom v0.1.4 -> v0.1.5 Updating zerofrom-derive v0.1.4 -> v0.1.5 Updating zip v2.2.0 -> v2.2.1 note: pass `--verbose` to see 18 unchanged dependencies behind latest Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
…as alias (#9406) remove duplicate gas_limit field, declare as alias
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
* adhere to --quiet flag * revert case-specific handling of writing to progress, redundant * handle writing to multiprogress, previously panic * make verification process compatible with --json flag * revert verifaction --json flow, too messy * clean up * revert * handle json correctly for script deployment logs, incl. receipts * avoid incompatible lines with json output * revert unnecessary change * add json and quiet test * address feedback * fix incorrect ordering
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
…#9420) * add --broadcast flag to forge create, default to dry run * nits * fix tests * add dry run tests incl --json * minor fixes, failing test due to minor bytecode difference
…`-vvvvv` (#9013) * Add options for state changes output and json output in cast run command * fix test * add back serde_json in Cargo.lock * format using nightly * rename parameter * update revm-inspectors * supress clippy warning and merge master * add serde_json * disable some stdout print when --json option is used * remove unnecessary check * replace with sh_println * replace with shell::is_json * Show storage for verbosity > 1, add test * Change verbosity to > 4 for both cast and forge test, add test, fix ci --------- Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
* feat: rewrite inline config using figment * wip * wip * fix: use same GasLimit type * wip * fixes * tests * test fixes * fmt * test update
* script: evm_opts -> evm_args Signed-off-by: jsvisa <delweng@gmail.com> * forge: evm_opts -> evm_args Signed-off-by: jsvisa <delweng@gmail.com> * chisel: evm_opts -> evm_args Signed-off-by: jsvisa <delweng@gmail.com> * forge: evm_opts -> evm_args Signed-off-by: jsvisa <delweng@gmail.com> --------- Signed-off-by: jsvisa <delweng@gmail.com>
This pull request addresses a minor but important syntax issue in the conditional statement used to check for the presence of libusb on macOS.
* feat: add timeouts to fuzz testing Adds --fuzz-timeout-secs to fuzz tests which will cause a property test to timeout after a certain number of seconds. Also adds --fuzz-allow-timeouts so that timeouts are optionally not considered to be failures. * simplify timeout implementation * use u32 for timeout * switch back to failing for timeouts * clippy * Nits: - move logic to interrupt invariant test in depth loop - add and reuse start_timer fn and TEST_TIMEOUT constant - add fuzz and invariant tests - fix failing test * Fix fmt * Changes after review: introduce FuzzTestTimer --------- Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
…9428) * feat(cast): Add custom error decoding support * Review changes * Changes after review: decode with Openchain too, add test * Review changes: nit, handle incomplete selectors
* use alloy-chains' is_arbitrum * clean up
* feat: specify `rpc_headers` in cast and config * test
feat(forge): allow
--verifier custom
optionChanges after review: add description of custom verifier, reorg err message, add custom verifier api key
Fix descriptions
Update crates/verify/src/provider.rs
Motivation
Solution
Summary by Sourcery
Add support for a custom verification provider by introducing the
--verifier custom
option, along with the ability to specify a custom verifier API key and URL.New Features:
--verifier custom
option to allow users to specify a custom verification provider.Enhancements: