OCamlPro/liquidity

Unable to retrieve contract_storage Json encoded

Closed this issue · 1 comments

Currently the option --json is ignored by the --get-storage command.
It would be nice to have the ability to retrieve JSON data since they are easy to parse from other languages than ocaml.

liquidity.asm --json --tezos-node alphanet-node.tzscan.io:80 /Users/pierre/workspace/moneytrack-os-api/app/services/contract_manager/contracts/token.liq --get-storage KT1T1QYR6VD2LLtRSP4CHNyKkGbAPHoVu7wc
Main contract Token
/Users/pierre/workspace/moneytrack-os-api/app/services/contract_manager/contracts/token.liq: Warning:
unused variable "parameter"
{
  accounts =
    (Map
       [(tz1bhZRsCjKtaDMzmjwb2qMeQhjbNhkAehKA,
          { balance = 102p; allowances = Map });
       (tz1UpbX2t47n6u8xUuVRbwmK7HBFp8ygjJD3,
         { balance = 99900000p; allowances = Map });
       (tz1SLkcnaMDJ2aWKqnSD4EzvnEUnCLT67msP,
         { balance = 22p; allowances = Map });
       (tz1S57hnLAXKuSerRd15fvt7jHDvQfCSe7SD,
         { balance = 99876p; allowances = Map })]);
  version = 1p;
  totalSupply = 100000000p;
  decimals = 0p;
  name = "MTK";
  symbol = "MTK";
  owner = tz1UpbX2t47n6u8xUuVRbwmK7HBFp8ygjJD3
}

You can use curl, or the tezos-client for that

curl -X GET -H "Content-Type:application/json" http://alphanet-node.tzscan.io/chains/main/blocks/head/context/contracts/KT1T1QYR6VD2LLtRSP4CHNyKkGbAPHoVu7wc/storage