Skip to content

Consider the decimals of the ERC20 token that you're transferring when using the **avalanche key transfer** command #2676

@PietroFaggion

Description

@PietroFaggion

Goal

When transfering tokens (not natives so ERC20/ERC1155...) through the avalanche cli command avalanche key transfer could be useful to have an indication of the number of decimals of that token or the equivalent amount of the specific token that you're transferring

Assumptions and Scope

Example Usage

Consider the USDC ERC20 which has 6 decimals, when transferring it through ictt (but the same argument can be made for transfers on the same chain so without the usage of ictt) the cli asks for the amount and writing 5 would cause a transfer of 5.000.000 tokens (or in case of insufficient balance raise an error) without the user being aware of it.

Requirements:

Could be useful to write near the amount inserted by the user the equivalent real amount that you would transfer for that specific token or at least the number of decimals so that the user knows how many decimals it should use.

Current Limitations

Nice to Have, but Not Required

Open Questions

Are there any calculations done by the cli which relates to the number of decimals of the native token of the network? In the end i transferred 5 * 10^-13 tokens which translated to 0.05 USDC, but this seems strange since USDC (from Circle's documentation) has 6 decimals. If this is true it would make even tougher to really understand how many tokens you'll transfer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions