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

Metamask wallet balance and balance according EPIRUS explorer don't match after destroying a smart contract #39

Open
RaKatt opened this issue Apr 11, 2021 · 2 comments

Comments

@RaKatt
Copy link

RaKatt commented Apr 11, 2021

We used EPIRUS on a private ethereum network with the native currency OKP.
After having deployed a smart contract I have sent 22 OKP to this contract.
Then I destroyed the contract and it returned to my wallet 22 OKP according to Metamask.
The EPIRUS explorer wallet balance of my external address didn't reflect that transaction.

To be sure that it is not a Metamask issue I checked with a node, which confirmed me, that the balance of my wallet (external address) was 22 OKP higher than EPIRUS was showing.
balances

@rach-id
Copy link

rach-id commented Dec 8, 2021

Hello,
Sorry for the late reply.
We will take a look on this issue, and work on a fix. Thanks for reporting it.

@mfornos
Copy link
Contributor

mfornos commented Sep 12, 2022

This functionality requires "internal transaction" processing, but at the moment is only available on the commercial version.

Brief explanation:
To reflect the proper balances you need to handle SELFDESTRUCT traces to know the value transferred or refresh the balance of the accounts involved in the internal CALL using eth_getBalance.

For further information, see hyperledger/besu#2319 regarding such traces in the Besu client. Note that it is client specific, although the traces format tends to some standardization 🐱

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

3 participants