【问题标题】:How to get near balance of an account using cli?如何使用 cli 获得账户余额?
【发布时间】:2021-07-22 16:52:49
【问题描述】:

是否可以使用near cli. 获得接近余额的帐户?

【问题讨论】:

    标签: nearprotocol


    【解决方案1】:

    跑步:

    near state <account.near>
    

    应该做的伎俩:

    Account account.near
    {
      amount: 'XXXXXX',
      locked: '0',
      code_hash: 'XXXX',
      storage_usage: XX,
      storage_paid_at: 0,
      block_height: XXX,
      block_hash: 'XXXX',
      formattedAmount: 'XXXX'
    }
    

    甚至:

    near state account.near |  sed -n "s/.*formattedAmount: '\([^\\]*\).*'/\1/p"
    

    如果您只需要格式化金额:

    XYZ.39429240342
    

    【讨论】:

    • 超级有帮助。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2021-12-06
    • 1970-01-01
    • 2022-08-17
    • 2011-12-09
    • 2020-01-14
    • 1970-01-01
    • 2015-11-25
    • 1970-01-01
    相关资源
    最近更新 更多