Skip to content

WIP: Convert min stake and max stake values in zwalletcli to ZCN ,mZCN and other formats #10

Description

@hm90121

Hello @vudn95 here is a sample output for ./zwallet mn-info command.

{
   "simple_miner":{
      "id":"110b07984a6592ae67f1830366f47c835f6f5f262be19ee4aedd1b9acf870aee",
      "n2n_host":"five.devnet-0chain.net",
      "host":"five.devnet-0chain.net",
      "port":31202,
      "path":"miner02",
      "public_key":"7f7a0515ae68eadee6eac5915519802911c7c7341d1ef23d913728aed47dc8090548a56031732d16916e203c4e41c2a32d022fe56758ba3956cc73b112f0961c",
      "short_name":"localhost.m02",
      "build_tag":"40058cb8b6aeeb95e61229702f29de4c7118ebaf",
      "total_stake":0,
      "delegate_wallet":"110b07984a6592ae67f1830366f47c835f6f5f262be19ee4aedd1b9acf870aee",
      "service_charge":0.1,
      "number_of_delegates":10,
      "min_stake":0,
      "max_stake":1000000000000,
      "stat":{
         "generator_rewards":187795440000000
      },
      "node_type":"miner",
      "last_health_check":1620947267
   }
}
Here min_stake and max_stake values have to be converted into ZCN and other formats
Also, in any other places or responses or flags in zwalletcli where these value types are used,they have to be converted to ZCN and other formats.

the value conversion table is as follows:
1 ZCN = 1,000 mZCN = 1,000,000 µZCN
0.1 ZCN = 100 mZCN = 100,000 µZCN
0.01 ZCN = 10 mZCN = 10,000 µZCN
0.001 ZCN = 1 mZCN = 1,000 µZCN
0.0001 ZCN = 0.1 mZCN = 100 µZCN
0.00001 ZCN = 0.01 mZCN = 10 µZCN
0.000001 ZCN = 0.001 mZCN = 1 µZCN
0.0000001 ZCN = 0.0001 mZCN = 0.1 µZCN
0.00000001 ZCN = 0.00001 mZCN = 0.01 µZCN
0.000000001 ZCN = 0.000001 mZCN = 0.001 µZCN
0.0000000001 ZCN = 0.0000001 mZCN = 0.0001 µZCN = 1 sas (Saswata, smallest unit, nickname) (edited)





Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions