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

thread 'main' panicked at src/evm/contract_utils.rs:847:9: setUp() failed #394

Open
0xxfu opened this issue Dec 2, 2023 · 1 comment
Open

Comments

@0xxfu
Copy link
Contributor

0xxfu commented Dec 2, 2023

Command:

blazo . -s src/SetUp.sol:SetUp

Print:

Results written to ./.ityfuzz/artifacts_file.json
Starting ityfuzz with command: ityfuzz evm --builder-artifacts-file ./.ityfuzz/artifacts_file.json -t "a" --work-dir ./.ityfuzz --setup-file src/SetUp.sol:SetUp
stderr: thread 'main' panicked at src/evm/contract_utils.rs:847:9:
setUp() failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

SetUp.sol:

// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;

contract Test {

    constructor(address _address){}
}
contract SetUp {
    Test test;
    function setUp() public {
        // usdt on ethereum https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7
        test = new Test(0xdAC17F958D2ee523a2206206994597C13D831ec7);
    }
}

Looks like the SetUp feature does not support initializing contracts with on-chain addresses.

@shouc
Copy link
Contributor

shouc commented Dec 5, 2023

this would also revert in Foundry. You can use Foundry cheatcodes to override code, most APIs are supported in ItyFuzz: https://book.getfoundry.sh/forge/cheatcodes

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

2 participants