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 '20 at 9:02
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 '20 at 11:01
  • 1
    Michelson and Micheline are not two separate languages, Micheline is Michelson's concrete syntax. Jun 16 '20 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 '20 at 11:26
  • Do you mean JSON? Jun 26 '20 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 '20 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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