Change note value unit in solidity contract #24
Labels
enhancement
New feature or request
good first issue
Good for newcomers
solidity
Task related to the Solidity part of the code base
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 than18ETH
.If we change the unit from
Wei
toSzabo
, the number18446744073709551615
becomes equal to18 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.
The text was updated successfully, but these errors were encountered: