archethic-foundation / archethic-node

Official Archethic Blockchain node, written in Elixir
GNU Affero General Public License v3.0
69 stars 21 forks source link

Smart Contracts: handle tokens with decimals != 8 #1532

Open bchamagne opened 2 weeks ago

bchamagne commented 2 weeks ago

Describe the problem you discovered

Capture d’écran 2024-06-13 à 15 39 38

Describe the solution you'd like

code is hardcoded as if there's 8 decimals. I believe it's done to not do some I/O, so we probably need to embed the decimal in the TokenTransfer struct

Epic

No response

bchamagne commented 2 weeks ago

just a thought, maybe we could store the amount as strings instead