I'm working on a smart contract designed to facilitate swaps, and given that values in Solidity are expressed in wei, I encounter exceedingly large numbers. Even when using uint256
, I've run into integer overflow errors.
I'm currently employing Solidity version 0.8.0, which has integrated SafeMath
functionalities.
How can I efficiently store and handle numbers larger than the uint256
capacity in Solidity?