Synthetixio / synthetix

Synthetix Solidity smart contracts
https://synthetix.io/
MIT License
1.2k stars 597 forks source link

Potential error in `BaseSynthetixBridge` unit test #2210

Open Wodann opened 5 months ago

Wodann commented 5 months ago

While upgrading Hardhat, we were testing our development-version of Hardhat with synthetix and noticed that there is a test failure which seems to be the result of a previous bug in Hardhat.

1) Contract: BaseSynthetixBridge (unit tests)
       when all the deps are mocked
         when the target is deployed and the proxy is set
           initiateSynthTransfer
             fails if synth is not enabled:
     AssertionError: expected 'VM Exception while processing transac…' to include 'Transaction reverted without a reason…'
      at Object.assertRevert [as revert] (test/utils/index.js:495:12)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at Context.<anonymous> (test/contracts/BaseSynthetixBridge.unit.js:207:6)

It is our understanding that the transaction should revert with a reason string, but for some reason would show up with a "reverted without a reason" error. This should be fixed in the next version of Hardhat.

If this is not the behaviour that you'd expect from Hardhat, please let us know here.