crytic/building-secure-contracts

Error: Deploying the contract failed

darkerego opened this issue · 4 comments

Hi. I have an issue.

Bug: my contracts fails to build when I run

$ echidna-test   echidna_test.sol

It does however compile with both brownie, critic-compile, and also slither. The specific error is:

"echidna-test: Deploying the contract 0x00a329c0648769A73afAc7F9381E08FB43dBEA72 failed (revert, out-of-gas, sending ether to an non-payable constructor, etc.):"

Exepected behavior: The contract should compile. Documentation says I should open an issue. Thanks.

Hi! can you share your contract code here? Have you checked if any of the conditions in the error message apply to your contract? (usually it's something simple like e.g. your contract constructor reverts, or sends ether to another address, but you've not funded your contract with ether)

Ah, thanks for the quick reply! You are right, it was totally my fault.

Hi,

Just to clarify: compiling an contract and deploying it without a revert are two different things. Your contract may compile properly, but always fail in the deployment. This is determined during runtime.

This seems to be fixed