[TM-344] Simplify user-defined upgrades
Description
Problem:
Currently, user-defined upgrades contain various workarounds to solve issues that do not exist anymore in Tezos mainnet, namely:
- It used to be impossible to call some contract without knowing its full parameter type, hence:
- The documentation proposes two fairly complicated ways to call V2 from V1 (lambdas and a proxy contract)
- The implementation uses the lambda approach instead of addressing V2 via entrypoints
- It used to be non-trivial to place big map arbitrarily in storage, thus he implementation used a
Map
instead of aBigMap
to store balances.
Since it is no longer required to know the full parameter type to call an entrypoint, and the placement restrictions on big maps have been lifted, it is natural to simplify both the spec and the implementation of user-defined upgrades.
Solution:
- Use explicit entrypoints instead of workarounds both in the docs and in the implementation.
- Replace a
Map
with aBigMap
Related issue(s)
Resolves https://issues.serokell.io/issue/TM-344
✅ 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.