[#538] Fix serialization of micheline expressions with `edo` instructions
Description
This MR fixes the (de)serialization of the recently-introduced edo
instructions to/from JSON.
This happened because they were added in the wrong order/index to the list of Micheline primitives.
This MR:
- Fixes the list of Micheline primitives
- Adds a script for automating the generation of the list (we can use this whenever a new protocol is released)
- Refactors the
Test.Serialization.Michelson
test suite. At the moment, this suite tests 1) parsing from michelson text, 2) serializing to binary, and 3) unserializing from binary. After this refactor this suite also tests 4) serializing to json and 5) deserilizing to json. This should make it harder to forget to test these scenarios in the future. - Added some example
.tz
contracts with the new instructions, which are tested by theTest.Interpreter.Reference
test suite. - Fixed some small bugs in the expression parser
Related issue(s)
Resolves #538 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Diogo Castro