I am trying to optimize every last drop of gas I can in my smart contract. One of my functions takes a single decimal number around 1,000,000. First, I just made it a uint256
. But I feel like this was wasting a lot of space. I made it a uint32
, but this didn’t ultimately change anything and after passing it through the ABI on with web3, the input was still as long.
Is there anyway to shorten the input? Does this even save gas if I ultimately have to convert this number to a uint256
anyway?