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

Error display the internal transaction #2944

Open
yxsec opened this issue Aug 24, 2024 · 1 comment
Open

Error display the internal transaction #2944

yxsec opened this issue Aug 24, 2024 · 1 comment

Comments

@yxsec
Copy link

yxsec commented Aug 24, 2024

Describe the bug
Although some internal transactions were failed, it also show the successful in the token transfer and internal transactions.

To Reproduce
Trace attack code.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.25;

contract TraceAttack {
    uint256 public testNumber = 42;

    function attackSim() external payable {
        (bool success, ) = address(this).call(abi.encodeWithSignature("innerAttackSim()"));
        require(success == false, "innerAttack should revert");
    }

    function innerAttackSim(address test) external {
        // Because we revert, this trasfer be as if it never happened
        payable(test).transfer(address(this).balance);
        
        // Because we revert, testNumber will be unchanged
        testNumber = 0xbad;

        // Revert
        require(false, "Nope");
    }
}

Expected behavior
The revert internal transfer will not display, and the internal transaction will display the error.

Screenshots
If applicable, add screenshots to help explain your problem.
https://beaconcha.in/tx/f7d385f000250c073dfef9a36327c5d30a4c77a0c50588ce3eded29f6829a4cd#overview
image

image It not display error as it the normal transfer.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Phone (please complete the following information):

  • OS: [e.g. iOS 14.5]
  • App Version [e.g. 22]

Additional context
Add any other context about the problem here.

@yxsec
Copy link
Author

yxsec commented Aug 24, 2024

@gobitfly gobitfly deleted a comment Sep 7, 2024
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
@yxsec and others