[TM-274] Update ManagedLedger
Description
Problem: there are some changes¹ in FA1.2 and our implementation of ManagedLedger does not account for them. Specifically:
- FA1.2 now has less strict requirements on parameter type, so Managed Ledger can be somewhat simplified (no SaneParameter stuff).
- At the same time FA1.2 has a stricter variation to be usable in Athens. We do not have an implementation of it.
Solution:
- Now there are three contracts:
- ManagedLedger implementation for Babylon.
- ManagedLedger implementation for Athens using the approach described in FA1.2.
- Proxy for the Athens implementation as described in FA1.2.
- There are two new modules with code shared by these contracts.
- Tests are updated: their logic is generalized and we instantiate them with each contract (only some tests are suitable for Proxy).
- Some tags (which use
named
) are updated to be consistent with FA1.2. - Previously we allowed admin to make arbitrary transfers without checking approval. This logic was removed to make implementation simpler.
¹ https://gitlab.com/serokell/morley/tzip/merge_requests/1
Related issue(s)
https://issues.serokell.io/issue/TM-274
✅ 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
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Ivan Gromakovskii