Hi guys, do you have a Uint256 number crate that you recommend to work with CosmWasm?
- 3 replies
- In reply toorkunkl⬆:Orkun Külçe @orkunkl2020-07-27 10:41:23.136Z
Yes makes sense. This should be done. It should be in cosmwasm-std in order to get the best possible JSON developer experience. This probably won’t work well with an external crate.
It would be a bit trickier to implement than Uint128 cuz there we can wrap rust's native u128 type and logic. There is no native u256 type.
Honestly, for most numeric math, u256 is likely unneeded. U128 offers 18 decimal places and 18 digits before the dot.
I think some crate that handles arbitrary precision fixed point math would be more useful (if you want to before more calculations), like "bigint" or suchReplySolution