I'm trying to store really large value to a table in field uint128_t, but I get this
"integer literal is too large to be represented in any integer type"
error when trying to compile. When i insert some small value and copy its value from db it is for example "0xf1a91a3b000000000000000000000000" and I try to hardcode that value into code like this:
uint128_t tmp = 0xffc91a3b000000000000000000000000;
I get same error during wast creation. I need this value for fast searching through db, and I can not store it as a string because string is not supported for index key.
Do you guys have any ideas?
EDIT: I can store it manually with cleos push action, just can not compile it because i get this error. So it can be stored but can not be in source code, and I need it to be in source code.
The problem is because the compiler won't let you specify a literal value for an integer bigger than
uint64_t. Setting a
uint128_t from another variable like the action params, or from an arithmetic operation between smaller
uint64_t integers will work well though.