3

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 :-)

  • 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 at 9:02
3

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.

| improve this answer | |
  • 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. – Felix Laufenberg Jun 15 at 11:01
  • 1
    Michelson and Micheline are not two separate languages, Micheline is Michelson's concrete syntax. – Raphaël Cauderlier Jun 16 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. – Felix Laufenberg Jun 25 at 11:26
  • Do you mean JSON? – Raphaël Cauderlier Jun 26 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. – Raphaël Cauderlier Jun 30 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.