[#470] Unpacking of right-combed pairs
Description
This MR updates the unpacking logic to handle the 2 new binary representations for right-combed pairs (introduced in edo
, more details here).
Because the Micheline decoding logic is implemented using the unpacking logic, we can now parse the 2 new Micheline representations as well.
Examples of the new Micheline representation:
$ tezos-client convert data 'Pair 1 2 3' from michelson to json --type 'pair int int int'
{ "prim": "Pair",
"args": [ { "int": "1" }, { "int": "2" }, { "int": "3" } ] }
$ tezos-client convert data '{1 ; 2 ; 3}' from michelson to json --type 'pair int int int'
[ { "int": "1" }, { "int": "2" }, { "int": "3" } ]
For comparison, here's the "normal" notation:
$ tezos-client convert data 'Pair 1 (Pair 2 3)' from michelson to json --type 'pair int int int'
{ "prim": "Pair",
"args":
[ { "int": "1" },
{ "prim": "Pair", "args": [ { "int": "2" }, { "int": "3" } ] } ] }
Related issue(s)
Resolves part of #470 (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.