6

I have this example contract.

contract Example{
    function foo(){
        revert("hello world!!!");        
    }
}

When execute the foo function, this revert the tx, how get the revert message?

PD.: i use truffle to test contracts


now truffle support revert message

eth
  • 85,679
  • 53
  • 285
  • 406
Alfredo Egaf
  • 321
  • 3
  • 9

1 Answers1

0

This feature still not supported on high-level: https://github.com/ethereum/solidity/issues/1686

Alex G.P.
  • 1,277
  • 11
  • 27
  • i try this in remix and get this: transact to Example.foo errored: VM error: revert. revert The transaction has been reverted to the initial state. Reason provided by the contract: "hello world!!!". Debug the transaction to get more information. – Alfredo Egaf Jun 18 '18 at 13:11