Using the online solidity compiler startGame() returns false, but using truffle this function returns a long hex string: 0xf697bd4ff4f5574f3cf73cd46a18087a5a0cf1aa1580fd4992ab20f574a808fe

function startGame() critical returns (bool) {
    Player player = players[msg.sender];
    if (player.ready) { 
        if (player.balance < minimumwager) { throw; }
            if (numWaiting > 1) { 
                var thismatchup =  makeMatchup();
                player.playing = true;
                return true; 
            else {
                player.playing = true;
                return false; 
  • You're getting a transaction hash in Truffle. You need to use events and this overview about transactions could help: ethereum.stackexchange.com/questions/765/…
    – eth
    Oct 21, 2016 at 5:24
  • No problem. I posted an answer and feel free to edit it or post your own answer that could help others.
    – eth
    Oct 21, 2016 at 18:01

1 Answer 1


Invoking startGame with .call() in Truffle solved the issue: startGame.call()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.