Skip to content

[TM-222] add operations with side-effects to Indigo

Pinto Pasquale requested to merge pasqu4le/tm-222-indigo-side-effects into master

Description

Only no-side effects operations exist in Indigo, however, there are some instructions in Michelson which have an effect on chain.

To support side effects this solution adds an [Operation] to the bottom of the stack and cons newly generated ones into it to be able to use said list in the closing PAIRing instruction.

This required compileIndigoContract to change type and prevents side-effects on compileIndigo, but a new compileIndigoOps has been added just for that.

All 3 side-effects instruction have now their counterpart and use the the HasSideEffects class to check if a stack supports them.

NOTE: an example has been added, but tests will be implemented only after TM-220 is closed.

Related issue(s)

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

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 Pinto Pasquale

Merge request reports