[#141] Add storage printing to ContractRegistry
Description
Problem: apart from printing a contract and its documentation we usually need its storage for origination. It's common for (nearly) all contracts, but this functionality is not present in ContractRegistry.
Solution: add a new PrintStorage action there.
ContractInfo
now specifies how to construct its storage inside
command line options parser. It is optional and can be omitted if you
think that initial storage is easy to construct manually.
Unfortunately, we need a different CLI for this functionality because
parsing of initial storage data depends on its name and Parser
is
not a monad. So we have one storage-NAME
command for each contract
called NAME
.
Additionally, we add runContractRegistry
function which captures
storage printing logic along with handling of all other existing
actions.
We also update morley-ledgers
and morley-multisig
. Updating morley-multisig
require adding ciCompilationOptions
.
Also I have updated the way output is chosen, now we construct output file name from contract name by default.
Related issue(s)
Resolves #141 (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.