Skip to content

[TM-341] support type annotations

Sandeep.C.R requested to merge sras/tm341-support-type-annotations into master

Description

This PR adds support for type annotations for entry point parameters that are in the named fields form

("from" :! Address, "to" :! Address, "value" :! Natural).

Sample output for managed ledger contract's parameter.

parameter (or (or (or (pair %transfer (address :from)
                                      (pair (address :to)
                                            (nat :value)))
                      (pair %approve (address :spender)
                                     (nat :value)))
                  (or (pair %getAllowance (pair address
                                                address)
                                          (contract nat))
                      (or (pair %getBalance address
                                            (contract nat))
                          (pair %getTotalSupply unit
                                                (contract nat)))))
              (or (or (bool %setPause)
                      (address %setAdministrator))
                  (or (pair %getAdministrator unit
                                              (contract address))
                      (or (pair %mint (address :to)
                                      (nat :value))
                          (pair %burn (address :from)
                                      (nat :value))))));

Related issue(s)

https://issues.serokell.io/issue/TM-341

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Sandeep.C.R

Merge request reports