[TM-282] Cleanup StoreClass a bit
Description
Problem:
- First of all, StoreClass has an obsolete statement that top-level storage is a pair of big_map and other fields. This restriction has been removed.
-
store*OpsTopLevelStorage
kinda suggests that it should only be used for top-level storage, but I think I encountered a valid use-case when it is used for something else. Imagine you have Storage which has A inside and it has some big_map. It makes sense to use thisstore*OpsTopLevelStorage
logic to defineStoreHasSubmap
for A, but A is not top-level storage. Same would happen for field if A contained B which in turned contained some useful field. -
composeStoreFieldOps
is exported, butcomposeStoreSubmapOps
. I think there is no reason for inconsistency, especially now that big_maps can appear everywhere.
Solution:
- Update obsolete comments.
- Rename *TopLevelStorage to *Deeper.
- Export
composeStoreSubmapOps
as well.
Related issue(s)
https://issues.serokell.io/issue/TM-282
✅ 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