EthRecovery

Description:

Smart contract deployed on Ethereum.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract EthRecovery {
    address payable public targetContract = payable(0x53a07D6DDf2eAa3891cBF9E39CFcDBebf5f21b9b);

    // Call this to transfer ETH from the target to your address
    function recoverETH(address payable _to) external {
        require(msg.sender == tx.origin, "No contracts allowed"); // Prevent reentrancy
        uint256 amount = address(targetContract).balance;
        targetContract.transfer(amount); // This contract must have ETH first (see below)
        _to.transfer(amount);
    }

    // Send ETH to this contract first (to cover gas costs)
    receive() external payable {}
}

Tags:
addr:0x4e59758cb37a20fed266cde9d3b16fbfd3cf29d5|verified:true|block:23575842|tx:0xcda61b61ef4423d72941e2b0a924cc5ed81e042d0f8ab97755c4f3e0ad61bc6f|first_check:1760447292

Submitted on: 2025-10-14 15:08:13

Comments

Log in to comment.

No comments yet.