dapphub / dapptools

Dapp, Seth, Hevm, and more

Home Page:https://dapp.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hevm VMFailure when following dapp tutorial symbolic execution

Daniel-Cumming opened this issue · comments

Hi, following the dapp tutorial I have run into this error when implementing the section with symbolic execution. I haven't been able to find any other posts with a similar issue and do not know how to resolve it.

$ dapp test -v
Running 1 tests for src/Dapptutorial.t.sol:DapptutorialTest
hevm: unexpected return value: Just (VMFailure (Revert ""))
CallStack (from HasCallStack):
  error, called at src/EVM/UnitTest.hs:700:18 in hevm-0.49.0-LKV6XlfnTklJ23RljYHQxH:EVM.UnitTest

Having the same issue :/

Similar issue here.

// SPDX-License-Identifier: GPL-3.0-or-later       
pragma solidity ^0.8.6;                            
                                                   
import "ds-test/test.sol";                         
                                                   
import "./Tmp1.sol";                               
                                                   
contract Tmp1Test is DSTest {                      
    Tmp1 tmp;                                      
                                                   
    function setUp() public {                      
        tmp = new Tmp1();                          
    }                                              
                                                   
    function test_basic_sanity() public {          
        assertEq(0, tmp.sayHi(false));             
    }                                              
                                                   
    function prove_some_prop(uint i) public {      
      assertTrue(i != i);                          
    }                                              
}                                                  

Running dapp test gives:

Running 2 tests for src/Tmp1.t.sol:Tmp1Test
[PASS] test_basic_sanity() (gas: 1780)
hevm: unexpected return value: Just (VMSuccess 0x00000000000000000000000000000000000000000000000000000000
00000000)
CallStack (from HasCallStack):
  error, called at src/EVM/UnitTest.hs:700:18 in hevm-0.49.0-LKV6XlfnTklJ23RljYHQxH:EVM.UnitTest

Strangely, if I delete the test_basic_sanity function, running gives:

Running 1 tests for src/Tmp1.t.sol:Tmp1Test
hevm: unexpected return value: Just (VMFailure (Revert ""))
CallStack (from HasCallStack):
  error, called at src/EVM/UnitTest.hs:700:18 in hevm-0.49.0-LKV6XlfnTklJ23RljYHQxH:EVM.UnitTest

And if I delete the prove_some_prop test, it works as expected.

Same here.

commented

I think this should be fixed in #946

hm, I think it has not been released?