Revert on Rinkeby when creating new colony: Why?


#1

I have been successfully working with Colony on Ganache without problems. I have been able to create and interact with Colonies, etc.

I am now trying to interact with Colony on Rinkeby using the same code base. I am able to retrieve the number of colonies using colonyJS on Rinkeby no problem. I was also able to create a token using colonyJS.

Unfortunately when I am running the very same code that worked on Ganache to create a colony I am getting a revert error.

Here is an example revert that occurred while trying to create a new colony:

const {
    eventData: {
        colonyId,
        colonyAddress
    },
} = await networkClient.createColony.send({
    tokenAddress
});

Revert info on Etherscan: https://rinkeby.etherscan.io/tx/0xe0de5d898dbca9ee7baad4652bf7722c82f2ffa7bdc3d29b7f2a938ce3dfda36

A couple questions:

  • Any suggestions on how to fix this?
  • Is there a good way to diagnose the reason for such a revert? I know Ethereum is working on adding better support for revert reasons, but any tips in the short term until they roll that out? MetaMask threw an error, but there was no error message in my browser console, for example. Can I enable additional debug info in the browser console somehow?

I am using these libraries

  • “colony-js-adapter-ethers”: “=1.5.3”
  • “colony-js-client”: “=1.5.3”
  • “colony-js-contract-loader-http”: “=1.4.1”
  • “colony-js-contract-loader-network”: “^1.6.2”
  • “ethers”: “^3.0.26”

BTW - I removed the @ Colony from the package names above because it looked like it might @mention a whole bunch of people when pasted in here! :open_mouth:

Thank you.


#2

It looks like you will need to downgrade the colony-js-contract-loader-network package or upgrade the other colonyJS packages. The latter will require some additional adjustments to your code to account for breaking changes. If you want to run your code as is, try downgrading colony-js-contract-loader-network:

"@colony/colony-js-contract-loader-network": "1.0.3"

We have made a lot of fixes and improvements since the rinkeby deployment associated with the above loader, so I would recommend updating to the following versions when you’re ready:

"@colony/colony-js-adapter-ethers": "1.7.0",
"@colony/colony-js-client": "1.7.5",
"@colony/colony-js-contract-loader-http": "1.6.2",
"@colony/colony-js-contract-loader-network": "1.6.2"

If using rinkeby is not necessary at this point, I would skip to the latest colonyJS versions and checkout the following colonyNetwork commit (f73dc84a41f5fc1962c999a24e13b15ba491b8a6) and hold off on running anything on rinkeby until we launch a new version on rinkeby and mainnet in the coming weeks.

This should be documented better but following launch, all colonyJS package versions (following the versions at the time of launch) will work with all deployed versions on rinkeby and mainnet because colonies will have the option to upgrade when they so choose, meaning colonyJS will have to support all versions of the colonyNetwork contracts (all versions following those launched on mainnet and rinkeby in the coming weeks).

Haha. Thanks but no worries. You can avoid this by putting the packages in a code block using ```.


#3

As of Solidity version 0.4.22, revert with reason has been supported. In the latest version of the contracts, we are using Solidity version 0.4.23 and we have added revert strings. I’m not sure of a better way than to debug than to test locally using the same version of the deployed contracts that you are attempting to interact with on rinkeby - but this also depends on the contracts including revert reasons.