4

Is there any documentation available for how to serialize contract call parameters?

I found good documentation for serialization of general operations and took a look at the tzips but neither seems to explain how to create a contract call from scratch without relying on external services for serialization of the parameters. Language for the implementation in this case is C#.

Any help/links is appreciated :-)

1
  • This might be helpful: ocamlpro.com/2018/11/15/… they use JSON, but the approach is similar for binary, you just need to use the binary encoding instead.
    – arvidj
    Jun 9, 2020 at 9:02

1 Answer 1

4

There is https://tezos.gitlab.io/whitedoc/micheline.html#binary-serialization which mostly tells to run tezos-codec describe alpha.script.expr binary schema for a complete description of the binary encoding.

More details are given here.

6
  • Do I see it correctly that in order to write a general purpose contract call software, I would have to write 1.) Michelson => Micheline compiler and 2.) Micheline => binary encoder? This seems like quite the Hercules task. Jun 15, 2020 at 11:01
  • 1
    Michelson and Micheline are not two separate languages, Micheline is Michelson's concrete syntax. Jun 16, 2020 at 18:44
  • Thanks! Any easy way to get the FA2 interface definitions found at tzip-12 in Micheline instead of Michelson? For FA1.2 I found existing transactions from which I could extract the micheline signature. Jun 25, 2020 at 11:26
  • Do you mean JSON? Jun 26, 2020 at 12:04
  • 1
    So you want to convert from Micheline to JSON, this can be done using tezos-client convert data ... from Michelson to Json. Jun 30, 2020 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.