Skip to main content
1 of 2

Your function is expecting a return statement from sendToAnother().

pragma solidity 0.4.25;

contract Another {
    uint public balance;
    function sendToAnother() public returns (bool success) {
        balance += 10;
        return true;
    }
}

contract Test {
    function send(address another) public {
        Another(another).sendToAnother();
    }
}

Even though this solution works, I'm not 100% clear as to why it worked for the Javascript VM and not for Ganache. It looks like while using Remix, Ganache is searching for a return first, thus the immediate revert being thrown.