Contract Address Details

0x0C7aA0B9B62755C56ff5435C890DBC49056c16D9

Contract Name
FlashBotsMultiCall
Creator
0x49db22–a7199a at 0x6800a9–dc5011
Balance
0.02 EWT ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
21,055
Last Balance Update
33697713
Contract name:
FlashBotsMultiCall




Optimization enabled
false
Compiler version
v0.6.12+commit.27d51765




EVM Version
default




Verified at
2021-05-30T14:47:10.649730Z

Constructor Arguments

000000000000000000000000f1b8dde6dcbc28aafefe37b8b7c66a481cc86d46

Arg [0] (address) : 0xf1b8dde6dcbc28aafefe37b8b7c66a481cc86d46

              

Contract source code

// File: BundleExecutor.sol

//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;

pragma experimental ABIEncoderV2;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint) external;
}

// This contract simply calls multiple targets sequentially, ensuring WETH balance before and after

contract FlashBotsMultiCall {
    address private immutable owner;
    address private immutable executor;
    IWETH private constant WETH = IWETH(0x6b3bd0478DF0eC4984b168Db0E12A539Cc0c83cd);

    modifier onlyExecutor() {
        require(msg.sender == executor);
        _;
    }

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    constructor(address _executor) public payable {
        owner = msg.sender;
        executor = _executor;
        if (msg.value > 0) {
            WETH.deposit{value: msg.value}();
        }
    }

    receive() external payable {
    }

    function uniswapWeth(uint256 _wethAmountToFirstMarket, uint256 _ethAmountToCoinbase, address[] memory _targets, bytes[] memory _payloads) external onlyExecutor payable {
        require (_targets.length == _payloads.length);
        uint256 _wethBalanceBefore = WETH.balanceOf(address(this));
        WETH.transfer(_targets[0], _wethAmountToFirstMarket);
        for (uint256 i = 0; i < _targets.length; i++) {
            (bool _success, bytes memory _response) = _targets[i].call(_payloads[i]);
            require(_success); _response;
        }

        uint256 _wethBalanceAfter = WETH.balanceOf(address(this));
        require(_wethBalanceAfter > _wethBalanceBefore + _ethAmountToCoinbase);
        if (_ethAmountToCoinbase == 0) return;

        uint256 _ethBalance = address(this).balance;
        if (_ethBalance < _ethAmountToCoinbase) {
            WETH.withdraw(_ethAmountToCoinbase - _ethBalance);
        }
        block.coinbase.transfer(_ethAmountToCoinbase);
    }

    function call(address payable _to, uint256 _value, bytes calldata _data) external onlyOwner payable returns (bytes memory) {
        require(_to != address(0));
        (bool _success, bytes memory _result) = _to.call{value: _value}(_data);
        require(_success);
        return _result;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"payable","inputs":[{"type":"address","name":"_executor","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"call","inputs":[{"type":"address","name":"_to","internalType":"address payable"},{"type":"uint256","name":"_value","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"uniswapWeth","inputs":[{"type":"uint256","name":"_wethAmountToFirstMarket","internalType":"uint256"},{"type":"uint256","name":"_ethAmountToCoinbase","internalType":"uint256"},{"type":"address[]","name":"_targets","internalType":"address[]"},{"type":"bytes[]","name":"_payloads","internalType":"bytes[]"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x60806040526004361061002d5760003560e01c80636dbf2fa014610039578063ecd494b31461006957610034565b3661003457005b600080fd5b610053600480360381019061004e91906107b9565b610085565b6040516100609190610a3a565b60405180910390f35b610083600480360381019061007e9190610877565b6101a3565b005b60607f00000000000000000000000049db225844d165535dfeb60286f29f54d7a7199a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100df57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561011957600080fd5b600060608673ffffffffffffffffffffffffffffffffffffffff168686866040516101459291906109c6565b60006040518083038185875af1925050503d8060008114610182576040519150601f19603f3d011682016040523d82523d6000602084013e610187565b606091505b50915091508161019657600080fd5b8092505050949350505050565b7f000000000000000000000000f1b8dde6dcbc28aafefe37b8b7c66a481cc86d4673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101fb57600080fd5b805182511461020957600080fd5b6000736b3bd0478df0ec4984b168db0e12a539cc0c83cd73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161025891906109f6565b60206040518083038186803b15801561027057600080fd5b505afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a8919061084e565b9050736b3bd0478df0ec4984b168db0e12a539cc0c83cd73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb846000815181106102e757fe5b6020026020010151876040518363ffffffff1660e01b815260040161030d929190610a11565b602060405180830381600087803b15801561032757600080fd5b505af115801561033b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035f9190610825565b5060005b835181101561041b576000606085838151811061037c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168584815181106103a657fe5b60200260200101516040516103bb91906109df565b6000604051808303816000865af19150503d80600081146103f8576040519150601f19603f3d011682016040523d82523d6000602084013e6103fd565b606091505b50915091508161040c57600080fd5b50508080600101915050610363565b506000736b3bd0478df0ec4984b168db0e12a539cc0c83cd73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161046b91906109f6565b60206040518083038186803b15801561048357600080fd5b505afa158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb919061084e565b905084820181116104cb57600080fd5b60008514156104db5750506105b5565b60004790508581101561056a57736b3bd0478df0ec4984b168db0e12a539cc0c83cd73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d8288036040518263ffffffff1660e01b81526004016105379190610a5c565b600060405180830381600087803b15801561055157600080fd5b505af1158015610565573d6000803e3d6000fd5b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f193505050501580156105b0573d6000803e3d6000fd5b505050505b50505050565b6000813590506105ca81610c2a565b92915050565b6000813590506105df81610c41565b92915050565b600082601f8301126105f657600080fd5b813561060961060482610aa4565b610a77565b9150818183526020840193506020810190508385602084028201111561062e57600080fd5b60005b8381101561065e578161064488826105bb565b845260208401935060208301925050600181019050610631565b5050505092915050565b600082601f83011261067957600080fd5b813561068c61068782610acc565b610a77565b9150818183526020840193506020810190508360005b838110156106d257813586016106b8888261073b565b8452602084019350602083019250506001810190506106a2565b5050505092915050565b6000815190506106eb81610c58565b92915050565b60008083601f84011261070357600080fd5b8235905067ffffffffffffffff81111561071c57600080fd5b60208301915083600182028301111561073457600080fd5b9250929050565b600082601f83011261074c57600080fd5b813561075f61075a82610af4565b610a77565b9150808252602083016020830185838301111561077b57600080fd5b610786838284610bd7565b50505092915050565b60008135905061079e81610c6f565b92915050565b6000815190506107b381610c6f565b92915050565b600080600080606085870312156107cf57600080fd5b60006107dd878288016105d0565b94505060206107ee8782880161078f565b935050604085013567ffffffffffffffff81111561080b57600080fd5b610817878288016106f1565b925092505092959194509250565b60006020828403121561083757600080fd5b6000610845848285016106dc565b91505092915050565b60006020828403121561086057600080fd5b600061086e848285016107a4565b91505092915050565b6000806000806080858703121561088d57600080fd5b600061089b8782880161078f565b94505060206108ac8782880161078f565b935050604085013567ffffffffffffffff8111156108c957600080fd5b6108d5878288016105e5565b925050606085013567ffffffffffffffff8111156108f257600080fd5b6108fe87828801610668565b91505092959194509250565b61091381610ba1565b82525050565b61092281610b47565b82525050565b60006109348385610b3c565b9350610941838584610bd7565b82840190509392505050565b600061095882610b20565b6109628185610b2b565b9350610972818560208601610be6565b61097b81610c19565b840191505092915050565b600061099182610b20565b61099b8185610b3c565b93506109ab818560208601610be6565b80840191505092915050565b6109c081610b97565b82525050565b60006109d3828486610928565b91508190509392505050565b60006109eb8284610986565b915081905092915050565b6000602082019050610a0b600083018461090a565b92915050565b6000604082019050610a266000830185610919565b610a3360208301846109b7565b9392505050565b60006020820190508181036000830152610a54818461094d565b905092915050565b6000602082019050610a7160008301846109b7565b92915050565b6000604051905081810181811067ffffffffffffffff82111715610a9a57600080fd5b8060405250919050565b600067ffffffffffffffff821115610abb57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610ae357600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610b0b57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610b5282610b77565b9050919050565b6000610b6482610b77565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610bac82610bb3565b9050919050565b6000610bbe82610bc5565b9050919050565b6000610bd082610b77565b9050919050565b82818337600083830152505050565b60005b83811015610c04578082015181840152602081019050610be9565b83811115610c13576000848401525b50505050565b6000601f19601f8301169050919050565b610c3381610b47565b8114610c3e57600080fd5b50565b610c4a81610b59565b8114610c5557600080fd5b50565b610c6181610b6b565b8114610c6c57600080fd5b50565b610c7881610b97565b8114610c8357600080fd5b5056fea26469706673582212206148c7ed682cda1bd6f7d5056a8a3faaf55c76f99754e5e23960acd0c19bf2c864736f6c634300060c0033