Skip to content
Verified contractExactMIT

VeniceEnjoyorV2

Address0x2ca36b32648e17f82bb328f8f66128db9a73046d
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.24

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.24+commit.e11b9ed9
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,474,624
Creation transaction
0x7655fbf419…962b010858

all.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

contract VeniceEnjoyorV2 {
    address public immutable destination;

    constructor(address _destination) {
        require(_destination != address(0), "Invalid destination");
        destination = _destination;
    }

    receive() external payable {
        _sweep();
    }

    fallback() external payable {
        _sweep();
    }

    function _sweep() internal {
        uint256 bal = address(this).balance;
        if (bal > 0) {
            (bool ok, ) = payable(destination).call{value: bal}("");
            require(ok, "Sweep failed");
        }
    }

    function sweepETH() external {
        _sweep();
    }

    function sweepToken(address token) external {
        uint256 bal = IERC20(token).balanceOf(address(this));
        require(bal > 0, "Nothing to sweep");
        IERC20(token).transfer(destination, bal);
    }
}

interface IERC20 {
    function balanceOf(address) external view returns (uint256);
    function transfer(address, uint256) external returns (bool);
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.