archethic-foundation / archethic-foundation/archethic-node

Smart Contracts: handle tokens with decimals != 8

Open
#1,532 1 comment 0 reactions 0 assignees View on GitHub
bug smart contracts
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start by locating the TokenTransfer struct and the code that hardcodes 8 decimal places for token transfers. Trace how token decimal metadata is obtained and used; done means transfers handle tokens with decimals other than 8 without relying on a fixed value.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.