0

When creating new eosio::asset objects, what is the maximum precision that can be stored in the asset?

1

In nodeos, eosio::chain::symbol only accepts decimals under 18 digits, but eosio::symbol in CDT doesn't check its precision. Of course, during [de]serialization, the inner value of symbol is managed by eosio::chain::symbol, so error occurs, but if you instantiate symbol or asset in contract, it can have more that 18 digits. I think eosio::symbol::is_valid needs to check maximum decimal digits to keep consistency with nodeos-side symbol struct. (I sent PR about this issue)

https://github.com/EOSIO/eosio.cdt/pull/553

|improve this answer|||||
  • Can you link the PR please? – Phillip Hamnett - EOS42 Jul 12 '19 at 10:32
  • 1
    @PhillipHamnett-EOS42 I added the link in answer. – conr2d Jul 18 '19 at 12:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.