[#520] Allow retrieving a contract's storage as an expression in cleveland
Description
Problem: We need a way to get a contract's storage without knowing its type in cleveland by returning it as an Expression.
Solution: Add an abstract niGetStorageExpr
to NettestImpl
and call it in
nettestCapImpl
. Implement this new function in Client
by changing
niGetStorage
to not convert it to an expression and rename to
niGetStorageExpr
. Create niGetStorage
to use niGetStorageExpr
, but call
fromExpression now. In Pure
, abstract the code to getting an
AddressState
's ContractState
to a function and change niGetStorage
to
use this new function. Create niGetStorageExpr
to use this function, but
call toExpression
.
Related issue(s)
Resolves #520 (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 Heitor Toledo Lassarote de Paula