Ones who do exchange / Investment platforms development, all ERC20 tokens has its atomic unit and only moved by specifying value in its atomic form.

for eg: 1 BuritoToken with unit decimals as 18, to move 63.33 BuritoToken we need to place 63,331,344,345,123,500,000 atomic units in tx params as hex string. it's convenient to keep it as number type in db to say sum a list of records. But we run out of column size to keep it as numbers.

Solution here seems to be to store values as hex strings in db. I wonder if thats the approach to go with.

ideas are appreciated.

  • 1
    I am using PostgreSQL to store ETH values and token values in NUMERIC field type and I have not had any problems with overflows. It is practically unlimited since it allows 130,000 digits , I think you can sum all the blockchain volume ever transferred without any problem in such a large number. Maybe you should switch to a more powerful database. – Nulik Jul 27 '18 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.