Yallo-lang

Yallo is a yet another high level experimental language for Tezos, with the purpose of providing a better abstraction for integrating different contracts.

Internally, the language is a functional language with side effects (storage assignments).

This is only a research project, it is not (yet) intendeed for real usage.

Usage

Yallo-lang compiler

  yallo.exe ACTION FILENAME

=== actions ===

  compile file.yallo [-dcontract ContractName] [-target ligo]
                 compiles a contract ContractName to ligo language

  extract-interface file.yallo -dcontract ContractName
                 extracts the yallo interface for the given contract

  interface-of-michelson file.tz
                 produce a yallo interface from michelson contract

=== flags ===

  [-contract _]        selected contract
  [-no-remove-unused]  disable removing unused symbols
  [-print-ast]         print ast
  [-print-ligo]        print ligo code
  [-print-pt]          print parse-tree
  [-target _]          target language
  [-verbose]           enable verbosity
  [-build-info]        print info about this build and exit
  [-version]           print the version of this build and exit
  [-help]              print this help text and exit
                       (alias: -?)

An example

We first define an interface describing the signature of a token contract, and another interface extending IToken with a getTotalSupply. (Views are entrypoint which receives as last argument 'a contract)

Now we can implement our token contract; the constructor is only an helper for building an initial storage value during compilation.

From another contract, if we want to use the token getBalance entry we'll do as follow:

Or, if we want to deploy a token contract from another contract:

License

Last updated

Was this helpful?