iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
962 stars 575 forks source link

deposit fee unit issue #1303

Closed terrancewong closed 2 years ago

terrancewong commented 2 years ago

What happened?

help says deposit fee is in ORE

$ ironfish deposit --help                                               
Deposit $IRON for testnet points

USAGE
  $ ironfish deposit [-v] [--config <value>] [--datadir <value>] [--rpc.tcp] [--rpc.ipc] [--rpc.tcp.host <value>] [--rpc.tcp.port <value>] [--rpc.tcp.secure] [-f
    <value>] [-e <value>] [-a <value>] [--confirm]

FLAGS
  -a, --account=<value>             the account to send money from
  -e, --expirationSequence=<value>  max number of blocks for the transaction to wait before expiring
  -f, --fee=<value>                 [default: 1] the fee amount in ORE, minimum of 1. 1 ORE is equal to 1e-8 IRON
  -v, --verbose                     set logging level to verbose
  --config=<value>                  [default: config.json] the name of the config file to use
  --confirm                         confirm without asking
  --datadir=<value>                 [default: ~/.ironfish] the path to the data dir
  --rpc.ipc                         connect to the RPC over IPC (default)
  --rpc.tcp                         connect to the RPC over TCP
  --rpc.tcp.host=<value>            the TCP host to listen for connections on
  --rpc.tcp.port=<value>            the TCP port to listen for connections on
  --rpc.tcp.secure                  allow sensitive config to be changed over TCP

DESCRIPTION
  Deposit $IRON for testnet points

but actual fee is in IRON

$ ironfish deposit --account=<X>  --fee 1 --confirm --verbose
Connecting to 0.0.0.0:9023
Creating the transaction: [████████████████████████████████████████] 100% | ETA: 0s

Depositing $IRON 0.10000000 ($ORE 10,000,000) from silico
Transaction Hash: 187bb932a62700d364ca5ff20b38c1cf1e175029ff448643a14df8ae5b1ebf69
Transaction fee: $IRON 1.00000000 ($ORE 100,000,000)

Find the transaction on https://explorer.ironfish.network/transaction/187bb932a62700d364ca5ff20b38c1cf1e175029ff448643a14df8ae5b1ebf69 (it can take a few minutes before the transaction appears in the Explorer)

use 0.00000001 IRON fee returns an error

$ ironfish deposit --account=<X> --fee 0.00000001 --confirm --verbose
    Error: Expected an integer but received: 0.00000001

Version

0.1.31

Debug output

Database in use, skipping output that requires database.
Stop the node and run the debug command again to show full output.

Iron Fish version       0.1.31 @ src
Iron Fish library       0.0.9 @ src
Operating system        Linux x64
CPU model(s)            Intel(R) Xeon(R) CPU E5-2651 v2 @ 1.80GHz
CPU threads             48
RAM total               23.47 GiB
Node version            v16.13.1
ironfish in PATH        false
Telemetry enabled       false

Relevant log output

No response

Graffiti

bh9sqoCqIR3rDFstCCCw1g

AmberKiso commented 2 years ago

Perhaps try version 0.1.32 @mat-if committed a possible fix #1281 yesterday.