Giter Site home page Giter Site logo

Comments (7)

ggrieco-tob avatar ggrieco-tob commented on August 25, 2024

This is still failing in hevm 0.24. Additionally, using the following simple test code:

pragma solidity ^0.4.21;

library Lib{
    struct Storage{
        uint val;
    }

    function set(Storage storage st) public {
        st.val = 1;
    }
}

and

pragma solidity ^0.4.21;

import "ds-test/test.sol";

import "./Test.sol";

contract TestTest is DSTest {
    using Lib for Lib.Storage;
    Lib.Storage st;

    function setUp() public {
       st.set();
    }

    function testFail_basic_sanity() public {
        assertTrue(false);
    }

    function test_basic_sanity() public {
        assertTrue(true);
    }
}

All the tests will fail with VMError. For instance:

test test_basic_sanity() (src/Test.t.sol:TestTest)
 ├╴constructor                                    
 ├╴initialize test                                
 └╴test_basic_sanity()                            
    └╴error BadJumpDestination (src/Test.t.sol:19)

from dapptools.

rainbreak avatar rainbreak commented on August 25, 2024

Thanks for the simple example. This does appear broken somehow. Can you confirm your solc version?

from dapptools.

ggrieco-tob avatar ggrieco-tob commented on August 25, 2024

Sure, I'm using:

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.4.25+commit.59dbf8f1.Linux.g++

from dapptools.

mbrock avatar mbrock commented on August 25, 2024

Thanks. This turns out to be an error in Hevm's gas semantics for delegatecalls, and also likely an error in the yellow paper's definition of delegatecall. We'll patch it and make a new release after a bit more investigation.

from dapptools.

rainbreak avatar rainbreak commented on August 25, 2024

fixed by #158

from dapptools.

rainbreak avatar rainbreak commented on August 25, 2024

@ggrieco-tob if there are still issues please let us know

from dapptools.

ggrieco-tob avatar ggrieco-tob commented on August 25, 2024

I will be happy to test it, but I'm having trouble to install it from source (using stack). Do you know when this new release will be added into stackage?

from dapptools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.