Closed seolaoh closed 6 months ago
The recent update transitions the handling of transaction amounts from a uint64
data type to a string
. This change applies to both the Deposit
and Withdraw
functions, as well as the sendTransaction
function, enhancing the handling of large transaction values by using big.Int
for parsing. Additionally, CLI command flags for specifying transaction amounts have been updated to accept strings, reflecting this shift in data type handling.
Files | Change Summary |
---|---|
.../balance/cmd.go |
Updated Deposit and Withdraw functions to accept amount as a string. Withdraw parses amount to big.Int . sendTransaction accepts txValue as a string. |
cmd/main.go |
Modified deposit and withdraw command flags from Uint64Flag to StringFlag for the amount parameter. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Since the validator subcommand amount flag had a type of uint64, the flag was limited to a maximum value of about 18 ETH. By changing the type of the amount flag to string, it is possible to use unlimited values for the flag.
Summary by CodeRabbit
deposit
andwithdraw
commands to accept string inputs, allowing for more flexible and precise transactions.