Closed tadejrola closed 5 years ago
Hey @tadejrola I'm not sure if this is your issue, but right off the bat it looks like there's a typo:
Contract2 public _contract2;
should be Contract1 public _contract1;
and
_contract2=Contract2 (_add);
should be _contract1=Contract1 (_add);
and
_contract2.call("data");
should be _contract1.call("data");
Frankly, I'm not sure how this would work either way. It's almost like you would have an infinite loop during construction/deployment with your current code (contract2 has a contract2 which is built on construction, and therefore an infinite construction of contract2's).
Further Contract2.sol doesn't have a function call
as that's in Contract1.sol and you don't extend Contract1.
Am confused why it would work :D
Thanks for your answer @seesemichaelj Ohh it was a typo. I fixed the example. But as you can assume, this is only prototype of my original code. And i still have no idea, why transaction reverts using ganache.
Does it still revert after using the updated source code @tadejrola?
I could see it reverting because of an Out Of Gas error because of this endless loop you had, as well as calling a function that didn't exist
Yes, it still reverts @seesemichaelj . Actually my original code didnt have typo. Only this, example code.
Gas is not the problem, because, as i said it works perfectly fine on Ropsten.
I've got the same problem :(
This should now be fixed in our latest beta: https://github.com/trufflesuite/ganache/releases/tag/v2.0.1-beta.0 Let me know if you have any issues or if the fix doesn't work for you.
I have 2 contracts.
Contract1.sol
Contract2.sol
Everything works perfectly fine using:
But it does not work with custom RPC using Ganache v1.1.0. When i try to call
sendData()
from Contract2.sol, the transaction reverts.