How can I convert Ethereum uint256 variables into Solana Rust?

1 Answer 1


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 to 2^256 - 1?
    – Callum M
    Sep 22, 2022 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.