I have a problem when developing in Remix and using my testnet as a blockchain. I have a contract that connects through an interface with an standart ERC20 contract. Everything works fine until I start to deploy them both after each other.

1.) The first contract should send tokens from the contract token to another contract.
2.) The second contract is simply an ERC20 contract, no more.

How it should work: I deploy contract 2 and then contract 1. I as the owner have all tokens and run the allow function to give contract 1 the permission to move tokens with the transferFrom function.

What happens The first thing that happens is, that once both contracts are deployed, I don't get answers in Remix for one of both contracts. For example I can't get the totalSupply, all it says is "Calling contract.totalSupply". It seems like they somehow are overwriting each other or so, but one of both contract is not working anymore. Then also one contract works. I can not even just not get variable values but also no longer run functions in one of the contracts.

It changes and works normally when I run the tests in Javascript VM. But I don't want to use JVM.

Why does no contract work when I deployed both? Does someone had the same issues?

  • That is really odd, I routinely deploy several contracts and I've never have a similar issue. Is ganache restarted between the deployment of both contracts? I'd suggest to try with a newer version of ganache sometimes a bug will escape from developers attention. – Ismael Aug 1 '18 at 14:35
  • I use ganache-cli, how can I update it? Sorry for this question. What I found regarding my issue is this: github.com/trufflesuite/ganache-cli/issues/547 But when it's really that, there would be no way to fix it currently and it would ruin all tests I want to do in the future. – dkb Aug 2 '18 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.