everx-labs / ever-cli

Command line tool for TVM compatible networks (Everscale, TON, Venom, Gosh, etc)
GNU General Public License v3.0
83 stars 32 forks source link

fix: make out command account useful for json parsers #914

Closed ilyar closed 1 year ago

ilyar commented 1 year ago

for command account in mode json

addr=0:f3dcad87c821342d9fa40a57836e791d91a509aed0a8de9172d2d134333532d2
tonos-cli --json -u https://devnet-sandbox.evercloud.dev account $addr | jq

out now

current return is very hard to parse with json parsing tools

{
  "0:f3dcad87c821342d9fa40a57836e791d91a509aed0a8de9172d2d134333532d2": {
    "acc_type": "Active",
    "address": "0:f3dcad87c821342d9fa40a57836e791d91a509aed0a8de9172d2d134333532d2",
    "balance": "3002590782",
    "last_paid": "1679950128",
    "last_trans_lt": "0xe53d95068c2",
    "data(boc)": "b5ee9c7201010101000600000800000005",
    "code_hash": "c2fded0b20c2bdcc48ea26f5f2bff81cfc36df3668323a925472d3b17c639dd9"
  }
}

out after apply commit

{
  "acc_type": "Active",
  "address": "0:f3dcad87c821342d9fa40a57836e791d91a509aed0a8de9172d2d134333532d2",
  "balance": "3002590782",
  "last_paid": "1679950128",
  "last_trans_lt": "0xe53d95068c2",
  "data_boc": "b5ee9c7201010101000600000800000005",
  "code_hash": "c2fded0b20c2bdcc48ea26f5f2bff81cfc36df3668323a925472d3b17c639dd9"
}