feat(cli): rework uplc subcommands

closes #553

* rename flat to encode
* rename unflat to decode
* alias both to their old names
* both only print to stdout
  use can pipe to file
* split cbor and hex flags
* hex flag works for either cbor or flat
* encode takes --to flag
  [name, named-debruijn, debruijn]
* decode takes --from flag
  [name, named-debruijn, debruijn]
This commit is contained in:
rvcas
2023-06-01 23:50:59 -04:00
parent e5d9398625
commit 335cc0c8bc
8 changed files with 181 additions and 154 deletions

View File

@@ -1,3 +1,4 @@
artifacts/
build/
*.sk
*.addr

View File

@@ -20,8 +20,8 @@
"$ref": "#/definitions/hello_world~1Redeemer"
}
},
"compiledCode": "58dd0100003232323232323232222533300632323232533300a002100114a06464660026eb0cc010c014cc010c014019200048040dd7198021802804240006002002444a66601e00429404c8c94ccc038cdc78010018a5113330050050010033012003375c602000466e3cdd71980098010022400091010d48656c6c6f2c20576f726c64210022323330010014800000c888cccc030cdc3802001008119980200219b8000348008c0480040048c024dd50008a4c2c6002002444a66600e004293099802980098040011998018019804801000ab9a5736aae7955cfaba15745",
"hash": "46872294cadbacb2c3214086c0129ede75cf9f767e95a449f996685f"
"compiledCode": "5901ec01000032323232323232323232322223232533300a3232533300c002100114a066646002002444a66602400429404c8c94ccc040cdc78010018a5113330050050010033015003375c60260046eb0cc01cc024cc01cc024011200048040dd71980398048012400066e3cdd7198031804001240009110d48656c6c6f2c20576f726c642100149858c8014c94ccc028cdc3a400000226464a66602060240042930a99806a49334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e2065787065637465640016375c6020002601000a2a660169212b436f6e73747220696e64657820646964206e6f74206d6174636820616e7920747970652076617269616e7400163008004320033253330093370e900000089919299980798088010a4c2a66018921334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e2065787065637465640016375c601e002600e0062a660149212b436f6e73747220696e64657820646964206e6f74206d6174636820616e7920747970652076617269616e740016300700233001001480008888cccc01ccdc38008018061199980280299b8000448008c0380040080088c018dd5000918021baa0015734ae7155ceaab9e5573eae855d11",
"hash": "f3f821d122b041244de074b9554c7dbcc62f34f62426344c0d0b4c86"
}
],
"definitions": {