Remix + Ganache - Cannot call one contract from another
See original GitHub issueI 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();
}
}
Expected Behavior
The contract works as is in JavaScript VM and Ropsten (with Metamask) as expected. Also, individual contacts work with ganache-cli. Just calling one contract from another doesnt seem to work.
Current Behavior
transact to Test.send errored: VM Exception while processing transaction: revert
Possible Solution
NA
Steps to Reproduce (for bugs)
- Put he given contract in Remix Editor
- Run ganache-ui. It starts on port 7545
- Run the SmartContract after setting the Environment to Web3 Provider
- Deploy the Another Contract first
- Deploy the Test Contract next
- Call the method
send()with address of Another contract
Your Environment
- Version used ; ganache-ui 1.2.2, Solidity 0.5.0

Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Remix + Ganache - Cannot call one contract from another
One suspicion I have is - am I picking up the address of the Another contract correctly? I am copying it from Remix's...
Read more >Remix Documentation - Read the Docs
Remix IDE is used for the entire journey of smart contract development by users at every knowledge level. It requires.
Read more >Creating and Deploying a Contract - Remix's documentation!
Go to the File Explorer, create a new file, name it and in the editor paste the contract below. // SPDX-License-Identifier: GPL-3.0 pragma...
Read more >Ethereum - Interacting with Deployed Contract - Tutorialspoint
You may check the various functions of the contract as in the case of Remix deployment. Note that the contact is now deployed...
Read more >How to call another smart contract from your solidity code
1. Smart contracts are the most popular feature of the Ethereum network. Smart contracts have functions ... 2. Smart contracts are computer code,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s been 25 days since labeling this issue as priority-high. Any news about releasing a beta with a fix for this issue?
This should now be fixed in the latest beta tagged releases of ganache-cli and ganache-core.
This fix involved pretty significant code changes; check out the release notes for details.
We’d love it if you’d test this beta out to make sure things are good to go before we release to stable.
If you using
ganache-cli, run:If you are using
ganache-core, run:Let us know if you discover any bugs with this new beta release! Thanks!