ETH Price: $3,487.62 (+5.35%)

Contract

0x08deB5be5E33C907842664611C9eE2fbB69d28Fb
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Single Buy With ...193130912024-02-26 17:01:11274 days ago1708966871IN
0x08deB5be...bB69d28Fb
0.296475 ETH0.0135720876
Single Buy With ...192999152024-02-24 20:45:35276 days ago1708807535IN
0x08deB5be...bB69d28Fb
0.045225 ETH0.0070185832.66978766
Single Buy With ...192334062024-02-15 12:43:47286 days ago1708001027IN
0x08deB5be...bB69d28Fb
0.02412 ETH0.0053602125.80104761
Single Buy With ...191564622024-02-04 17:35:35296 days ago1707068135IN
0x08deB5be...bB69d28Fb
0.00201 ETH0.0034856718.08167929
Single Buy With ...191564532024-02-04 17:33:47296 days ago1707068027IN
0x08deB5be...bB69d28Fb
0.002211 ETH0.0013175317.78531099
Single Buy With ...191209432024-01-30 17:54:11301 days ago1706637251IN
0x08deB5be...bB69d28Fb
0.085023 ETH0.0054062728.11109785
Single Buy With ...191058842024-01-28 15:20:35303 days ago1706455235IN
0x08deB5be...bB69d28Fb
0.070953 ETH0.0025886614.40260469
Batch Buy With E...191055272024-01-28 14:07:35303 days ago1706450855IN
0x08deB5be...bB69d28Fb
0.009045 ETH0.0063188515.1315104
Batch Buy With E...191042152024-01-28 9:42:11304 days ago1706434931IN
0x08deB5be...bB69d28Fb
0.009045 ETH0.0051326613.67107628
Single Buy With ...190988652024-01-27 15:39:11304 days ago1706369951IN
0x08deB5be...bB69d28Fb
0.01102083 ETH0.002135224.6221115
Batch Buy With E...190987252024-01-27 15:11:11304 days ago1706368271IN
0x08deB5be...bB69d28Fb
0.0437175 ETH0.0121303627.15908843
Single Buy With ...190436322024-01-19 21:35:35312 days ago1705700135IN
0x08deB5be...bB69d28Fb
0.06155524 ETH0.0039789619.92133433
Single Buy With ...190406482024-01-19 11:36:23313 days ago1705664183IN
0x08deB5be...bB69d28Fb
0.034974 ETH0.0037353820.25235299
Single Buy With ...189955572024-01-13 4:22:11319 days ago1705119731IN
0x08deB5be...bB69d28Fb
0.09246 ETH0.0028775213.69146092
Single Buy With ...189934002024-01-12 21:08:23319 days ago1705093703IN
0x08deB5be...bB69d28Fb
0.00804 ETH0.0050380926.30211339
Single Buy With ...189692972024-01-09 12:06:23323 days ago1704801983IN
0x08deB5be...bB69d28Fb
0.01809 ETH0.0025666513.96234945
Batch Buy With E...189437382024-01-05 21:29:11326 days ago1704490151IN
0x08deB5be...bB69d28Fb
0.00441195 ETH0.0032809617.15118322
Batch Buy With E...189437262024-01-05 21:26:47326 days ago1704490007IN
0x08deB5be...bB69d28Fb
0.00441195 ETH0.0032505916.99238109
Single Buy With ...189220932024-01-02 20:32:11329 days ago1704227531IN
0x08deB5be...bB69d28Fb
0.01466295 ETH0.0047732227
Single Buy With ...189157912024-01-01 23:17:35330 days ago1704151055IN
0x08deB5be...bB69d28Fb
0.00201 ETH0.0029663412.03643453
Single Buy With ...189156262024-01-01 22:43:59330 days ago1704149039IN
0x08deB5be...bB69d28Fb
0.08442 ETH0.0024187711.05318032
Single Buy With ...189147232024-01-01 19:40:59330 days ago1704138059IN
0x08deB5be...bB69d28Fb
0.00753749 ETH0.0011494815.51934647
Single Buy With ...189140572024-01-01 17:26:11330 days ago1704129971IN
0x08deB5be...bB69d28Fb
0.01395945 ETH0.0036319517.16199623
Single Buy With ...189140292024-01-01 17:20:35330 days ago1704129635IN
0x08deB5be...bB69d28Fb
0.006432 ETH0.0013000817.56686275
Single Buy With ...188983122023-12-30 12:24:11333 days ago1703939051IN
0x08deB5be...bB69d28Fb
0.03015 ETH0.0030371613.9740172
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
193130912024-02-26 17:01:11274 days ago1708966871
0x08deB5be...bB69d28Fb
0.001475 ETH
193130912024-02-26 17:01:11274 days ago1708966871
0x08deB5be...bB69d28Fb
0.295 ETH
192999152024-02-24 20:45:35276 days ago1708807535
0x08deB5be...bB69d28Fb
0.000225 ETH
192999152024-02-24 20:45:35276 days ago1708807535
0x08deB5be...bB69d28Fb
0.045 ETH
192334062024-02-15 12:43:47286 days ago1708001027
0x08deB5be...bB69d28Fb
0.00012 ETH
192334062024-02-15 12:43:47286 days ago1708001027
0x08deB5be...bB69d28Fb
0.024 ETH
191564622024-02-04 17:35:35296 days ago1707068135
0x08deB5be...bB69d28Fb
0.00001 ETH
191564622024-02-04 17:35:35296 days ago1707068135
0x08deB5be...bB69d28Fb
0.002 ETH
191564532024-02-04 17:33:47296 days ago1707068027
0x08deB5be...bB69d28Fb
0.0022 ETH
191209432024-01-30 17:54:11301 days ago1706637251
0x08deB5be...bB69d28Fb
0.000423 ETH
191209432024-01-30 17:54:11301 days ago1706637251
0x08deB5be...bB69d28Fb
0.0846 ETH
191058842024-01-28 15:20:35303 days ago1706455235
0x08deB5be...bB69d28Fb
0.000353 ETH
191058842024-01-28 15:20:35303 days ago1706455235
0x08deB5be...bB69d28Fb
0.0706 ETH
191055272024-01-28 14:07:35303 days ago1706450855
0x08deB5be...bB69d28Fb
0.000045 ETH
191055272024-01-28 14:07:35303 days ago1706450855
0x08deB5be...bB69d28Fb
0.009 ETH
191042152024-01-28 9:42:11304 days ago1706434931
0x08deB5be...bB69d28Fb
0.000045 ETH
191042152024-01-28 9:42:11304 days ago1706434931
0x08deB5be...bB69d28Fb
0.009 ETH
190988652024-01-27 15:39:11304 days ago1706369951
0x08deB5be...bB69d28Fb
0.010966 ETH
190987252024-01-27 15:11:11304 days ago1706368271
0x08deB5be...bB69d28Fb
0.0105 ETH
190987252024-01-27 15:11:11304 days ago1706368271
0x08deB5be...bB69d28Fb
0.0002175 ETH
190987252024-01-27 15:11:11304 days ago1706368271
0x08deB5be...bB69d28Fb
0.0105 ETH
190987252024-01-27 15:11:11304 days ago1706368271
0x08deB5be...bB69d28Fb
0.0435 ETH
190436322024-01-19 21:35:35312 days ago1705700135
0x08deB5be...bB69d28Fb
0.00030624 ETH
190436322024-01-19 21:35:35312 days ago1705700135
0x08deB5be...bB69d28Fb
0.061249 ETH
190406482024-01-19 11:36:23313 days ago1705664183
0x08deB5be...bB69d28Fb
0.000174 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 13 : 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 "@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 {

    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 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");
        _;
    }

    event BatchBuyEvent(uint256 indexed totalNum, uint256 indexed successNum);

    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);
        }
    }

    // skip the function signature (4 bytes)
    function _sliceCalldata(bytes calldata data) public pure returns (bytes memory){
      return data[4:];
    }

    function _trade(
        MarketRegistry.TradeDetails[] memory _tradeDetails
    ) internal returns (uint256) {
        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;
        uint256 successNum = 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;
                successNum += 1;
            }
        }
        if(fee > 0)
            payable(GOV).transfer(fee);
        return successNum;
    }

    function _singleTrade(
        MarketRegistry.TradeDetails memory _tradeDetail
    ) internal {
        uint256 totalValue = _tradeDetail.value;
        require(msg.value >= totalValue * 1005/1000, "Insuficient total funds!");
        uint256 fee = 0;

        // get market details
        (address _proxy, bool _isLib, bool _isActive) = marketRegistry.markets(_tradeDetail.marketId);
        // market should be active
        require(_isActive, "_trade: InActive Market");
        // execute trade
        (bool success, ) = _isLib
            ? _proxy.delegatecall(_tradeDetail.tradeData)
            : _proxy.call{value:_tradeDetail.value}(_tradeDetail.tradeData);
        require(success, "buy single item failed!");
        fee += _tradeDetail.value * 5 / 1000;

        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
        uint256 successNum = _trade(tradeDetails);

        // return remaining ETH (if any)
        assembly {
            if gt(selfbalance(), 0) {
                let callStatus := call(
                    gas(),
                    caller(),
                    selfbalance(),
                    0,
                    0,
                    0,
                    0
                )
            }
        }
        emit BatchBuyEvent(tradeDetails.length, successNum);
    }

    function singleBuyWithETH(
        MarketRegistry.TradeDetails memory tradeDetail
    ) payable external nonReentrant {
        // execute trades
        _singleTrade(tradeDetail);

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

    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
        uint256 successNum = _trade(tradeDetails);

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

        emit BatchBuyEvent(tradeDetails.length, successNum);
    }

    // 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 returns (uint256){
        // transfer all tokens
        _transferFromHelper(
            erc20Details,
            erc721Details,
            erc1155Details
        );

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

        // execute trades
        uint256 successNum = _trade(tradeDetails);

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

        return successNum;
    }

    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 13 : 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 13 : 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 4 of 13 : 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 5 of 13 : 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 6 of 13 : 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 7 of 13 : MarketRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity >= 0.8.10;


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

