ETH Price: $3,350.27 (+0.37%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Batch Buy With E...171393452023-04-27 18:38:11614 days ago1682620691IN
0xBa74741B...7067ff62A
0.015075 ETH0.0031349332.27096319
Batch Buy With E...171393422023-04-27 18:37:35614 days ago1682620655IN
0xBa74741B...7067ff62A
0.0155775 ETH0.0065071933.14739187
Batch Buy With E...170219862023-04-11 2:43:23631 days ago1681181003IN
0xBa74741B...7067ff62A
0.0350745 ETH0.0047796322.5747173
Batch Buy With E...170217182023-04-11 1:48:59631 days ago1681177739IN
0xBa74741B...7067ff62A
0.033165 ETH0.0042285819.96978608
Batch Buy With E...170201712023-04-10 20:34:35631 days ago1681158875IN
0xBa74741B...7067ff62A
0.06432 ETH0.0022329223.95713677
Batch Buy With E...170201702023-04-10 20:34:23631 days ago1681158863IN
0xBa74741B...7067ff62A
0.06432 ETH0.0047724524.72003767
Batch Buy With E...170049002023-04-08 16:37:59633 days ago1680971879IN
0xBa74741B...7067ff62A
0.008643 ETH0.0017029318.40175191
Batch Buy With E...170023902023-04-08 8:06:11633 days ago1680941171IN
0xBa74741B...7067ff62A
0.0087435 ETH0.0057286627.175067
Batch Buy With E...170013932023-04-08 4:40:23633 days ago1680928823IN
0xBa74741B...7067ff62A
0.0145725 ETH0.0046584320.30713942
Batch Buy With E...170012582023-04-08 4:13:23633 days ago1680927203IN
0xBa74741B...7067ff62A
0.006432 ETH0.0052707521.8202019
Batch Buy With E...170012512023-04-08 4:11:47633 days ago1680927107IN
0xBa74741B...7067ff62A
0.00402 ETH0.0048674822.14415713
Batch Buy With E...169981962023-04-07 17:50:11634 days ago1680889811IN
0xBa74741B...7067ff62A
0.851235 ETH0.0023711824.39993276
Batch Buy With E...169948812023-04-07 6:32:59634 days ago1680849179IN
0xBa74741B...7067ff62A
0.0201 ETH0.0040901220.45788776
Batch Buy With E...169924362023-04-06 22:15:35635 days ago1680819335IN
0xBa74741B...7067ff62A
0.0156579 ETH0.0064790824.17858217
Batch Buy With E...169873932023-04-06 4:53:35635 days ago1680756815IN
0xBa74741B...7067ff62A
0.01246099 ETH0.0064454225.05421733
Batch Buy With E...169857402023-04-05 23:16:11636 days ago1680736571IN
0xBa74741B...7067ff62A
0.011658 ETH0.0030209631.10548257
Batch Buy With E...169857252023-04-05 23:13:11636 days ago1680736391IN
0xBa74741B...7067ff62A
0.008442 ETH0.0028147530.4119763
Batch Buy With E...169856942023-04-05 23:06:59636 days ago1680736019IN
0xBa74741B...7067ff62A
0.008442 ETH0.002524327.27391327
Batch Buy With E...169856622023-04-05 23:00:23636 days ago1680735623IN
0xBa74741B...7067ff62A
0.00804 ETH0.0026270527.06633866
Batch Buy With E...169797112023-04-05 2:41:35637 days ago1680662495IN
0xBa74741B...7067ff62A
0.06231 ETH0.0040760244.08518296
Batch Buy With E...169794842023-04-05 1:55:23637 days ago1680659723IN
0xBa74741B...7067ff62A
0.05025 ETH0.0034151136.94650118
Batch Buy With E...169794822023-04-05 1:54:59637 days ago1680659699IN
0xBa74741B...7067ff62A
0.049245 ETH0.0034646637.48746416
Batch Buy With E...169790902023-04-05 0:35:47637 days ago1680654947IN
0xBa74741B...7067ff62A
0.05628 ETH0.0047780654.38209572
Batch Buy With E...169773902023-04-04 18:49:23637 days ago1680634163IN
0xBa74741B...7067ff62A
0.022311 ETH0.0068173973.74458888
Batch Buy With E...169749772023-04-04 10:35:35637 days ago1680604535IN
0xBa74741B...7067ff62A
0.01206 ETH0.0047012420.55530621
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
171393452023-04-27 18:38:11614 days ago1682620691
0xBa74741B...7067ff62A
0.015075 ETH
171393452023-04-27 18:38:11614 days ago1682620691
0xBa74741B...7067ff62A
0.015 ETH
171393422023-04-27 18:37:35614 days ago1682620655
0xBa74741B...7067ff62A
0.0155775 ETH
171393422023-04-27 18:37:35614 days ago1682620655
0xBa74741B...7067ff62A
0.0155 ETH
170219862023-04-11 2:43:23631 days ago1681181003
0xBa74741B...7067ff62A
0.0001745 ETH
170219862023-04-11 2:43:23631 days ago1681181003
0xBa74741B...7067ff62A
0.0349 ETH
170217182023-04-11 1:48:59631 days ago1681177739
0xBa74741B...7067ff62A
0.000165 ETH
170217182023-04-11 1:48:59631 days ago1681177739
0xBa74741B...7067ff62A
0.033 ETH
170201712023-04-10 20:34:35631 days ago1681158875
0xBa74741B...7067ff62A
0.06432 ETH
170201712023-04-10 20:34:35631 days ago1681158875
0xBa74741B...7067ff62A
0.064 ETH
170201702023-04-10 20:34:23631 days ago1681158863
0xBa74741B...7067ff62A
0.00032 ETH
170201702023-04-10 20:34:23631 days ago1681158863
0xBa74741B...7067ff62A
0.064 ETH
170049002023-04-08 16:37:59633 days ago1680971879
0xBa74741B...7067ff62A
0.008643 ETH
170049002023-04-08 16:37:59633 days ago1680971879
0xBa74741B...7067ff62A
0.0086 ETH
170023902023-04-08 8:06:11633 days ago1680941171
0xBa74741B...7067ff62A
0.0000435 ETH
170023902023-04-08 8:06:11633 days ago1680941171
0xBa74741B...7067ff62A
0.0087 ETH
170013932023-04-08 4:40:23633 days ago1680928823
0xBa74741B...7067ff62A
0.0000725 ETH
170013932023-04-08 4:40:23633 days ago1680928823
0xBa74741B...7067ff62A
0.0145 ETH
170012582023-04-08 4:13:23633 days ago1680927203
0xBa74741B...7067ff62A
0.000032 ETH
170012582023-04-08 4:13:23633 days ago1680927203
0xBa74741B...7067ff62A
0.0064 ETH
170012512023-04-08 4:11:47633 days ago1680927107
0xBa74741B...7067ff62A
0.00002 ETH
170012512023-04-08 4:11:47633 days ago1680927107
0xBa74741B...7067ff62A
0.004 ETH
169981962023-04-07 17:50:11634 days ago1680889811
0xBa74741B...7067ff62A
0.851235 ETH
169981962023-04-07 17:50:11634 days ago1680889811
0xBa74741B...7067ff62A
0.847 ETH
169948812023-04-07 6:32:59634 days ago1680849179
0xBa74741B...7067ff62A
0.0001 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TrackSwap

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : TrackSwap.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/ReentrancyGuard.sol";
import "./MarketRegistry.sol";
import "./SpecialTransferHelper.sol";
import "./libs/X2Y2Market.sol";
import "./interfaces/IExecutionStrategy.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

contract TrackSwap is SpecialTransferHelper, Ownable, ReentrancyGuard {

    // ERC721 interfaceID
    bytes4 public constant INTERFACE_ID_ERC721 = 0x80ac58cd;
    // ERC1155 interfaceID
    bytes4 public constant INTERFACE_ID_ERC1155 = 0xd9b67a26;

    struct ERC20Details {
        address[] tokenAddrs;
        uint256[] amounts;
    }

    struct ERC1155Details {
        address tokenAddr;
        uint256[] ids;
        uint256[] amounts;
    }

    struct ConverstionDetails {
        bytes conversionData;
    }

    address public constant GOV = 0xD92ed451d94983957957c97F54d3c685D84D316a;
    address public constant X2Y2_ERC721_DELEGATE = 0xF849de01B080aDC3A814FaBE1E2087475cF2E354;
    address public constant X2Y2_ERC1155_DELEGATE = 0x024aC22ACdB367a3ae52A3D94aC6649fdc1f0779;
    address public guardian;
    address public converter;
    address public punkProxy;
    bool public openForTrades;
    bool public openForFreeTrades;
    MarketRegistry public marketRegistry;

    modifier isOpenForTrades() {
        require(openForTrades, "trades not allowed");
        _;
    }

    modifier isOpenForFreeTrades() {
        require(openForFreeTrades, "free trades not allowed");
        _;
    }

    constructor(address _marketRegistry, address _guardian) {
        marketRegistry = MarketRegistry(_marketRegistry);
        guardian = _guardian;
        openForTrades = true;
        openForFreeTrades = true;
    }

    function setUp() external onlyOwner {
        // Create CryptoPunk Proxy
        IWrappedPunk(0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6).registerProxy();
        punkProxy = IWrappedPunk(0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6).proxyInfo(address(this));

        // approve wrapped mooncats rescue to Acclimated​MoonCats contract
        IERC721(0x7C40c393DC0f283F318791d746d894DdD3693572).setApprovalForAll(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69, true);
    }

    // modifies `src`
    function _arrayReplace(
        bytes memory src,
        bytes memory replacement,
        bytes memory mask
    ) internal view virtual {
        require(src.length == replacement.length);
        require(src.length == mask.length);

        for (uint256 i = 0; i < src.length; i++) {
            if (mask[i] != 0) {
                src[i] = replacement[i];
            }
        }
    }
    // @audit This function is used to approve specific tokens to specific market contracts with high volume.
    // This is done in very rare cases for the gas optimization purposes. 
    function setOneTimeApproval(IERC20 token, address operator, uint256 amount) external onlyOwner {
        token.approve(operator, amount);
    }

    function updateGuardian(address _guardian) external onlyOwner {
        guardian = _guardian;
    }

    function setOpenForTrades(bool _openForTrades) external onlyOwner {
        openForTrades = _openForTrades;
    }

    function setOpenForFreeTrades(bool _openForFreeTrades) external onlyOwner {
        openForFreeTrades = _openForFreeTrades;
    }

    // @audit we will setup a system that will monitor the contract for any leftover
    // assets. In case any asset is leftover, the system should be able to trigger this
    // function to close all the trades until the leftover assets are rescued.
    function closeAllTrades() external {
        require(_msgSender() == guardian);
        openForTrades = false;
        openForFreeTrades = false;
    }

    function setConverter(address _converter) external onlyOwner {
        converter = _converter;
    }

    function setMarketRegistry(MarketRegistry _marketRegistry) external onlyOwner {
        marketRegistry = _marketRegistry;
    }

    function _transferEth(address _to, uint256 _amount) internal {
        bool callStatus;
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            callStatus := call(gas(), _to, _amount, 0, 0, 0, 0)
        }
        require(callStatus, "_transferEth: Eth transfer failed");
    }

    function _checkCallResult(bool _success) internal pure {
        if (!_success) {
            // Copy revert reason from call
            assembly {
                returndatacopy(0, 0, returndatasize())
                revert(0, returndatasize())
            }
        }
    }

    function _transferFromHelper(
        ERC20Details memory erc20Details,
        SpecialTransferHelper.ERC721Details[] memory erc721Details,
        ERC1155Details[] memory erc1155Details
    ) internal {
        // transfer ERC20 tokens from the sender to this contract
        for (uint256 i = 0; i < erc20Details.tokenAddrs.length; i++) {
            erc20Details.tokenAddrs[i].call(abi.encodeWithSelector(0x23b872dd, msg.sender, address(this), erc20Details.amounts[i]));
        }

        // transfer ERC721 tokens from the sender to this contract
        for (uint256 i = 0; i < erc721Details.length; i++) {
            // accept CryptoPunks
            if (erc721Details[i].tokenAddr == 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB) {
                _acceptCryptoPunk(erc721Details[i]);
            }
            // accept Mooncat
            else if (erc721Details[i].tokenAddr == 0x60cd862c9C687A9dE49aecdC3A99b74A4fc54aB6) {
                _acceptMoonCat(erc721Details[i]);
            }
            // default
            else {
                for (uint256 j = 0; j < erc721Details[i].ids.length; j++) {
                    IERC721(erc721Details[i].tokenAddr).transferFrom(
                        _msgSender(),
                        address(this),
                        erc721Details[i].ids[j]
                    );
                }
            }
        }

        // transfer ERC1155 tokens from the sender to this contract
        for (uint256 i = 0; i < erc1155Details.length; i++) {
            IERC1155(erc1155Details[i].tokenAddr).safeBatchTransferFrom(
                _msgSender(),
                address(this),
                erc1155Details[i].ids,
                erc1155Details[i].amounts,
                ""
            );
        }
    }

    function _conversionHelper(
        ConverstionDetails[] memory _converstionDetails
    ) internal {
        for (uint256 i = 0; i < _converstionDetails.length; i++) {
            // convert to desired asset
            (bool success, ) = converter.delegatecall(_converstionDetails[i].conversionData);
            // check if the call passed successfully
            _checkCallResult(success);
        }
    }

    function _trade(
        MarketRegistry.TradeDetails[] memory _tradeDetails
    ) internal {
        uint256 totalValue = 0;
        for (uint256 i = 0; i < _tradeDetails.length; i++) {
            totalValue += _tradeDetails[i].value;
        }
        require(msg.value >= totalValue * 1005/1000, "Insuficient total funds!");
        uint256 fee = 0;

        for (uint256 i = 0; i < _tradeDetails.length; i++) {
            // get market details
            (address _proxy, bool _isLib, bool _isActive) = marketRegistry.markets(_tradeDetails[i].marketId);
            // market should be active
            require(_isActive, "_trade: InActive Market");
            // execute trade
            (bool success, ) = _isLib
                ? _proxy.delegatecall(_tradeDetails[i].tradeData)
                : _proxy.call{value:_tradeDetails[i].value}(_tradeDetails[i].tradeData);
            // check if the call passed successfully
            if(success)
            {
                fee += _tradeDetails[i].value * 5 / 1000;

                if(_tradeDetails[i].marketId == 2)
                {
                    // X2Y2
                    X2Y2Market.RunInput memory input = abi.decode(_tradeDetails[i].tradeData, (X2Y2Market.RunInput));
                    for(uint256 k=0; k < input.details.length; k ++)
                    {
                        X2Y2Market.SettleDetail memory detail = input.details[k];
                        X2Y2Market.Order memory order = input.orders[detail.orderIdx];
                        X2Y2Market.OrderItem memory item = order.items[detail.itemIdx];
                        bytes memory data = item.data;
                        {
                            if (order.dataMask.length > 0 && detail.dataReplacement.length > 0) {
                                _arrayReplace(data, detail.dataReplacement, order.dataMask);
                            }
                        }
                        if(address(detail.executionDelegate) == X2Y2_ERC721_DELEGATE)
                        {
                            X2Y2Market.ERC721Pair[] memory pairs = abi.decode(data, (X2Y2Market.ERC721Pair[]));
                            for (uint256 j = 0; j < pairs.length; j++) {
                                X2Y2Market.ERC721Pair memory p = pairs[j];
                                if(p.token.ownerOf(p.tokenId) == address(this))
                                    p.token.safeTransferFrom(address(this), msg.sender, p.tokenId);
                            }
                        }else if(address(detail.executionDelegate) == X2Y2_ERC1155_DELEGATE)
                        {
                            X2Y2Market.ERC1155Pair[] memory pairs = abi.decode(data, (X2Y2Market.ERC1155Pair[]));
                            for (uint256 j = 0; j < pairs.length; j++) {
                                X2Y2Market.ERC1155Pair memory p = pairs[j];
                                p.token.safeTransferFrom(address(this), msg.sender, p.tokenId, p.amount, "");
                            }
                        }
                    }
                }
                if(_tradeDetails[i].marketId == 3)
                {
                    (OrderTypes.TakerOrder memory takerBid, OrderTypes.MakerOrder memory makerAsk) = abi.decode(_tradeDetails[i].tradeData, (OrderTypes.TakerOrder, OrderTypes.MakerOrder));
                    // Retrieve execution parameters
                    (, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy).canExecuteTakerBid(takerBid, makerAsk);
                    if (IERC165(makerAsk.collection).supportsInterface(INTERFACE_ID_ERC721)) {
                        IERC721(makerAsk.collection).transferFrom(address(this), msg.sender, tokenId);
                    } else if (IERC165(makerAsk.collection).supportsInterface(INTERFACE_ID_ERC1155)) {
                        IERC1155(makerAsk.collection).safeTransferFrom(address(this), msg.sender, tokenId, amount, "");
                    }
                }
            }
        }
        if(fee > 0)
            payable(GOV).transfer(fee);
    }

    function _returnDust(address[] memory _tokens) internal {
        // return remaining ETH (if any)
        assembly {
            if gt(selfbalance(), 0) {
                let callStatus := call(
                    gas(),
                    caller(),
                    selfbalance(),
                    0,
                    0,
                    0,
                    0
                )
            }
        }
        // return remaining tokens (if any)
        for (uint256 i = 0; i < _tokens.length; i++) {
            if (IERC20(_tokens[i]).balanceOf(address(this)) > 0) {
                _tokens[i].call(abi.encodeWithSelector(0xa9059cbb, msg.sender, IERC20(_tokens[i]).balanceOf(address(this))));
            }
        }
    }

    function batchBuyWithETH(
        MarketRegistry.TradeDetails[] memory tradeDetails
    ) payable external nonReentrant {
        // execute trades
        _trade(tradeDetails);

        // return remaining ETH (if any)
        assembly {
            if gt(selfbalance(), 0) {
                let callStatus := call(
                    gas(),
                    caller(),
                    selfbalance(),
                    0,
                    0,
                    0,
                    0
                )
            }
        }
    }

    function batchBuyWithERC20s(
        ERC20Details memory erc20Details,
        MarketRegistry.TradeDetails[] memory tradeDetails,
        ConverstionDetails[] memory converstionDetails,
        address[] memory dustTokens
    ) payable external nonReentrant {
        // transfer ERC20 tokens from the sender to this contract
        for (uint256 i = 0; i < erc20Details.tokenAddrs.length; i++) {
            erc20Details.tokenAddrs[i].call(abi.encodeWithSelector(0x23b872dd, msg.sender, address(this), erc20Details.amounts[i]));
        }

        // Convert any assets if needed
        _conversionHelper(converstionDetails);

        // execute trades
        _trade(tradeDetails);

        // return dust tokens (if any)
        _returnDust(dustTokens);
    }

    // swaps any combination of ERC-20/721/1155
    // User needs to approve assets before invoking swap
    // WARNING: DO NOT SEND TOKENS TO THIS FUNCTION DIRECTLY!!!
    function multiAssetSwap(
        ERC20Details memory erc20Details,
        SpecialTransferHelper.ERC721Details[] memory erc721Details,
        ERC1155Details[] memory erc1155Details,
        ConverstionDetails[] memory converstionDetails,
        MarketRegistry.TradeDetails[] memory tradeDetails,
        address[] memory dustTokens
    ) payable external isOpenForTrades nonReentrant {
        // transfer all tokens
        _transferFromHelper(
            erc20Details,
            erc721Details,
            erc1155Details
        );

        // Convert any assets if needed
        _conversionHelper(converstionDetails);

        // execute trades
        _trade(tradeDetails);

        // return dust tokens (if any)
        _returnDust(dustTokens);
    }

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) public virtual returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) public virtual returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return 0x150b7a02;
    }

    // Used by ERC721BasicToken.sol
    function onERC721Received(
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return 0xf0b9e5ba;
    }

    function supportsInterface(bytes4 interfaceId)
        external
        virtual
        view
        returns (bool)
    {
        return interfaceId == this.supportsInterface.selector;
    }

    receive() external payable {}

    // Emergency function: In case any ETH get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueETH(address recipient) onlyOwner external {
        _transferEth(recipient, address(this).balance);
    }

    // Emergency function: In case any ERC20 tokens get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueERC20(address asset, address recipient) onlyOwner external { 
        (bool success, ) = asset.call(abi.encodeWithSelector(0xa9059cbb, recipient, IERC20(asset).balanceOf(address(this))));
        _checkCallResult(success);
    }

    // Emergency function: In case any ERC721 tokens get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueERC721(address asset, uint256[] calldata ids, address recipient) onlyOwner external {
        for (uint256 i = 0; i < ids.length; i++) {
            IERC721(asset).transferFrom(address(this), recipient, ids[i]);
        }
    }

    // Emergency function: In case any ERC1155 tokens get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueERC1155(address asset, uint256[] calldata ids, uint256[] calldata amounts, address recipient) onlyOwner external {
        for (uint256 i = 0; i < ids.length; i++) {
            IERC1155(asset).safeTransferFrom(address(this), recipient, ids[i], amounts[i], "");
        }
    }
}

File 2 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private reentrancyStatus = 1;

    modifier nonReentrant() {
        require(reentrancyStatus == 1, "REENTRANCY");

        reentrancyStatus = 2;

        _;

        reentrancyStatus = 1;
    }
}

File 3 of 17 : X2Y2Market.sol
// SPDX-License-Identifier: MIT 

pragma solidity >=0.8.0;
pragma abicoder v2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "../interfaces/IDelegate.sol";

library X2Y2Market {

    struct OrderItem {
        uint256 price;
        bytes data;
    }

    struct Order {
        uint256 salt;
        address user;
        uint256 network;
        uint256 intent;
        uint256 delegateType;
        uint256 deadline;
        IERC20  currency;
        bytes dataMask;
        OrderItem[] items;
        // signature
        bytes32 r;
        bytes32 s;
        uint8 v;
        uint8 signVersion;
    }

    struct Fee {
        uint256 percentage;
        address to;
    }

    struct ERC721Pair {
        IERC721 token;
        uint256 tokenId;
    }

    struct ERC1155Pair {
        IERC1155 token;
        uint256 tokenId;
        uint256 amount;
    }

    struct SettleDetail {
        X2Y2Market.Op op;
        uint256 orderIdx;
        uint256 itemIdx;
        uint256 price;
        bytes32 itemHash;
        IDelegate executionDelegate;
        bytes dataReplacement;
        uint256 bidIncentivePct;
        uint256 aucMinIncrementPct;
        uint256 aucIncDurationSecs;
        Fee[] fees;
    }

    struct SettleShared {
        uint256 salt;
        uint256 deadline;
        uint256 amountToEth;
        uint256 amountToWeth;
        address user;
        bool canFail;
    }

    struct RunInput {
        Order[] orders;
        SettleDetail[] details;
        SettleShared shared;
        // signature
        bytes32 r;
        bytes32 s;
        uint8 v;
    }

    struct OngoingAuction {
        uint256 price;
        uint256 netPrice;
        uint256 endAt;
        address bidder;
    }

    enum InvStatus {
        NEW,
        AUCTION,
        COMPLETE,
        CANCELLED,
        REFUNDED
    }

    enum Op {
        INVALID,
        // off-chain
        COMPLETE_SELL_OFFER,
        COMPLETE_BUY_OFFER,
        CANCEL_OFFER,
        // auction
        BID,
        COMPLETE_AUCTION,
        REFUND_AUCTION,
        REFUND_AUCTION_STUCK_ITEM
    }

    enum DelegationType {
        INVALID,
        ERC721,
        ERC1155
    }
}

File 4 of 17 : OrderTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title OrderTypes
 * @notice This library contains order types for the LooksRare exchange.
 */
library OrderTypes {
    // keccak256("MakerOrder(bool isOrderAsk,address signer,address collection,uint256 price,uint256 tokenId,uint256 amount,address strategy,address currency,uint256 nonce,uint256 startTime,uint256 endTime,uint256 minPercentageToAsk,bytes params)")
    bytes32 internal constant MAKER_ORDER_HASH = 0x40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a85028;

    struct MakerOrder {
        bool isOrderAsk; // true --> ask / false --> bid
        address signer; // signer of the maker order
        address collection; // collection address
        uint256 price; // price (used as )
        uint256 tokenId; // id of the token
        uint256 amount; // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155)
        address strategy; // strategy for trade execution (e.g., DutchAuction, StandardSaleForFixedPrice)
        address currency; // currency (e.g., WETH)
        uint256 nonce; // order nonce (must be unique unless new maker order is meant to override existing one e.g., lower ask price)
        uint256 startTime; // startTime in timestamp
        uint256 endTime; // endTime in timestamp
        uint256 minPercentageToAsk; // slippage protection (9000 --> 90% of the final price must return to ask)
        bytes params; // additional parameters
        uint8 v; // v: parameter (27 or 28)
        bytes32 r; // r: parameter
        bytes32 s; // s: parameter
    }

    struct TakerOrder {
        bool isOrderAsk; // true --> ask / false --> bid
        address taker; // msg.sender
        uint256 price; // final price for the purchase
        uint256 tokenId;
        uint256 minPercentageToAsk; // // slippage protection (9000 --> 90% of the final price must return to ask)
        bytes params; // other params (e.g., tokenId)
    }

    function hash(MakerOrder memory makerOrder) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    MAKER_ORDER_HASH,
                    makerOrder.isOrderAsk,
                    makerOrder.signer,
                    makerOrder.collection,
                    makerOrder.price,
                    makerOrder.tokenId,
                    makerOrder.amount,
                    makerOrder.strategy,
                    makerOrder.currency,
                    makerOrder.nonce,
                    makerOrder.startTime,
                    makerOrder.endTime,
                    makerOrder.minPercentageToAsk,
                    keccak256(makerOrder.params)
                )
            );
    }
}

File 5 of 17 : IWrappedPunk.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;

interface IWrappedPunk {
    /**
     * @dev Mints a wrapped punk
     */
    function mint(uint256 punkIndex) external;

    /**
     * @dev Burns a specific wrapped punk
     */
    function burn(uint256 punkIndex) external;
    
    /**
     * @dev Registers proxy
     */
    function registerProxy() external;

    /**
     * @dev Gets proxy address
     */
    function proxyInfo(address user) external view returns (address);
}

File 6 of 17 : IMoonCatsRescue.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;

interface IMoonCatsRescue {
    function acceptAdoptionOffer(bytes5 catId) payable external;
    function makeAdoptionOfferToAddress(bytes5 catId, uint price, address to) external;
    function giveCat(bytes5 catId, address to) external;
    function catOwners(bytes5 catId) external view returns(address);
    function rescueOrder(uint256 rescueIndex) external view returns(bytes5 catId);
}

File 7 of 17 : IExecutionStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {OrderTypes} from "../libs/OrderTypes.sol";

interface IExecutionStrategy {
    function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid)
        external
        view
        returns (
            bool,
            uint256,
            uint256
        );

    function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk)
        external
        view
        returns (
            bool,
            uint256,
            uint256
        );

    function viewProtocolFee() external view returns (uint256);
}

File 8 of 17 : IDelegate.sol
// SPDX-License-Identifier: MIT 

pragma solidity >=0.8.0;
pragma abicoder v2;

interface IDelegate {
    function delegateType() external view returns (uint256);

    function executeSell(
        address seller,
        address buyer,
        bytes calldata data
    ) external returns (bool);

    function executeBuy(
        address seller,
        address buyer,
        bytes calldata data
    ) external returns (bool);

    function executeBid(
        address seller,
        address previousBidder,
        address bidder,
        bytes calldata data
    ) external returns (bool);

    function executeAuctionComplete(
        address seller,
        address buyer,
        bytes calldata data
    ) external returns (bool);

    function executeAuctionRefund(
        address seller,
        address lastBidder,
        bytes calldata data
    ) external returns (bool);
}

File 9 of 17 : ICryptoPunks.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;

interface ICryptoPunks {
    function punkIndexToAddress(uint index) external view returns(address owner);
    function offerPunkForSaleToAddress(uint punkIndex, uint minSalePriceInWei, address toAddress) external;
    function buyPunk(uint punkIndex) external payable;
    function transferPunk(address to, uint punkIndex) external;
}

File 10 of 17 : SpecialTransferHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.13;

import "@openzeppelin/contracts/utils/Context.sol";
import "./interfaces/ICryptoPunks.sol";
import "./interfaces/IWrappedPunk.sol";
import "./interfaces/IMoonCatsRescue.sol";

contract SpecialTransferHelper is Context {

    struct ERC721Details {
        address tokenAddr;
        address[] to;
        uint256[] ids;
    }

    function _uintToBytes5(uint256 id)
        internal
        pure
        returns (bytes5 slicedDataBytes5)
    {
        bytes memory _bytes = new bytes(32);
        assembly {
            mstore(add(_bytes, 32), id)
        }

        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // The first word of the slice result is potentially a partial
            // word read from the original array. To read it, we calculate
            // the length of that partial word and start copying that many
            // bytes into the array. The first word we copy will start with
            // data we don't care about, but the last `lengthmod` bytes will
            // land at the beginning of the contents of the new array. When
            // we're done copying, we overwrite the full first word with
            // the actual length of the slice.
            let lengthmod := and(5, 31)

            // The multiplication in the next line is necessary
            // because when slicing multiples of 32 bytes (lengthmod == 0)
            // the following copy loop was copying the origin's length
            // and then ending prematurely not copying everything it should.
            let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
            let end := add(mc, 5)

            for {
                // The multiplication in the next line has the same exact purpose
                // as the one above.
                let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), 27)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            mstore(tempBytes, 5)

            //update free-memory pointer
            //allocating the array padded to 32 bytes like the compiler does now
            mstore(0x40, and(add(mc, 31), not(31)))
        }

        assembly {
            slicedDataBytes5 := mload(add(tempBytes, 32))
        }
    }


    function _acceptMoonCat(ERC721Details memory erc721Details) internal {
        for (uint256 i = 0; i < erc721Details.ids.length; i++) {
            bytes5 catId = _uintToBytes5(erc721Details.ids[i]);
            address owner = IMoonCatsRescue(erc721Details.tokenAddr).catOwners(catId);
            require(owner == _msgSender(), "_acceptMoonCat: invalid mooncat owner");
            IMoonCatsRescue(erc721Details.tokenAddr).acceptAdoptionOffer(catId);
        }
    }

    function _transferMoonCat(ERC721Details memory erc721Details) internal {
        for (uint256 i = 0; i < erc721Details.ids.length; i++) {
            IMoonCatsRescue(erc721Details.tokenAddr).giveCat(_uintToBytes5(erc721Details.ids[i]), erc721Details.to[i]);
        }
    }

    function _acceptCryptoPunk(ERC721Details memory erc721Details) internal {
        for (uint256 i = 0; i < erc721Details.ids.length; i++) {    
            address owner = ICryptoPunks(erc721Details.tokenAddr).punkIndexToAddress(erc721Details.ids[i]);
            require(owner == _msgSender(), "_acceptCryptoPunk: invalid punk owner");
            ICryptoPunks(erc721Details.tokenAddr).buyPunk(erc721Details.ids[i]);
        }
    }

    function _transferCryptoPunk(ERC721Details memory erc721Details) internal {
        for (uint256 i = 0; i < erc721Details.ids.length; i++) {
            ICryptoPunks(erc721Details.tokenAddr).transferPunk(erc721Details.to[i], erc721Details.ids[i]);
        }
    }
}

File 11 of 17 : MarketRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;


import "@openzeppelin/contracts/access/Ownable.sol";

contract MarketRegistry is Ownable {

    struct TradeDetails {
        uint256 marketId;
        uint256 value;
        bytes tradeData;
    }

    struct Market {
        address proxy;
        bool isLib;
        bool isActive;
    }

    Market[] public markets;

    constructor(address[] memory proxies, bool[] memory isLibs) {
        for (uint256 i = 0; i < proxies.length; i++) {
            markets.push(Market(proxies[i], isLibs[i], true));
        }
    }

    function addMarket(address proxy, bool isLib) external onlyOwner {
        markets.push(Market(proxy, isLib, true));
    }

    function setMarketStatus(uint256 marketId, bool newStatus) external onlyOwner {
        Market storage market = markets[marketId];
        market.isActive = newStatus;
    }

    function setMarketProxy(uint256 marketId, address newProxy, bool isLib) external onlyOwner {
        Market storage market = markets[marketId];
        market.proxy = newProxy;
        market.isLib = isLib;
    }
}

File 12 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 14 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 15 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 16 of 17 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 17 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_marketRegistry","type":"address"},{"internalType":"address","name":"_guardian","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"GOV","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTERFACE_ID_ERC1155","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTERFACE_ID_ERC721","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"X2Y2_ERC1155_DELEGATE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"X2Y2_ERC721_DELEGATE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC20Details","name":"erc20Details","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"conversionData","type":"bytes"}],"internalType":"struct TrackSwap.ConverstionDetails[]","name":"converstionDetails","type":"tuple[]"},{"internalType":"address[]","name":"dustTokens","type":"address[]"}],"name":"batchBuyWithERC20s","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"}],"name":"batchBuyWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"closeAllTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"converter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketRegistry","outputs":[{"internalType":"contract MarketRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC20Details","name":"erc20Details","type":"tuple"},{"components":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"internalType":"struct SpecialTransferHelper.ERC721Details[]","name":"erc721Details","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC1155Details[]","name":"erc1155Details","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"conversionData","type":"bytes"}],"internalType":"struct TrackSwap.ConverstionDetails[]","name":"converstionDetails","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"},{"internalType":"address[]","name":"dustTokens","type":"address[]"}],"name":"multiAssetSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openForFreeTrades","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openForTrades","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_converter","type":"address"}],"name":"setConverter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract MarketRegistry","name":"_marketRegistry","type":"address"}],"name":"setMarketRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setOneTimeApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openForFreeTrades","type":"bool"}],"name":"setOpenForFreeTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openForTrades","type":"bool"}],"name":"setOpenForTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_guardian","type":"address"}],"name":"updateGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600180553480156200001557600080fd5b5060405162004261380380620042618339810160408190526200003891620000f8565b62000043336200008b565b600580546001600160a01b03199081166001600160a01b039485161790915560028054909116919092161790556004805461ffff60a01b191661010160a01b17905562000130565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f357600080fd5b919050565b600080604083850312156200010c57600080fd5b6200011783620000db565b91506200012760208401620000db565b90509250929050565b61412180620001406000396000f3fe6080604052600436106101fd5760003560e01c80639f2ba09b1161010d578063cba64967116100a0578063ecb96fe61161006f578063ecb96fe6146105e3578063f0b9e5ba14610603578063f23a6e611461062e578063f2fde38b1461065b578063fc5253951461067b57600080fd5b8063cba6496714610568578063d85797041461057b578063ddb4dddc1461059b578063e6041f9a146105c357600080fd5b8063bc197c81116100dc578063bc197c81146104e9578063bc6bc0cd14610518578063bd38837b14610533578063c5cadd7f1461055357600080fd5b80639f2ba09b14610468578063a1b6279714610488578063b19337a4146104a9578063b7ce33a2146104c957600080fd5b806327ad5f9f116101905780636335f25e1161015f5780636335f25e146103e2578063715018a61461040257806383206e80146104175780638da5cb5b146104375780639a2b81151461045557600080fd5b806327ad5f9f1461035f57806333bf615614610387578063452a9320146103a25780635d799f87146103c257600080fd5b806311f85417116101cc57806311f8541714610299578063150b7a02146102ba578063180cb47f146102ff57806326e2dca21461033f57600080fd5b806301ffc9a71461020957806304824e701461024f57806309ba153d146102715780630a9254e41461028457600080fd5b3661020457005b600080fd5b34801561021557600080fd5b5061023a610224366004612612565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026f61026a366004612658565b61069b565b005b61026f61027f366004612b0b565b6106db565b34801561029057600080fd5b5061026f610822565b3480156102a557600080fd5b5060045461023a90600160a81b900460ff1681565b3480156102c657600080fd5b506102e66102d5366004612bff565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610246565b34801561030b57600080fd5b5061032773d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610246565b34801561034b57600080fd5b5061026f61035a366004612cb5565b6109c9565b34801561036b57600080fd5b5061032773024ac22acdb367a3ae52a3d94ac6649fdc1f077981565b34801561039357600080fd5b506102e6636cdb3d1360e11b81565b3480156103ae57600080fd5b50600254610327906001600160a01b031681565b3480156103ce57600080fd5b5061026f6103dd366004612d1c565b610a92565b3480156103ee57600080fd5b50600454610327906001600160a01b031681565b34801561040e57600080fd5b5061026f610bd9565b34801561042357600080fd5b5061026f610432366004612d63565b610c0f565b34801561044357600080fd5b506000546001600160a01b0316610327565b61026f610463366004612d80565b610c57565b34801561047457600080fd5b5061026f610483366004612dbc565b610ca0565b34801561049457600080fd5b5060045461023a90600160a01b900460ff1681565b3480156104b557600080fd5b5061026f6104c4366004612658565b610d3d565b3480156104d557600080fd5b5061026f6104e4366004612dfd565b610d89565b3480156104f557600080fd5b506102e6610504366004612e91565b63bc197c8160e01b98975050505050505050565b34801561052457600080fd5b506102e66380ac58cd60e01b81565b34801561053f57600080fd5b50600354610327906001600160a01b031681565b34801561055f57600080fd5b5061026f610e6e565b61026f610576366004613131565b610e9e565b34801561058757600080fd5b5061026f610596366004612658565b610f45565b3480156105a757600080fd5b5061032773f849de01b080adc3a814fabe1e2087475cf2e35481565b3480156105cf57600080fd5b5061026f6105de366004612d63565b610f91565b3480156105ef57600080fd5b50600554610327906001600160a01b031681565b34801561060f57600080fd5b506102e661061e366004613225565b63785cf2dd60e11b949350505050565b34801561063a57600080fd5b506102e6610649366004613280565b63f23a6e6160e01b9695505050505050565b34801561066757600080fd5b5061026f610676366004612658565b610fd9565b34801561068757600080fd5b5061026f610696366004612658565b611071565b6000546001600160a01b031633146106ce5760405162461bcd60e51b81526004016106c5906132fb565b60405180910390fd5b6106d881476110bd565b50565b6001546001146106fd5760405162461bcd60e51b81526004016106c590613330565b600260015560005b8451518110156107fc57845180518290811061072357610723613354565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061075157610751613354565b602002602001015160405160240161076b9392919061336a565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516107a491906133ba565b6000604051808303816000865af19150503d80600081146107e1576040519150601f19603f3d011682016040523d82523d6000602084013e6107e6565b606091505b50505080806107f4906133ec565b915050610705565b5061080682611122565b61080f836111cf565b61081881611b91565b5050600180555050565b6000546001600160a01b0316331461084c5760405162461bcd60e51b81526004016106c5906132fb565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109269190613415565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b1580156109af57600080fd5b505af11580156109c3573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109f35760405162461bcd60e51b81526004016106c5906132fb565b60005b82811015610a8b57846001600160a01b03166323b872dd3084878786818110610a2157610a21613354565b905060200201356040518463ffffffff1660e01b8152600401610a469392919061336a565b600060405180830381600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050508080610a83906133ec565b9150506109f6565b5050505050565b6000546001600160a01b03163314610abc5760405162461bcd60e51b81526004016106c5906132fb565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190613432565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610b8591906133ba565b6000604051808303816000865af19150503d8060008114610bc2576040519150601f19603f3d011682016040523d82523d6000602084013e610bc7565b606091505b50509050610bd481611d98565b505050565b6000546001600160a01b03163314610c035760405162461bcd60e51b81526004016106c5906132fb565b610c0d6000611da7565b565b6000546001600160a01b03163314610c395760405162461bcd60e51b81526004016106c5906132fb565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610c795760405162461bcd60e51b81526004016106c590613330565b6002600155610c87816111cf565b4715610c995760008060008047335af1505b5060018055565b6000546001600160a01b03163314610cca5760405162461bcd60e51b81526004016106c5906132fb565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190613456565b6000546001600160a01b03163314610d675760405162461bcd60e51b81526004016106c5906132fb565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610db35760405162461bcd60e51b81526004016106c5906132fb565b60005b84811015610e6557866001600160a01b031663f242432a3084898986818110610de157610de1613354565b90506020020135888887818110610dfa57610dfa613354565b905060200201356040518563ffffffff1660e01b8152600401610e209493929190613473565b600060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050508080610e5d906133ec565b915050610db6565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610e8e57600080fd5b6004805461ffff60a01b19169055565b600454600160a01b900460ff16610eec5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b60448201526064016106c5565b600154600114610f0e5760405162461bcd60e51b81526004016106c590613330565b6002600155610f1e868686611df7565b610f2783611122565b610f30826111cf565b610f3981611b91565b50506001805550505050565b6000546001600160a01b03163314610f6f5760405162461bcd60e51b81526004016106c5906132fb565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fbb5760405162461bcd60e51b81526004016106c5906132fb565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146110035760405162461bcd60e51b81526004016106c5906132fb565b6001600160a01b0381166110685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c5565b6106d881611da7565b6000546001600160a01b0316331461109b5760405162461bcd60e51b81526004016106c5906132fb565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610bd45760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b60648201526084016106c5565b60005b81518110156111cb5760035482516000916001600160a01b03169084908490811061115257611152613354565b60200260200101516000015160405161116b91906133ba565b600060405180830381855af49150503d80600081146111a6576040519150601f19603f3d011682016040523d82523d6000602084013e6111ab565b606091505b505090506111b881611d98565b50806111c3816133ec565b915050611125565b5050565b6000805b8251811015611219578281815181106111ee576111ee613354565b6020026020010151602001518261120591906134ab565b915080611211816133ec565b9150506111d3565b506103e8611229826103ed6134c3565b61123391906134e2565b3410156112825760405162461bcd60e51b815260206004820152601860248201527f496e737566696369656e7420746f74616c2066756e647321000000000000000060448201526064016106c5565b6000805b8351811015611b49576005548451600091829182916001600160a01b03169063b1283e77908990879081106112bd576112bd613354565b6020026020010151600001516040518263ffffffff1660e01b81526004016112e791815260200190565b606060405180830381865afa158015611304573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113289190613504565b9250925092508061137b5760405162461bcd60e51b815260206004820152601760248201527f5f74726164653a20496e416374697665204d61726b657400000000000000000060448201526064016106c5565b60008261141d57836001600160a01b031688868151811061139e5761139e613354565b6020026020010151602001518987815181106113bc576113bc613354565b6020026020010151604001516040516113d591906133ba565b60006040518083038185875af1925050503d8060008114611412576040519150601f19603f3d011682016040523d82523d6000602084013e611417565b606091505b50611494565b836001600160a01b031688868151811061143957611439613354565b60200260200101516040015160405161145291906133ba565b600060405180830381855af49150503d806000811461148d576040519150601f19603f3d011682016040523d82523d6000602084013e611492565b606091505b505b5090508015611b32576103e88886815181106114b2576114b2613354565b60200260200101516020015160056114ca91906134c3565b6114d491906134e2565b6114de90876134ab565b95508785815181106114f2576114f2613354565b60200260200101516000015160020361188d57600088868151811061151957611519613354565b6020026020010151604001518060200190518101906115389190613a3e565b905060005b81602001515181101561188a5760008260200151828151811061156257611562613354565b602002602001015190506000836000015182602001518151811061158857611588613354565b6020026020010151905060008161010001518360400151815181106115af576115af613354565b6020026020010151905060008160200151905060008360e00151511180156115dc575060008460c0015151115b156115f4576115f4818560c001518560e001516121c7565b73f849de01b080adc3a814fabe1e2087475cf2e3546001600160a01b03168460a001516001600160a01b0316036117795760008180602001905181019061163b9190613b09565b905060005b815181101561177257600082828151811061165d5761165d613354565b60200260200101519050306001600160a01b031681600001516001600160a01b0316636352211e83602001516040518263ffffffff1660e01b81526004016116a791815260200190565b602060405180830381865afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e89190613415565b6001600160a01b03160361175f5780516020820151604051632142170760e11b81526001600160a01b03909216916342842e0e9161172c913091339160040161336a565b600060405180830381600087803b15801561174657600080fd5b505af115801561175a573d6000803e3d6000fd5b505050505b508061176a816133ec565b915050611640565b5050611873565b73024ac22acdb367a3ae52a3d94ac6649fdc1f07796001600160a01b03168460a001516001600160a01b031603611873576000818060200190518101906117c09190613bc7565b905060005b81518110156118705760008282815181106117e2576117e2613354565b6020026020010151905080600001516001600160a01b031663f242432a3033846020015185604001516040518563ffffffff1660e01b815260040161182a9493929190613473565b600060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b50505050508080611868906133ec565b9150506117c5565b50505b505050508080611882906133ec565b91505061153d565b50505b87858151811061189f5761189f613354565b602002602001015160000151600303611b32576000808987815181106118c7576118c7613354565b6020026020010151604001518060200190518101906118e69190613da0565b915091506000808260c001516001600160a01b031663865781ca85856040518363ffffffff1660e01b815260040161191f929190613ea4565b606060405180830381865afa15801561193c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611960919061401e565b60408681015190516301ffc9a760e01b81526380ac58cd60e01b60048201529295509093506001600160a01b031691506301ffc9a790602401602060405180830381865afa1580156119b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119da9190613456565b15611a4a5782604001516001600160a01b03166323b872dd3033856040518463ffffffff1660e01b8152600401611a139392919061336a565b600060405180830381600087803b158015611a2d57600080fd5b505af1158015611a41573d6000803e3d6000fd5b50505050611b2d565b60408381015190516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b03909116906301ffc9a790602401602060405180830381865afa158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190613456565b15611b2d5782604001516001600160a01b031663f242432a303385856040518563ffffffff1660e01b8152600401611afa9493929190613473565b600060405180830381600087803b158015611b1457600080fd5b505af1158015611b28573d6000803e3d6000fd5b505050505b505050505b505050508080611b41906133ec565b915050611286565b508015610bd45760405173d92ed451d94983957957c97f54d3c685d84d316a9082156108fc029083906000818181858888f193505050501580156109c3573d6000803e3d6000fd5b4715611ba35760008060008047335af1505b60005b81518110156111cb576000828281518110611bc357611bc3613354565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c379190613432565b1115611d8657818181518110611c4f57611c4f613354565b60200260200101516001600160a01b031663a9059cbb33848481518110611c7857611c78613354565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cec9190613432565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611d4091906133ba565b6000604051808303816000865af19150503d8060008114611d7d576040519150601f19603f3d011682016040523d82523d6000602084013e611d82565b606091505b5050505b80611d90816133ec565b915050611ba6565b806106d8573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611ef1578351805182908110611e1857611e18613354565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611e4657611e46613354565b6020026020010151604051602401611e609392919061336a565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611e9991906133ba565b6000604051808303816000865af19150503d8060008114611ed6576040519150601f19603f3d011682016040523d82523d6000602084013e611edb565b606091505b5050508080611ee9906133ec565b915050611dfa565b5060005b82518110156120e657828181518110611f1057611f10613354565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611f6f57611f6a838281518110611f5d57611f5d613354565b602002602001015161226e565b6120d4565b828181518110611f8157611f81613354565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611fdb57611f6a838281518110611fce57611fce613354565b602002602001015161240d565b60005b838281518110611ff057611ff0613354565b602002602001015160400151518110156120d25783828151811061201657612016613354565b6020026020010151600001516001600160a01b03166323b872dd6120373390565b3087868151811061204a5761204a613354565b602002602001015160400151858151811061206757612067613354565b60200260200101516040518463ffffffff1660e01b815260040161208d9392919061336a565b600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b5050505080806120ca906133ec565b915050611fde565b505b806120de816133ec565b915050611ef5565b5060005b81518110156109c35781818151811061210557612105613354565b6020026020010151600001516001600160a01b0316632eb2c2d66121263390565b3085858151811061213957612139613354565b60200260200101516020015186868151811061215757612157613354565b6020026020010151604001516040518563ffffffff1660e01b81526004016121829493929190614090565b600060405180830381600087803b15801561219c57600080fd5b505af11580156121b0573d6000803e3d6000fd5b5050505080806121bf906133ec565b9150506120ea565b81518351146121d557600080fd5b80518351146121e357600080fd5b60005b83518110156109c35781818151811061220157612201613354565b01602001516001600160f81b0319161561225c5782818151811061222757612227613354565b602001015160f81c60f81b84828151811061224457612244613354565b60200101906001600160f81b031916908160001a9053505b80612266816133ec565b9150506121e6565b60005b8160400151518110156111cb57600082600001516001600160a01b03166358178168846040015184815181106122a9576122a9613354565b60200260200101516040518263ffffffff1660e01b81526004016122cf91815260200190565b602060405180830381865afa1580156122ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123109190613415565b90506001600160a01b03811633146123785760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b60648201526084016106c5565b82600001516001600160a01b0316638264fe98846040015184815181106123a1576123a1613354565b60200260200101516040518263ffffffff1660e01b81526004016123c791815260200190565b600060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b50505050508080612405906133ec565b915050612271565b60005b8160400151518110156111cb5760006124458360400151838151811061243857612438613354565b60200260200101516125a3565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561249c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c09190613415565b90506001600160a01b03811633146125285760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b60648201526084016106c5565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561257657600080fd5b505af115801561258a573d6000803e3d6000fd5b505050505050808061259b906133ec565b915050612410565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156125f65780518352602092830192016125de565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561262457600080fd5b81356001600160e01b03198116811461263c57600080fd5b9392505050565b6001600160a01b03811681146106d857600080fd5b60006020828403121561266a57600080fd5b813561263c81612643565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156126ad576126ad612675565b60405290565b604051606081016001600160401b03811182821017156126ad576126ad612675565b604051602081016001600160401b03811182821017156126ad576126ad612675565b6040516101a081016001600160401b03811182821017156126ad576126ad612675565b60405161016081016001600160401b03811182821017156126ad576126ad612675565b60405160c081016001600160401b03811182821017156126ad576126ad612675565b60405161020081016001600160401b03811182821017156126ad576126ad612675565b604051601f8201601f191681016001600160401b03811182821017156127aa576127aa612675565b604052919050565b60006001600160401b038211156127cb576127cb612675565b5060051b60200190565b600082601f8301126127e657600080fd5b813560206127fb6127f6836127b2565b612782565b82815260059290921b8401810191818101908684111561281a57600080fd5b8286015b8481101561283e57803561283181612643565b835291830191830161281e565b509695505050505050565b600082601f83011261285a57600080fd5b8135602061286a6127f6836127b2565b82815260059290921b8401810191818101908684111561288957600080fd5b8286015b8481101561283e578035835291830191830161288d565b6000604082840312156128b657600080fd5b6128be61268b565b905081356001600160401b03808211156128d757600080fd5b6128e3858386016127d5565b835260208401359150808211156128f957600080fd5b5061290684828501612849565b60208301525092915050565b60006001600160401b0382111561292b5761292b612675565b50601f01601f191660200190565b600082601f83011261294a57600080fd5b81356129586127f682612912565b81815284602083860101111561296d57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261299b57600080fd5b813560206129ab6127f6836127b2565b82815260059290921b840181019181810190868411156129ca57600080fd5b8286015b8481101561283e5780356001600160401b03808211156129ee5760008081fd5b908801906060828b03601f1901811315612a085760008081fd5b612a106126b3565b838801358152604080850135828a0152918401359183831115612a335760008081fd5b612a418d8a85880101612939565b9082015286525050509183019183016129ce565b600082601f830112612a6657600080fd5b81356020612a766127f6836127b2565b82815260059290921b84018101918181019086841115612a9557600080fd5b8286015b8481101561283e5780356001600160401b0380821115612ab95760008081fd5b90880190818a03601f1901861315612ad15760008081fd5b612ad96126d5565b8683013582811115612aeb5760008081fd5b612af98c8983870101612939565b82525085525050918301918301612a99565b60008060008060808587031215612b2157600080fd5b84356001600160401b0380821115612b3857600080fd5b612b44888389016128a4565b95506020870135915080821115612b5a57600080fd5b612b668883890161298a565b94506040870135915080821115612b7c57600080fd5b612b8888838901612a55565b93506060870135915080821115612b9e57600080fd5b50612bab878288016127d5565b91505092959194509250565b60008083601f840112612bc957600080fd5b5081356001600160401b03811115612be057600080fd5b602083019150836020828501011115612bf857600080fd5b9250929050565b600080600080600060808688031215612c1757600080fd5b8535612c2281612643565b94506020860135612c3281612643565b93506040860135925060608601356001600160401b03811115612c5457600080fd5b612c6088828901612bb7565b969995985093965092949392505050565b60008083601f840112612c8357600080fd5b5081356001600160401b03811115612c9a57600080fd5b6020830191508360208260051b8501011115612bf857600080fd5b60008060008060608587031215612ccb57600080fd5b8435612cd681612643565b935060208501356001600160401b03811115612cf157600080fd5b612cfd87828801612c71565b9094509250506040850135612d1181612643565b939692955090935050565b60008060408385031215612d2f57600080fd5b8235612d3a81612643565b91506020830135612d4a81612643565b809150509250929050565b80151581146106d857600080fd5b600060208284031215612d7557600080fd5b813561263c81612d55565b600060208284031215612d9257600080fd5b81356001600160401b03811115612da857600080fd5b612db48482850161298a565b949350505050565b600080600060608486031215612dd157600080fd5b8335612ddc81612643565b92506020840135612dec81612643565b929592945050506040919091013590565b60008060008060008060808789031215612e1657600080fd5b8635612e2181612643565b955060208701356001600160401b0380821115612e3d57600080fd5b612e498a838b01612c71565b90975095506040890135915080821115612e6257600080fd5b50612e6f89828a01612c71565b9094509250506060870135612e8381612643565b809150509295509295509295565b60008060008060008060008060a0898b031215612ead57600080fd5b8835612eb881612643565b97506020890135612ec881612643565b965060408901356001600160401b0380821115612ee457600080fd5b612ef08c838d01612c71565b909850965060608b0135915080821115612f0957600080fd5b612f158c838d01612c71565b909650945060808b0135915080821115612f2e57600080fd5b50612f3b8b828c01612bb7565b999c989b5096995094979396929594505050565b600082601f830112612f6057600080fd5b81356020612f706127f6836127b2565b82815260059290921b84018101918181019086841115612f8f57600080fd5b8286015b8481101561283e5780356001600160401b0380821115612fb35760008081fd5b908801906060828b03601f1901811315612fcd5760008081fd5b612fd56126b3565b87840135612fe281612643565b815260408481013584811115612ff85760008081fd5b6130068e8b838901016127d5565b838b01525091840135918383111561301e5760008081fd5b61302c8d8a85880101612849565b908201528652505050918301918301612f93565b600082601f83011261305157600080fd5b813560206130616127f6836127b2565b82815260059290921b8401810191818101908684111561308057600080fd5b8286015b8481101561283e5780356001600160401b03808211156130a45760008081fd5b908801906060828b03601f19018113156130be5760008081fd5b6130c66126b3565b878401356130d381612643565b8152604084810135848111156130e95760008081fd5b6130f78e8b83890101612849565b838b01525091840135918383111561310f5760008081fd5b61311d8d8a85880101612849565b908201528652505050918301918301613084565b60008060008060008060c0878903121561314a57600080fd5b86356001600160401b038082111561316157600080fd5b61316d8a838b016128a4565b9750602089013591508082111561318357600080fd5b61318f8a838b01612f4f565b965060408901359150808211156131a557600080fd5b6131b18a838b01613040565b955060608901359150808211156131c757600080fd5b6131d38a838b01612a55565b945060808901359150808211156131e957600080fd5b6131f58a838b0161298a565b935060a089013591508082111561320b57600080fd5b5061321889828a016127d5565b9150509295509295509295565b6000806000806060858703121561323b57600080fd5b843561324681612643565b93506020850135925060408501356001600160401b0381111561326857600080fd5b61327487828801612bb7565b95989497509550505050565b60008060008060008060a0878903121561329957600080fd5b86356132a481612643565b955060208701356132b481612643565b9450604087013593506060870135925060808701356001600160401b038111156132dd57600080fd5b6132e989828a01612bb7565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133a9578181015183820152602001613391565b838111156109c35750506000910152565b600082516133cc81846020870161338e565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016133fe576133fe6133d6565b5060010190565b805161341081612643565b919050565b60006020828403121561342757600080fd5b815161263c81612643565b60006020828403121561344457600080fd5b5051919050565b805161341081612d55565b60006020828403121561346857600080fd5b815161263c81612d55565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600082198211156134be576134be6133d6565b500190565b60008160001904831182151516156134dd576134dd6133d6565b500290565b6000826134ff57634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561351957600080fd5b835161352481612643565b602085015190935061353581612d55565b604085015190925061354681612d55565b809150509250925092565b600082601f83011261356257600080fd5b81516135706127f682612912565b81815284602083860101111561358557600080fd5b612db482602083016020870161338e565b600082601f8301126135a757600080fd5b815160206135b76127f6836127b2565b82815260059290921b840181019181810190868411156135d657600080fd5b8286015b8481101561283e5780516001600160401b03808211156135fa5760008081fd5b908801906040828b03601f19018113156136145760008081fd5b61361c61268b565b8388015181529083015190828211156136355760008081fd5b6136438c8984870101613551565b8189015286525050509183019183016135da565b805160ff8116811461341057600080fd5b600082601f83011261367957600080fd5b815160206136896127f6836127b2565b82815260059290921b840181019181810190868411156136a857600080fd5b8286015b8481101561283e5780516001600160401b03808211156136cc5760008081fd5b908801906101a0828b03601f19018113156136e75760008081fd5b6136ef6126f7565b8784015181526040613702818601613405565b89830152606080860151828401526080915081860151818401525060a0808601518284015260c0915081860151818401525060e0613741818701613405565b828401526101009150818601518581111561375c5760008081fd5b61376a8f8c838a0101613551565b82850152505061012080860151858111156137855760008081fd5b6137938f8c838a0101613596565b8385015250610140945084860151818401525050610160808501518483015261018093506137c2848601613657565b908201526137d1848301613657565b92810192909252508452509183019183016136ac565b80516008811061341057600080fd5b600082601f83011261380757600080fd5b815160206138176127f6836127b2565b82815260069290921b8401810191818101908684111561383657600080fd5b8286015b8481101561283e57604081890312156138535760008081fd5b61385b61268b565b815181528482015161386c81612643565b8186015283529183019160400161383a565b600082601f83011261388f57600080fd5b8151602061389f6127f6836127b2565b82815260059290921b840181019181810190868411156138be57600080fd5b8286015b8481101561283e5780516001600160401b03808211156138e25760008081fd5b90880190610160828b03601f19018113156138fd5760008081fd5b61390561271a565b6139108885016137e7565b815260408085015189830152606080860151828401526080915081860151818401525060a0808601518284015260c0915061394c828701613405565b9083015260e085810151858111156139645760008081fd5b6139728f8c838a0101613551565b8385015250610100915081860151818401525061012080860151828401526101409150818601518184015250828501519250838311156139b25760008081fd5b6139c08d8a858801016137f6565b9082015286525050509183019183016138c2565b600060c082840312156139e657600080fd5b6139ee61273d565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151613a2081612643565b608082015260a0820151613a3381612d55565b60a082015292915050565b600060208284031215613a5057600080fd5b81516001600160401b0380821115613a6757600080fd5b908301906101608286031215613a7c57600080fd5b613a8461273d565b825182811115613a9357600080fd5b613a9f87828601613668565b825250602083015182811115613ab457600080fd5b613ac08782860161387e565b602083015250613ad386604085016139d4565b604082015261010083015160608201526101208301516080820152613afb6101408401613657565b60a082015295945050505050565b60006020808385031215613b1c57600080fd5b82516001600160401b03811115613b3257600080fd5b8301601f81018513613b4357600080fd5b8051613b516127f6826127b2565b81815260069190911b82018301908381019087831115613b7057600080fd5b928401925b82841015613bbc5760408489031215613b8e5760008081fd5b613b9661268b565b8451613ba181612643565b81528486015186820152825260409093019290840190613b75565b979650505050505050565b60006020808385031215613bda57600080fd5b82516001600160401b03811115613bf057600080fd5b8301601f81018513613c0157600080fd5b8051613c0f6127f6826127b2565b81815260609182028301840191848201919088841115613c2e57600080fd5b938501935b83851015613c815780858a031215613c4b5760008081fd5b613c536126b3565b8551613c5e81612643565b815285870151878201526040808701519082015283529384019391850191613c33565b50979650505050505050565b60006102008284031215613ca057600080fd5b613ca861275f565b9050613cb38261344b565b8152613cc160208301613405565b6020820152613cd260408301613405565b6040820152606082015160608201526080820151608082015260a082015160a0820152613d0160c08301613405565b60c0820152613d1260e08301613405565b60e08201526101008281015190820152610120808301519082015261014080830151908201526101608083015190820152610180808301516001600160401b03811115613d5e57600080fd5b613d6a85828601613551565b8284015250506101a0613d7e818401613657565b908201526101c082810151908201526101e09182015191810191909152919050565b60008060408385031215613db357600080fd5b82516001600160401b0380821115613dca57600080fd5b9084019060c08287031215613dde57600080fd5b613de661273d565b8251613df181612d55565b81526020830151613e0181612643565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015182811115613e3857600080fd5b613e4488828601613551565b60a0830152506020860151909450915080821115613e6157600080fd5b50613e6e85828601613c8d565b9150509250929050565b60008151808452613e9081602086016020860161338e565b601f01601f19169290920160200192915050565b60408152600061010084511515604084015260018060a01b03602086015116606084015260408501516080840152606085015160a0840152608085015160c084015260a085015160c060e0850152613efe82850182613e78565b848103602086015285511515815290506102006020860151613f2b60208401826001600160a01b03169052565b506040860151613f4660408401826001600160a01b03169052565b50606086015160608301526080860151608083015260a086015160a083015260c0860151613f7f60c08401826001600160a01b03169052565b5060e0860151613f9a60e08401826001600160a01b03169052565b50858301519282019290925261012080860151908201526101408086015190820152610160808601519082015261018080860151818301849052909290613fe382840182613e78565b935050506101a080860151613ffc8284018260ff169052565b50506101c085810151908201526101e094850151940193909352509092915050565b60008060006060848603121561403357600080fd5b835161403e81612d55565b602085015160409095015190969495509392505050565b600081518084526020808501945080840160005b8381101561408557815187529582019590820190600101614069565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906140bc90830185614055565b82810360608401526140ce8185614055565b83810360809094019390935250506000815260200194935050505056fea26469706673582212205aeaef58e6abd4d47eaf64ec337514c341fe3086fe5df10357d7a7d92b63cae864736f6c634300080d00330000000000000000000000005a20c3886900eddad911522aedd60a9d87f1ece7000000000000000000000000d92ed451d94983957957c97f54d3c685d84d316a

Deployed Bytecode

0x6080604052600436106101fd5760003560e01c80639f2ba09b1161010d578063cba64967116100a0578063ecb96fe61161006f578063ecb96fe6146105e3578063f0b9e5ba14610603578063f23a6e611461062e578063f2fde38b1461065b578063fc5253951461067b57600080fd5b8063cba6496714610568578063d85797041461057b578063ddb4dddc1461059b578063e6041f9a146105c357600080fd5b8063bc197c81116100dc578063bc197c81146104e9578063bc6bc0cd14610518578063bd38837b14610533578063c5cadd7f1461055357600080fd5b80639f2ba09b14610468578063a1b6279714610488578063b19337a4146104a9578063b7ce33a2146104c957600080fd5b806327ad5f9f116101905780636335f25e1161015f5780636335f25e146103e2578063715018a61461040257806383206e80146104175780638da5cb5b146104375780639a2b81151461045557600080fd5b806327ad5f9f1461035f57806333bf615614610387578063452a9320146103a25780635d799f87146103c257600080fd5b806311f85417116101cc57806311f8541714610299578063150b7a02146102ba578063180cb47f146102ff57806326e2dca21461033f57600080fd5b806301ffc9a71461020957806304824e701461024f57806309ba153d146102715780630a9254e41461028457600080fd5b3661020457005b600080fd5b34801561021557600080fd5b5061023a610224366004612612565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026f61026a366004612658565b61069b565b005b61026f61027f366004612b0b565b6106db565b34801561029057600080fd5b5061026f610822565b3480156102a557600080fd5b5060045461023a90600160a81b900460ff1681565b3480156102c657600080fd5b506102e66102d5366004612bff565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610246565b34801561030b57600080fd5b5061032773d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610246565b34801561034b57600080fd5b5061026f61035a366004612cb5565b6109c9565b34801561036b57600080fd5b5061032773024ac22acdb367a3ae52a3d94ac6649fdc1f077981565b34801561039357600080fd5b506102e6636cdb3d1360e11b81565b3480156103ae57600080fd5b50600254610327906001600160a01b031681565b3480156103ce57600080fd5b5061026f6103dd366004612d1c565b610a92565b3480156103ee57600080fd5b50600454610327906001600160a01b031681565b34801561040e57600080fd5b5061026f610bd9565b34801561042357600080fd5b5061026f610432366004612d63565b610c0f565b34801561044357600080fd5b506000546001600160a01b0316610327565b61026f610463366004612d80565b610c57565b34801561047457600080fd5b5061026f610483366004612dbc565b610ca0565b34801561049457600080fd5b5060045461023a90600160a01b900460ff1681565b3480156104b557600080fd5b5061026f6104c4366004612658565b610d3d565b3480156104d557600080fd5b5061026f6104e4366004612dfd565b610d89565b3480156104f557600080fd5b506102e6610504366004612e91565b63bc197c8160e01b98975050505050505050565b34801561052457600080fd5b506102e66380ac58cd60e01b81565b34801561053f57600080fd5b50600354610327906001600160a01b031681565b34801561055f57600080fd5b5061026f610e6e565b61026f610576366004613131565b610e9e565b34801561058757600080fd5b5061026f610596366004612658565b610f45565b3480156105a757600080fd5b5061032773f849de01b080adc3a814fabe1e2087475cf2e35481565b3480156105cf57600080fd5b5061026f6105de366004612d63565b610f91565b3480156105ef57600080fd5b50600554610327906001600160a01b031681565b34801561060f57600080fd5b506102e661061e366004613225565b63785cf2dd60e11b949350505050565b34801561063a57600080fd5b506102e6610649366004613280565b63f23a6e6160e01b9695505050505050565b34801561066757600080fd5b5061026f610676366004612658565b610fd9565b34801561068757600080fd5b5061026f610696366004612658565b611071565b6000546001600160a01b031633146106ce5760405162461bcd60e51b81526004016106c5906132fb565b60405180910390fd5b6106d881476110bd565b50565b6001546001146106fd5760405162461bcd60e51b81526004016106c590613330565b600260015560005b8451518110156107fc57845180518290811061072357610723613354565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061075157610751613354565b602002602001015160405160240161076b9392919061336a565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516107a491906133ba565b6000604051808303816000865af19150503d80600081146107e1576040519150601f19603f3d011682016040523d82523d6000602084013e6107e6565b606091505b50505080806107f4906133ec565b915050610705565b5061080682611122565b61080f836111cf565b61081881611b91565b5050600180555050565b6000546001600160a01b0316331461084c5760405162461bcd60e51b81526004016106c5906132fb565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109269190613415565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b1580156109af57600080fd5b505af11580156109c3573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109f35760405162461bcd60e51b81526004016106c5906132fb565b60005b82811015610a8b57846001600160a01b03166323b872dd3084878786818110610a2157610a21613354565b905060200201356040518463ffffffff1660e01b8152600401610a469392919061336a565b600060405180830381600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050508080610a83906133ec565b9150506109f6565b5050505050565b6000546001600160a01b03163314610abc5760405162461bcd60e51b81526004016106c5906132fb565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190613432565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610b8591906133ba565b6000604051808303816000865af19150503d8060008114610bc2576040519150601f19603f3d011682016040523d82523d6000602084013e610bc7565b606091505b50509050610bd481611d98565b505050565b6000546001600160a01b03163314610c035760405162461bcd60e51b81526004016106c5906132fb565b610c0d6000611da7565b565b6000546001600160a01b03163314610c395760405162461bcd60e51b81526004016106c5906132fb565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610c795760405162461bcd60e51b81526004016106c590613330565b6002600155610c87816111cf565b4715610c995760008060008047335af1505b5060018055565b6000546001600160a01b03163314610cca5760405162461bcd60e51b81526004016106c5906132fb565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190613456565b6000546001600160a01b03163314610d675760405162461bcd60e51b81526004016106c5906132fb565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610db35760405162461bcd60e51b81526004016106c5906132fb565b60005b84811015610e6557866001600160a01b031663f242432a3084898986818110610de157610de1613354565b90506020020135888887818110610dfa57610dfa613354565b905060200201356040518563ffffffff1660e01b8152600401610e209493929190613473565b600060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050508080610e5d906133ec565b915050610db6565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610e8e57600080fd5b6004805461ffff60a01b19169055565b600454600160a01b900460ff16610eec5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b60448201526064016106c5565b600154600114610f0e5760405162461bcd60e51b81526004016106c590613330565b6002600155610f1e868686611df7565b610f2783611122565b610f30826111cf565b610f3981611b91565b50506001805550505050565b6000546001600160a01b03163314610f6f5760405162461bcd60e51b81526004016106c5906132fb565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fbb5760405162461bcd60e51b81526004016106c5906132fb565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146110035760405162461bcd60e51b81526004016106c5906132fb565b6001600160a01b0381166110685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c5565b6106d881611da7565b6000546001600160a01b0316331461109b5760405162461bcd60e51b81526004016106c5906132fb565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610bd45760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b60648201526084016106c5565b60005b81518110156111cb5760035482516000916001600160a01b03169084908490811061115257611152613354565b60200260200101516000015160405161116b91906133ba565b600060405180830381855af49150503d80600081146111a6576040519150601f19603f3d011682016040523d82523d6000602084013e6111ab565b606091505b505090506111b881611d98565b50806111c3816133ec565b915050611125565b5050565b6000805b8251811015611219578281815181106111ee576111ee613354565b6020026020010151602001518261120591906134ab565b915080611211816133ec565b9150506111d3565b506103e8611229826103ed6134c3565b61123391906134e2565b3410156112825760405162461bcd60e51b815260206004820152601860248201527f496e737566696369656e7420746f74616c2066756e647321000000000000000060448201526064016106c5565b6000805b8351811015611b49576005548451600091829182916001600160a01b03169063b1283e77908990879081106112bd576112bd613354565b6020026020010151600001516040518263ffffffff1660e01b81526004016112e791815260200190565b606060405180830381865afa158015611304573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113289190613504565b9250925092508061137b5760405162461bcd60e51b815260206004820152601760248201527f5f74726164653a20496e416374697665204d61726b657400000000000000000060448201526064016106c5565b60008261141d57836001600160a01b031688868151811061139e5761139e613354565b6020026020010151602001518987815181106113bc576113bc613354565b6020026020010151604001516040516113d591906133ba565b60006040518083038185875af1925050503d8060008114611412576040519150601f19603f3d011682016040523d82523d6000602084013e611417565b606091505b50611494565b836001600160a01b031688868151811061143957611439613354565b60200260200101516040015160405161145291906133ba565b600060405180830381855af49150503d806000811461148d576040519150601f19603f3d011682016040523d82523d6000602084013e611492565b606091505b505b5090508015611b32576103e88886815181106114b2576114b2613354565b60200260200101516020015160056114ca91906134c3565b6114d491906134e2565b6114de90876134ab565b95508785815181106114f2576114f2613354565b60200260200101516000015160020361188d57600088868151811061151957611519613354565b6020026020010151604001518060200190518101906115389190613a3e565b905060005b81602001515181101561188a5760008260200151828151811061156257611562613354565b602002602001015190506000836000015182602001518151811061158857611588613354565b6020026020010151905060008161010001518360400151815181106115af576115af613354565b6020026020010151905060008160200151905060008360e00151511180156115dc575060008460c0015151115b156115f4576115f4818560c001518560e001516121c7565b73f849de01b080adc3a814fabe1e2087475cf2e3546001600160a01b03168460a001516001600160a01b0316036117795760008180602001905181019061163b9190613b09565b905060005b815181101561177257600082828151811061165d5761165d613354565b60200260200101519050306001600160a01b031681600001516001600160a01b0316636352211e83602001516040518263ffffffff1660e01b81526004016116a791815260200190565b602060405180830381865afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e89190613415565b6001600160a01b03160361175f5780516020820151604051632142170760e11b81526001600160a01b03909216916342842e0e9161172c913091339160040161336a565b600060405180830381600087803b15801561174657600080fd5b505af115801561175a573d6000803e3d6000fd5b505050505b508061176a816133ec565b915050611640565b5050611873565b73024ac22acdb367a3ae52a3d94ac6649fdc1f07796001600160a01b03168460a001516001600160a01b031603611873576000818060200190518101906117c09190613bc7565b905060005b81518110156118705760008282815181106117e2576117e2613354565b6020026020010151905080600001516001600160a01b031663f242432a3033846020015185604001516040518563ffffffff1660e01b815260040161182a9493929190613473565b600060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b50505050508080611868906133ec565b9150506117c5565b50505b505050508080611882906133ec565b91505061153d565b50505b87858151811061189f5761189f613354565b602002602001015160000151600303611b32576000808987815181106118c7576118c7613354565b6020026020010151604001518060200190518101906118e69190613da0565b915091506000808260c001516001600160a01b031663865781ca85856040518363ffffffff1660e01b815260040161191f929190613ea4565b606060405180830381865afa15801561193c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611960919061401e565b60408681015190516301ffc9a760e01b81526380ac58cd60e01b60048201529295509093506001600160a01b031691506301ffc9a790602401602060405180830381865afa1580156119b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119da9190613456565b15611a4a5782604001516001600160a01b03166323b872dd3033856040518463ffffffff1660e01b8152600401611a139392919061336a565b600060405180830381600087803b158015611a2d57600080fd5b505af1158015611a41573d6000803e3d6000fd5b50505050611b2d565b60408381015190516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b03909116906301ffc9a790602401602060405180830381865afa158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf9190613456565b15611b2d5782604001516001600160a01b031663f242432a303385856040518563ffffffff1660e01b8152600401611afa9493929190613473565b600060405180830381600087803b158015611b1457600080fd5b505af1158015611b28573d6000803e3d6000fd5b505050505b505050505b505050508080611b41906133ec565b915050611286565b508015610bd45760405173d92ed451d94983957957c97f54d3c685d84d316a9082156108fc029083906000818181858888f193505050501580156109c3573d6000803e3d6000fd5b4715611ba35760008060008047335af1505b60005b81518110156111cb576000828281518110611bc357611bc3613354565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c379190613432565b1115611d8657818181518110611c4f57611c4f613354565b60200260200101516001600160a01b031663a9059cbb33848481518110611c7857611c78613354565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cec9190613432565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611d4091906133ba565b6000604051808303816000865af19150503d8060008114611d7d576040519150601f19603f3d011682016040523d82523d6000602084013e611d82565b606091505b5050505b80611d90816133ec565b915050611ba6565b806106d8573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611ef1578351805182908110611e1857611e18613354565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611e4657611e46613354565b6020026020010151604051602401611e609392919061336a565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611e9991906133ba565b6000604051808303816000865af19150503d8060008114611ed6576040519150601f19603f3d011682016040523d82523d6000602084013e611edb565b606091505b5050508080611ee9906133ec565b915050611dfa565b5060005b82518110156120e657828181518110611f1057611f10613354565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611f6f57611f6a838281518110611f5d57611f5d613354565b602002602001015161226e565b6120d4565b828181518110611f8157611f81613354565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611fdb57611f6a838281518110611fce57611fce613354565b602002602001015161240d565b60005b838281518110611ff057611ff0613354565b602002602001015160400151518110156120d25783828151811061201657612016613354565b6020026020010151600001516001600160a01b03166323b872dd6120373390565b3087868151811061204a5761204a613354565b602002602001015160400151858151811061206757612067613354565b60200260200101516040518463ffffffff1660e01b815260040161208d9392919061336a565b600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b5050505080806120ca906133ec565b915050611fde565b505b806120de816133ec565b915050611ef5565b5060005b81518110156109c35781818151811061210557612105613354565b6020026020010151600001516001600160a01b0316632eb2c2d66121263390565b3085858151811061213957612139613354565b60200260200101516020015186868151811061215757612157613354565b6020026020010151604001516040518563ffffffff1660e01b81526004016121829493929190614090565b600060405180830381600087803b15801561219c57600080fd5b505af11580156121b0573d6000803e3d6000fd5b5050505080806121bf906133ec565b9150506120ea565b81518351146121d557600080fd5b80518351146121e357600080fd5b60005b83518110156109c35781818151811061220157612201613354565b01602001516001600160f81b0319161561225c5782818151811061222757612227613354565b602001015160f81c60f81b84828151811061224457612244613354565b60200101906001600160f81b031916908160001a9053505b80612266816133ec565b9150506121e6565b60005b8160400151518110156111cb57600082600001516001600160a01b03166358178168846040015184815181106122a9576122a9613354565b60200260200101516040518263ffffffff1660e01b81526004016122cf91815260200190565b602060405180830381865afa1580156122ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123109190613415565b90506001600160a01b03811633146123785760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b60648201526084016106c5565b82600001516001600160a01b0316638264fe98846040015184815181106123a1576123a1613354565b60200260200101516040518263ffffffff1660e01b81526004016123c791815260200190565b600060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b50505050508080612405906133ec565b915050612271565b60005b8160400151518110156111cb5760006124458360400151838151811061243857612438613354565b60200260200101516125a3565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561249c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c09190613415565b90506001600160a01b03811633146125285760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b60648201526084016106c5565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561257657600080fd5b505af115801561258a573d6000803e3d6000fd5b505050505050808061259b906133ec565b915050612410565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156125f65780518352602092830192016125de565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561262457600080fd5b81356001600160e01b03198116811461263c57600080fd5b9392505050565b6001600160a01b03811681146106d857600080fd5b60006020828403121561266a57600080fd5b813561263c81612643565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156126ad576126ad612675565b60405290565b604051606081016001600160401b03811182821017156126ad576126ad612675565b604051602081016001600160401b03811182821017156126ad576126ad612675565b6040516101a081016001600160401b03811182821017156126ad576126ad612675565b60405161016081016001600160401b03811182821017156126ad576126ad612675565b60405160c081016001600160401b03811182821017156126ad576126ad612675565b60405161020081016001600160401b03811182821017156126ad576126ad612675565b604051601f8201601f191681016001600160401b03811182821017156127aa576127aa612675565b604052919050565b60006001600160401b038211156127cb576127cb612675565b5060051b60200190565b600082601f8301126127e657600080fd5b813560206127fb6127f6836127b2565b612782565b82815260059290921b8401810191818101908684111561281a57600080fd5b8286015b8481101561283e57803561283181612643565b835291830191830161281e565b509695505050505050565b600082601f83011261285a57600080fd5b8135602061286a6127f6836127b2565b82815260059290921b8401810191818101908684111561288957600080fd5b8286015b8481101561283e578035835291830191830161288d565b6000604082840312156128b657600080fd5b6128be61268b565b905081356001600160401b03808211156128d757600080fd5b6128e3858386016127d5565b835260208401359150808211156128f957600080fd5b5061290684828501612849565b60208301525092915050565b60006001600160401b0382111561292b5761292b612675565b50601f01601f191660200190565b600082601f83011261294a57600080fd5b81356129586127f682612912565b81815284602083860101111561296d57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261299b57600080fd5b813560206129ab6127f6836127b2565b82815260059290921b840181019181810190868411156129ca57600080fd5b8286015b8481101561283e5780356001600160401b03808211156129ee5760008081fd5b908801906060828b03601f1901811315612a085760008081fd5b612a106126b3565b838801358152604080850135828a0152918401359183831115612a335760008081fd5b612a418d8a85880101612939565b9082015286525050509183019183016129ce565b600082601f830112612a6657600080fd5b81356020612a766127f6836127b2565b82815260059290921b84018101918181019086841115612a9557600080fd5b8286015b8481101561283e5780356001600160401b0380821115612ab95760008081fd5b90880190818a03601f1901861315612ad15760008081fd5b612ad96126d5565b8683013582811115612aeb5760008081fd5b612af98c8983870101612939565b82525085525050918301918301612a99565b60008060008060808587031215612b2157600080fd5b84356001600160401b0380821115612b3857600080fd5b612b44888389016128a4565b95506020870135915080821115612b5a57600080fd5b612b668883890161298a565b94506040870135915080821115612b7c57600080fd5b612b8888838901612a55565b93506060870135915080821115612b9e57600080fd5b50612bab878288016127d5565b91505092959194509250565b60008083601f840112612bc957600080fd5b5081356001600160401b03811115612be057600080fd5b602083019150836020828501011115612bf857600080fd5b9250929050565b600080600080600060808688031215612c1757600080fd5b8535612c2281612643565b94506020860135612c3281612643565b93506040860135925060608601356001600160401b03811115612c5457600080fd5b612c6088828901612bb7565b969995985093965092949392505050565b60008083601f840112612c8357600080fd5b5081356001600160401b03811115612c9a57600080fd5b6020830191508360208260051b8501011115612bf857600080fd5b60008060008060608587031215612ccb57600080fd5b8435612cd681612643565b935060208501356001600160401b03811115612cf157600080fd5b612cfd87828801612c71565b9094509250506040850135612d1181612643565b939692955090935050565b60008060408385031215612d2f57600080fd5b8235612d3a81612643565b91506020830135612d4a81612643565b809150509250929050565b80151581146106d857600080fd5b600060208284031215612d7557600080fd5b813561263c81612d55565b600060208284031215612d9257600080fd5b81356001600160401b03811115612da857600080fd5b612db48482850161298a565b949350505050565b600080600060608486031215612dd157600080fd5b8335612ddc81612643565b92506020840135612dec81612643565b929592945050506040919091013590565b60008060008060008060808789031215612e1657600080fd5b8635612e2181612643565b955060208701356001600160401b0380821115612e3d57600080fd5b612e498a838b01612c71565b90975095506040890135915080821115612e6257600080fd5b50612e6f89828a01612c71565b9094509250506060870135612e8381612643565b809150509295509295509295565b60008060008060008060008060a0898b031215612ead57600080fd5b8835612eb881612643565b97506020890135612ec881612643565b965060408901356001600160401b0380821115612ee457600080fd5b612ef08c838d01612c71565b909850965060608b0135915080821115612f0957600080fd5b612f158c838d01612c71565b909650945060808b0135915080821115612f2e57600080fd5b50612f3b8b828c01612bb7565b999c989b5096995094979396929594505050565b600082601f830112612f6057600080fd5b81356020612f706127f6836127b2565b82815260059290921b84018101918181019086841115612f8f57600080fd5b8286015b8481101561283e5780356001600160401b0380821115612fb35760008081fd5b908801906060828b03601f1901811315612fcd5760008081fd5b612fd56126b3565b87840135612fe281612643565b815260408481013584811115612ff85760008081fd5b6130068e8b838901016127d5565b838b01525091840135918383111561301e5760008081fd5b61302c8d8a85880101612849565b908201528652505050918301918301612f93565b600082601f83011261305157600080fd5b813560206130616127f6836127b2565b82815260059290921b8401810191818101908684111561308057600080fd5b8286015b8481101561283e5780356001600160401b03808211156130a45760008081fd5b908801906060828b03601f19018113156130be5760008081fd5b6130c66126b3565b878401356130d381612643565b8152604084810135848111156130e95760008081fd5b6130f78e8b83890101612849565b838b01525091840135918383111561310f5760008081fd5b61311d8d8a85880101612849565b908201528652505050918301918301613084565b60008060008060008060c0878903121561314a57600080fd5b86356001600160401b038082111561316157600080fd5b61316d8a838b016128a4565b9750602089013591508082111561318357600080fd5b61318f8a838b01612f4f565b965060408901359150808211156131a557600080fd5b6131b18a838b01613040565b955060608901359150808211156131c757600080fd5b6131d38a838b01612a55565b945060808901359150808211156131e957600080fd5b6131f58a838b0161298a565b935060a089013591508082111561320b57600080fd5b5061321889828a016127d5565b9150509295509295509295565b6000806000806060858703121561323b57600080fd5b843561324681612643565b93506020850135925060408501356001600160401b0381111561326857600080fd5b61327487828801612bb7565b95989497509550505050565b60008060008060008060a0878903121561329957600080fd5b86356132a481612643565b955060208701356132b481612643565b9450604087013593506060870135925060808701356001600160401b038111156132dd57600080fd5b6132e989828a01612bb7565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133a9578181015183820152602001613391565b838111156109c35750506000910152565b600082516133cc81846020870161338e565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016133fe576133fe6133d6565b5060010190565b805161341081612643565b919050565b60006020828403121561342757600080fd5b815161263c81612643565b60006020828403121561344457600080fd5b5051919050565b805161341081612d55565b60006020828403121561346857600080fd5b815161263c81612d55565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600082198211156134be576134be6133d6565b500190565b60008160001904831182151516156134dd576134dd6133d6565b500290565b6000826134ff57634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561351957600080fd5b835161352481612643565b602085015190935061353581612d55565b604085015190925061354681612d55565b809150509250925092565b600082601f83011261356257600080fd5b81516135706127f682612912565b81815284602083860101111561358557600080fd5b612db482602083016020870161338e565b600082601f8301126135a757600080fd5b815160206135b76127f6836127b2565b82815260059290921b840181019181810190868411156135d657600080fd5b8286015b8481101561283e5780516001600160401b03808211156135fa5760008081fd5b908801906040828b03601f19018113156136145760008081fd5b61361c61268b565b8388015181529083015190828211156136355760008081fd5b6136438c8984870101613551565b8189015286525050509183019183016135da565b805160ff8116811461341057600080fd5b600082601f83011261367957600080fd5b815160206136896127f6836127b2565b82815260059290921b840181019181810190868411156136a857600080fd5b8286015b8481101561283e5780516001600160401b03808211156136cc5760008081fd5b908801906101a0828b03601f19018113156136e75760008081fd5b6136ef6126f7565b8784015181526040613702818601613405565b89830152606080860151828401526080915081860151818401525060a0808601518284015260c0915081860151818401525060e0613741818701613405565b828401526101009150818601518581111561375c5760008081fd5b61376a8f8c838a0101613551565b82850152505061012080860151858111156137855760008081fd5b6137938f8c838a0101613596565b8385015250610140945084860151818401525050610160808501518483015261018093506137c2848601613657565b908201526137d1848301613657565b92810192909252508452509183019183016136ac565b80516008811061341057600080fd5b600082601f83011261380757600080fd5b815160206138176127f6836127b2565b82815260069290921b8401810191818101908684111561383657600080fd5b8286015b8481101561283e57604081890312156138535760008081fd5b61385b61268b565b815181528482015161386c81612643565b8186015283529183019160400161383a565b600082601f83011261388f57600080fd5b8151602061389f6127f6836127b2565b82815260059290921b840181019181810190868411156138be57600080fd5b8286015b8481101561283e5780516001600160401b03808211156138e25760008081fd5b90880190610160828b03601f19018113156138fd5760008081fd5b61390561271a565b6139108885016137e7565b815260408085015189830152606080860151828401526080915081860151818401525060a0808601518284015260c0915061394c828701613405565b9083015260e085810151858111156139645760008081fd5b6139728f8c838a0101613551565b8385015250610100915081860151818401525061012080860151828401526101409150818601518184015250828501519250838311156139b25760008081fd5b6139c08d8a858801016137f6565b9082015286525050509183019183016138c2565b600060c082840312156139e657600080fd5b6139ee61273d565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151613a2081612643565b608082015260a0820151613a3381612d55565b60a082015292915050565b600060208284031215613a5057600080fd5b81516001600160401b0380821115613a6757600080fd5b908301906101608286031215613a7c57600080fd5b613a8461273d565b825182811115613a9357600080fd5b613a9f87828601613668565b825250602083015182811115613ab457600080fd5b613ac08782860161387e565b602083015250613ad386604085016139d4565b604082015261010083015160608201526101208301516080820152613afb6101408401613657565b60a082015295945050505050565b60006020808385031215613b1c57600080fd5b82516001600160401b03811115613b3257600080fd5b8301601f81018513613b4357600080fd5b8051613b516127f6826127b2565b81815260069190911b82018301908381019087831115613b7057600080fd5b928401925b82841015613bbc5760408489031215613b8e5760008081fd5b613b9661268b565b8451613ba181612643565b81528486015186820152825260409093019290840190613b75565b979650505050505050565b60006020808385031215613bda57600080fd5b82516001600160401b03811115613bf057600080fd5b8301601f81018513613c0157600080fd5b8051613c0f6127f6826127b2565b81815260609182028301840191848201919088841115613c2e57600080fd5b938501935b83851015613c815780858a031215613c4b5760008081fd5b613c536126b3565b8551613c5e81612643565b815285870151878201526040808701519082015283529384019391850191613c33565b50979650505050505050565b60006102008284031215613ca057600080fd5b613ca861275f565b9050613cb38261344b565b8152613cc160208301613405565b6020820152613cd260408301613405565b6040820152606082015160608201526080820151608082015260a082015160a0820152613d0160c08301613405565b60c0820152613d1260e08301613405565b60e08201526101008281015190820152610120808301519082015261014080830151908201526101608083015190820152610180808301516001600160401b03811115613d5e57600080fd5b613d6a85828601613551565b8284015250506101a0613d7e818401613657565b908201526101c082810151908201526101e09182015191810191909152919050565b60008060408385031215613db357600080fd5b82516001600160401b0380821115613dca57600080fd5b9084019060c08287031215613dde57600080fd5b613de661273d565b8251613df181612d55565b81526020830151613e0181612643565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015182811115613e3857600080fd5b613e4488828601613551565b60a0830152506020860151909450915080821115613e6157600080fd5b50613e6e85828601613c8d565b9150509250929050565b60008151808452613e9081602086016020860161338e565b601f01601f19169290920160200192915050565b60408152600061010084511515604084015260018060a01b03602086015116606084015260408501516080840152606085015160a0840152608085015160c084015260a085015160c060e0850152613efe82850182613e78565b848103602086015285511515815290506102006020860151613f2b60208401826001600160a01b03169052565b506040860151613f4660408401826001600160a01b03169052565b50606086015160608301526080860151608083015260a086015160a083015260c0860151613f7f60c08401826001600160a01b03169052565b5060e0860151613f9a60e08401826001600160a01b03169052565b50858301519282019290925261012080860151908201526101408086015190820152610160808601519082015261018080860151818301849052909290613fe382840182613e78565b935050506101a080860151613ffc8284018260ff169052565b50506101c085810151908201526101e094850151940193909352509092915050565b60008060006060848603121561403357600080fd5b835161403e81612d55565b602085015160409095015190969495509392505050565b600081518084526020808501945080840160005b8381101561408557815187529582019590820190600101614069565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906140bc90830185614055565b82810360608401526140ce8185614055565b83810360809094019390935250506000815260200194935050505056fea26469706673582212205aeaef58e6abd4d47eaf64ec337514c341fe3086fe5df10357d7a7d92b63cae864736f6c634300080d0033

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

0000000000000000000000005a20c3886900eddad911522aedd60a9d87f1ece7000000000000000000000000d92ed451d94983957957c97f54d3c685d84d316a

-----Decoded View---------------
Arg [0] : _marketRegistry (address): 0x5a20c3886900EdDaD911522AEdD60A9d87F1Ece7
Arg [1] : _guardian (address): 0xD92ed451d94983957957c97F54d3c685D84D316a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005a20c3886900eddad911522aedd60a9d87f1ece7
Arg [1] : 000000000000000000000000d92ed451d94983957957c97f54d3c685d84d316a


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
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.