8000 Change note value unit in solidity contract · Issue #24 · clearmatics/zeth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Change note value unit in solidity contract #24
Closed
@AntoineRondelet

Description

@AntoineRondelet

We might need to use the Szabo as a unit for the payments.

In fact, note values are represented (in the prover/circuit) by hexadecimal strings encoded on 64bits. As a consequence, the maximum value for a note is: 0xFFFFFFFFFFFFFFFF which corresponds to: 18446744073709551615 in decimal.

Now, if we use this number as Wei, this represents: 18.446744073709551615 ETH. However, we might not need such a long mantissa. Moreover, we would like to be able to do payments of more than 18ETH.
If we change the unit from Wei to Szabo, the number 18446744073709551615 becomes equal to 18 446 744 073 709.551615 ETH which presents a sufficiently high upper bound for note values and which contains 6 digits in the mantissa.

See: https://solidity.readthedocs.io/en/v0.5.0/units-and-global-variables.html#ether-units for some infos on how to change the units.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomerssolidityTask related to the Solidity part of the code base

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0