Inspect big_maps in Nettest

Clarification and motivation

At the moment, the Nettest interface allows you to inspect a contract's storage, so long as the storage type does not have big_maps in it. This is due to a limitation in the Tezos RPC: when we retrieve a contract's storage, it'll replace the big_maps' contents with their IDs.

One possible solution is: For a contract with storage S, getStorage returns a value of type S', where S' has the exact same structure as S except all the big_maps have been replaced with big_map IDs. Perhaps this construction S -> S' could even be automated.

As an illustration, consider the work we did in Stablecoin, where we have Storage and (manually) added StorageView (which is just like Storage with all big_maps replaced by big_map IDs)

However, the Pure implementation of Nettest already stores internally the full storage, with big_maps contents and all. The approach described above would imply that Pure's getStorage would have to "forget" the big_map contents and replace them with sequential IDs, to mimic the Tezos RPC. Perhaps there's a better approach? Some investigation would be helpful.

The Nettest interface would also have to expose a function that retrieves a big_map value, given a big_map ID and key. Such a function already exists in morley-client, it just needs to be exposed here as well. We'd also need to implement something similar for Pure.

This is related to #53 (closed)

Acceptance criteria

The Nettest interfaces allows the user to check that a big_map in a contract's storage contains a certain key for a given value.

Assignee Loading
Time tracking Loading