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

fix(cast) cast run panicks when encountering failed contract deployment #4871

Conversation

ckoopmann
Copy link
Contributor

Motivation

Currently cast run panicks when trying to simulate a failed contract deployment, due to a misplaced "unwrap" call.
This fixes that.

Solution

Remove the offending unwrap and replace with a pattern match.

Before

image

After

image

closes #4870

@ckoopmann ckoopmann changed the title Fix cast run panick when encountering failed contract deployment fix(cast) cast run panicks when encountering failed contract deployment May 3, 2023
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

cli/src/cmd/cast/run.rs Outdated Show resolved Hide resolved
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@mattsse mattsse merged commit e807429 into foundry-rs:master May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cast run panicks when simulating a reverted contract deployment
2 participants