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

Cosmos tx amount is casted to uint64 #164

Open
0x0ece opened this issue Oct 26, 2022 · 1 comment
Open

Cosmos tx amount is casted to uint64 #164

0x0ece opened this issue Oct 26, 2022 · 1 comment

Comments

@0x0ece
Copy link

0x0ece commented Oct 26, 2022

Hi, while Terra and Cosmos have relatively low amount of decimals, new chains are popping up with 18 decimals, e.g. XPLA.

We just noticed that there's an explicit cast to uint64:
https://github.com/renproject/multichain/blob/master/chain/cosmos/tx.go#L120

This causes overflow issue/incorrect amount on such chains.

@jazg
Copy link
Member

jazg commented Oct 26, 2022

Hey @0x0ece, good catch! We should go through and update the internal amount types to pack.U256 to prevent this from happening. We will add this to the backlog, but if you would like to give it a go and create a PR that would be appreciated!

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

No branches or pull requests

2 participants