archethic-node
archethic-node copied to clipboard
Interpreter error message not clear
Describe the problem you discovered
If we pass a smart contract code with just the following code:
@version 1
We get an error which is not accurate:
unexpected term - @:atom => \"version\"(1) - L1
This issue seems to related to a pattern matching issue
https://github.com/archethic-foundation/archethic-node/blob/31cc63def92a24b74a5133f3c8f19a7d3e9a7886/lib/archethic/contracts/interpreter.ex#L36C10-L38C44
Describe the solution you'd like
The interpreter should accept @version 1 without having a block or mention the contract cannot be empty with only the version mention.
Epic
#608