Skip to content
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

Bug on Deployment to ZKsync #8156

Closed
2 tasks done
jtfirek opened this issue Jun 13, 2024 · 3 comments
Closed
2 tasks done

Bug on Deployment to ZKsync #8156

jtfirek opened this issue Jun 13, 2024 · 3 comments
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug

Comments

@jtfirek
Copy link
Contributor

jtfirek commented Jun 13, 2024

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (e0ea59c 2024-04-24T00:17:37.065879000Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Apple Silicon)

Describe the bug

forge script --chain 324 script/OFTConfigure.sol:DeployOFTScript --rpc-url $RPC_URL --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY -vvv
[⠢] Compiling...
[⠆] Compiling 2 files with 0.8.25
[⠰] Solc 0.8.25 finished in 2.12s
Compiler run successful!
The application panicked (crashed).
Message: called Option::unwrap() on a None value
Location: /Users/runner/.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::h3131e0868b9f8622
at :
10: core::option::unwrap_failed::hdb518deb484b6610
at :
11: revm::inspector::handler_register::inspector_handle_register::{{closure}}::h4267af1945b14904
at :
12: revm::evm::Evm<EXT,DB>::transact::hc098e979d8f4081a
at :
13: foundry_evm::executors::Executor::call_raw::h002954fbbb7c604c
at :
14: forge_script::runner::ScriptRunner::call::h11367cefefe39cab
at :
15: forge_script::execute::PreExecutionState::execute::{{closure}}::h670442284707f0cf
at :
16: forge_script::ScriptArgs::run_script::{{closure}}::h75ca2c06ff9d8cd0
at :
17: forge::main::h250832e8765746d2
at :
18: std::sys_common::backtrace::__rust_begin_short_backtrace::h014dc81c722c4340
at :
19: _main
at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
zsh: abort forge script --chain 324 script/OFTConfigure.sol:DeployOFTScript --rpc-url

@jtfirek jtfirek added the T-bug Type: bug label Jun 13, 2024
@jtfirek
Copy link
Contributor Author

jtfirek commented Jun 13, 2024

The transaction succeed when I remove the SALT cheatcode even though I have used this same script to deploy to other chains

Failure:

        oftDeployment.implementationAddress = address(new MintableOFTUpgradeable{salt: SALT}(DEPLOYMENT_LZ_ENDPOINT));
        oftDeployment.proxyAddress = address(
            new TransparentUpgradeableProxy{salt: SALT}(
                oftDeployment.implementationAddress,
                scriptDeployer,
                abi.encodeWithSelector(
                    MintableOFTUpgradeable.initialize.selector, TOKEN_NAME, TOKEN_SYMBOL, scriptDeployer
                )
            )
        );

Successful:

        oftDeployment.implementationAddress = address(new MintableOFTUpgradeable(DEPLOYMENT_LZ_ENDPOINT));
      oftDeployment.proxyAddress = address(
          new TransparentUpgradeableProxy(
              oftDeployment.implementationAddress,
              scriptDeployer,
              abi.encodeWithSelector(
                  MintableOFTUpgradeable.initialize.selector, TOKEN_NAME, TOKEN_SYMBOL, scriptDeployer
              )
          )
      );

@klkvr
Copy link
Member

klkvr commented Jun 14, 2024

likely #7838, you can update to latest nightly to avoid panic

zkSync does not have default CREATE2 deployer predeployed (0x4e59b44847b379578588920ca78fbf26c0b4956c), so CREATE2 deployments from scripts can't be supported there

@zerosnacks zerosnacks added C-forge Command: forge Cmd-forge-script Command: forge script labels Jun 27, 2024
@zerosnacks
Copy link
Member

Marking as resolved by comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

3 participants