I have an innocent looking contracts that work painlessly in Remix. Test contract can easily call Another if I use JavaScript VM in Remix.
I also have ganache-cli running on port 7454. If I connect Remix to ganache-cli, each of these contracts work well individually. But I cant call Another from Test. Remix console says transact to Test.send errored: VM Exception while processing transaction: revert
My contracts look like:
pragma solidity 0.4.25;
contract Another {
uint public balance;
function sendToAnother() public {
balance += 10;
}
}
contract Test {
function send(address another) public {
Another(another).sendToAnother();
}
}
One suspicion I have is - am I picking up the address of the Another contract correctly? I am copying it from Remix's Deployed Contracts
tab.
Edit: Odd enough, it works well on Ropsten Test Network! Could it have to do something with running out of gas. Unlikely, since remix shows around 100 Ether on the account.
npm install -g [email protected]
. To see available versions consult npmjs.com/package/ganache-cli, in the versions tab.