Skip to content

[#159] Make it possible to define a type with FA2 annotations

Moremi Vannak requested to merge rinn7e/#20-storage-ann-lorentz-final into master

Description

Problem: See FA2. One day we will inevitably have to implement a contract conforming to it in Lorentz or Indigo. Look at the total_supply type:

(pair %total_supply
  (list %token_ids nat)
  (contract %callback
    (list
      (pair
        (nat %token_id)
        (nat %total_supply)
      )
    )
  )
)

There are two problems:

  1. snake_case annotations.
  2. Field annotations for things that are not entrypoints.

Currently we can't generate such things.

Solution: Add ability to generate field annotation for record type in entrypoint sum types.

Related issue(s)

Resolves #159 (closed)

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:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Sandeep.C.R

Merge request reports