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

cast run panicks when simulating a reverted contract deployment #4870

Closed
2 tasks done
ckoopmann opened this issue May 3, 2023 · 1 comment · Fixed by #4871
Closed
2 tasks done

cast run panicks when simulating a reverted contract deployment #4870

ckoopmann opened this issue May 3, 2023 · 1 comment · Fixed by #4871
Labels
T-bug Type: bug

Comments

@ckoopmann
Copy link
Contributor

ckoopmann commented May 3, 2023

Component

Cast

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ac19482 2023-05-03T00:04:41.398754000Z)

What command(s) is the bug in?

cast run

Operating System

macOS (Apple Silicon)

Describe the bug

Cast run panicks when attempting to simulate / rerun a contract deployment that reverted.

Following command reproduces the error:
cast run --quick --rpc-url https://rpc.ankr.com/eth_goerli 0x355df255305c37648e2d1b42fc9842fd3718615eaf23dcf125a2ae53f6cc6284

The given transaction is a reverted deployment of the following contract code:

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

// Uncomment this line to use console.log
// import "hardhat/console.sol";

contract Lock {
    constructor() payable {
        revert("Nope");
    }
}

Attempting to rerun this transaction panicks with the following message:
image

@ckoopmann ckoopmann added the T-bug Type: bug label May 3, 2023
@gakonst gakonst added this to Foundry May 3, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry May 3, 2023
@ckoopmann
Copy link
Contributor Author

Seems like this unwrap is the culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant