Hey folks! If you are running ZeppelinOS with any version of truffle between 5.0.13 and 5.0.19, you should upgrade now to truffle 5.0.20. This release includes a fix for an issue that broke compiled JSON artifacts, which were used by
What exactly was the issue?
When you compiled a contract with one of the affected versions of truffle, then modified the Solidity code, and recompiled, the resulting artifact had incorrect ABI definitions (the list of the public methods that your contract exposes) and AST information (what does the source of the contract look like).
How does this impact ZeppelinOS?
(1) When trying to interact one of the contracts you deployed, since the ABI definition is incorrect, you end up with a different set of method than those in the contract, and (2) As
zos looks up the contract variables in the AST to check that storage layout is compatible between upgrades, and the truffle-generated AST is incorrect, it can report false positives, or miss some errors when running
How do I know if I was affected?
If you compiled a contract with one of the affected versions, modified it, and recompiled then you are most likely affected. You will also notice this issue if you find incorrect method definitions in your ABI, or when running
zos push you get unexpected storage layout errors.
How can I fix this?
After you upgrade, the first thing to do is to either manually clear out
build/artifacts and recompile, or run a
truffle compile --all. Solving the storage layout issue can be trickier. One option is to run a
zos push to deploy your contracts to the network, with a
--force flag to skip any validation errors, which will also regenerate the storage layout info with the correct AST information. However, you will have to manually ensure that any changes made to the contract storage are compatible.