Skip to content
Verified contractExactMIT

ETHDrainer

Address0xbe2acdc6b03b4b2c6a9e32c318d30cc84adda619
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.20

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,338,013
Creation transaction
0xc3f56073df…2edb5c573e

ethdrainer.sol

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

contract ETHDrainer {
 error TransferFailed();

 receive() external payable {}
 fallback() external payable {}

 function drainETH() external {
 uint256 balance = address(this).balance;
 (bool success, ) = payable(msg.sender).call{value: balance}("");
 if (!success) revert TransferFailed();
 }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.