[#346] Generate big_map IDs in interpreter
Description
We want cleveland to support retrieving storages with big_maps, on both the emulator and on a network. The chain seems to assign a unique ID to each new big_map, and when a storage with big_maps is retrieved via the RPC, only the ID is returned. We need our emulator to mimic this behaviour.
This MR changes the interpreter to generate and assign unique IDs whenever a new big_map is created.
big_maps can be created by:
- originating a contract with big_maps in its initial storage.
- calling a contract with a parameter with big_maps, and then saving those big_maps in the contract's storage.
- executing the
EMPTY_BIG_MAP
instruction - executing the
DUP
orDUP n
instructions on another big_map.
Please review one commit at a time.
Related issue(s)
Resolves part of #346 (closed)
✅ 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 Diogo Castro