handshake-org.github.io icon indicating copy to clipboard operation
handshake-org.github.io copied to clipboard

fee rate is whole HNS

Open pinheadmz opened this issue 4 years ago • 2 comments

https://hsd-dev.org/api-docs/?shell--cli#send-a-transaction

the rate for transaction fees. Denominated in subunits per kb

I don't think this is right. Internally in hsd, rate is treated as an int, a number of dollarydoos. But actually what you enter into hsw-cli is a float, that gets multiplied *10e6:

https://github.com/handshake-org/hs-client/blob/533b1403f381c086fc364545d88410fc38e8c0f4/bin/hsw-cli#L375

      rate: this.config.ufixed('rate', EXP),

pinheadmz avatar Oct 06 '21 18:10 pinheadmz

Do you mean multiplied by * 1e6?

So 1 HNS = 1 000 000 dollarydoos. — https://hsd-dev.org/api-docs/?javascript=#values

NetOpWibby avatar Nov 10 '22 00:11 NetOpWibby

Do you mean multiplied by * 1e6?

Yes I either meant * 1e6 OR * (10 ** 6) sorry...

exponent:

https://github.com/handshake-org/hs-client/blob/533b1403f381c086fc364545d88410fc38e8c0f4/bin/hsw-cli#L7

base:

https://github.com/bcoin-org/bcfg/blob/05122154b35baa82cd01dc9478ebee7346386ba1/lib/config.js#L1190

Looks like some of these parameter descriptions should probably just get deleted. We generalized the units into its own section: https://github.com/handshake-org/handshake-org.github.io/pull/101

@NetOpWibby got any time to edit the docs?

pinheadmz avatar Nov 11 '22 16:11 pinheadmz