hashgraph/hedera-smart-contracts

All unit tests for Panic solidity example contract failed

Closed this issue · 2 comments

Problem

All the unit tests for Panic solidity example contract failed.

@solidityequiv3 Panic Errors
    1) should verify panic error 0x01
    2) should verify panic error 0x11
    3) should verify panic error 0x12
    4) should verify panic error 0x21
    5) should verify panic error 0x31
    6) should verify panic error 0x32
    7) should verify panic error 0x41
    8) should verify panic error 0x51


  0 passing (6s)
  8 failing

  1) @solidityequiv3 Panic Errors
       should verify panic error 0x01:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:40:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  2) @solidityequiv3 Panic Errors
       should verify panic error 0x11:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:51:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  3) @solidityequiv3 Panic Errors
       should verify panic error 0x12:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:62:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  4) @solidityequiv3 Panic Errors
       should verify panic error 0x21:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:73:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  5) @solidityequiv3 Panic Errors
       should verify panic error 0x31:
     TypeError: Cannot read properties of undefined (reading 'errorName')
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:86:18)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  6) @solidityequiv3 Panic Errors
       should verify panic error 0x32:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:97:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  7) @solidityequiv3 Panic Errors
       should verify panic error 0x41:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:109:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  8) @solidityequiv3 Panic Errors
       should verify panic error 0x51:
     AssertionError: expected undefined to equal 'Panic'
      at Context.<anonymous> (test/solidity/errors/panicErrors.js:120:32)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

Solution

The error object returned from contract calls does not recognize errorName and errorArgs fields. Please find other approaches to test

Alternatives

No response

@quiet-node Locally, they are passing for me, except one which i have marked with .skip
Screenshot 2023-11-08 at 13 36 05

Closing as there's a mismatch version of the tools. This should work on the latest hedera-local-node version.