contract MarketRegistry is Ownable {

    enum MarketId {
        INVALID,
        OPENSEA,
        X2Y2,
        LOOKSRARE
    }

    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 8 of 13 : 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 9 of 13 : 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 10 of 13 : 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 11 of 13 : 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 12 of 13 : 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 13 of 13 : 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":"uint256","name":"totalNum","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"successNum","type":"uint256"}],"name":"BatchBuyEvent","type":"event"},{"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":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"_sliceCalldata","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","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":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails","name":"tradeDetail","type":"tuple"}],"name":"singleBuyWithETH","outputs":[],"stateMutability":"payable","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"}]

6080604052600180553480156200001557600080fd5b506040516200343b3803806200343b8339810160408190526200003891620000f8565b62000043336200008b565b600580546001600160a01b03199081166001600160a01b039485161790915560028054909116919092161790556004805461ffff60a01b191661010160a01b17905562000130565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f357600080fd5b919050565b600080604083850312156200010c57600080fd5b6200011783620000db565b91506200012760208401620000db565b90509250929050565b6132fb80620001406000396000f3fe6080604052600436106101e75760003560e01c80639f2ba09b11610102578063d857970411610095578063f0b9e5ba11610064578063f0b9e5ba146105b5578063f23a6e61146105e0578063f2fde38b1461060d578063fc5253951461062d57600080fd5b8063d857970414610528578063ddf6a7e714610548578063e6041f9a14610575578063ecb96fe61461059557600080fd5b8063bc197c81116100d1578063bc197c81146104a3578063bd38837b146104d2578063c5cadd7f146104f2578063cba649671461050757600080fd5b80639f2ba09b14610422578063a1b6279714610442578063b19337a414610463578063b7ce33a21461048357600080fd5b8063271486e41161017a578063715018a611610149578063715018a6146103bc57806383206e80146103d15780638da5cb5b146103f15780639a2b81151461040f57600080fd5b8063271486e414610349578063452a93201461035c5780635d799f871461037c5780636335f25e1461039c57600080fd5b806311f85417116101b657806311f8541714610283578063150b7a02146102a4578063180cb47f146102e957806326e2dca21461032957600080fd5b806301ffc9a7146101f357806304824e701461023957806309ba153d1461025b5780630a9254e41461026e57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5061022461020e366004612305565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561024557600080fd5b5061025961025436600461234b565b61064d565b005b610259610269366004612772565b61068d565b34801561027a57600080fd5b50610259610807565b34801561028f57600080fd5b5060045461022490600160a81b900460ff1681565b3480156102b057600080fd5b506102d06102bf366004612866565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610230565b3480156102f557600080fd5b5061031173d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610230565b34801561033557600080fd5b5061025961034436600461291c565b6109ae565b610259610357366004612983565b610a77565b34801561036857600080fd5b50600254610311906001600160a01b031681565b34801561038857600080fd5b506102596103973660046129b7565b610aee565b3480156103a857600080fd5b50600454610311906001600160a01b031681565b3480156103c857600080fd5b50610259610c35565b3480156103dd57600080fd5b506102596103ec3660046129fe565b610c6b565b3480156103fd57600080fd5b506000546001600160a01b0316610311565b61025961041d366004612a1b565b610cb3565b34801561042e57600080fd5b5061025961043d366004612a4f565b610d2f565b34801561044e57600080fd5b5060045461022490600160a01b900460ff1681565b34801561046f57600080fd5b5061025961047e36600461234b565b610dcc565b34801561048f57600080fd5b5061025961049e366004612a90565b610e18565b3480156104af57600080fd5b506102d06104be366004612b24565b63bc197c8160e01b98975050505050505050565b3480156104de57600080fd5b50600354610311906001600160a01b031681565b3480156104fe57600080fd5b50610259610f2a565b61051a610515366004612dc4565b610f5a565b604051908152602001610230565b34801561053457600080fd5b5061025961054336600461234b565b61100b565b34801561055457600080fd5b50610568610563366004612eb8565b611057565b6040516102309190612f25565b34801561058157600080fd5b506102596105903660046129fe565b6110a2565b3480156105a157600080fd5b50600554610311906001600160a01b031681565b3480156105c157600080fd5b506102d06105d0366004612f58565b63785cf2dd60e11b949350505050565b3480156105ec57600080fd5b506102d06105fb366004612fb3565b63f23a6e6160e01b9695505050505050565b34801561061957600080fd5b5061025961062836600461234b565b6110ea565b34801561063957600080fd5b5061025961064836600461234b565b611182565b6000546001600160a01b031633146106805760405162461bcd60e51b81526004016106779061302e565b60405180910390fd5b61068a81476111ce565b50565b6001546001146106af5760405162461bcd60e51b815260040161067790613063565b600260015560005b8451518110156107ae5784518051829081106106d5576106d5613087565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061070357610703613087565b602002602001015160405160240161071d9392919061309d565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161075691906130c1565b6000604051808303816000865af19150503d8060008114610793576040519150601f19603f3d011682016040523d82523d6000602084013e610798565b606091505b50505080806107a6906130f3565b9150506106b7565b506107b882611233565b60006107c3846112e0565b90506107ce82611660565b83516040518291907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a3505060018055505050565b6000546001600160a01b031633146108315760405162461bcd60e51b81526004016106779061302e565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561088057600080fd5b505af1158015610894573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa1580156108e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090b919061310c565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b15801561099457600080fd5b505af11580156109a8573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109d85760405162461bcd60e51b81526004016106779061302e565b60005b82811015610a7057846001600160a01b03166323b872dd3084878786818110610a0657610a06613087565b905060200201356040518463ffffffff1660e01b8152600401610a2b9392919061309d565b600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b505050508080610a68906130f3565b9150506109db565b5050505050565b600154600114610a995760405162461bcd60e51b815260040161067790613063565b6002600155610aa781611867565b4715610ab95760008060008047335af1505b60405160019081907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a35060018055565b6000546001600160a01b03163314610b185760405162461bcd60e51b81526004016106779061302e565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8d9190613129565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610be191906130c1565b6000604051808303816000865af19150503d8060008114610c1e576040519150601f19603f3d011682016040523d82523d6000602084013e610c23565b606091505b50509050610c3081611b32565b505050565b6000546001600160a01b03163314610c5f5760405162461bcd60e51b81526004016106779061302e565b610c696000611b41565b565b6000546001600160a01b03163314610c955760405162461bcd60e51b81526004016106779061302e565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610cd55760405162461bcd60e51b815260040161067790613063565b60026001556000610ce5826112e0565b90504715610cf95760008060008047335af1505b81516040518291907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a3505060018055565b6000546001600160a01b03163314610d595760405162461bcd60e51b81526004016106779061302e565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190613142565b6000546001600160a01b03163314610df65760405162461bcd60e51b81526004016106779061302e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e425760405162461bcd60e51b81526004016106779061302e565b60005b84811015610f2157866001600160a01b031663f242432a3084898986818110610e7057610e70613087565b90506020020135888887818110610e8957610e89613087565b6040516001600160e01b031960e089901b1681526001600160a01b03968716600482015295909416602486015250604484019190915260209091020135606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050508080610f19906130f3565b915050610e45565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610f4a57600080fd5b6004805461ffff60a01b19169055565b600454600090600160a01b900460ff16610fab5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b6044820152606401610677565b600154600114610fcd5760405162461bcd60e51b815260040161067790613063565b6002600155610fdd878787611b91565b610fe684611233565b6000610ff1846112e0565b9050610ffc83611660565b60018055979650505050505050565b6000546001600160a01b031633146110355760405162461bcd60e51b81526004016106779061302e565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6060611066826004818661315f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b6000546001600160a01b031633146110cc5760405162461bcd60e51b81526004016106779061302e565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146111145760405162461bcd60e51b81526004016106779061302e565b6001600160a01b0381166111795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610677565b61068a81611b41565b6000546001600160a01b031633146111ac5760405162461bcd60e51b81526004016106779061302e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610c305760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b6064820152608401610677565b60005b81518110156112dc5760035482516000916001600160a01b03169084908490811061126357611263613087565b60200260200101516000015160405161127c91906130c1565b600060405180830381855af49150503d80600081146112b7576040519150601f19603f3d011682016040523d82523d6000602084013e6112bc565b606091505b505090506112c981611b32565b50806112d4816130f3565b915050611236565b5050565b600080805b835181101561132b5783818151811061130057611300613087565b602002602001015160200151826113179190613189565b915080611323816130f3565b9150506112e5565b506103e861133b826103ed6131a1565b61134591906131c0565b34101561138f5760405162461bcd60e51b8152602060048201526018602482015277496e737566696369656e7420746f74616c2066756e64732160401b6044820152606401610677565b60008060005b855181101561160e576005548651600091829182916001600160a01b03169063b1283e77908b90879081106113cc576113cc613087565b6020026020010151600001516040518263ffffffff1660e01b81526004016113f691815260200190565b606060405180830381865afa158015611413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143791906131e2565b925092509250806114845760405162461bcd60e51b815260206004820152601760248201527617dd1c9859194e88125b9058dd1a5d994813585c9ad95d604a1b6044820152606401610677565b60008261152657836001600160a01b03168a86815181106114a7576114a7613087565b6020026020010151602001518b87815181106114c5576114c5613087565b6020026020010151604001516040516114de91906130c1565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b5061159d565b836001600160a01b03168a868151811061154257611542613087565b60200260200101516040015160405161155b91906130c1565b600060405180830381855af49150503d8060008114611596576040519150601f19603f3d011682016040523d82523d6000602084013e61159b565b606091505b505b50905080156115f7576103e88a86815181106115bb576115bb613087565b60200260200101516020015160056115d391906131a1565b6115dd91906131c0565b6115e79088613189565b96506115f4600187613189565b95505b505050508080611606906130f3565b915050611395565b5081156116585760405173d92ed451d94983957957c97f54d3c685d84d316a9083156108fc029084906000818181858888f19350505050158015611656573d6000803e3d6000fd5b505b949350505050565b47156116725760008060008047335af1505b60005b81518110156112dc57600082828151811061169257611692613087565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156116e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117069190613129565b11156118555781818151811061171e5761171e613087565b60200260200101516001600160a01b031663a9059cbb3384848151811061174757611747613087565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190613129565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161180f91906130c1565b6000604051808303816000865af19150503d806000811461184c576040519150601f19603f3d011682016040523d82523d6000602084013e611851565b606091505b5050505b8061185f816130f3565b915050611675565b60208101516103e861187b826103ed6131a1565b61188591906131c0565b3410156118cf5760405162461bcd60e51b8152602060048201526018602482015277496e737566696369656e7420746f74616c2066756e64732160401b6044820152606401610677565b600554825160405163b1283e7760e01b81526000928392839283926001600160a01b03169163b1283e779161190b919060040190815260200190565b606060405180830381865afa158015611928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194c91906131e2565b925092509250806119995760405162461bcd60e51b815260206004820152601760248201527617dd1c9859194e88125b9058dd1a5d994813585c9ad95d604a1b6044820152606401610677565b600082611a0957836001600160a01b0316876020015188604001516040516119c191906130c1565b60006040518083038185875af1925050503d80600081146119fe576040519150601f19603f3d011682016040523d82523d6000602084013e611a03565b606091505b50611a67565b836001600160a01b03168760400151604051611a2591906130c1565b600060405180830381855af49150503d8060008114611a60576040519150601f19603f3d011682016040523d82523d6000602084013e611a65565b606091505b505b50905080611ab75760405162461bcd60e51b815260206004820152601760248201527f6275792073696e676c65206974656d206661696c6564210000000000000000006044820152606401610677565b6103e887602001516005611acb91906131a1565b611ad591906131c0565b611adf9086613189565b94508415610f215760405173d92ed451d94983957957c97f54d3c685d84d316a9086156108fc029087906000818181858888f19350505050158015611b28573d6000803e3d6000fd5b5050505050505050565b8061068a573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611c8b578351805182908110611bb257611bb2613087565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611be057611be0613087565b6020026020010151604051602401611bfa9392919061309d565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611c3391906130c1565b6000604051808303816000865af19150503d8060008114611c70576040519150601f19603f3d011682016040523d82523d6000602084013e611c75565b606091505b5050508080611c83906130f3565b915050611b94565b5060005b8251811015611e8057828181518110611caa57611caa613087565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611d0957611d04838281518110611cf757611cf7613087565b6020026020010151611f61565b611e6e565b828181518110611d1b57611d1b613087565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611d7557611d04838281518110611d6857611d68613087565b6020026020010151612100565b60005b838281518110611d8a57611d8a613087565b60200260200101516040015151811015611e6c57838281518110611db057611db0613087565b6020026020010151600001516001600160a01b03166323b872dd611dd13390565b30878681518110611de457611de4613087565b6020026020010151604001518581518110611e0157611e01613087565b60200260200101516040518463ffffffff1660e01b8152600401611e279392919061309d565b600060405180830381600087803b158015611e4157600080fd5b505af1158015611e55573d6000803e3d6000fd5b505050508080611e64906130f3565b915050611d78565b505b80611e78816130f3565b915050611c8f565b5060005b81518110156109a857818181518110611e9f57611e9f613087565b6020026020010151600001516001600160a01b0316632eb2c2d6611ec03390565b30858581518110611ed357611ed3613087565b602002602001015160200151868681518110611ef157611ef1613087565b6020026020010151604001516040518563ffffffff1660e01b8152600401611f1c949392919061326a565b600060405180830381600087803b158015611f3657600080fd5b505af1158015611f4a573d6000803e3d6000fd5b505050508080611f59906130f3565b915050611e84565b60005b8160400151518110156112dc57600082600001516001600160a01b0316635817816884604001518481518110611f9c57611f9c613087565b60200260200101516040518263ffffffff1660e01b8152600401611fc291815260200190565b602060405180830381865afa158015611fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612003919061310c565b90506001600160a01b038116331461206b5760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b6064820152608401610677565b82600001516001600160a01b0316638264fe988460400151848151811061209457612094613087565b60200260200101516040518263ffffffff1660e01b81526004016120ba91815260200190565b600060405180830381600087803b1580156120d457600080fd5b505af11580156120e8573d6000803e3d6000fd5b505050505080806120f8906130f3565b915050611f64565b60005b8160400151518110156112dc5760006121388360400151838151811061212b5761212b613087565b6020026020010151612296565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561218f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b3919061310c565b90506001600160a01b038116331461221b5760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b6064820152608401610677565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561226957600080fd5b505af115801561227d573d6000803e3d6000fd5b505050505050808061228e906130f3565b915050612103565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156122e95780518352602092830192016122d1565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561231757600080fd5b81356001600160e01b03198116811461232f57600080fd5b9392505050565b6001600160a01b038116811461068a57600080fd5b60006020828403121561235d57600080fd5b813561232f81612336565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156123a0576123a0612368565b60405290565b604051602081016001600160401b03811182821017156123a0576123a0612368565b604051601f8201601f191681016001600160401b03811182821017156123f0576123f0612368565b604052919050565b60006001600160401b0382111561241157612411612368565b5060051b60200190565b600082601f83011261242c57600080fd5b8135602061244161243c836123f8565b6123c8565b82815260059290921b8401810191818101908684111561246057600080fd5b8286015b8481101561248457803561247781612336565b8352918301918301612464565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b061243c836123f8565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b8481101561248457803583529183019183016124d3565b6000604082840312156124fc57600080fd5b604051604081016001600160401b03828210818311171561251f5761251f612368565b81604052829350843591508082111561253757600080fd5b6125438683870161241b565b8352602085013591508082111561255957600080fd5b506125668582860161248f565b6020830152505092915050565b600082601f83011261258457600080fd5b81356001600160401b0381111561259d5761259d612368565b6125b0601f8201601f19166020016123c8565b8181528460208386010111156125c557600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082840312156125f457600080fd5b6125fc61237e565b9050813581526020820135602082015260408201356001600160401b0381111561262557600080fd5b61263184828501612573565b60408301525092915050565b600082601f83011261264e57600080fd5b8135602061265e61243c836123f8565b82815260059290921b8401810191818101908684111561267d57600080fd5b8286015b848110156124845780356001600160401b038111156126a05760008081fd5b6126ae8986838b01016125e2565b845250918301918301612681565b600082601f8301126126cd57600080fd5b813560206126dd61243c836123f8565b82815260059290921b840181019181810190868411156126fc57600080fd5b8286015b848110156124845780356001600160401b03808211156127205760008081fd5b90880190818a03601f19018613156127385760008081fd5b6127406123a6565b86830135828111156127525760008081fd5b6127608c8983870101612573565b82525085525050918301918301612700565b6000806000806080858703121561278857600080fd5b84356001600160401b038082111561279f57600080fd5b6127ab888389016124ea565b955060208701359150808211156127c157600080fd5b6127cd8883890161263d565b945060408701359150808211156127e357600080fd5b6127ef888389016126bc565b9350606087013591508082111561280557600080fd5b506128128782880161241b565b91505092959194509250565b60008083601f84011261283057600080fd5b5081356001600160401b0381111561284757600080fd5b60208301915083602082850101111561285f57600080fd5b9250929050565b60008060008060006080868803121561287e57600080fd5b853561288981612336565b9450602086013561289981612336565b93506040860135925060608601356001600160401b038111156128bb57600080fd5b6128c78882890161281e565b969995985093965092949392505050565b60008083601f8401126128ea57600080fd5b5081356001600160401b0381111561290157600080fd5b6020830191508360208260051b850101111561285f57600080fd5b6000806000806060858703121561293257600080fd5b843561293d81612336565b935060208501356001600160401b0381111561295857600080fd5b612964878288016128d8565b909450925050604085013561297881612336565b939692955090935050565b60006020828403121561299557600080fd5b81356001600160401b038111156129ab57600080fd5b611658848285016125e2565b600080604083850312156129ca57600080fd5b82356129d581612336565b915060208301356129e581612336565b809150509250929050565b801515811461068a57600080fd5b600060208284031215612a1057600080fd5b813561232f816129f0565b600060208284031215612a2d57600080fd5b81356001600160401b03811115612a4357600080fd5b6116588482850161263d565b600080600060608486031215612a6457600080fd5b8335612a6f81612336565b92506020840135612a7f81612336565b929592945050506040919091013590565b60008060008060008060808789031215612aa957600080fd5b8635612ab481612336565b955060208701356001600160401b0380821115612ad057600080fd5b612adc8a838b016128d8565b90975095506040890135915080821115612af557600080fd5b50612b0289828a016128d8565b9094509250506060870135612b1681612336565b809150509295509295509295565b60008060008060008060008060a0898b031215612b4057600080fd5b8835612b4b81612336565b97506020890135612b5b81612336565b965060408901356001600160401b0380821115612b7757600080fd5b612b838c838d016128d8565b909850965060608b0135915080821115612b9c57600080fd5b612ba88c838d016128d8565b909650945060808b0135915080821115612bc157600080fd5b50612bce8b828c0161281e565b999c989b5096995094979396929594505050565b600082601f830112612bf357600080fd5b81356020612c0361243c836123f8565b82815260059290921b84018101918181019086841115612c2257600080fd5b8286015b848110156124845780356001600160401b0380821115612c465760008081fd5b908801906060828b03601f1901811315612c605760008081fd5b612c6861237e565b87840135612c7581612336565b815260408481013584811115612c8b5760008081fd5b612c998e8b8389010161241b565b838b015250918401359183831115612cb15760008081fd5b612cbf8d8a8588010161248f565b908201528652505050918301918301612c26565b600082601f830112612ce457600080fd5b81356020612cf461243c836123f8565b82815260059290921b84018101918181019086841115612d1357600080fd5b8286015b848110156124845780356001600160401b0380821115612d375760008081fd5b908801906060828b03601f1901811315612d515760008081fd5b612d5961237e565b87840135612d6681612336565b815260408481013584811115612d7c5760008081fd5b612d8a8e8b8389010161248f565b838b015250918401359183831115612da25760008081fd5b612db08d8a8588010161248f565b908201528652505050918301918301612d17565b60008060008060008060c08789031215612ddd57600080fd5b86356001600160401b0380821115612df457600080fd5b612e008a838b016124ea565b97506020890135915080821115612e1657600080fd5b612e228a838b01612be2565b96506040890135915080821115612e3857600080fd5b612e448a838b01612cd3565b95506060890135915080821115612e5a57600080fd5b612e668a838b016126bc565b94506080890135915080821115612e7c57600080fd5b612e888a838b0161263d565b935060a0890135915080821115612e9e57600080fd5b50612eab89828a0161241b565b9150509295509295509295565b60008060208385031215612ecb57600080fd5b82356001600160401b03811115612ee157600080fd5b612eed8582860161281e565b90969095509350505050565b60005b83811015612f14578181015183820152602001612efc565b838111156109a85750506000910152565b6020815260008251806020840152612f44816040850160208701612ef9565b601f01601f19169190910160400192915050565b60008060008060608587031215612f6e57600080fd5b8435612f7981612336565b93506020850135925060408501356001600160401b03811115612f9b57600080fd5b612fa78782880161281e565b95989497509550505050565b60008060008060008060a08789031215612fcc57600080fd5b8635612fd781612336565b95506020870135612fe781612336565b9450604087013593506060870135925060808701356001600160401b0381111561301057600080fd5b61301c89828a0161281e565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b600082516130d3818460208701612ef9565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600060018201613105576131056130dd565b5060010190565b60006020828403121561311e57600080fd5b815161232f81612336565b60006020828403121561313b57600080fd5b5051919050565b60006020828403121561315457600080fd5b815161232f816129f0565b6000808585111561316f57600080fd5b8386111561317c57600080fd5b5050820193919092039150565b6000821982111561319c5761319c6130dd565b500190565b60008160001904831182151516156131bb576131bb6130dd565b500290565b6000826131dd57634e487b7160e01b600052601260045260246000fd5b500490565b6000806000606084860312156131f757600080fd5b835161320281612336565b6020850151909350613213816129f0565b6040850151909250613224816129f0565b809150509250925092565b600081518084526020808501945080840160005b8381101561325f57815187529582019590820190600101613243565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906132969083018561322f565b82810360608401526132a8818561322f565b83810360809094019390935250506000815260200194935050505056fea2646970667358221220d4305e9f8e59b8cf8f7a6ba9c37536c52a558ef4fe2547ecc2b2783c1718e90064736f6c634300080d00330000000000000000000000005a20c3886900eddad911522aedd60a9d87f1ece7000000000000000000000000d92ed451d94983957957c97f54d3c685d84d316a

Deployed Bytecode

0x6080604052600436106101e75760003560e01c80639f2ba09b11610102578063d857970411610095578063f0b9e5ba11610064578063f0b9e5ba146105b5578063f23a6e61146105e0578063f2fde38b1461060d578063fc5253951461062d57600080fd5b8063d857970414610528578063ddf6a7e714610548578063e6041f9a14610575578063ecb96fe61461059557600080fd5b8063bc197c81116100d1578063bc197c81146104a3578063bd38837b146104d2578063c5cadd7f146104f2578063cba649671461050757600080fd5b80639f2ba09b14610422578063a1b6279714610442578063b19337a414610463578063b7ce33a21461048357600080fd5b8063271486e41161017a578063715018a611610149578063715018a6146103bc57806383206e80146103d15780638da5cb5b146103f15780639a2b81151461040f57600080fd5b8063271486e414610349578063452a93201461035c5780635d799f871461037c5780636335f25e1461039c57600080fd5b806311f85417116101b657806311f8541714610283578063150b7a02146102a4578063180cb47f146102e957806326e2dca21461032957600080fd5b806301ffc9a7146101f357806304824e701461023957806309ba153d1461025b5780630a9254e41461026e57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5061022461020e366004612305565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561024557600080fd5b5061025961025436600461234b565b61064d565b005b610259610269366004612772565b61068d565b34801561027a57600080fd5b50610259610807565b34801561028f57600080fd5b5060045461022490600160a81b900460ff1681565b3480156102b057600080fd5b506102d06102bf366004612866565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610230565b3480156102f557600080fd5b5061031173d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610230565b34801561033557600080fd5b5061025961034436600461291c565b6109ae565b610259610357366004612983565b610a77565b34801561036857600080fd5b50600254610311906001600160a01b031681565b34801561038857600080fd5b506102596103973660046129b7565b610aee565b3480156103a857600080fd5b50600454610311906001600160a01b031681565b3480156103c857600080fd5b50610259610c35565b3480156103dd57600080fd5b506102596103ec3660046129fe565b610c6b565b3480156103fd57600080fd5b506000546001600160a01b0316610311565b61025961041d366004612a1b565b610cb3565b34801561042e57600080fd5b5061025961043d366004612a4f565b610d2f565b34801561044e57600080fd5b5060045461022490600160a01b900460ff1681565b34801561046f57600080fd5b5061025961047e36600461234b565b610dcc565b34801561048f57600080fd5b5061025961049e366004612a90565b610e18565b3480156104af57600080fd5b506102d06104be366004612b24565b63bc197c8160e01b98975050505050505050565b3480156104de57600080fd5b50600354610311906001600160a01b031681565b3480156104fe57600080fd5b50610259610f2a565b61051a610515366004612dc4565b610f5a565b604051908152602001610230565b34801561053457600080fd5b5061025961054336600461234b565b61100b565b34801561055457600080fd5b50610568610563366004612eb8565b611057565b6040516102309190612f25565b34801561058157600080fd5b506102596105903660046129fe565b6110a2565b3480156105a157600080fd5b50600554610311906001600160a01b031681565b3480156105c157600080fd5b506102d06105d0366004612f58565b63785cf2dd60e11b949350505050565b3480156105ec57600080fd5b506102d06105fb366004612fb3565b63f23a6e6160e01b9695505050505050565b34801561061957600080fd5b5061025961062836600461234b565b6110ea565b34801561063957600080fd5b5061025961064836600461234b565b611182565b6000546001600160a01b031633146106805760405162461bcd60e51b81526004016106779061302e565b60405180910390fd5b61068a81476111ce565b50565b6001546001146106af5760405162461bcd60e51b815260040161067790613063565b600260015560005b8451518110156107ae5784518051829081106106d5576106d5613087565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061070357610703613087565b602002602001015160405160240161071d9392919061309d565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161075691906130c1565b6000604051808303816000865af19150503d8060008114610793576040519150601f19603f3d011682016040523d82523d6000602084013e610798565b606091505b50505080806107a6906130f3565b9150506106b7565b506107b882611233565b60006107c3846112e0565b90506107ce82611660565b83516040518291907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a3505060018055505050565b6000546001600160a01b031633146108315760405162461bcd60e51b81526004016106779061302e565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561088057600080fd5b505af1158015610894573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa1580156108e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090b919061310c565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b15801561099457600080fd5b505af11580156109a8573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109d85760405162461bcd60e51b81526004016106779061302e565b60005b82811015610a7057846001600160a01b03166323b872dd3084878786818110610a0657610a06613087565b905060200201356040518463ffffffff1660e01b8152600401610a2b9392919061309d565b600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b505050508080610a68906130f3565b9150506109db565b5050505050565b600154600114610a995760405162461bcd60e51b815260040161067790613063565b6002600155610aa781611867565b4715610ab95760008060008047335af1505b60405160019081907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a35060018055565b6000546001600160a01b03163314610b185760405162461bcd60e51b81526004016106779061302e565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8d9190613129565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610be191906130c1565b6000604051808303816000865af19150503d8060008114610c1e576040519150601f19603f3d011682016040523d82523d6000602084013e610c23565b606091505b50509050610c3081611b32565b505050565b6000546001600160a01b03163314610c5f5760405162461bcd60e51b81526004016106779061302e565b610c696000611b41565b565b6000546001600160a01b03163314610c955760405162461bcd60e51b81526004016106779061302e565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610cd55760405162461bcd60e51b815260040161067790613063565b60026001556000610ce5826112e0565b90504715610cf95760008060008047335af1505b81516040518291907fd6fc501c15afd37f80e6129ecf479bbf8e2d33edd93db294e7463f4661c125db90600090a3505060018055565b6000546001600160a01b03163314610d595760405162461bcd60e51b81526004016106779061302e565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190613142565b6000546001600160a01b03163314610df65760405162461bcd60e51b81526004016106779061302e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e425760405162461bcd60e51b81526004016106779061302e565b60005b84811015610f2157866001600160a01b031663f242432a3084898986818110610e7057610e70613087565b90506020020135888887818110610e8957610e89613087565b6040516001600160e01b031960e089901b1681526001600160a01b03968716600482015295909416602486015250604484019190915260209091020135606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050508080610f19906130f3565b915050610e45565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610f4a57600080fd5b6004805461ffff60a01b19169055565b600454600090600160a01b900460ff16610fab5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b6044820152606401610677565b600154600114610fcd5760405162461bcd60e51b815260040161067790613063565b6002600155610fdd878787611b91565b610fe684611233565b6000610ff1846112e0565b9050610ffc83611660565b60018055979650505050505050565b6000546001600160a01b031633146110355760405162461bcd60e51b81526004016106779061302e565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6060611066826004818661315f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b6000546001600160a01b031633146110cc5760405162461bcd60e51b81526004016106779061302e565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146111145760405162461bcd60e51b81526004016106779061302e565b6001600160a01b0381166111795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610677565b61068a81611b41565b6000546001600160a01b031633146111ac5760405162461bcd60e51b81526004016106779061302e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610c305760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b6064820152608401610677565b60005b81518110156112dc5760035482516000916001600160a01b03169084908490811061126357611263613087565b60200260200101516000015160405161127c91906130c1565b600060405180830381855af49150503d80600081146112b7576040519150601f19603f3d011682016040523d82523d6000602084013e6112bc565b606091505b505090506112c981611b32565b50806112d4816130f3565b915050611236565b5050565b600080805b835181101561132b5783818151811061130057611300613087565b602002602001015160200151826113179190613189565b915080611323816130f3565b9150506112e5565b506103e861133b826103ed6131a1565b61134591906131c0565b34101561138f5760405162461bcd60e51b8152602060048201526018602482015277496e737566696369656e7420746f74616c2066756e64732160401b6044820152606401610677565b60008060005b855181101561160e576005548651600091829182916001600160a01b03169063b1283e77908b90879081106113cc576113cc613087565b6020026020010151600001516040518263ffffffff1660e01b81526004016113f691815260200190565b606060405180830381865afa158015611413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143791906131e2565b925092509250806114845760405162461bcd60e51b815260206004820152601760248201527617dd1c9859194e88125b9058dd1a5d994813585c9ad95d604a1b6044820152606401610677565b60008261152657836001600160a01b03168a86815181106114a7576114a7613087565b6020026020010151602001518b87815181106114c5576114c5613087565b6020026020010151604001516040516114de91906130c1565b60006040518083038185875af1925050503d806000811461151b576040519150601f19603f3d011682016040523d82523d6000602084013e611520565b606091505b5061159d565b836001600160a01b03168a868151811061154257611542613087565b60200260200101516040015160405161155b91906130c1565b600060405180830381855af49150503d8060008114611596576040519150601f19603f3d011682016040523d82523d6000602084013e61159b565b606091505b505b50905080156115f7576103e88a86815181106115bb576115bb613087565b60200260200101516020015160056115d391906131a1565b6115dd91906131c0565b6115e79088613189565b96506115f4600187613189565b95505b505050508080611606906130f3565b915050611395565b5081156116585760405173d92ed451d94983957957c97f54d3c685d84d316a9083156108fc029084906000818181858888f19350505050158015611656573d6000803e3d6000fd5b505b949350505050565b47156116725760008060008047335af1505b60005b81518110156112dc57600082828151811061169257611692613087565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156116e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117069190613129565b11156118555781818151811061171e5761171e613087565b60200260200101516001600160a01b031663a9059cbb3384848151811061174757611747613087565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190613129565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161180f91906130c1565b6000604051808303816000865af19150503d806000811461184c576040519150601f19603f3d011682016040523d82523d6000602084013e611851565b606091505b5050505b8061185f816130f3565b915050611675565b60208101516103e861187b826103ed6131a1565b61188591906131c0565b3410156118cf5760405162461bcd60e51b8152602060048201526018602482015277496e737566696369656e7420746f74616c2066756e64732160401b6044820152606401610677565b600554825160405163b1283e7760e01b81526000928392839283926001600160a01b03169163b1283e779161190b919060040190815260200190565b606060405180830381865afa158015611928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194c91906131e2565b925092509250806119995760405162461bcd60e51b815260206004820152601760248201527617dd1c9859194e88125b9058dd1a5d994813585c9ad95d604a1b6044820152606401610677565b600082611a0957836001600160a01b0316876020015188604001516040516119c191906130c1565b60006040518083038185875af1925050503d80600081146119fe576040519150601f19603f3d011682016040523d82523d6000602084013e611a03565b606091505b50611a67565b836001600160a01b03168760400151604051611a2591906130c1565b600060405180830381855af49150503d8060008114611a60576040519150601f19603f3d011682016040523d82523d6000602084013e611a65565b606091505b505b50905080611ab75760405162461bcd60e51b815260206004820152601760248201527f6275792073696e676c65206974656d206661696c6564210000000000000000006044820152606401610677565b6103e887602001516005611acb91906131a1565b611ad591906131c0565b611adf9086613189565b94508415610f215760405173d92ed451d94983957957c97f54d3c685d84d316a9086156108fc029087906000818181858888f19350505050158015611b28573d6000803e3d6000fd5b5050505050505050565b8061068a573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611c8b578351805182908110611bb257611bb2613087565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611be057611be0613087565b6020026020010151604051602401611bfa9392919061309d565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611c3391906130c1565b6000604051808303816000865af19150503d8060008114611c70576040519150601f19603f3d011682016040523d82523d6000602084013e611c75565b606091505b5050508080611c83906130f3565b915050611b94565b5060005b8251811015611e8057828181518110611caa57611caa613087565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611d0957611d04838281518110611cf757611cf7613087565b6020026020010151611f61565b611e6e565b828181518110611d1b57611d1b613087565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611d7557611d04838281518110611d6857611d68613087565b6020026020010151612100565b60005b838281518110611d8a57611d8a613087565b60200260200101516040015151811015611e6c57838281518110611db057611db0613087565b6020026020010151600001516001600160a01b03166323b872dd611dd13390565b30878681518110611de457611de4613087565b6020026020010151604001518581518110611e0157611e01613087565b60200260200101516040518463ffffffff1660e01b8152600401611e279392919061309d565b600060405180830381600087803b158015611e4157600080fd5b505af1158015611e55573d6000803e3d6000fd5b505050508080611e64906130f3565b915050611d78565b505b80611e78816130f3565b915050611c8f565b5060005b81518110156109a857818181518110611e9f57611e9f613087565b6020026020010151600001516001600160a01b0316632eb2c2d6611ec03390565b30858581518110611ed357611ed3613087565b602002602001015160200151868681518110611ef157611ef1613087565b6020026020010151604001516040518563ffffffff1660e01b8152600401611f1c949392919061326a565b600060405180830381600087803b158015611f3657600080fd5b505af1158015611f4a573d6000803e3d6000fd5b505050508080611f59906130f3565b915050611e84565b60005b8160400151518110156112dc57600082600001516001600160a01b0316635817816884604001518481518110611f9c57611f9c613087565b60200260200101516040518263ffffffff1660e01b8152600401611fc291815260200190565b602060405180830381865afa158015611fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612003919061310c565b90506001600160a01b038116331461206b5760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b6064820152608401610677565b82600001516001600160a01b0316638264fe988460400151848151811061209457612094613087565b60200260200101516040518263ffffffff1660e01b81526004016120ba91815260200190565b600060405180830381600087803b1580156120d457600080fd5b505af11580156120e8573d6000803e3d6000fd5b505050505080806120f8906130f3565b915050611f64565b60005b8160400151518110156112dc5760006121388360400151838151811061212b5761212b613087565b6020026020010151612296565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561218f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b3919061310c565b90506001600160a01b038116331461221b5760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b6064820152608401610677565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561226957600080fd5b505af115801561227d573d6000803e3d6000fd5b505050505050808061228e906130f3565b915050612103565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156122e95780518352602092830192016122d1565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561231757600080fd5b81356001600160e01b03198116811461232f57600080fd5b9392505050565b6001600160a01b038116811461068a57600080fd5b60006020828403121561235d57600080fd5b813561232f81612336565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156123a0576123a0612368565b60405290565b604051602081016001600160401b03811182821017156123a0576123a0612368565b604051601f8201601f191681016001600160401b03811182821017156123f0576123f0612368565b604052919050565b60006001600160401b0382111561241157612411612368565b5060051b60200190565b600082601f83011261242c57600080fd5b8135602061244161243c836123f8565b6123c8565b82815260059290921b8401810191818101908684111561246057600080fd5b8286015b8481101561248457803561247781612336565b8352918301918301612464565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b061243c836123f8565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b8481101561248457803583529183019183016124d3565b6000604082840312156124fc57600080fd5b604051604081016001600160401b03828210818311171561251f5761251f612368565b81604052829350843591508082111561253757600080fd5b6125438683870161241b565b8352602085013591508082111561255957600080fd5b506125668582860161248f565b6020830152505092915050565b600082601f83011261258457600080fd5b81356001600160401b0381111561259d5761259d612368565b6125b0601f8201601f19166020016123c8565b8181528460208386010111156125c557600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082840312156125f457600080fd5b6125fc61237e565b9050813581526020820135602082015260408201356001600160401b0381111561262557600080fd5b61263184828501612573565b60408301525092915050565b600082601f83011261264e57600080fd5b8135602061265e61243c836123f8565b82815260059290921b8401810191818101908684111561267d57600080fd5b8286015b848110156124845780356001600160401b038111156126a05760008081fd5b6126ae8986838b01016125e2565b845250918301918301612681565b600082601f8301126126cd57600080fd5b813560206126dd61243c836123f8565b82815260059290921b840181019181810190868411156126fc57600080fd5b8286015b848110156124845780356001600160401b03808211156127205760008081fd5b90880190818a03601f19018613156127385760008081fd5b6127406123a6565b86830135828111156127525760008081fd5b6127608c8983870101612573565b82525085525050918301918301612700565b6000806000806080858703121561278857600080fd5b84356001600160401b038082111561279f57600080fd5b6127ab888389016124ea565b955060208701359150808211156127c157600080fd5b6127cd8883890161263d565b945060408701359150808211156127e357600080fd5b6127ef888389016126bc565b9350606087013591508082111561280557600080fd5b506128128782880161241b565b91505092959194509250565b60008083601f84011261283057600080fd5b5081356001600160401b0381111561284757600080fd5b60208301915083602082850101111561285f57600080fd5b9250929050565b60008060008060006080868803121561287e57600080fd5b853561288981612336565b9450602086013561289981612336565b93506040860135925060608601356001600160401b038111156128bb57600080fd5b6128c78882890161281e565b969995985093965092949392505050565b60008083601f8401126128ea57600080fd5b5081356001600160401b0381111561290157600080fd5b6020830191508360208260051b850101111561285f57600080fd5b6000806000806060858703121561293257600080fd5b843561293d81612336565b935060208501356001600160401b0381111561295857600080fd5b612964878288016128d8565b909450925050604085013561297881612336565b939692955090935050565b60006020828403121561299557600080fd5b81356001600160401b038111156129ab57600080fd5b611658848285016125e2565b600080604083850312156129ca57600080fd5b82356129d581612336565b915060208301356129e581612336565b809150509250929050565b801515811461068a57600080fd5b600060208284031215612a1057600080fd5b813561232f816129f0565b600060208284031215612a2d57600080fd5b81356001600160401b03811115612a4357600080fd5b6116588482850161263d565b600080600060608486031215612a6457600080fd5b8335612a6f81612336565b92506020840135612a7f81612336565b929592945050506040919091013590565b60008060008060008060808789031215612aa957600080fd5b8635612ab481612336565b955060208701356001600160401b0380821115612ad057600080fd5b612adc8a838b016128d8565b90975095506040890135915080821115612af557600080fd5b50612b0289828a016128d8565b9094509250506060870135612b1681612336565b809150509295509295509295565b60008060008060008060008060a0898b031215612b4057600080fd5b8835612b4b81612336565b97506020890135612b5b81612336565b965060408901356001600160401b0380821115612b7757600080fd5b612b838c838d016128d8565b909850965060608b0135915080821115612b9c57600080fd5b612ba88c838d016128d8565b909650945060808b0135915080821115612bc157600080fd5b50612bce8b828c0161281e565b999c989b5096995094979396929594505050565b600082601f830112612bf357600080fd5b81356020612c0361243c836123f8565b82815260059290921b84018101918181019086841115612c2257600080fd5b8286015b848110156124845780356001600160401b0380821115612c465760008081fd5b908801906060828b03601f1901811315612c605760008081fd5b612c6861237e565b87840135612c7581612336565b815260408481013584811115612c8b5760008081fd5b612c998e8b8389010161241b565b838b015250918401359183831115612cb15760008081fd5b612cbf8d8a8588010161248f565b908201528652505050918301918301612c26565b600082601f830112612ce457600080fd5b81356020612cf461243c836123f8565b82815260059290921b84018101918181019086841115612d1357600080fd5b8286015b848110156124845780356001600160401b0380821115612d375760008081fd5b908801906060828b03601f1901811315612d515760008081fd5b612d5961237e565b87840135612d6681612336565b815260408481013584811115612d7c5760008081fd5b612d8a8e8b8389010161248f565b838b015250918401359183831115612da25760008081fd5b612db08d8a8588010161248f565b908201528652505050918301918301612d17565b60008060008060008060c08789031215612ddd57600080fd5b86356001600160401b0380821115612df457600080fd5b612e008a838b016124ea565b97506020890135915080821115612e1657600080fd5b612e228a838b01612be2565b96506040890135915080821115612e3857600080fd5b612e448a838b01612cd3565b95506060890135915080821115612e5a57600080fd5b612e668a838b016126bc565b94506080890135915080821115612e7c57600080fd5b612e888a838b0161263d565b935060a0890135915080821115612e9e57600080fd5b50612eab89828a0161241b565b9150509295509295509295565b60008060208385031215612ecb57600080fd5b82356001600160401b03811115612ee157600080fd5b612eed8582860161281e565b90969095509350505050565b60005b83811015612f14578181015183820152602001612efc565b838111156109a85750506000910152565b6020815260008251806020840152612f44816040850160208701612ef9565b601f01601f19169190910160400192915050565b60008060008060608587031215612f6e57600080fd5b8435612f7981612336565b93506020850135925060408501356001600160401b03811115612f9b57600080fd5b612fa78782880161281e565b95989497509550505050565b60008060008060008060a08789031215612fcc57600080fd5b8635612fd781612336565b95506020870135612fe781612336565b9450604087013593506060870135925060808701356001600160401b0381111561301057600080fd5b61301c89828a0161281e565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b600082516130d3818460208701612ef9565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600060018201613105576131056130dd565b5060010190565b60006020828403121561311e57600080fd5b815161232f81612336565b60006020828403121561313b57600080fd5b5051919050565b60006020828403121561315457600080fd5b815161232f816129f0565b6000808585111561316f57600080fd5b8386111561317c57600080fd5b5050820193919092039150565b6000821982111561319c5761319c6130dd565b500190565b60008160001904831182151516156131bb576131bb6130dd565b500290565b6000826131dd57634e487b7160e01b600052601260045260246000fd5b500490565b6000806000606084860312156131f757600080fd5b835161320281612336565b6020850151909350613213816129f0565b6040850151909250613224816129f0565b809150509250925092565b600081518084526020808501945080840160005b8381101561325f57815187529582019590820190600101613243565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906132969083018561322f565b82810360608401526132a8818561322f565b83810360809094019390935250506000815260200194935050505056fea2646970667358221220d4305e9f8e59b8cf8f7a6ba9c37536c52a558ef4fe2547ecc2b2783c1718e90064736f6c634300080d0033

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.