Truffle Tests Fail to Compile with Solidity 0.4.21
I was exploring the Truffle Framework for developing against Ethereum and working my way through its Pet Shop Tutorial with things going well until I hit the first section on testing. When I attempted to run the tests that it had me write, I ran into compiler errors against the Truffle assertion library. It seems that the package was written against v0.4.17 of the Solidity compiler while I’m using the current release, v0.4.21, and there have been breaking changes.
The fix appears to have already made in the next
branch in the Truffle repository, but I was able to hack my way around them for the time being. If you’re running into the same issue, you may be able to work around it until the next Truffle package release by replacing $NPM_ROOT/node_modules/truffle/build/Assert.sol
with the version in this Gist.
Please keep comments respectful and relevant. Off-topic and inappropriate comments are likely to be removed.
Please see our Community Guidelines for more information.