crytic / building-secure-contracts

Guidelines and training material to write secure smart contracts

Home Page:https://secure-contracts.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Echidna test with proxy contract to initialise contract

bogdynator opened this issue · comments

Hello, I have an issues when I try to initialise a contract. Below is the code and the error is:
echidna-test: Deploying the contract 0x00a329c0648769A73afAc7F9381E08FB43dBEA72 failed (revert, out-of-gas, sending ether to an non-payable constructor, etc.)

contract Deployer {
    function deployContractsAndSet()
        public
        returns (
            ERC20,
            ERC20
        )
    {
        ERC20 contract1 = new ERC20("a", "b");
        ERC20 contract2 = new ERC20("a2", "b2");

        return (contract1, contract2);
    }
}

contract EchidnaTest {
    ERC20 a;
    ERC20 b;

    constructor() {
        Deployer deployer = new Deployer();
        (a, b) = deployer.deployContractsAndSet();
    }

    function echidna_da()public view returns(bool){
        return true;
    }
}

Can somebody tell me why this is happening?

We cannot reproduce it without the complete example.

sorry, I moved it

Sorry I was a little rude about it. In retrospective it is ok to have questions here about Echidna, but if there is an technical issue with the tool, that should be created in the other repository. Let's continue that discussion there.