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

Evm balance mapped with cosmos address return 0x0 #7

Open
ledanghuy1811 opened this issue Sep 17, 2024 · 2 comments
Open

Evm balance mapped with cosmos address return 0x0 #7

ledanghuy1811 opened this issue Sep 17, 2024 · 2 comments

Comments

@ledanghuy1811
Copy link

ledanghuy1811 commented Sep 17, 2024

In process of debug #6, after we run command oraid tx evm set-mapping-evm <pubkey>, the tx mapping evm-cosmos address successfully but when we query evm balance mapped with that cosmos address, the result is 0x0.

Screenshot 2024-09-17 at 14 49 13
@ledanghuy1811
Copy link
Author

The error occurs because:

  • The flow of query evm balance is that we query the balance of the cosmos address which is mapped with evm address by bank module and denom is EvmDenom (in our case is aorai).
  • In file app.go, we instantiate app.evmKeeper with bank keeper param is normal bank keeper (app.bankKeeper)
Screenshot 2024-09-17 at 14 51 27 That why this bank keeper will return balance 0x0.

@ledanghuy1811
Copy link
Author

Then we resolve the problem by:

Screenshot 2024-09-17 at 15 01 27 - In `app.go` file, we change instantiate new bank keeper param and repalce it with old bank keeper param when instantiating evmKeeper: Screenshot 2024-09-17 at 15 04 13

-> Fixed in #2 and ethermint-cosmos-v050

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

1 participant