How can I convert Ethereum uint256 variables into Solana Rust?
1 Answer
I think we do not need an additional library like uint256 because the Solana Program Library(their token library) is using u64 for the amount to transfer.
uint128 in Rust is actually large enough. uint128 has a range of 0 to 2^128 - 1, which is enough for Ethereum uint256.
-
Wouldn't the Ethereum
uint256
have a range of 0 to2^256 - 1
?– Callum MCommented Sep 22, 2022 at 12:29