Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fee rate is whole HNS #138

Open
pinheadmz opened this issue Oct 6, 2021 · 2 comments
Open

fee rate is whole HNS #138

pinheadmz opened this issue Oct 6, 2021 · 2 comments

Comments

@pinheadmz
Copy link
Member

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),
@NetOpWibby
Copy link

Do you mean multiplied by * 1e6?

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

@pinheadmz
Copy link
Member Author

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: #101

@NetOpWibby got any time to edit the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants