ETH Price: $4,472.24 (-0.06%)

Contract

0xDA9C0fAA0D15E4525d3854E58dBdF23C67b3477c

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Token Transfers found.

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WethMaker

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "./Unwindooor.sol";

/// @notice Contract for selling received tokens into weth. Deploy on secondary networks.
contract WethMaker is Unwindooor {

    event SetBridge(address indexed token, address bridge);

    address public immutable weth;

    mapping(address => address) public bridges;

    constructor(
        address owner,
        address user,
        address factory,
        address _weth
    ) Unwindooor(owner, user, factory) {
        weth = _weth;
    }

    function setBridge(address token, address bridge) external onlyOwner {
        bridges[token] = bridge;
        emit SetBridge(token, bridge);
    }

    // Exchange token for weth or its bridge token (which gets converted into weth in subsequent transactions).
    function buyWeth(
        address[] calldata tokens,
        uint256[] calldata amountsIn,
        uint256[] calldata minimumOuts
    ) external onlyTrusted {
        for (uint256 i = 0; i < tokens.length; i++) {

            address tokenIn = tokens[i];
            address outToken = bridges[tokenIn] == address(0) ? weth : bridges[tokenIn];
            if (_swap(tokenIn, outToken, amountsIn[i], address(this)) < minimumOuts[i]) revert SlippageProtection();
            
        }
    }

    function _swap(
        address tokenIn,
        address tokenOut,
        uint256 amountIn,
        address to
    ) internal returns (uint256 outAmount) {

        IUniV2 pair = IUniV2(_pairFor(tokenIn, tokenOut));
        _safeTransfer(tokenIn, address(pair), amountIn);

        (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();

        if (tokenIn < tokenOut) {

            outAmount = _getAmountOut(amountIn, reserve0, reserve1);
            pair.swap(0, outAmount, to, "");

        } else {

            outAmount = _getAmountOut(amountIn, reserve1, reserve0);
            pair.swap(outAmount, 0, to, "");

        }

    }

    // Allow the owner to withdraw the funds and bridge them to mainnet.
    function withdraw(address token, address to, uint256 _value) onlyOwner external {
        if (token != address(0)) {
            _safeTransfer(token, to, _value);
        } else {
            (bool success, ) = to.call{value: _value}("");
            require(success);
        }
    }

    function doAction(address to, uint256 _value, bytes memory data) onlyOwner external {
        (bool success, ) = to.call{value: _value}(data);
        require(success);
    }

    receive() external payable {}

}

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

abstract contract Auth {

    event SetOwner(address indexed owner);
    event SetTrusted(address indexed user, bool isTrusted);

    address public owner;

    mapping(address => bool) public trusted;

    error OnlyOwner();
    error OnlyTrusted();

    modifier onlyOwner() {
        if (msg.sender != owner) revert OnlyOwner();
        _;
    }

    modifier onlyTrusted() {
        if (!trusted[msg.sender]) revert OnlyTrusted();
        _;
    }

    constructor(address newOwner, address trustedUser) {
        owner = newOwner;
        trusted[trustedUser] = true;

        emit SetOwner(owner);
        emit SetTrusted(trustedUser, true);
    }

    function setOwner(address newOwner) external onlyOwner {
        owner = newOwner;
        emit SetOwner(newOwner);
    }

    function setTrusted(address user, bool isTrusted) external onlyOwner {
        trusted[user] = isTrusted;
        emit SetTrusted(user, isTrusted);
    }

}

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "./Auth.sol";
import "./interfaces/IUniV2.sol";
import "./interfaces/IUniV2Factory.sol";

/// @notice Contract for withdrawing LP positions.
/// @dev Calling unwindPairs() withdraws the LP position into one of the two tokens
contract Unwindooor is Auth {

    error SlippageProtection();
    error TransferFailed();

    bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));

    IUniV2Factory public immutable factory;

    constructor(
        address owner,
        address user,
        address factoryAddress
    ) Auth(owner, user) {
        factory = IUniV2Factory(factoryAddress);
    }

    // We remove liquidity and sell tokensB[i] for tokensA[i].
    function unwindPairs(
        address[] calldata tokensA,
        address[] calldata tokensB,
        uint256[] calldata amounts,
        uint256[] calldata minimumOuts
    ) external onlyTrusted {
        for (uint256 i = 0; i < tokensA.length; i++) {
            
            address tokenA = tokensA[i];
            address tokenB = tokensB[i];
            bool keepToken0 = tokenA < tokenB;
            address pair = _pairFor(tokenA, tokenB);

            if (_unwindPair(IUniV2(pair), amounts[i], keepToken0, tokenB) < minimumOuts[i]) revert SlippageProtection();
        }
    }

    // Burn liquidity and sell one of the tokens for the other.
    function _unwindPair(
        IUniV2 pair,
        uint256 amount,
        bool keepToken0,
        address tokenToSell
    ) private returns (uint256 amountOut) {

        pair.transfer(address(pair), amount);
        (uint256 amount0, uint256 amount1) = pair.burn(address(this));
        (uint112 reserve0, uint112 reserve1,) = pair.getReserves();

        if (keepToken0) {
            _safeTransfer(tokenToSell, address(pair), amount1);
            amountOut = _getAmountOut(amount1, uint256(reserve1), uint256(reserve0));
            pair.swap(amountOut, 0, address(this), "");
            amountOut += amount0;
        } else {
            _safeTransfer(tokenToSell, address(pair), amount0);
            amountOut = _getAmountOut(amount0, uint256(reserve0), uint256(reserve1));
            pair.swap(0, amountOut, address(this), "");
            amountOut += amount1;
        }
    }

    // In case we don't want to sell one of the tokens for the other.
    function burnPairs(
        IUniV2[] calldata lpTokens,
        uint256[] calldata amounts,
        uint256[] calldata minimumOut0,
        uint256[] calldata minimumOut1
    ) external onlyTrusted {
        for (uint256 i = 0; i < lpTokens.length; i++) {
            IUniV2 pair = lpTokens[i];
            pair.transfer(address(pair), amounts[i]);
            (uint256 amount0, uint256 amount1) = pair.burn(address(this));
            if (amount0 < minimumOut0[i] || amount1 < minimumOut1[i]) revert SlippageProtection();
        }
    }

    function _getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256) {
        uint256 amountInWithFee = amountIn * 997;
        uint256 numerator = amountInWithFee * reserveOut;
        uint256 denominator = reserveIn * 1000 + amountInWithFee;
        return numerator / denominator;
    }

    function _safeTransfer(address token, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(TRANSFER_SELECTOR, to, value));
        if (!success || (data.length != 0 && !abi.decode(data, (bool)))) revert TransferFailed();
    }

    function _pairFor(address tokenA, address tokenB) internal view returns (address pair) {
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        pair = address(uint160(uint256(keccak256(abi.encodePacked(
            hex'ff',
            factory,
            keccak256(abi.encodePacked(token0, token1)),
            hex'e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303' // init code hash
        )))));
    }

}

// SPDX-License-Identifier: GPL-3.0-or-later

interface IERC20 {
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address addy) external view returns (uint256);
}

// SPDX-License-Identifier: GPL-3.0-or-later

import "./IERC20.sol";

interface IUniV2 is IERC20 {
    function totalSupply() external view returns (uint256);
    function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast);
    function burn(address to) external returns (uint256 amount0, uint256 amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function token0() external view returns (address);
    function token1() external view returns (address);
}

// SPDX-License-Identifier: GPL-3.0-or-later

interface IUniV2Factory {
    function getPair(address tokenA, address tokenB) external view returns (address);
}

Settings
{
  "libraries": {},
  "metadata": {
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 99999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"OnlyTrusted","type":"error"},{"inputs":[],"name":"SlippageProtection","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"bridge","type":"address"}],"name":"SetBridge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"SetOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"isTrusted","type":"bool"}],"name":"SetTrusted","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bridges","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniV2[]","name":"lpTokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOut0","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOut1","type":"uint256[]"}],"name":"burnPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amountsIn","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOuts","type":"uint256[]"}],"name":"buyWeth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"doAction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"isTrusted","type":"bool"}],"name":"setTrusted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"trusted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokensA","type":"address[]"},{"internalType":"address[]","name":"tokensB","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOuts","type":"uint256[]"}],"name":"unwindPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b5060405162001d5a38038062001d5a833981016040819052620000349162000126565b600080546001600160a01b0319166001600160a01b038681169190911782558481168252600160208190526040808420805460ff1916909217909155825490518793879387938693869391909216917f167d3e9c1016ab80e58802ca9da10ce5c6a0f4debc46a2e7a2cd9e56899a4fb59190a2604051600181526001600160a01b038216907f878d105ed19c01e992a54459c2f04ba19432ac45600b42ce340d0342722074369060200160405180910390a250506001600160a01b039081166080529290921660a05250620001839350505050565b80516001600160a01b03811681146200012157600080fd5b919050565b600080600080608085870312156200013d57600080fd5b620001488562000109565b9350620001586020860162000109565b9250620001686040860162000109565b9150620001786060860162000109565b905092959194509250565b60805160a051611ba3620001b7600039600081816101360152610a470152600081816102810152610cf10152611ba36000f3fe6080604052600436106100d65760003560e01c80638e9be9f41161007f578063c45a015511610059578063c45a01551461026f578063ced67f0c146102a3578063d9caed12146102e6578063f32a12ac1461030657600080fd5b80638e9be9f41461020f5780639d22ae8c1461022f5780639dd8a81c1461024f57600080fd5b806354a0af17116100b057806354a0af17146101825780636e9821c2146101a25780638da5cb5b146101e257600080fd5b806313af4035146100e2578063248091c0146101045780633fc8cef31461012457600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd3660046115b9565b610326565b005b34801561011057600080fd5b5061010261011f366004611629565b6103e4565b34801561013057600080fd5b506101587f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018e57600080fd5b5061010261019d36600461171c565b61065d565b3480156101ae57600080fd5b506101d26101bd3660046115b9565b60016020526000908152604090205460ff1681565b6040519015158152602001610179565b3480156101ee57600080fd5b506000546101589073ffffffffffffffffffffffffffffffffffffffff1681565b34801561021b57600080fd5b5061010261022a366004611629565b61072c565b34801561023b57600080fd5b5061010261024a366004611807565b61088c565b34801561025b57600080fd5b5061010261026a366004611840565b61096a565b34801561027b57600080fd5b506101587f000000000000000000000000000000000000000000000000000000000000000081565b3480156102af57600080fd5b506101586102be3660046115b9565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f257600080fd5b506101026103013660046118da565b610afc565b34801561031257600080fd5b50610102610321366004611929565b610b9b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610377576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f167d3e9c1016ab80e58802ca9da10ce5c6a0f4debc46a2e7a2cd9e56899a4fb591a250565b3360009081526001602052604090205460ff1661042d576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8781101561065257600089898381811061044c5761044c611957565b905060200201602081019061046191906115b9565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb828a8a8681811061049257610492611957565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff909416600485015260200291909101356024830152506044016020604051808303816000875af115801561050b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052f9190611986565b506040517f89afcb44000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906389afcb449060240160408051808303816000875af11580156105a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c491906119a3565b915091508787858181106105da576105da611957565b9050602002013582108061060557508585858181106105fb576105fb611957565b9050602002013581105b1561063c576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050808061064a906119f6565b915050610430565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106ae576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1683836040516106d69190611a2f565b60006040518083038185875af1925050503d8060008114610713576040519150601f19603f3d011682016040523d82523d6000602084013e610718565b606091505b505090508061072657600080fd5b50505050565b3360009081526001602052604090205460ff16610775576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8781101561065257600089898381811061079457610794611957565b90506020020160208101906107a991906115b9565b905060008888848181106107bf576107bf611957565b90506020020160208101906107d491906115b9565b905073ffffffffffffffffffffffffffffffffffffffff8082169083161060006107fe8484610c6f565b905086868681811061081257610812611957565b9050602002013561083d828b8b8981811061082f5761082f611957565b905060200201358587610df6565b1015610875576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050508080610884906119f6565b915050610778565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108dd576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660008181526002602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055905192835290917f8357797ab855a0bad5103ea8bd2f21f986350e94d73f143ae114db8f0db5a93a91015b60405180910390a25050565b3360009081526001602052604090205460ff166109b3576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b85811015610af35760008787838181106109d2576109d2611957565b90506020020160208101906109e791906115b9565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260026020526040812054929350911615610a455773ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604090205416610a67565b7f00000000000000000000000000000000000000000000000000000000000000005b9050848484818110610a7b57610a7b611957565b90506020020135610aa683838a8a88818110610a9957610a99611957565b905060200201353061117c565b1015610ade576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50508080610aeb906119f6565b9150506109b6565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b4d576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831615610b7957610b748383836113d0565b505050565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516106d6565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bec576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f878d105ed19c01e992a54459c2f04ba19432ac45600b42ce340d034272207436910161095e565b60008060008373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610610cae578385610cb1565b84845b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b8216602084015283901b16603482015291935091507f00000000000000000000000000000000000000000000000000000000000000009060480160405160208183030381529060405280519060200120604051602001610db79291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012095945050505050565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482018190526024820185905260009163a9059cbb906044016020604051808303816000875af1158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190611986565b506040517f89afcb44000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8816906389afcb449060240160408051808303816000875af1158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2591906119a3565b915091506000808873ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9b9190611a8d565b5091509150861561108d57610fb1868a856113d0565b610fdc83826dffffffffffffffffffffffffffff16846dffffffffffffffffffffffffffff16611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526004810182905260006024820181905230604483015260806064830152608482015290955073ffffffffffffffffffffffffffffffffffffffff8a169063022c0d9f9060a401600060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b5050505083856110869190611add565b9450611170565b611098868a866113d0565b6110c384836dffffffffffffffffffffffffffff16836dffffffffffffffffffffffffffff16611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526000600482018190526024820183905230604483015260806064830152608482015290955073ffffffffffffffffffffffffffffffffffffffff8a169063022c0d9f9060a401600060405180830381600087803b15801561114957600080fd5b505af115801561115d573d6000803e3d6000fd5b50505050828561116d9190611add565b94505b50505050949350505050565b6000806111898686610c6f565b90506111968682866113d0565b6000808273ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156111e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112089190611a8d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1610156113155761126c868383611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526000600482018190526024820183905273ffffffffffffffffffffffffffffffffffffffff88811660448401526080606484015260848301919091529195509084169063022c0d9f9060a401600060405180830381600087803b1580156112f857600080fd5b505af115801561130c573d6000803e3d6000fd5b505050506113c5565b611320868284611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526004810182905260006024820181905273ffffffffffffffffffffffffffffffffffffffff88811660448401526080606484015260848301919091529195509084169063022c0d9f9060a401600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b505050505b505050949350505050565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283928716916114979190611a2f565b6000604051808303816000865af19150503d80600081146114d4576040519150601f19603f3d011682016040523d82523d6000602084013e6114d9565b606091505b509150915081158061150757508051158015906115075750808060200190518101906115059190611986565b155b1561153e576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b600080611554856103e5611af5565b905060006115628483611af5565b9050600082611573876103e8611af5565b61157d9190611add565b90506115898183611b32565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146115b657600080fd5b50565b6000602082840312156115cb57600080fd5b81356115d681611594565b9392505050565b60008083601f8401126115ef57600080fd5b50813567ffffffffffffffff81111561160757600080fd5b6020830191508360208260051b850101111561162257600080fd5b9250929050565b6000806000806000806000806080898b03121561164557600080fd5b883567ffffffffffffffff8082111561165d57600080fd5b6116698c838d016115dd565b909a50985060208b013591508082111561168257600080fd5b61168e8c838d016115dd565b909850965060408b01359150808211156116a757600080fd5b6116b38c838d016115dd565b909650945060608b01359150808211156116cc57600080fd5b506116d98b828c016115dd565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561173157600080fd5b833561173c81611594565b925060208401359150604084013567ffffffffffffffff8082111561176057600080fd5b818601915086601f83011261177457600080fd5b813581811115611786576117866116ed565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156117cc576117cc6116ed565b816040528281528960208487010111156117e557600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806040838503121561181a57600080fd5b823561182581611594565b9150602083013561183581611594565b809150509250929050565b6000806000806000806060878903121561185957600080fd5b863567ffffffffffffffff8082111561187157600080fd5b61187d8a838b016115dd565b9098509650602089013591508082111561189657600080fd5b6118a28a838b016115dd565b909650945060408901359150808211156118bb57600080fd5b506118c889828a016115dd565b979a9699509497509295939492505050565b6000806000606084860312156118ef57600080fd5b83356118fa81611594565b9250602084013561190a81611594565b929592945050506040919091013590565b80151581146115b657600080fd5b6000806040838503121561193c57600080fd5b823561194781611594565b915060208301356118358161191b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561199857600080fd5b81516115d68161191b565b600080604083850312156119b657600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611a2857611a286119c7565b5060010190565b6000825160005b81811015611a505760208186018101518583015201611a36565b81811115611a5f576000828501525b509190910192915050565b80516dffffffffffffffffffffffffffff81168114611a8857600080fd5b919050565b600080600060608486031215611aa257600080fd5b611aab84611a6a565b9250611ab960208501611a6a565b9150604084015163ffffffff81168114611ad257600080fd5b809150509250925092565b60008219821115611af057611af06119c7565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b2d57611b2d6119c7565b500290565b600082611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220822f210a7504114693c5861ca20fdc857719a6e6246b16c6612d519a3ad370fb64736f6c634300080a00330000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a00000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a000000000000000000000000072d111b4d6f31b38919ae39779f570b747d6acd9000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62

Deployed Bytecode

0x6080604052600436106100d65760003560e01c80638e9be9f41161007f578063c45a015511610059578063c45a01551461026f578063ced67f0c146102a3578063d9caed12146102e6578063f32a12ac1461030657600080fd5b80638e9be9f41461020f5780639d22ae8c1461022f5780639dd8a81c1461024f57600080fd5b806354a0af17116100b057806354a0af17146101825780636e9821c2146101a25780638da5cb5b146101e257600080fd5b806313af4035146100e2578063248091c0146101045780633fc8cef31461012457600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd3660046115b9565b610326565b005b34801561011057600080fd5b5061010261011f366004611629565b6103e4565b34801561013057600080fd5b506101587f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab6281565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018e57600080fd5b5061010261019d36600461171c565b61065d565b3480156101ae57600080fd5b506101d26101bd3660046115b9565b60016020526000908152604090205460ff1681565b6040519015158152602001610179565b3480156101ee57600080fd5b506000546101589073ffffffffffffffffffffffffffffffffffffffff1681565b34801561021b57600080fd5b5061010261022a366004611629565b61072c565b34801561023b57600080fd5b5061010261024a366004611807565b61088c565b34801561025b57600080fd5b5061010261026a366004611840565b61096a565b34801561027b57600080fd5b506101587f00000000000000000000000072d111b4d6f31b38919ae39779f570b747d6acd981565b3480156102af57600080fd5b506101586102be3660046115b9565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f257600080fd5b506101026103013660046118da565b610afc565b34801561031257600080fd5b50610102610321366004611929565b610b9b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610377576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f167d3e9c1016ab80e58802ca9da10ce5c6a0f4debc46a2e7a2cd9e56899a4fb591a250565b3360009081526001602052604090205460ff1661042d576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8781101561065257600089898381811061044c5761044c611957565b905060200201602081019061046191906115b9565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb828a8a8681811061049257610492611957565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff909416600485015260200291909101356024830152506044016020604051808303816000875af115801561050b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052f9190611986565b506040517f89afcb44000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906389afcb449060240160408051808303816000875af11580156105a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c491906119a3565b915091508787858181106105da576105da611957565b9050602002013582108061060557508585858181106105fb576105fb611957565b9050602002013581105b1561063c576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050808061064a906119f6565b915050610430565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106ae576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1683836040516106d69190611a2f565b60006040518083038185875af1925050503d8060008114610713576040519150601f19603f3d011682016040523d82523d6000602084013e610718565b606091505b505090508061072657600080fd5b50505050565b3360009081526001602052604090205460ff16610775576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8781101561065257600089898381811061079457610794611957565b90506020020160208101906107a991906115b9565b905060008888848181106107bf576107bf611957565b90506020020160208101906107d491906115b9565b905073ffffffffffffffffffffffffffffffffffffffff8082169083161060006107fe8484610c6f565b905086868681811061081257610812611957565b9050602002013561083d828b8b8981811061082f5761082f611957565b905060200201358587610df6565b1015610875576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050508080610884906119f6565b915050610778565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108dd576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660008181526002602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055905192835290917f8357797ab855a0bad5103ea8bd2f21f986350e94d73f143ae114db8f0db5a93a91015b60405180910390a25050565b3360009081526001602052604090205460ff166109b3576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b85811015610af35760008787838181106109d2576109d2611957565b90506020020160208101906109e791906115b9565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260026020526040812054929350911615610a455773ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604090205416610a67565b7f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab625b9050848484818110610a7b57610a7b611957565b90506020020135610aa683838a8a88818110610a9957610a99611957565b905060200201353061117c565b1015610ade576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50508080610aeb906119f6565b9150506109b6565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b4d576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831615610b7957610b748383836113d0565b505050565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516106d6565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bec576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f878d105ed19c01e992a54459c2f04ba19432ac45600b42ce340d034272207436910161095e565b60008060008373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610610cae578385610cb1565b84845b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b8216602084015283901b16603482015291935091507f00000000000000000000000072d111b4d6f31b38919ae39779f570b747d6acd99060480160405160208183030381529060405280519060200120604051602001610db79291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012095945050505050565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482018190526024820185905260009163a9059cbb906044016020604051808303816000875af1158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190611986565b506040517f89afcb44000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8816906389afcb449060240160408051808303816000875af1158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2591906119a3565b915091506000808873ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9b9190611a8d565b5091509150861561108d57610fb1868a856113d0565b610fdc83826dffffffffffffffffffffffffffff16846dffffffffffffffffffffffffffff16611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526004810182905260006024820181905230604483015260806064830152608482015290955073ffffffffffffffffffffffffffffffffffffffff8a169063022c0d9f9060a401600060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b5050505083856110869190611add565b9450611170565b611098868a866113d0565b6110c384836dffffffffffffffffffffffffffff16836dffffffffffffffffffffffffffff16611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526000600482018190526024820183905230604483015260806064830152608482015290955073ffffffffffffffffffffffffffffffffffffffff8a169063022c0d9f9060a401600060405180830381600087803b15801561114957600080fd5b505af115801561115d573d6000803e3d6000fd5b50505050828561116d9190611add565b94505b50505050949350505050565b6000806111898686610c6f565b90506111968682866113d0565b6000808273ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156111e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112089190611a8d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1610156113155761126c868383611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526000600482018190526024820183905273ffffffffffffffffffffffffffffffffffffffff88811660448401526080606484015260848301919091529195509084169063022c0d9f9060a401600060405180830381600087803b1580156112f857600080fd5b505af115801561130c573d6000803e3d6000fd5b505050506113c5565b611320868284611545565b6040517f022c0d9f0000000000000000000000000000000000000000000000000000000081526004810182905260006024820181905273ffffffffffffffffffffffffffffffffffffffff88811660448401526080606484015260848301919091529195509084169063022c0d9f9060a401600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b505050505b505050949350505050565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283928716916114979190611a2f565b6000604051808303816000865af19150503d80600081146114d4576040519150601f19603f3d011682016040523d82523d6000602084013e6114d9565b606091505b509150915081158061150757508051158015906115075750808060200190518101906115059190611986565b155b1561153e576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b600080611554856103e5611af5565b905060006115628483611af5565b9050600082611573876103e8611af5565b61157d9190611add565b90506115898183611b32565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146115b657600080fd5b50565b6000602082840312156115cb57600080fd5b81356115d681611594565b9392505050565b60008083601f8401126115ef57600080fd5b50813567ffffffffffffffff81111561160757600080fd5b6020830191508360208260051b850101111561162257600080fd5b9250929050565b6000806000806000806000806080898b03121561164557600080fd5b883567ffffffffffffffff8082111561165d57600080fd5b6116698c838d016115dd565b909a50985060208b013591508082111561168257600080fd5b61168e8c838d016115dd565b909850965060408b01359150808211156116a757600080fd5b6116b38c838d016115dd565b909650945060608b01359150808211156116cc57600080fd5b506116d98b828c016115dd565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561173157600080fd5b833561173c81611594565b925060208401359150604084013567ffffffffffffffff8082111561176057600080fd5b818601915086601f83011261177457600080fd5b813581811115611786576117866116ed565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156117cc576117cc6116ed565b816040528281528960208487010111156117e557600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806040838503121561181a57600080fd5b823561182581611594565b9150602083013561183581611594565b809150509250929050565b6000806000806000806060878903121561185957600080fd5b863567ffffffffffffffff8082111561187157600080fd5b61187d8a838b016115dd565b9098509650602089013591508082111561189657600080fd5b6118a28a838b016115dd565b909650945060408901359150808211156118bb57600080fd5b506118c889828a016115dd565b979a9699509497509295939492505050565b6000806000606084860312156118ef57600080fd5b83356118fa81611594565b9250602084013561190a81611594565b929592945050506040919091013590565b80151581146115b657600080fd5b6000806040838503121561193c57600080fd5b823561194781611594565b915060208301356118358161191b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561199857600080fd5b81516115d68161191b565b600080604083850312156119b657600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611a2857611a286119c7565b5060010190565b6000825160005b81811015611a505760208186018101518583015201611a36565b81811115611a5f576000828501525b509190910192915050565b80516dffffffffffffffffffffffffffff81168114611a8857600080fd5b919050565b600080600060608486031215611aa257600080fd5b611aab84611a6a565b9250611ab960208501611a6a565b9150604084015163ffffffff81168114611ad257600080fd5b809150509250925092565b60008219821115611af057611af06119c7565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b2d57611b2d6119c7565b500290565b600082611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220822f210a7504114693c5861ca20fdc857719a6e6246b16c6612d519a3ad370fb64736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a00000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a000000000000000000000000072d111b4d6f31b38919ae39779f570b747d6acd9000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62

-----Decoded View---------------
Arg [0] : owner (address): 0x4bb4c1B0745ef7B4642fEECcd0740deC417ca0a0
Arg [1] : user (address): 0x4bb4c1B0745ef7B4642fEECcd0740deC417ca0a0
Arg [2] : factory (address): 0x72D111b4d6f31B38919ae39779f570b747d6Acd9
Arg [3] : _weth (address): 0xEE7D8BCFb72bC1880D0Cf19822eB0A2e6577aB62

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a0
Arg [1] : 0000000000000000000000004bb4c1b0745ef7b4642feeccd0740dec417ca0a0
Arg [2] : 00000000000000000000000072d111b4d6f31b38919ae39779f570b747d6acd9
Arg [3] : 000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.