Skip to content

[TM-331]: Test FA1.2 compatibility

Anton Myasnikov requested to merge awkure/tm331-test-FA1.2-compatibility into master

Description

Some contracts may have requirement to be compatible with some standard. The most canonical standardization approach will hopefully be to require presence of certain entrypoints. Currently there is a quite popular example: FA1.2. We want to write automatic tests checking that ManagedLedger is FA1.2 compatible and make it easy to write such tests for other contracts.

This MR will be separated in 3 steps to pass acceptance criteria:

  • Add a helper function which checks whether a contract has a certain set of entrypoints. It should check resulting Michelson contract, not Lorentz code or anything else in our internal representation, at least because we add annotations only during printing. Probably the easiest way is to print and parse it.
  • Apply it by adding a test to managed ledger test suite: it should check that managed ledger is FA1.2 compliant.
  • Add similar tests to other contracts that we develop and that should be FA1.2 compliant (will happen once this MR is merged).

Related issue(s)

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

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 Anton Myasnikov

Merge request reports