Hot answers tagged

2

If we could do a logic schematics for this specific case, do you sirs think it could be described like this? : parameter (or (or (pair %addCustomer (pair (mutez %balance) (string %id)) (pair (string %name) (nat %phoneNumber))) (string %removeCustomer)) (or (pair %transfer (mutez %amount) (pair (string %idFrom) (string %idTo))) (pair %updateBalance (mutez %...


2

Parsing and unparsing json seems totally impractical. You’re correct in your assumption. You cannot change the type of the storage. You could use a map so that fields are replaced by keys (supposing you want to add a field of a known type).


2

The concept of entrypoints is very lightweight in Michelson, and under the hood it's still a value of a single type that is actually passed to the script. Hence the various ways to do the same thing, e.g: KT1VG2WtYdSWz5E7chTeAdDPZNy2MpP8pTfL (Left (Left ($Arg))) KT1VG2WtYdSWz5E7chTeAdDPZNy2MpP8pTfL%default (Left (Left ($Arg))) ...


1

It means 2 things: 1/ For some reason I cannot really guess like that, the economic protocol disagreed with your block and returned an error message. 2/ There were a bug in the JSON encoding of error messages from the economic protocol (fixed in the dev version but maybe not in v7 indeed) that made it crash with this unhelpful cryptic message. So, the faulty ...


1

There are two ways to indicate which entrypoint you want to call: call it by its name using the --entrypoint command-line argument of tezos-client transfer or the entrypoint optional parameter of the corresponding RPCs. If you do this, you can simply pass the argument of the expected entrypoint type without the leading Lefts and Rights. call it by its ...


1

You need to follow the path to the corresponding entry point in the Michelson parameter type. ‘Left’ when you go to the left branch of a ‘or’ and ‘Right’ for the right branch.


1

With PyTezos it would be (don't mind the naming, it is wrong, will be fixed at some point): >>> from pytezos.michelson.converter import micheline_to_michelson >>> print(micheline_to_michelson({'prim': 'pair', 'args': [{'string': 'hello'}, {'int': '42'}]})) pair "hello" 42


1

Edit: I realized that I misread the question and answered it for Michelson to Micheline when you wanted Micheline to Michelon. I do not know if there is a way to do that via the command line. Regardless, it would be nice to have both supported by the tezos-client tool. Michelson to Micheline It would be nice if there was a dedicated tezos-client command to ...


Only top voted, non community-wiki answers of a minimum length are eligible