ityfuzz
ityfuzz copied to clipboard
thread 'main' panicked at src/evm/contract_utils.rs:847:9: setUp() failed
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.
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