Neo: Make fee format be unified.

Created on 26 Aug 2019  路  13Comments  路  Source: neo-project/neo

In getblocksysfee, fee returns full decimals. However, in getrawtransaction, fee has decimal point. I think it's necessary to make fee format be unified in RPC, otherwise, it'll make a lot of users be comfused.
image
image

Most helpful comment

I prefer to return long in RPC, and return decimal in command line.

Because in RPC, the results are for programs, and long is easy for programs to process. In command line, the results are for human reading.

What do you think?

All 13 comments

Can you find all APIs that return inconsistent formats?

And which one do you prefer to return? Long or decimal?

I prefer as decimal

Can you find all APIs that return inconsistent formats?

Sure.

@erikzhang
getnep5balances--->amount(full decimals)
getnep5transfers--->amount(full decimals)
getunclaimedgas--->result(full decimals)
getapplicationlog--->value(full decimals)
getbalance--->balance(full decimals)
getblock--->net_fee,sys_fee(decimal point)
getrawtransaction--->net_fee,sys_fee(decimal point)
invokefunction, invokescript--->gas_consumed, value(full decimals)
sendfrom, sendtoaddress, sendmany--->net_fee,sys_fee(decimal point)
getblocksysfee --->result(full decimals)
cli command line: decimal point
If we choose full decimals, I think we鈥榙 better add subscript to help read value.

I prefer to return long in RPC, and return decimal in command line.

Because in RPC, the results are for programs, and long is easy for programs to process. In command line, the results are for human reading.

What do you think?

Because in RPC, the results are for programs, and long is easy for programs to process. In command line, the results are for human reading.

Couldn't agree more Erik. long is good for me too on RPC.

have sense, is good for me

getapplicationlog--->value(full decimals)

invokefunction, invokescript--->gas_consumed, value(full decimals)

What value? I didn't see it.

@superboyiii Please check the fixes.

@erikzhang OK

getapplicationlog--->value(full decimals)

invokefunction, invokescript--->gas_consumed, value(full decimals)

What value? I didn't see it.

I mean the invocation return value. Such like this:
image

These are StackItems and I don't think they have any problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borovik96 picture borovik96  路  4Comments

doubiliu picture doubiliu  路  3Comments

igormcoelho picture igormcoelho  路  4Comments

canesin picture canesin  路  3Comments

Tommo-L picture Tommo-L  路  4Comments