Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert decimals between Substrate native token and EVM native token #1640

Closed
xlc opened this issue Nov 24, 2021 · 0 comments · Fixed by #1658
Closed

Convert decimals between Substrate native token and EVM native token #1640

xlc opened this issue Nov 24, 2021 · 0 comments · Fixed by #1658
Assignees

Comments

@xlc
Copy link
Member

xlc commented Nov 24, 2021

The Substrate native token is using 10 (ACA) and 12 (KAR) decimals. All Ethereal tooling assume native token is using 18 decimals.

So when query native token balance, should add the extra zeros. When perform transfer, it should error if the reminder part is not zero and then scale down to the right decimals.

Note the ERC20 precompiles should not be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants