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

Internal transactions do not trigger balance update #9455

Open
ardier16 opened this issue Feb 22, 2024 · 0 comments
Open

Internal transactions do not trigger balance update #9455

ardier16 opened this issue Feb 22, 2024 · 0 comments
Labels

Comments

@ardier16
Copy link

Description

When the contract transfers some native tokens to EOA (e.g. Account A) inside internal transaction, this transfer has no effect on the Account A balance and is not reflected on Coin Balance History page and on the address balance view.

Type of the installation

Docker-compose

Type of the JSON RPC archive node

Geth

Type of the chain

No response

Link to the page

https://eth-sepolia.blockscout.com/tx/0xf9c2b98c5f24249303f605a818e9b738cff836f88bfee20d3283f3d781f7f277?tab=internal

Steps to reproduce

Steps

1. Deploy a contract that tranfers some native tokens to EOA

Contract example source code (Solidity)

// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity 0.8.24;

contract AllocatorTest {
    constructor() {}
    receive() external payable {}

    function allocate() external payable {
        address[] memory members = [// list of addresses];

        uint256 amount = 100000000000000; // 0.0001 ETH
        address payable _to;

        for (uint64 i = 0; i < members.length; ++i) {
            _to = payable(members[i]);
            (bool sent,) = _to.call{value: amount}("");
            require(sent, "Failed to send Ether");
        }
    }
}

Deployed contract on Sepolia:
https://eth-sepolia.blockscout.com/address/0x2aD29aca9455fba6E8DA77b52Ed8111438C2c90B

2. Call the contract method to allocate the funds

Example of allocate transaction:
https://eth-sepolia.blockscout.com/tx/0xf9c2b98c5f24249303f605a818e9b738cff836f88bfee20d3283f3d781f7f277

Screenshot of internal transactions

image

3. Verify the balance of allocation members

Members:

Screenshots

Screenshot 2024-02-22 at 16 56 14 Screenshot 2024-02-22 at 16 56 38

Expected behavior

  • All member balances are updated according to the allocation
  • The coin balance history is updated accordingly

Actual behavior

  • Coin balance history is empty
  • Balance is not updated for some members

Backend version

v6.1.0-beta.+commit.61df0a9b

Frontend version

No response

Elixir & Erlang/OTP versions

Deployed on eth-sepolia.blockscout.com

Operating system

No response

Additional information

On Sepolia Etherscan the balance update is handled correctly:

Transaction:
https://sepolia.etherscan.io/tx/0xf9c2b98c5f24249303f605a818e9b738cff836f88bfee20d3283f3d781f7f277#internal

Members:

Screenshots

image Screenshot 2024-02-22 at 17 02 17 Screenshot 2024-02-22 at 17 02 27

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

No branches or pull requests

1 participant