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

contract deployment tx returned a failed status: execution reverted #351

Closed
aviggiano opened this issue Apr 19, 2024 · 4 comments
Closed

Comments

@aviggiano
Copy link

I am trying to run medusa on a codebase but it is failing with the following error:

[I] ➜ medusa fuzz
⇾ Reading the configuration file at: medusa.json
⇾ Compiling targets with crytic-compile
error Failed to initialize the test chain
‣ contract deployment tx returned a failed status: execution reverted

The same codebase works with Echidna

Unfortunately, it is still private, but I'd like to know if there are any recommendations on how to debug this issue. Is there a verbose/debug mode that I can use to understand why it is failing?

Copy link

Have you tried using the coverage report to see what lines of the constructor are failing? I found Medusa's report to be pretty accurate for tracking what lines of the constructor ended up executing or reverting.

@0xalpharush
Copy link
Contributor

Can you try the master branch? It should have better error reporting
#337

@aviggiano
Copy link
Author

Thanks for your responses.

The coverage report is not being generated. Here's the updated logs:

[I] ➜ medusa fuzz
⇾ Reading the configuration file at: medusa.json
⇾ Compiling targets with crytic-compile
⇾ Initializing corpus
⇾ Setting up base chain
error Failed to initialize the test chain
{
‣ contract deployment tx returned a failed status: execution reverted
‣ [Execution Trace]
 => [creation] CryticTester.constructor() (addr=0xA647ff3c36cFab592509E13860ab8c4F28781a66, value=300000000000000000000, sender=0x0000000000000000000000000000000000030000)
	 => [revert]

@aviggiano
Copy link
Author

Hmm actually I think the problem is that I had an old "targetContractsBalances": ["0x1043561a8829300000"] set to 3 ether.

I removed it and it now works.

The new logs did help!

Thank you

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

No branches or pull requests

3 participants