Error: Artifacts are from different compiler runs
Run a full recompilation using `truffle compile --all`
https://zpl.in/upgrades/truffle-recompile-all
at reconstructSolcInputOutput (/.../.../node_modules/@openzeppelin/truffle-upgrades/src/validate.ts:70:15)
...
Just run a npm install and them run truffle test. Youâll see even the first time it runs throws an error. Also a file named .openzeppelin/unknown-1337.json is created when I run migrate or test. But I donât see any useful informations there. The only way I can test is supressing the validation part on oz/validate.js script.
This is copying our ERC20 artifact into the artifacts directory of Truffleâs test environment, which triggers our detection of independent compilation artifacts.
If you remove this line from your migration it works. If you need to use ERC20, as a workaround, you can create a Solidity file in your project containing only:
Wow. I have no idea that validations took into account the artifacts imported on migrations.
I was neglecting those requires because I tought they donât make any difference.
Correcting requires solved the problem. Thank you so much @frangio.
P.S.: Would be nice if the error report those cases.