Closed GustaveCharles closed 2 months ago
You are putting this code into main.nr?
You should put your contract into main.nr and import any new types into your contract. You can see the token contract folder for an example.
We should avoid panicking in this case but this code is temporary and will be removed when Noir has proper macro support
You are putting this code into main.nr?
You should put your contract into main.nr and import any new types into your contract. You can see the token contract folder for an example.
I put it in main for example purposes. Putting it in a folder gives the same error.
We should avoid panicking in this case but this code is temporary and will be removed when Noir has proper macro support
The problem on my side was that I didn't pass the second generic parameter to the NoteInterface. A better error message could also be useful :)
fyi @Thunkar as this seems to be an issue inside aztec_macros.
Closing since https://github.com/AztecProtocol/aztec-packages/pull/7451 adds a nicer error message while we implement NoteInterface
using metaprogramming.
Aim
Expected Behavior
No error, the code should compile.
Bug
The application panicked (crashed). Message: called
Result::unwrap()
on anErr
value: ["TOKEN_NOTE_LEN"] Location: aztec_macros/src/transforms/note_interface.rs:102This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/. If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml
To Reproduce
Project Impact
Blocker
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
nargo version = 0.30.0 noirc version = 0.30.0+48d9df4ff227c08a6e66f21c0286bc6349151671
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response