Draft: [SDAO-297] morley-client: Extend NodeMethods so specific blocks can be queried
Description
Problem: For SDAO-297, we need to query big maps and contract storage at specific blocks.
Solution:
-
NodeMethods
is extended with new methodsgetStorageAtBlock
andgetBigMapValueAtBlock
- A
BlockId
type is added that represents different types of block IDs.
Related issue(s)
https://issues.serokell.io/issue/SDAO-297
TODOs (please discuss)
-
For consistency, the
Text
arguments ingetBlockConstants
andgetHeadBlockOperations
are changed toBlockId
s -
To avoid confusion,
getHeadBlockOperations
is renamed togetBlockOperations
-
For consistency, the remaining methods that are currently specialized to query the
head
block are generalized to take aBlockId
argument -
To avoid unnecessary growth in
NodeMethods
, turn "non-primitive" methods likegetStorage
andgetBigMapValue
into top-level definitions
✅ 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.