The vesting calculator currently only handles a single currency at a time, and that currency must be ubld. It is also limited to 64-bit int quantities. It also does not use established external notation for coins in its input or pretty-printed output.
Description of the Design
Replace the current --amount and --denom flags with a single --coins flag, parsing sdk.Coins. Use appropriate sdk libraries throughout. Calculate the division of each denomination separately and zip them together for each vesting event.
Security Considerations
Will give up current restriction to ubld in the name of generality, but makes the denomination more subject to typos.
Giving up on plan for comma-separated numbers on input and output in the name of consistency with other tools, so sharing the risk of entering too few/many digits for large quantities.
What is the Problem Being Solved?
The vesting calculator currently only handles a single currency at a time, and that currency must be
ubld
. It is also limited to 64-bit int quantities. It also does not use established external notation for coins in its input or pretty-printed output.Description of the Design
Replace the current
--amount
and--denom
flags with a single--coins
flag, parsingsdk.Coins
. Use appropriatesdk
libraries throughout. Calculate the division of each denomination separately and zip them together for each vesting event.Security Considerations
Will give up current restriction to
ubld
in the name of generality, but makes the denomination more subject to typos.Giving up on plan for comma-separated numbers on input and output in the name of consistency with other tools, so sharing the risk of entering too few/many digits for large quantities.
Test Plan
Add appropriate unit tests.