[TM-246] Upgradable parameter
Description
Problem: we need an easily extensible parameter for contract,
current solution with IsoValue
and unions does not help here.
Solution: represent parameters as (MText, ByteString)
pair, where
the first argument is entry point name and the second one is serialized
argument for it.
I do not use Generic magic here because, like, there is no any reason
to use it here. Traversing a linear Rec
is way simplier, produces
less boilerplate and easier to generalize.
Here I provide slightly different interface comparing to one expected in TM-190 prototype. In particular, I aimed on making sure that no entry point handler is lost, neither fallback handler is forgotten.
Related issue(s)
https://issues.serokell.io/issue/TM-246
✅ 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