Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 test keep failing on solc 0.8.13 #10

Open
kalote opened this issue Apr 25, 2022 · 0 comments
Open

1 test keep failing on solc 0.8.13 #10

kalote opened this issue Apr 25, 2022 · 0 comments

Comments

@kalote
Copy link

kalote commented Apr 25, 2022

Hi,

Just finished the exercice, and everything looked good, except for 1 of the test that i cannot succeed:

1) Contract: SupplyChain
       Use cases
         should error when not enough value is sent when purchasing an item:

      Wrong kind of exception received
      + expected - actual

      -Transaction: 0xf50038536fc0c89aa5f9380acee59ab810fff4082c8137b7ab9132f11ca4dde0 exited with an error (status 0). Reason given: Panic: Failed assertion.
      -     Please check that the transaction:
      -     - satisfies all conditions set by Solidity `require` statements.
      -     - does not trigger a Solidity `revert` statement.
      +invalid opcode
      
      at expectException (node_modules/@openzeppelin/test-helpers/src/expectRevert.js:20:30)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at Context.<anonymous> (test/supply_chain.test.js:242:7)

I'm using solc version: solc: 0.8.13+commit.abaa5c0e.Emscripten.clang

So, even with an assert() instead of a require(), i'm not able to generate an invalid opcode exception. You can check more on my repo: https://github.com/ConsenSys-Academy-Github-Classroom/supply-chain-exercise-kalote/

Thanks for your support o/
Johann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant