Remix IDE Kovan Network – Unable to Interact with a Contract on Kovan Network Using Remix IDE

contract-deploymentkovanremix

I am working on a project and I have successfully deployed a smart contract on Kovan test network, but for some reason, I am not able to interact with it in JS code. So, now I want to access it through remix IDE(as it has the option to do so)

How I am trying to do this:

  • Entering Remix
  • Switching to Injected Web3 option in Environment
  • Connecting metamask with remix
  • Entering the contract address in the At address field
  • Pressing the At address button

Nothing is happening after pressing the button.

Deployed contract address: 0xCC0F8a34B0e4ce5baac80c50E5bB1E4042dDED67, etherscanlink.

This is the contract code(mostly irrelevant to the actual problem):

contract CampaignFactory{
    address[] public deployedCampaigns;

    function createCampaign(uint minimum) public { 
    }

    function getDeployedCampaigns() public view returns (address[]) {
        return [];
    }
}

I tried remix in Google Chrome and Mozilla Firefox, the same problem.

Please tell me if, this feature is available or not(interacting though deployed contracts on test networks in remix IDE)?

Suggestions?

Best Answer

Your steps to use Remix are fine, so just two remarks that might help:

  1. Make sure you have selected your contract CampaignFactory in field CONTRACT from <Deploy & Run transactions> menu. Otherwise, if you put the contract address but you haven't selected the contract, it won't deploy it in Remix. The field CONTRACT is linked to the file explorer, where you save all your contracts.

  2. Your contract is apparently not compiling. Not sure what you try to achieve, your Solidity pragma and the reason to return an empty array, but you need to add the location in the return type. E.g.:

    function getDeployedCampaigns() public view returns (address[] memory) {
       return deployedCampaigns;
    }
    
  3. Extra: probably not the case, but I have had issues when using Remix with https, so better to use http if your browser allows to do so.