You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR enhances the formatting command to properly exclude libraries during recursive runs, introduces a new bypass_prevrandao configuration option for networks, and refactors environment setup to propagate network settings (including the new flag) across EVM and CLI components. Workspace and test updates ensure defaults and dependencies align with these changes.
Sequence diagram for environment setup with bypass_prevrandao propagation
Add foundry-evm-networks to the workspace members in verify/Cargo.toml
crates/verify/Cargo.toml
Tips and commands
Interacting with Sourcery
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
Reviewer's Guide
This PR enhances the formatting command to properly exclude libraries during recursive runs, introduces a new bypass_prevrandao configuration option for networks, and refactors environment setup to propagate network settings (including the new flag) across EVM and CLI components. Workspace and test updates ensure defaults and dependencies align with these changes.
Sequence diagram for environment setup with bypass_prevrandao propagation
sequenceDiagram participant "CLI/Forge/Cast/Anvil" participant "EVM Core" participant "NetworkConfigs" participant "EnvMut" participant "BlockResponse" "CLI/Forge/Cast/Anvil"->>"EVM Core": Call environment(..., configs) "EVM Core"->>"NetworkConfigs": Pass configs to apply_chain_and_block_specific_env_changes "EVM Core"->>"EnvMut": Apply chain and block specific changes "EVM Core"->>"NetworkConfigs": Call bypass_prevrandao(chain_id) "NetworkConfigs"-->>"EVM Core": Return true/false "EVM Core"->>"EnvMut": Set prevrandao if bypass required "EVM Core"->>"EnvMut": Finalize environment setupEntity relationship diagram for NetworkConfigs and chain types
erDiagram NETWORKCONFIGS { bool bypass_prevrandao } NAMEDCHAIN { chain_id u64 } NETWORKCONFIGS ||--o| NAMEDCHAIN : "uses chain_id for bypass_prevrandao logic"Class diagram for updated NetworkConfigs struct and related methods
classDiagram class NetworkConfigs { +bool optimism +bool celo +bool bypass_prevrandao +bypass_prevrandao(chain_id: u64) bool +is_optimism() bool +is_celo() bool } NetworkConfigs <|-- AnyNetwork class AnyNetwork { // Inherits network config logic }Class diagram for FmtArgs filtering logic update
classDiagram class FmtArgs { +run() Result -is_under_ignored_dir(file_path: &Path, include_libs: bool) bool } FmtArgs --> Input class Input { +Paths(Vec<PathBuf>) }File-Level Changes
crates/forge/src/cmd/fmt.rscrates/forge/tests/cli/fmt.rscrates/evm/networks/src/lib.rscrates/forge/tests/cli/config.rscrates/evm/core/src/utils.rscrates/anvil/src/config.rscrates/cast/src/cmd/run.rscrates/verify/src/bytecode.rscrates/verify/src/utils.rscrates/evm/core/src/fork/init.rscrates/evm/core/src/opts.rscrates/verify/Cargo.tomlTips and commands
Interacting with Sourcery
@sourcery-ai reviewon the pull request.issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it.@sourcery-aianywhere in the pullrequest title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time.@sourcery-ai summaryanywhere inthe pull request body to generate a PR summary at any time exactly where you
want it. You can also comment
@sourcery-ai summaryon the pull request to(re-)generate the summary at any time.
@sourcery-ai guideon the pullrequest to (re-)generate the reviewer's guide at any time.
@sourcery-ai resolveon thepull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
@sourcery-ai dismisson the pullrequest to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!Customizing Your Experience
Access your dashboard to:
summary, the reviewer's guide, and others.
Getting Help
Originally posted by @sourcery-ai[bot] in #147 (comment)