foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.28k stars 1.75k forks source link

bug(`forge script`): the application panicked #8621

Closed askucher closed 1 month ago

askucher commented 3 months ago

Component

Forge

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (63fff351 2024-06-10T09:15:22.570694000Z)

What command(s) is the bug in?

forge script ./scripts/deploy/Deploy.s.sol:Deploy \ --broadcast --private-key $PRIVATE_KEY \ --fork-url $L1_RPC_URL

where $L1_RPC_URL is local hardhat server

Operating System

macOS (Apple Silicon)

Describe the bug

Trying to compile and deploy beta.2 optimism smart contract on l1

DEPLOYMENT_OUTFILE=./deployments/artifact.json \
  DEPLOY_CONFIG_PATH=./deploy-config/getting-started.json \
    forge script ./scripts/deploy/Deploy.s.sol:Deploy \
    --broadcast --private-key $PRIVATE_KEY \
    --fork-url $L1_RPC_URL

Got this

Compiler run successful!
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: /Users/askucher/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-8.0.0/src/inspector/handler_register.rs:198

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 8 frames hidden ⋮                               
   9: core::panicking::panic::h57fd475c037a9df3
      at <unknown source file>:<unknown line>
  10: revm::inspector::handler_register::inspector_handle_register::{{closure}}::h22f32cc5ba4bb94e
      at <unknown source file>:<unknown line>
  11: revm::evm::Evm<EXT,DB>::transact::h8831846c855ead26
      at <unknown source file>:<unknown line>
  12: foundry_evm::executors::Executor::call_raw::he63957cf962c80b3
      at <unknown source file>:<unknown line>
  13: forge_script::runner::ScriptRunner::call::he4ce25a83b716905
      at <unknown source file>:<unknown line>
  14: forge_script::execute::PreExecutionState::execute::{{closure}}::h8f409576f5b47b6f
      at <unknown source file>:<unknown line>
  15: forge_script::ScriptArgs::run_script::{{closure}}::h888814aeac39c92b
      at <unknown source file>:<unknown line>
  16: forge::main::h960ecf6b48ad2f67
      at <unknown source file>:<unknown line>
  17: std::sys_common::backtrace::__rust_begin_short_backtrace::hdd652279f01427c7
      at <unknown source file>:<unknown line>
  18: _main<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
lib.sh: line 635:  1544 Abort trap: 6           DEPLOYMENT_OUTFILE=./deployments/artifact.json DEPLOY_CONFIG_PATH=./deploy-config/getting-started.json forge script ./scripts/deploy/Deploy.s.sol:Deploy --broadcast --private-key $PRIVATE_KEY --fork-url $L1_RPC_URL
askucher@Andreys-MBP op_stack % git status
On branch main
Your branch is up to date with 'origin/main'.
zerosnacks commented 3 months ago

Hi @askucher, would you mind updating your version of Foundry to the latest nightly by running foundryup? It appears your version is from the 10th of June.

zerosnacks commented 1 month ago

Marking as unresolved, there is unfortunately not enough information to triage this bug.

Running a basic script deployment with Foundry against a Hardhat node did not result in any issues.

Please re-open or leave a comment with additional details if you are still experiencing issues with this.