Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
TrackSwap
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "./utils/ReentrancyGuard.sol"; import "./MarketRegistry.sol"; import "./SpecialTransferHelper.sol"; import "./libs/X2Y2Market.sol"; import "./interfaces/IExecutionStrategy.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; contract TrackSwap is SpecialTransferHelper, Ownable, ReentrancyGuard { // ERC721 interfaceID bytes4 public constant INTERFACE_ID_ERC721 = 0x80ac58cd; // ERC1155 interfaceID bytes4 public constant INTERFACE_ID_ERC1155 = 0xd9b67a26; struct ERC20Details { address[] tokenAddrs; uint256[] amounts; } struct ERC1155Details { address tokenAddr; uint256[] ids; uint256[] amounts; } struct ConverstionDetails { bytes conversionData; } address public constant GOV = 0xD92ed451d94983957957c97F54d3c685D84D316a; address public constant X2Y2_ERC721_DELEGATE = 0xF849de01B080aDC3A814FaBE1E2087475cF2E354; address public constant X2Y2_ERC1155_DELEGATE = 0x024aC22ACdB367a3ae52A3D94aC6649fdc1f0779; address public guardian; address public converter; address public punkProxy; bool public openForTrades; bool public openForFreeTrades; MarketRegistry public marketRegistry; modifier isOpenForTrades() { require(openForTrades, "trades not allowed"); _; } modifier isOpenForFreeTrades() { require(openForFreeTrades, "free trades not allowed"); _; } constructor(address _marketRegistry, address _guardian) { marketRegistry = MarketRegistry(_marketRegistry); guardian = _guardian; openForTrades = true; openForFreeTrades = true; } function setUp() external onlyOwner { // Create CryptoPunk Proxy IWrappedPunk(0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6).registerProxy(); punkProxy = IWrappedPunk(0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6).proxyInfo(address(this)); // approve wrapped mooncats rescue to AcclimatedMoonCats contract IERC721(0x7C40c393DC0f283F318791d746d894DdD3693572).setApprovalForAll(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69, true); } // modifies `src` function _arrayReplace( bytes memory src, bytes memory replacement, bytes memory mask ) internal view virtual { require(src.length == replacement.length); require(src.length == mask.length); for (uint256 i = 0; i < src.length; i++) { if (mask[i] != 0) { src[i] = replacement[i]; } } } // @audit This function is used to approve specific tokens to specific market contracts with high volume. // This is done in very rare cases for the gas optimization purposes. function setOneTimeApproval(IERC20 token, address operator, uint256 amount) external onlyOwner { token.approve(operator, amount); } function updateGuardian(address _guardian) external onlyOwner { guardian = _guardian; } function setOpenForTrades(bool _openForTrades) external onlyOwner { openForTrades = _openForTrades; } function setOpenForFreeTrades(bool _openForFreeTrades) external onlyOwner { openForFreeTrades = _openForFreeTrades; } // @audit we will setup a system that will monitor the contract for any leftover // assets. In case any asset is leftover, the system should be able to trigger this // function to close all the trades until the leftover assets are rescued. function closeAllTrades() external { require(_msgSender() == guardian); openForTrades = false; openForFreeTrades = false; } function setConverter(address _converter) external onlyOwner { converter = _converter; } function setMarketRegistry(MarketRegistry _marketRegistry) external onlyOwner { marketRegistry = _marketRegistry; } function _transferEth(address _to, uint256 _amount) internal { bool callStatus; assembly { // Transfer the ETH and store if it succeeded or not. callStatus := call(gas(), _to, _amount, 0, 0, 0, 0) } require(callStatus, "_transferEth: Eth transfer failed"); } function _checkCallResult(bool _success) internal pure { if (!_success) { // Copy revert reason from call assembly { returndatacopy(0, 0, returndatasize()) revert(0, returndatasize()) } } } function _transferFromHelper( ERC20Details memory erc20Details, SpecialTransferHelper.ERC721Details[] memory erc721Details, ERC1155Details[] memory erc1155Details ) internal { // transfer ERC20 tokens from the sender to this contract for (uint256 i = 0; i < erc20Details.tokenAddrs.length; i++) { erc20Details.tokenAddrs[i].call(abi.encodeWithSelector(0x23b872dd, msg.sender, address(this), erc20Details.amounts[i])); } // transfer ERC721 tokens from the sender to this contract for (uint256 i = 0; i < erc721Details.length; i++) { // accept CryptoPunks if (erc721Details[i].tokenAddr == 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB) { _acceptCryptoPunk(erc721Details[i]); } // accept Mooncat else if (erc721Details[i].tokenAddr == 0x60cd862c9C687A9dE49aecdC3A99b74A4fc54aB6) { _acceptMoonCat(erc721Details[i]); } // default else { for (uint256 j = 0; j < erc721Details[i].ids.length; j++) { IERC721(erc721Details[i].tokenAddr).transferFrom( _msgSender(), address(this), erc721Details[i].ids[j] ); } } } // transfer ERC1155 tokens from the sender to this contract for (uint256 i = 0; i < erc1155Details.length; i++) { IERC1155(erc1155Details[i].tokenAddr).safeBatchTransferFrom( _msgSender(), address(this), erc1155Details[i].ids, erc1155Details[i].amounts, "" ); } } function _conversionHelper( ConverstionDetails[] memory _converstionDetails ) internal { for (uint256 i = 0; i < _converstionDetails.length; i++) { // convert to desired asset (bool success, ) = converter.delegatecall(_converstionDetails[i].conversionData); // check if the call passed successfully _checkCallResult(success); } } function _trade( MarketRegistry.TradeDetails[] memory _tradeDetails ) internal { uint256 totalValue = 0; for (uint256 i = 0; i < _tradeDetails.length; i++) { totalValue += _tradeDetails[i].value; } require(msg.value >= totalValue * 1005/1000, "Insuficient total funds!"); uint256 fee = 0; for (uint256 i = 0; i < _tradeDetails.length; i++) { // get market details (address _proxy, bool _isLib, bool _isActive) = marketRegistry.markets(_tradeDetails[i].marketId); // market should be active require(_isActive, "_trade: InActive Market"); // execute trade (bool success, ) = _isLib ? _proxy.delegatecall(_tradeDetails[i].tradeData) : _proxy.call{value:_tradeDetails[i].value}(_tradeDetails[i].tradeData); // check if the call passed successfully if(success) { fee += _tradeDetails[i].value * 1005 / 1000; if(_tradeDetails[i].marketId == 2) { // X2Y2 X2Y2Market.RunInput memory input = abi.decode(_tradeDetails[i].tradeData, (X2Y2Market.RunInput)); for(uint256 k=0; k < input.details.length; k ++) { X2Y2Market.SettleDetail memory detail = input.details[k]; X2Y2Market.Order memory order = input.orders[detail.orderIdx]; X2Y2Market.OrderItem memory item = order.items[detail.itemIdx]; bytes memory data = item.data; { if (order.dataMask.length > 0 && detail.dataReplacement.length > 0) { _arrayReplace(data, detail.dataReplacement, order.dataMask); } } if(address(detail.executionDelegate) == X2Y2_ERC721_DELEGATE) { X2Y2Market.ERC721Pair[] memory pairs = abi.decode(data, (X2Y2Market.ERC721Pair[])); for (uint256 j = 0; j < pairs.length; j++) { X2Y2Market.ERC721Pair memory p = pairs[j]; if(p.token.ownerOf(p.tokenId) == address(this)) p.token.safeTransferFrom(address(this), msg.sender, p.tokenId); } }else if(address(detail.executionDelegate) == X2Y2_ERC1155_DELEGATE) { X2Y2Market.ERC1155Pair[] memory pairs = abi.decode(data, (X2Y2Market.ERC1155Pair[])); for (uint256 j = 0; j < pairs.length; j++) { X2Y2Market.ERC1155Pair memory p = pairs[j]; p.token.safeTransferFrom(address(this), msg.sender, p.tokenId, p.amount, ""); } } } } if(_tradeDetails[i].marketId == 3) { (OrderTypes.TakerOrder memory takerBid, OrderTypes.MakerOrder memory makerAsk) = abi.decode(_tradeDetails[i].tradeData, (OrderTypes.TakerOrder, OrderTypes.MakerOrder)); // Retrieve execution parameters (, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy).canExecuteTakerBid(takerBid, makerAsk); if (IERC165(makerAsk.collection).supportsInterface(INTERFACE_ID_ERC721)) { IERC721(makerAsk.collection).transferFrom(address(this), msg.sender, tokenId); } else if (IERC165(makerAsk.collection).supportsInterface(INTERFACE_ID_ERC1155)) { IERC1155(makerAsk.collection).safeTransferFrom(address(this), msg.sender, tokenId, amount, ""); } } } } if(fee > 0) payable(GOV).transfer(fee); } function _returnDust(address[] memory _tokens) internal { // return remaining ETH (if any) assembly { if gt(selfbalance(), 0) { let callStatus := call( gas(), caller(), selfbalance(), 0, 0, 0, 0 ) } } // return remaining tokens (if any) for (uint256 i = 0; i < _tokens.length; i++) { if (IERC20(_tokens[i]).balanceOf(address(this)) > 0) { _tokens[i].call(abi.encodeWithSelector(0xa9059cbb, msg.sender, IERC20(_tokens[i]).balanceOf(address(this)))); } } } function batchBuyWithETH( MarketRegistry.TradeDetails[] memory tradeDetails ) payable external nonReentrant { // execute trades _trade(tradeDetails); // return remaining ETH (if any) assembly { if gt(selfbalance(), 0) { let callStatus := call( gas(), caller(), selfbalance(), 0, 0, 0, 0 ) } } } function batchBuyWithERC20s( ERC20Details memory erc20Details, MarketRegistry.TradeDetails[] memory tradeDetails, ConverstionDetails[] memory converstionDetails, address[] memory dustTokens ) payable external nonReentrant { // transfer ERC20 tokens from the sender to this contract for (uint256 i = 0; i < erc20Details.tokenAddrs.length; i++) { erc20Details.tokenAddrs[i].call(abi.encodeWithSelector(0x23b872dd, msg.sender, address(this), erc20Details.amounts[i])); } // Convert any assets if needed _conversionHelper(converstionDetails); // execute trades _trade(tradeDetails); // return dust tokens (if any) _returnDust(dustTokens); } // swaps any combination of ERC-20/721/1155 // User needs to approve assets before invoking swap // WARNING: DO NOT SEND TOKENS TO THIS FUNCTION DIRECTLY!!! function multiAssetSwap( ERC20Details memory erc20Details, SpecialTransferHelper.ERC721Details[] memory erc721Details, ERC1155Details[] memory erc1155Details, ConverstionDetails[] memory converstionDetails, MarketRegistry.TradeDetails[] memory tradeDetails, address[] memory dustTokens ) payable external isOpenForTrades nonReentrant { // transfer all tokens _transferFromHelper( erc20Details, erc721Details, erc1155Details ); // Convert any assets if needed _conversionHelper(converstionDetails); // execute trades _trade(tradeDetails); // return dust tokens (if any) _returnDust(dustTokens); } function onERC1155Received( address, address, uint256, uint256, bytes calldata ) public virtual returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) public virtual returns (bytes4) { return this.onERC1155BatchReceived.selector; } function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return 0x150b7a02; } // Used by ERC721BasicToken.sol function onERC721Received( address, uint256, bytes calldata ) external virtual returns (bytes4) { return 0xf0b9e5ba; } function supportsInterface(bytes4 interfaceId) external virtual view returns (bool) { return interfaceId == this.supportsInterface.selector; } receive() external payable {} // Emergency function: In case any ETH get stuck in the contract unintentionally // Only owner can retrieve the asset balance to a recipient address function rescueETH(address recipient) onlyOwner external { _transferEth(recipient, address(this).balance); } // Emergency function: In case any ERC20 tokens get stuck in the contract unintentionally // Only owner can retrieve the asset balance to a recipient address function rescueERC20(address asset, address recipient) onlyOwner external { (bool success, ) = asset.call(abi.encodeWithSelector(0xa9059cbb, recipient, IERC20(asset).balanceOf(address(this)))); _checkCallResult(success); } // Emergency function: In case any ERC721 tokens get stuck in the contract unintentionally // Only owner can retrieve the asset balance to a recipient address function rescueERC721(address asset, uint256[] calldata ids, address recipient) onlyOwner external { for (uint256 i = 0; i < ids.length; i++) { IERC721(asset).transferFrom(address(this), recipient, ids[i]); } } // Emergency function: In case any ERC1155 tokens get stuck in the contract unintentionally // Only owner can retrieve the asset balance to a recipient address function rescueERC1155(address asset, uint256[] calldata ids, uint256[] calldata amounts, address recipient) onlyOwner external { for (uint256 i = 0; i < ids.length; i++) { IERC1155(asset).safeTransferFrom(address(this), recipient, ids[i], amounts[i], ""); } } }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "../interfaces/IDelegate.sol"; library X2Y2Market { struct OrderItem { uint256 price; bytes data; } struct Order { uint256 salt; address user; uint256 network; uint256 intent; uint256 delegateType; uint256 deadline; IERC20 currency; bytes dataMask; OrderItem[] items; // signature bytes32 r; bytes32 s; uint8 v; uint8 signVersion; } struct Fee { uint256 percentage; address to; } struct ERC721Pair { IERC721 token; uint256 tokenId; } struct ERC1155Pair { IERC1155 token; uint256 tokenId; uint256 amount; } struct SettleDetail { X2Y2Market.Op op; uint256 orderIdx; uint256 itemIdx; uint256 price; bytes32 itemHash; IDelegate executionDelegate; bytes dataReplacement; uint256 bidIncentivePct; uint256 aucMinIncrementPct; uint256 aucIncDurationSecs; Fee[] fees; } struct SettleShared { uint256 salt; uint256 deadline; uint256 amountToEth; uint256 amountToWeth; address user; bool canFail; } struct RunInput { Order[] orders; SettleDetail[] details; SettleShared shared; // signature bytes32 r; bytes32 s; uint8 v; } struct OngoingAuction { uint256 price; uint256 netPrice; uint256 endAt; address bidder; } enum InvStatus { NEW, AUCTION, COMPLETE, CANCELLED, REFUNDED } enum Op { INVALID, // off-chain COMPLETE_SELL_OFFER, COMPLETE_BUY_OFFER, CANCEL_OFFER, // auction BID, COMPLETE_AUCTION, REFUND_AUCTION, REFUND_AUCTION_STUCK_ITEM } enum DelegationType { INVALID, ERC721, ERC1155 } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title OrderTypes * @notice This library contains order types for the LooksRare exchange. */ library OrderTypes { // keccak256("MakerOrder(bool isOrderAsk,address signer,address collection,uint256 price,uint256 tokenId,uint256 amount,address strategy,address currency,uint256 nonce,uint256 startTime,uint256 endTime,uint256 minPercentageToAsk,bytes params)") bytes32 internal constant MAKER_ORDER_HASH = 0x40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a85028; struct MakerOrder { bool isOrderAsk; // true --> ask / false --> bid address signer; // signer of the maker order address collection; // collection address uint256 price; // price (used as ) uint256 tokenId; // id of the token uint256 amount; // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155) address strategy; // strategy for trade execution (e.g., DutchAuction, StandardSaleForFixedPrice) address currency; // currency (e.g., WETH) uint256 nonce; // order nonce (must be unique unless new maker order is meant to override existing one e.g., lower ask price) uint256 startTime; // startTime in timestamp uint256 endTime; // endTime in timestamp uint256 minPercentageToAsk; // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // additional parameters uint8 v; // v: parameter (27 or 28) bytes32 r; // r: parameter bytes32 s; // s: parameter } struct TakerOrder { bool isOrderAsk; // true --> ask / false --> bid address taker; // msg.sender uint256 price; // final price for the purchase uint256 tokenId; uint256 minPercentageToAsk; // // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // other params (e.g., tokenId) } function hash(MakerOrder memory makerOrder) internal pure returns (bytes32) { return keccak256( abi.encode( MAKER_ORDER_HASH, makerOrder.isOrderAsk, makerOrder.signer, makerOrder.collection, makerOrder.price, makerOrder.tokenId, makerOrder.amount, makerOrder.strategy, makerOrder.currency, makerOrder.nonce, makerOrder.startTime, makerOrder.endTime, makerOrder.minPercentageToAsk, keccak256(makerOrder.params) ) ); } }
// 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); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {OrderTypes} from "../libs/OrderTypes.sol"; interface IExecutionStrategy { function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external view returns ( bool, uint256, uint256 ); function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external view returns ( bool, uint256, uint256 ); function viewProtocolFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma abicoder v2; interface IDelegate { function delegateType() external view returns (uint256); function executeSell( address seller, address buyer, bytes calldata data ) external returns (bool); function executeBuy( address seller, address buyer, bytes calldata data ) external returns (bool); function executeBid( address seller, address previousBidder, address bidder, bytes calldata data ) external returns (bool); function executeAuctionComplete( address seller, address buyer, bytes calldata data ) external returns (bool); function executeAuctionRefund( address seller, address lastBidder, bytes calldata data ) external returns (bool); }
// 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; }
// 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]); } } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; contract MarketRegistry is Ownable { struct TradeDetails { uint256 marketId; uint256 value; bytes tradeData; } struct Market { address proxy; bool isLib; bool isActive; } Market[] public markets; constructor(address[] memory proxies, bool[] memory isLibs) { for (uint256 i = 0; i < proxies.length; i++) { markets.push(Market(proxies[i], isLibs[i], true)); } } function addMarket(address proxy, bool isLib) external onlyOwner { markets.push(Market(proxy, isLib, true)); } function setMarketStatus(uint256 marketId, bool newStatus) external onlyOwner { Market storage market = markets[marketId]; market.isActive = newStatus; } function setMarketProxy(uint256 marketId, address newProxy, bool isLib) external onlyOwner { Market storage market = markets[marketId]; market.proxy = newProxy; market.isLib = isLib; } }
// 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); }
// 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; } }
// 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); }
// 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); }
// 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; }
// 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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_marketRegistry","type":"address"},{"internalType":"address","name":"_guardian","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"GOV","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTERFACE_ID_ERC1155","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTERFACE_ID_ERC721","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"X2Y2_ERC1155_DELEGATE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"X2Y2_ERC721_DELEGATE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC20Details","name":"erc20Details","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"conversionData","type":"bytes"}],"internalType":"struct TrackSwap.ConverstionDetails[]","name":"converstionDetails","type":"tuple[]"},{"internalType":"address[]","name":"dustTokens","type":"address[]"}],"name":"batchBuyWithERC20s","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"}],"name":"batchBuyWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"closeAllTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"converter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketRegistry","outputs":[{"internalType":"contract MarketRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC20Details","name":"erc20Details","type":"tuple"},{"components":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"internalType":"struct SpecialTransferHelper.ERC721Details[]","name":"erc721Details","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct TrackSwap.ERC1155Details[]","name":"erc1155Details","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"conversionData","type":"bytes"}],"internalType":"struct TrackSwap.ConverstionDetails[]","name":"converstionDetails","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"marketId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"tradeData","type":"bytes"}],"internalType":"struct MarketRegistry.TradeDetails[]","name":"tradeDetails","type":"tuple[]"},{"internalType":"address[]","name":"dustTokens","type":"address[]"}],"name":"multiAssetSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openForFreeTrades","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openForTrades","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_converter","type":"address"}],"name":"setConverter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract MarketRegistry","name":"_marketRegistry","type":"address"}],"name":"setMarketRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setOneTimeApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openForFreeTrades","type":"bool"}],"name":"setOpenForFreeTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openForTrades","type":"bool"}],"name":"setOpenForTrades","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_guardian","type":"address"}],"name":"updateGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600180553480156200001557600080fd5b5060405162004262380380620042628339810160408190526200003891620000f8565b62000043336200008b565b600580546001600160a01b03199081166001600160a01b039485161790915560028054909116919092161790556004805461ffff60a01b191661010160a01b17905562000130565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f357600080fd5b919050565b600080604083850312156200010c57600080fd5b6200011783620000db565b91506200012760208401620000db565b90509250929050565b61412280620001406000396000f3fe6080604052600436106101fd5760003560e01c80639f2ba09b1161010d578063cba64967116100a0578063ecb96fe61161006f578063ecb96fe6146105e3578063f0b9e5ba14610603578063f23a6e611461062e578063f2fde38b1461065b578063fc5253951461067b57600080fd5b8063cba6496714610568578063d85797041461057b578063ddb4dddc1461059b578063e6041f9a146105c357600080fd5b8063bc197c81116100dc578063bc197c81146104e9578063bc6bc0cd14610518578063bd38837b14610533578063c5cadd7f1461055357600080fd5b80639f2ba09b14610468578063a1b6279714610488578063b19337a4146104a9578063b7ce33a2146104c957600080fd5b806327ad5f9f116101905780636335f25e1161015f5780636335f25e146103e2578063715018a61461040257806383206e80146104175780638da5cb5b146104375780639a2b81151461045557600080fd5b806327ad5f9f1461035f57806333bf615614610387578063452a9320146103a25780635d799f87146103c257600080fd5b806311f85417116101cc57806311f8541714610299578063150b7a02146102ba578063180cb47f146102ff57806326e2dca21461033f57600080fd5b806301ffc9a71461020957806304824e701461024f57806309ba153d146102715780630a9254e41461028457600080fd5b3661020457005b600080fd5b34801561021557600080fd5b5061023a610224366004612613565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026f61026a366004612659565b61069b565b005b61026f61027f366004612b0c565b6106db565b34801561029057600080fd5b5061026f610822565b3480156102a557600080fd5b5060045461023a90600160a81b900460ff1681565b3480156102c657600080fd5b506102e66102d5366004612c00565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610246565b34801561030b57600080fd5b5061032773d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610246565b34801561034b57600080fd5b5061026f61035a366004612cb6565b6109c9565b34801561036b57600080fd5b5061032773024ac22acdb367a3ae52a3d94ac6649fdc1f077981565b34801561039357600080fd5b506102e6636cdb3d1360e11b81565b3480156103ae57600080fd5b50600254610327906001600160a01b031681565b3480156103ce57600080fd5b5061026f6103dd366004612d1d565b610a92565b3480156103ee57600080fd5b50600454610327906001600160a01b031681565b34801561040e57600080fd5b5061026f610bd9565b34801561042357600080fd5b5061026f610432366004612d64565b610c0f565b34801561044357600080fd5b506000546001600160a01b0316610327565b61026f610463366004612d81565b610c57565b34801561047457600080fd5b5061026f610483366004612dbd565b610ca0565b34801561049457600080fd5b5060045461023a90600160a01b900460ff1681565b3480156104b557600080fd5b5061026f6104c4366004612659565b610d3d565b3480156104d557600080fd5b5061026f6104e4366004612dfe565b610d89565b3480156104f557600080fd5b506102e6610504366004612e92565b63bc197c8160e01b98975050505050505050565b34801561052457600080fd5b506102e66380ac58cd60e01b81565b34801561053f57600080fd5b50600354610327906001600160a01b031681565b34801561055f57600080fd5b5061026f610e6e565b61026f610576366004613132565b610e9e565b34801561058757600080fd5b5061026f610596366004612659565b610f45565b3480156105a757600080fd5b5061032773f849de01b080adc3a814fabe1e2087475cf2e35481565b3480156105cf57600080fd5b5061026f6105de366004612d64565b610f91565b3480156105ef57600080fd5b50600554610327906001600160a01b031681565b34801561060f57600080fd5b506102e661061e366004613226565b63785cf2dd60e11b949350505050565b34801561063a57600080fd5b506102e6610649366004613281565b63f23a6e6160e01b9695505050505050565b34801561066757600080fd5b5061026f610676366004612659565b610fd9565b34801561068757600080fd5b5061026f610696366004612659565b611071565b6000546001600160a01b031633146106ce5760405162461bcd60e51b81526004016106c5906132fc565b60405180910390fd5b6106d881476110bd565b50565b6001546001146106fd5760405162461bcd60e51b81526004016106c590613331565b600260015560005b8451518110156107fc57845180518290811061072357610723613355565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061075157610751613355565b602002602001015160405160240161076b9392919061336b565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516107a491906133bb565b6000604051808303816000865af19150503d80600081146107e1576040519150601f19603f3d011682016040523d82523d6000602084013e6107e6565b606091505b50505080806107f4906133ed565b915050610705565b5061080682611122565b61080f836111cf565b61081881611b92565b5050600180555050565b6000546001600160a01b0316331461084c5760405162461bcd60e51b81526004016106c5906132fc565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109269190613416565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b1580156109af57600080fd5b505af11580156109c3573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109f35760405162461bcd60e51b81526004016106c5906132fc565b60005b82811015610a8b57846001600160a01b03166323b872dd3084878786818110610a2157610a21613355565b905060200201356040518463ffffffff1660e01b8152600401610a469392919061336b565b600060405180830381600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050508080610a83906133ed565b9150506109f6565b5050505050565b6000546001600160a01b03163314610abc5760405162461bcd60e51b81526004016106c5906132fc565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190613433565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610b8591906133bb565b6000604051808303816000865af19150503d8060008114610bc2576040519150601f19603f3d011682016040523d82523d6000602084013e610bc7565b606091505b50509050610bd481611d99565b505050565b6000546001600160a01b03163314610c035760405162461bcd60e51b81526004016106c5906132fc565b610c0d6000611da8565b565b6000546001600160a01b03163314610c395760405162461bcd60e51b81526004016106c5906132fc565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610c795760405162461bcd60e51b81526004016106c590613331565b6002600155610c87816111cf565b4715610c995760008060008047335af1505b5060018055565b6000546001600160a01b03163314610cca5760405162461bcd60e51b81526004016106c5906132fc565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190613457565b6000546001600160a01b03163314610d675760405162461bcd60e51b81526004016106c5906132fc565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610db35760405162461bcd60e51b81526004016106c5906132fc565b60005b84811015610e6557866001600160a01b031663f242432a3084898986818110610de157610de1613355565b90506020020135888887818110610dfa57610dfa613355565b905060200201356040518563ffffffff1660e01b8152600401610e209493929190613474565b600060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050508080610e5d906133ed565b915050610db6565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610e8e57600080fd5b6004805461ffff60a01b19169055565b600454600160a01b900460ff16610eec5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b60448201526064016106c5565b600154600114610f0e5760405162461bcd60e51b81526004016106c590613331565b6002600155610f1e868686611df8565b610f2783611122565b610f30826111cf565b610f3981611b92565b50506001805550505050565b6000546001600160a01b03163314610f6f5760405162461bcd60e51b81526004016106c5906132fc565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fbb5760405162461bcd60e51b81526004016106c5906132fc565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146110035760405162461bcd60e51b81526004016106c5906132fc565b6001600160a01b0381166110685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c5565b6106d881611da8565b6000546001600160a01b0316331461109b5760405162461bcd60e51b81526004016106c5906132fc565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610bd45760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b60648201526084016106c5565b60005b81518110156111cb5760035482516000916001600160a01b03169084908490811061115257611152613355565b60200260200101516000015160405161116b91906133bb565b600060405180830381855af49150503d80600081146111a6576040519150601f19603f3d011682016040523d82523d6000602084013e6111ab565b606091505b505090506111b881611d99565b50806111c3816133ed565b915050611125565b5050565b6000805b8251811015611219578281815181106111ee576111ee613355565b6020026020010151602001518261120591906134ac565b915080611211816133ed565b9150506111d3565b506103e8611229826103ed6134c4565b61123391906134e3565b3410156112825760405162461bcd60e51b815260206004820152601860248201527f496e737566696369656e7420746f74616c2066756e647321000000000000000060448201526064016106c5565b6000805b8351811015611b4a576005548451600091829182916001600160a01b03169063b1283e77908990879081106112bd576112bd613355565b6020026020010151600001516040518263ffffffff1660e01b81526004016112e791815260200190565b606060405180830381865afa158015611304573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113289190613505565b9250925092508061137b5760405162461bcd60e51b815260206004820152601760248201527f5f74726164653a20496e416374697665204d61726b657400000000000000000060448201526064016106c5565b60008261141d57836001600160a01b031688868151811061139e5761139e613355565b6020026020010151602001518987815181106113bc576113bc613355565b6020026020010151604001516040516113d591906133bb565b60006040518083038185875af1925050503d8060008114611412576040519150601f19603f3d011682016040523d82523d6000602084013e611417565b606091505b50611494565b836001600160a01b031688868151811061143957611439613355565b60200260200101516040015160405161145291906133bb565b600060405180830381855af49150503d806000811461148d576040519150601f19603f3d011682016040523d82523d6000602084013e611492565b606091505b505b5090508015611b33576103e88886815181106114b2576114b2613355565b6020026020010151602001516103ed6114cb91906134c4565b6114d591906134e3565b6114df90876134ac565b95508785815181106114f3576114f3613355565b60200260200101516000015160020361188e57600088868151811061151a5761151a613355565b6020026020010151604001518060200190518101906115399190613a3f565b905060005b81602001515181101561188b5760008260200151828151811061156357611563613355565b602002602001015190506000836000015182602001518151811061158957611589613355565b6020026020010151905060008161010001518360400151815181106115b0576115b0613355565b6020026020010151905060008160200151905060008360e00151511180156115dd575060008460c0015151115b156115f5576115f5818560c001518560e001516121c8565b73f849de01b080adc3a814fabe1e2087475cf2e3546001600160a01b03168460a001516001600160a01b03160361177a5760008180602001905181019061163c9190613b0a565b905060005b815181101561177357600082828151811061165e5761165e613355565b60200260200101519050306001600160a01b031681600001516001600160a01b0316636352211e83602001516040518263ffffffff1660e01b81526004016116a891815260200190565b602060405180830381865afa1580156116c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e99190613416565b6001600160a01b0316036117605780516020820151604051632142170760e11b81526001600160a01b03909216916342842e0e9161172d913091339160040161336b565b600060405180830381600087803b15801561174757600080fd5b505af115801561175b573d6000803e3d6000fd5b505050505b508061176b816133ed565b915050611641565b5050611874565b73024ac22acdb367a3ae52a3d94ac6649fdc1f07796001600160a01b03168460a001516001600160a01b031603611874576000818060200190518101906117c19190613bc8565b905060005b81518110156118715760008282815181106117e3576117e3613355565b6020026020010151905080600001516001600160a01b031663f242432a3033846020015185604001516040518563ffffffff1660e01b815260040161182b9493929190613474565b600060405180830381600087803b15801561184557600080fd5b505af1158015611859573d6000803e3d6000fd5b50505050508080611869906133ed565b9150506117c6565b50505b505050508080611883906133ed565b91505061153e565b50505b8785815181106118a0576118a0613355565b602002602001015160000151600303611b33576000808987815181106118c8576118c8613355565b6020026020010151604001518060200190518101906118e79190613da1565b915091506000808260c001516001600160a01b031663865781ca85856040518363ffffffff1660e01b8152600401611920929190613ea5565b606060405180830381865afa15801561193d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611961919061401f565b60408681015190516301ffc9a760e01b81526380ac58cd60e01b60048201529295509093506001600160a01b031691506301ffc9a790602401602060405180830381865afa1580156119b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119db9190613457565b15611a4b5782604001516001600160a01b03166323b872dd3033856040518463ffffffff1660e01b8152600401611a149392919061336b565b600060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b50505050611b2e565b60408381015190516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b03909116906301ffc9a790602401602060405180830381865afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190613457565b15611b2e5782604001516001600160a01b031663f242432a303385856040518563ffffffff1660e01b8152600401611afb9493929190613474565b600060405180830381600087803b158015611b1557600080fd5b505af1158015611b29573d6000803e3d6000fd5b505050505b505050505b505050508080611b42906133ed565b915050611286565b508015610bd45760405173d92ed451d94983957957c97f54d3c685d84d316a9082156108fc029083906000818181858888f193505050501580156109c3573d6000803e3d6000fd5b4715611ba45760008060008047335af1505b60005b81518110156111cb576000828281518110611bc457611bc4613355565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c389190613433565b1115611d8757818181518110611c5057611c50613355565b60200260200101516001600160a01b031663a9059cbb33848481518110611c7957611c79613355565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ced9190613433565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611d4191906133bb565b6000604051808303816000865af19150503d8060008114611d7e576040519150601f19603f3d011682016040523d82523d6000602084013e611d83565b606091505b5050505b80611d91816133ed565b915050611ba7565b806106d8573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611ef2578351805182908110611e1957611e19613355565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611e4757611e47613355565b6020026020010151604051602401611e619392919061336b565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611e9a91906133bb565b6000604051808303816000865af19150503d8060008114611ed7576040519150601f19603f3d011682016040523d82523d6000602084013e611edc565b606091505b5050508080611eea906133ed565b915050611dfb565b5060005b82518110156120e757828181518110611f1157611f11613355565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611f7057611f6b838281518110611f5e57611f5e613355565b602002602001015161226f565b6120d5565b828181518110611f8257611f82613355565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611fdc57611f6b838281518110611fcf57611fcf613355565b602002602001015161240e565b60005b838281518110611ff157611ff1613355565b602002602001015160400151518110156120d35783828151811061201757612017613355565b6020026020010151600001516001600160a01b03166323b872dd6120383390565b3087868151811061204b5761204b613355565b602002602001015160400151858151811061206857612068613355565b60200260200101516040518463ffffffff1660e01b815260040161208e9392919061336b565b600060405180830381600087803b1580156120a857600080fd5b505af11580156120bc573d6000803e3d6000fd5b5050505080806120cb906133ed565b915050611fdf565b505b806120df816133ed565b915050611ef6565b5060005b81518110156109c35781818151811061210657612106613355565b6020026020010151600001516001600160a01b0316632eb2c2d66121273390565b3085858151811061213a5761213a613355565b60200260200101516020015186868151811061215857612158613355565b6020026020010151604001516040518563ffffffff1660e01b81526004016121839493929190614091565b600060405180830381600087803b15801561219d57600080fd5b505af11580156121b1573d6000803e3d6000fd5b5050505080806121c0906133ed565b9150506120eb565b81518351146121d657600080fd5b80518351146121e457600080fd5b60005b83518110156109c35781818151811061220257612202613355565b01602001516001600160f81b0319161561225d5782818151811061222857612228613355565b602001015160f81c60f81b84828151811061224557612245613355565b60200101906001600160f81b031916908160001a9053505b80612267816133ed565b9150506121e7565b60005b8160400151518110156111cb57600082600001516001600160a01b03166358178168846040015184815181106122aa576122aa613355565b60200260200101516040518263ffffffff1660e01b81526004016122d091815260200190565b602060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613416565b90506001600160a01b03811633146123795760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b60648201526084016106c5565b82600001516001600160a01b0316638264fe98846040015184815181106123a2576123a2613355565b60200260200101516040518263ffffffff1660e01b81526004016123c891815260200190565b600060405180830381600087803b1580156123e257600080fd5b505af11580156123f6573d6000803e3d6000fd5b50505050508080612406906133ed565b915050612272565b60005b8160400151518110156111cb5760006124468360400151838151811061243957612439613355565b60200260200101516125a4565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561249d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c19190613416565b90506001600160a01b03811633146125295760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b60648201526084016106c5565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561257757600080fd5b505af115801561258b573d6000803e3d6000fd5b505050505050808061259c906133ed565b915050612411565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156125f75780518352602092830192016125df565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561262557600080fd5b81356001600160e01b03198116811461263d57600080fd5b9392505050565b6001600160a01b03811681146106d857600080fd5b60006020828403121561266b57600080fd5b813561263d81612644565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156126ae576126ae612676565b60405290565b604051606081016001600160401b03811182821017156126ae576126ae612676565b604051602081016001600160401b03811182821017156126ae576126ae612676565b6040516101a081016001600160401b03811182821017156126ae576126ae612676565b60405161016081016001600160401b03811182821017156126ae576126ae612676565b60405160c081016001600160401b03811182821017156126ae576126ae612676565b60405161020081016001600160401b03811182821017156126ae576126ae612676565b604051601f8201601f191681016001600160401b03811182821017156127ab576127ab612676565b604052919050565b60006001600160401b038211156127cc576127cc612676565b5060051b60200190565b600082601f8301126127e757600080fd5b813560206127fc6127f7836127b3565b612783565b82815260059290921b8401810191818101908684111561281b57600080fd5b8286015b8481101561283f57803561283281612644565b835291830191830161281f565b509695505050505050565b600082601f83011261285b57600080fd5b8135602061286b6127f7836127b3565b82815260059290921b8401810191818101908684111561288a57600080fd5b8286015b8481101561283f578035835291830191830161288e565b6000604082840312156128b757600080fd5b6128bf61268c565b905081356001600160401b03808211156128d857600080fd5b6128e4858386016127d6565b835260208401359150808211156128fa57600080fd5b506129078482850161284a565b60208301525092915050565b60006001600160401b0382111561292c5761292c612676565b50601f01601f191660200190565b600082601f83011261294b57600080fd5b81356129596127f782612913565b81815284602083860101111561296e57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261299c57600080fd5b813560206129ac6127f7836127b3565b82815260059290921b840181019181810190868411156129cb57600080fd5b8286015b8481101561283f5780356001600160401b03808211156129ef5760008081fd5b908801906060828b03601f1901811315612a095760008081fd5b612a116126b4565b838801358152604080850135828a0152918401359183831115612a345760008081fd5b612a428d8a8588010161293a565b9082015286525050509183019183016129cf565b600082601f830112612a6757600080fd5b81356020612a776127f7836127b3565b82815260059290921b84018101918181019086841115612a9657600080fd5b8286015b8481101561283f5780356001600160401b0380821115612aba5760008081fd5b90880190818a03601f1901861315612ad25760008081fd5b612ada6126d6565b8683013582811115612aec5760008081fd5b612afa8c898387010161293a565b82525085525050918301918301612a9a565b60008060008060808587031215612b2257600080fd5b84356001600160401b0380821115612b3957600080fd5b612b45888389016128a5565b95506020870135915080821115612b5b57600080fd5b612b678883890161298b565b94506040870135915080821115612b7d57600080fd5b612b8988838901612a56565b93506060870135915080821115612b9f57600080fd5b50612bac878288016127d6565b91505092959194509250565b60008083601f840112612bca57600080fd5b5081356001600160401b03811115612be157600080fd5b602083019150836020828501011115612bf957600080fd5b9250929050565b600080600080600060808688031215612c1857600080fd5b8535612c2381612644565b94506020860135612c3381612644565b93506040860135925060608601356001600160401b03811115612c5557600080fd5b612c6188828901612bb8565b969995985093965092949392505050565b60008083601f840112612c8457600080fd5b5081356001600160401b03811115612c9b57600080fd5b6020830191508360208260051b8501011115612bf957600080fd5b60008060008060608587031215612ccc57600080fd5b8435612cd781612644565b935060208501356001600160401b03811115612cf257600080fd5b612cfe87828801612c72565b9094509250506040850135612d1281612644565b939692955090935050565b60008060408385031215612d3057600080fd5b8235612d3b81612644565b91506020830135612d4b81612644565b809150509250929050565b80151581146106d857600080fd5b600060208284031215612d7657600080fd5b813561263d81612d56565b600060208284031215612d9357600080fd5b81356001600160401b03811115612da957600080fd5b612db58482850161298b565b949350505050565b600080600060608486031215612dd257600080fd5b8335612ddd81612644565b92506020840135612ded81612644565b929592945050506040919091013590565b60008060008060008060808789031215612e1757600080fd5b8635612e2281612644565b955060208701356001600160401b0380821115612e3e57600080fd5b612e4a8a838b01612c72565b90975095506040890135915080821115612e6357600080fd5b50612e7089828a01612c72565b9094509250506060870135612e8481612644565b809150509295509295509295565b60008060008060008060008060a0898b031215612eae57600080fd5b8835612eb981612644565b97506020890135612ec981612644565b965060408901356001600160401b0380821115612ee557600080fd5b612ef18c838d01612c72565b909850965060608b0135915080821115612f0a57600080fd5b612f168c838d01612c72565b909650945060808b0135915080821115612f2f57600080fd5b50612f3c8b828c01612bb8565b999c989b5096995094979396929594505050565b600082601f830112612f6157600080fd5b81356020612f716127f7836127b3565b82815260059290921b84018101918181019086841115612f9057600080fd5b8286015b8481101561283f5780356001600160401b0380821115612fb45760008081fd5b908801906060828b03601f1901811315612fce5760008081fd5b612fd66126b4565b87840135612fe381612644565b815260408481013584811115612ff95760008081fd5b6130078e8b838901016127d6565b838b01525091840135918383111561301f5760008081fd5b61302d8d8a8588010161284a565b908201528652505050918301918301612f94565b600082601f83011261305257600080fd5b813560206130626127f7836127b3565b82815260059290921b8401810191818101908684111561308157600080fd5b8286015b8481101561283f5780356001600160401b03808211156130a55760008081fd5b908801906060828b03601f19018113156130bf5760008081fd5b6130c76126b4565b878401356130d481612644565b8152604084810135848111156130ea5760008081fd5b6130f88e8b8389010161284a565b838b0152509184013591838311156131105760008081fd5b61311e8d8a8588010161284a565b908201528652505050918301918301613085565b60008060008060008060c0878903121561314b57600080fd5b86356001600160401b038082111561316257600080fd5b61316e8a838b016128a5565b9750602089013591508082111561318457600080fd5b6131908a838b01612f50565b965060408901359150808211156131a657600080fd5b6131b28a838b01613041565b955060608901359150808211156131c857600080fd5b6131d48a838b01612a56565b945060808901359150808211156131ea57600080fd5b6131f68a838b0161298b565b935060a089013591508082111561320c57600080fd5b5061321989828a016127d6565b9150509295509295509295565b6000806000806060858703121561323c57600080fd5b843561324781612644565b93506020850135925060408501356001600160401b0381111561326957600080fd5b61327587828801612bb8565b95989497509550505050565b60008060008060008060a0878903121561329a57600080fd5b86356132a581612644565b955060208701356132b581612644565b9450604087013593506060870135925060808701356001600160401b038111156132de57600080fd5b6132ea89828a01612bb8565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133aa578181015183820152602001613392565b838111156109c35750506000910152565b600082516133cd81846020870161338f565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016133ff576133ff6133d7565b5060010190565b805161341181612644565b919050565b60006020828403121561342857600080fd5b815161263d81612644565b60006020828403121561344557600080fd5b5051919050565b805161341181612d56565b60006020828403121561346957600080fd5b815161263d81612d56565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600082198211156134bf576134bf6133d7565b500190565b60008160001904831182151516156134de576134de6133d7565b500290565b60008261350057634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561351a57600080fd5b835161352581612644565b602085015190935061353681612d56565b604085015190925061354781612d56565b809150509250925092565b600082601f83011261356357600080fd5b81516135716127f782612913565b81815284602083860101111561358657600080fd5b612db582602083016020870161338f565b600082601f8301126135a857600080fd5b815160206135b86127f7836127b3565b82815260059290921b840181019181810190868411156135d757600080fd5b8286015b8481101561283f5780516001600160401b03808211156135fb5760008081fd5b908801906040828b03601f19018113156136155760008081fd5b61361d61268c565b8388015181529083015190828211156136365760008081fd5b6136448c8984870101613552565b8189015286525050509183019183016135db565b805160ff8116811461341157600080fd5b600082601f83011261367a57600080fd5b8151602061368a6127f7836127b3565b82815260059290921b840181019181810190868411156136a957600080fd5b8286015b8481101561283f5780516001600160401b03808211156136cd5760008081fd5b908801906101a0828b03601f19018113156136e85760008081fd5b6136f06126f8565b8784015181526040613703818601613406565b89830152606080860151828401526080915081860151818401525060a0808601518284015260c0915081860151818401525060e0613742818701613406565b828401526101009150818601518581111561375d5760008081fd5b61376b8f8c838a0101613552565b82850152505061012080860151858111156137865760008081fd5b6137948f8c838a0101613597565b8385015250610140945084860151818401525050610160808501518483015261018093506137c3848601613658565b908201526137d2848301613658565b92810192909252508452509183019183016136ad565b80516008811061341157600080fd5b600082601f83011261380857600080fd5b815160206138186127f7836127b3565b82815260069290921b8401810191818101908684111561383757600080fd5b8286015b8481101561283f57604081890312156138545760008081fd5b61385c61268c565b815181528482015161386d81612644565b8186015283529183019160400161383b565b600082601f83011261389057600080fd5b815160206138a06127f7836127b3565b82815260059290921b840181019181810190868411156138bf57600080fd5b8286015b8481101561283f5780516001600160401b03808211156138e35760008081fd5b90880190610160828b03601f19018113156138fe5760008081fd5b61390661271b565b6139118885016137e8565b815260408085015189830152606080860151828401526080915081860151818401525060a0808601518284015260c0915061394d828701613406565b9083015260e085810151858111156139655760008081fd5b6139738f8c838a0101613552565b8385015250610100915081860151818401525061012080860151828401526101409150818601518184015250828501519250838311156139b35760008081fd5b6139c18d8a858801016137f7565b9082015286525050509183019183016138c3565b600060c082840312156139e757600080fd5b6139ef61273e565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151613a2181612644565b608082015260a0820151613a3481612d56565b60a082015292915050565b600060208284031215613a5157600080fd5b81516001600160401b0380821115613a6857600080fd5b908301906101608286031215613a7d57600080fd5b613a8561273e565b825182811115613a9457600080fd5b613aa087828601613669565b825250602083015182811115613ab557600080fd5b613ac18782860161387f565b602083015250613ad486604085016139d5565b604082015261010083015160608201526101208301516080820152613afc6101408401613658565b60a082015295945050505050565b60006020808385031215613b1d57600080fd5b82516001600160401b03811115613b3357600080fd5b8301601f81018513613b4457600080fd5b8051613b526127f7826127b3565b81815260069190911b82018301908381019087831115613b7157600080fd5b928401925b82841015613bbd5760408489031215613b8f5760008081fd5b613b9761268c565b8451613ba281612644565b81528486015186820152825260409093019290840190613b76565b979650505050505050565b60006020808385031215613bdb57600080fd5b82516001600160401b03811115613bf157600080fd5b8301601f81018513613c0257600080fd5b8051613c106127f7826127b3565b81815260609182028301840191848201919088841115613c2f57600080fd5b938501935b83851015613c825780858a031215613c4c5760008081fd5b613c546126b4565b8551613c5f81612644565b815285870151878201526040808701519082015283529384019391850191613c34565b50979650505050505050565b60006102008284031215613ca157600080fd5b613ca9612760565b9050613cb48261344c565b8152613cc260208301613406565b6020820152613cd360408301613406565b6040820152606082015160608201526080820151608082015260a082015160a0820152613d0260c08301613406565b60c0820152613d1360e08301613406565b60e08201526101008281015190820152610120808301519082015261014080830151908201526101608083015190820152610180808301516001600160401b03811115613d5f57600080fd5b613d6b85828601613552565b8284015250506101a0613d7f818401613658565b908201526101c082810151908201526101e09182015191810191909152919050565b60008060408385031215613db457600080fd5b82516001600160401b0380821115613dcb57600080fd5b9084019060c08287031215613ddf57600080fd5b613de761273e565b8251613df281612d56565b81526020830151613e0281612644565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015182811115613e3957600080fd5b613e4588828601613552565b60a0830152506020860151909450915080821115613e6257600080fd5b50613e6f85828601613c8e565b9150509250929050565b60008151808452613e9181602086016020860161338f565b601f01601f19169290920160200192915050565b60408152600061010084511515604084015260018060a01b03602086015116606084015260408501516080840152606085015160a0840152608085015160c084015260a085015160c060e0850152613eff82850182613e79565b848103602086015285511515815290506102006020860151613f2c60208401826001600160a01b03169052565b506040860151613f4760408401826001600160a01b03169052565b50606086015160608301526080860151608083015260a086015160a083015260c0860151613f8060c08401826001600160a01b03169052565b5060e0860151613f9b60e08401826001600160a01b03169052565b50858301519282019290925261012080860151908201526101408086015190820152610160808601519082015261018080860151818301849052909290613fe482840182613e79565b935050506101a080860151613ffd8284018260ff169052565b50506101c085810151908201526101e094850151940193909352509092915050565b60008060006060848603121561403457600080fd5b835161403f81612d56565b602085015160409095015190969495509392505050565b600081518084526020808501945080840160005b838110156140865781518752958201959082019060010161406a565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906140bd90830185614056565b82810360608401526140cf8185614056565b83810360809094019390935250506000815260200194935050505056fea264697066735822122067ba72cd3266a52aef510824fe7fc420bb4cdd92b06c9d473b5f1efa63b597c964736f6c634300080d00330000000000000000000000005a20c3886900eddad911522aedd60a9d87f1ece7000000000000000000000000d92ed451d94983957957c97f54d3c685d84d316a
Deployed Bytecode
0x6080604052600436106101fd5760003560e01c80639f2ba09b1161010d578063cba64967116100a0578063ecb96fe61161006f578063ecb96fe6146105e3578063f0b9e5ba14610603578063f23a6e611461062e578063f2fde38b1461065b578063fc5253951461067b57600080fd5b8063cba6496714610568578063d85797041461057b578063ddb4dddc1461059b578063e6041f9a146105c357600080fd5b8063bc197c81116100dc578063bc197c81146104e9578063bc6bc0cd14610518578063bd38837b14610533578063c5cadd7f1461055357600080fd5b80639f2ba09b14610468578063a1b6279714610488578063b19337a4146104a9578063b7ce33a2146104c957600080fd5b806327ad5f9f116101905780636335f25e1161015f5780636335f25e146103e2578063715018a61461040257806383206e80146104175780638da5cb5b146104375780639a2b81151461045557600080fd5b806327ad5f9f1461035f57806333bf615614610387578063452a9320146103a25780635d799f87146103c257600080fd5b806311f85417116101cc57806311f8541714610299578063150b7a02146102ba578063180cb47f146102ff57806326e2dca21461033f57600080fd5b806301ffc9a71461020957806304824e701461024f57806309ba153d146102715780630a9254e41461028457600080fd5b3661020457005b600080fd5b34801561021557600080fd5b5061023a610224366004612613565b6001600160e01b0319166301ffc9a760e01b1490565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026f61026a366004612659565b61069b565b005b61026f61027f366004612b0c565b6106db565b34801561029057600080fd5b5061026f610822565b3480156102a557600080fd5b5060045461023a90600160a81b900460ff1681565b3480156102c657600080fd5b506102e66102d5366004612c00565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610246565b34801561030b57600080fd5b5061032773d92ed451d94983957957c97f54d3c685d84d316a81565b6040516001600160a01b039091168152602001610246565b34801561034b57600080fd5b5061026f61035a366004612cb6565b6109c9565b34801561036b57600080fd5b5061032773024ac22acdb367a3ae52a3d94ac6649fdc1f077981565b34801561039357600080fd5b506102e6636cdb3d1360e11b81565b3480156103ae57600080fd5b50600254610327906001600160a01b031681565b3480156103ce57600080fd5b5061026f6103dd366004612d1d565b610a92565b3480156103ee57600080fd5b50600454610327906001600160a01b031681565b34801561040e57600080fd5b5061026f610bd9565b34801561042357600080fd5b5061026f610432366004612d64565b610c0f565b34801561044357600080fd5b506000546001600160a01b0316610327565b61026f610463366004612d81565b610c57565b34801561047457600080fd5b5061026f610483366004612dbd565b610ca0565b34801561049457600080fd5b5060045461023a90600160a01b900460ff1681565b3480156104b557600080fd5b5061026f6104c4366004612659565b610d3d565b3480156104d557600080fd5b5061026f6104e4366004612dfe565b610d89565b3480156104f557600080fd5b506102e6610504366004612e92565b63bc197c8160e01b98975050505050505050565b34801561052457600080fd5b506102e66380ac58cd60e01b81565b34801561053f57600080fd5b50600354610327906001600160a01b031681565b34801561055f57600080fd5b5061026f610e6e565b61026f610576366004613132565b610e9e565b34801561058757600080fd5b5061026f610596366004612659565b610f45565b3480156105a757600080fd5b5061032773f849de01b080adc3a814fabe1e2087475cf2e35481565b3480156105cf57600080fd5b5061026f6105de366004612d64565b610f91565b3480156105ef57600080fd5b50600554610327906001600160a01b031681565b34801561060f57600080fd5b506102e661061e366004613226565b63785cf2dd60e11b949350505050565b34801561063a57600080fd5b506102e6610649366004613281565b63f23a6e6160e01b9695505050505050565b34801561066757600080fd5b5061026f610676366004612659565b610fd9565b34801561068757600080fd5b5061026f610696366004612659565b611071565b6000546001600160a01b031633146106ce5760405162461bcd60e51b81526004016106c5906132fc565b60405180910390fd5b6106d881476110bd565b50565b6001546001146106fd5760405162461bcd60e51b81526004016106c590613331565b600260015560005b8451518110156107fc57845180518290811061072357610723613355565b60200260200101516001600160a01b03166323b872dd33308860200151858151811061075157610751613355565b602002602001015160405160240161076b9392919061336b565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516107a491906133bb565b6000604051808303816000865af19150503d80600081146107e1576040519150601f19603f3d011682016040523d82523d6000602084013e6107e6565b606091505b50505080806107f4906133ed565b915050610705565b5061080682611122565b61080f836111cf565b61081881611b92565b5050600180555050565b6000546001600160a01b0316331461084c5760405162461bcd60e51b81526004016106c5906132fc565b73b7f7f6c52f2e2fdb1963eab30438024864c313f66001600160a01b031663ddd81f826040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b5050604051631538f65960e31b815230600482015273b7f7f6c52f2e2fdb1963eab30438024864c313f6925063a9c7b2c89150602401602060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109269190613416565b600480546001600160a01b0319166001600160a01b039290921691909117815560405163a22cb46560e01b815273c3f733ca98e0dad0386979eb96fb1722a1a05e699181019190915260016024820152737c40c393dc0f283f318791d746d894ddd36935729063a22cb46590604401600060405180830381600087803b1580156109af57600080fd5b505af11580156109c3573d6000803e3d6000fd5b50505050565b6000546001600160a01b031633146109f35760405162461bcd60e51b81526004016106c5906132fc565b60005b82811015610a8b57846001600160a01b03166323b872dd3084878786818110610a2157610a21613355565b905060200201356040518463ffffffff1660e01b8152600401610a469392919061336b565b600060405180830381600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050508080610a83906133ed565b9150506109f6565b5050505050565b6000546001600160a01b03163314610abc5760405162461bcd60e51b81526004016106c5906132fc565b6040516370a0823160e01b81523060048201526000906001600160a01b0384169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190613433565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610b8591906133bb565b6000604051808303816000865af19150503d8060008114610bc2576040519150601f19603f3d011682016040523d82523d6000602084013e610bc7565b606091505b50509050610bd481611d99565b505050565b6000546001600160a01b03163314610c035760405162461bcd60e51b81526004016106c5906132fc565b610c0d6000611da8565b565b6000546001600160a01b03163314610c395760405162461bcd60e51b81526004016106c5906132fc565b60048054911515600160a01b0260ff60a01b19909216919091179055565b600154600114610c795760405162461bcd60e51b81526004016106c590613331565b6002600155610c87816111cf565b4715610c995760008060008047335af1505b5060018055565b6000546001600160a01b03163314610cca5760405162461bcd60e51b81526004016106c5906132fc565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190613457565b6000546001600160a01b03163314610d675760405162461bcd60e51b81526004016106c5906132fc565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610db35760405162461bcd60e51b81526004016106c5906132fc565b60005b84811015610e6557866001600160a01b031663f242432a3084898986818110610de157610de1613355565b90506020020135888887818110610dfa57610dfa613355565b905060200201356040518563ffffffff1660e01b8152600401610e209493929190613474565b600060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050508080610e5d906133ed565b915050610db6565b50505050505050565b6002546001600160a01b0316336001600160a01b031614610e8e57600080fd5b6004805461ffff60a01b19169055565b600454600160a01b900460ff16610eec5760405162461bcd60e51b81526020600482015260126024820152711d1c9859195cc81b9bdd08185b1b1bddd95960721b60448201526064016106c5565b600154600114610f0e5760405162461bcd60e51b81526004016106c590613331565b6002600155610f1e868686611df8565b610f2783611122565b610f30826111cf565b610f3981611b92565b50506001805550505050565b6000546001600160a01b03163314610f6f5760405162461bcd60e51b81526004016106c5906132fc565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fbb5760405162461bcd60e51b81526004016106c5906132fc565b60048054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146110035760405162461bcd60e51b81526004016106c5906132fc565b6001600160a01b0381166110685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c5565b6106d881611da8565b6000546001600160a01b0316331461109b5760405162461bcd60e51b81526004016106c5906132fc565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080600080600085875af1905080610bd45760405162461bcd60e51b815260206004820152602160248201527f5f7472616e736665724574683a20457468207472616e73666572206661696c656044820152601960fa1b60648201526084016106c5565b60005b81518110156111cb5760035482516000916001600160a01b03169084908490811061115257611152613355565b60200260200101516000015160405161116b91906133bb565b600060405180830381855af49150503d80600081146111a6576040519150601f19603f3d011682016040523d82523d6000602084013e6111ab565b606091505b505090506111b881611d99565b50806111c3816133ed565b915050611125565b5050565b6000805b8251811015611219578281815181106111ee576111ee613355565b6020026020010151602001518261120591906134ac565b915080611211816133ed565b9150506111d3565b506103e8611229826103ed6134c4565b61123391906134e3565b3410156112825760405162461bcd60e51b815260206004820152601860248201527f496e737566696369656e7420746f74616c2066756e647321000000000000000060448201526064016106c5565b6000805b8351811015611b4a576005548451600091829182916001600160a01b03169063b1283e77908990879081106112bd576112bd613355565b6020026020010151600001516040518263ffffffff1660e01b81526004016112e791815260200190565b606060405180830381865afa158015611304573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113289190613505565b9250925092508061137b5760405162461bcd60e51b815260206004820152601760248201527f5f74726164653a20496e416374697665204d61726b657400000000000000000060448201526064016106c5565b60008261141d57836001600160a01b031688868151811061139e5761139e613355565b6020026020010151602001518987815181106113bc576113bc613355565b6020026020010151604001516040516113d591906133bb565b60006040518083038185875af1925050503d8060008114611412576040519150601f19603f3d011682016040523d82523d6000602084013e611417565b606091505b50611494565b836001600160a01b031688868151811061143957611439613355565b60200260200101516040015160405161145291906133bb565b600060405180830381855af49150503d806000811461148d576040519150601f19603f3d011682016040523d82523d6000602084013e611492565b606091505b505b5090508015611b33576103e88886815181106114b2576114b2613355565b6020026020010151602001516103ed6114cb91906134c4565b6114d591906134e3565b6114df90876134ac565b95508785815181106114f3576114f3613355565b60200260200101516000015160020361188e57600088868151811061151a5761151a613355565b6020026020010151604001518060200190518101906115399190613a3f565b905060005b81602001515181101561188b5760008260200151828151811061156357611563613355565b602002602001015190506000836000015182602001518151811061158957611589613355565b6020026020010151905060008161010001518360400151815181106115b0576115b0613355565b6020026020010151905060008160200151905060008360e00151511180156115dd575060008460c0015151115b156115f5576115f5818560c001518560e001516121c8565b73f849de01b080adc3a814fabe1e2087475cf2e3546001600160a01b03168460a001516001600160a01b03160361177a5760008180602001905181019061163c9190613b0a565b905060005b815181101561177357600082828151811061165e5761165e613355565b60200260200101519050306001600160a01b031681600001516001600160a01b0316636352211e83602001516040518263ffffffff1660e01b81526004016116a891815260200190565b602060405180830381865afa1580156116c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e99190613416565b6001600160a01b0316036117605780516020820151604051632142170760e11b81526001600160a01b03909216916342842e0e9161172d913091339160040161336b565b600060405180830381600087803b15801561174757600080fd5b505af115801561175b573d6000803e3d6000fd5b505050505b508061176b816133ed565b915050611641565b5050611874565b73024ac22acdb367a3ae52a3d94ac6649fdc1f07796001600160a01b03168460a001516001600160a01b031603611874576000818060200190518101906117c19190613bc8565b905060005b81518110156118715760008282815181106117e3576117e3613355565b6020026020010151905080600001516001600160a01b031663f242432a3033846020015185604001516040518563ffffffff1660e01b815260040161182b9493929190613474565b600060405180830381600087803b15801561184557600080fd5b505af1158015611859573d6000803e3d6000fd5b50505050508080611869906133ed565b9150506117c6565b50505b505050508080611883906133ed565b91505061153e565b50505b8785815181106118a0576118a0613355565b602002602001015160000151600303611b33576000808987815181106118c8576118c8613355565b6020026020010151604001518060200190518101906118e79190613da1565b915091506000808260c001516001600160a01b031663865781ca85856040518363ffffffff1660e01b8152600401611920929190613ea5565b606060405180830381865afa15801561193d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611961919061401f565b60408681015190516301ffc9a760e01b81526380ac58cd60e01b60048201529295509093506001600160a01b031691506301ffc9a790602401602060405180830381865afa1580156119b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119db9190613457565b15611a4b5782604001516001600160a01b03166323b872dd3033856040518463ffffffff1660e01b8152600401611a149392919061336b565b600060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b50505050611b2e565b60408381015190516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b03909116906301ffc9a790602401602060405180830381865afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190613457565b15611b2e5782604001516001600160a01b031663f242432a303385856040518563ffffffff1660e01b8152600401611afb9493929190613474565b600060405180830381600087803b158015611b1557600080fd5b505af1158015611b29573d6000803e3d6000fd5b505050505b505050505b505050508080611b42906133ed565b915050611286565b508015610bd45760405173d92ed451d94983957957c97f54d3c685d84d316a9082156108fc029083906000818181858888f193505050501580156109c3573d6000803e3d6000fd5b4715611ba45760008060008047335af1505b60005b81518110156111cb576000828281518110611bc457611bc4613355565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c389190613433565b1115611d8757818181518110611c5057611c50613355565b60200260200101516001600160a01b031663a9059cbb33848481518110611c7957611c79613355565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ced9190613433565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611d4191906133bb565b6000604051808303816000865af19150503d8060008114611d7e576040519150601f19603f3d011682016040523d82523d6000602084013e611d83565b606091505b5050505b80611d91816133ed565b915050611ba7565b806106d8573d6000803e3d6000fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b835151811015611ef2578351805182908110611e1957611e19613355565b60200260200101516001600160a01b03166323b872dd333087602001518581518110611e4757611e47613355565b6020026020010151604051602401611e619392919061336b565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611e9a91906133bb565b6000604051808303816000865af19150503d8060008114611ed7576040519150601f19603f3d011682016040523d82523d6000602084013e611edc565b606091505b5050508080611eea906133ed565b915050611dfb565b5060005b82518110156120e757828181518110611f1157611f11613355565b6020026020010151600001516001600160a01b031673b47e3cd837ddf8e4c57f05d70ab865de6e193bbb6001600160a01b031603611f7057611f6b838281518110611f5e57611f5e613355565b602002602001015161226f565b6120d5565b828181518110611f8257611f82613355565b6020026020010151600001516001600160a01b03167360cd862c9c687a9de49aecdc3a99b74a4fc54ab66001600160a01b031603611fdc57611f6b838281518110611fcf57611fcf613355565b602002602001015161240e565b60005b838281518110611ff157611ff1613355565b602002602001015160400151518110156120d35783828151811061201757612017613355565b6020026020010151600001516001600160a01b03166323b872dd6120383390565b3087868151811061204b5761204b613355565b602002602001015160400151858151811061206857612068613355565b60200260200101516040518463ffffffff1660e01b815260040161208e9392919061336b565b600060405180830381600087803b1580156120a857600080fd5b505af11580156120bc573d6000803e3d6000fd5b5050505080806120cb906133ed565b915050611fdf565b505b806120df816133ed565b915050611ef6565b5060005b81518110156109c35781818151811061210657612106613355565b6020026020010151600001516001600160a01b0316632eb2c2d66121273390565b3085858151811061213a5761213a613355565b60200260200101516020015186868151811061215857612158613355565b6020026020010151604001516040518563ffffffff1660e01b81526004016121839493929190614091565b600060405180830381600087803b15801561219d57600080fd5b505af11580156121b1573d6000803e3d6000fd5b5050505080806121c0906133ed565b9150506120eb565b81518351146121d657600080fd5b80518351146121e457600080fd5b60005b83518110156109c35781818151811061220257612202613355565b01602001516001600160f81b0319161561225d5782818151811061222857612228613355565b602001015160f81c60f81b84828151811061224557612245613355565b60200101906001600160f81b031916908160001a9053505b80612267816133ed565b9150506121e7565b60005b8160400151518110156111cb57600082600001516001600160a01b03166358178168846040015184815181106122aa576122aa613355565b60200260200101516040518263ffffffff1660e01b81526004016122d091815260200190565b602060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613416565b90506001600160a01b03811633146123795760405162461bcd60e51b815260206004820152602560248201527f5f61636365707443727970746f50756e6b3a20696e76616c69642070756e6b2060448201526437bbb732b960d91b60648201526084016106c5565b82600001516001600160a01b0316638264fe98846040015184815181106123a2576123a2613355565b60200260200101516040518263ffffffff1660e01b81526004016123c891815260200190565b600060405180830381600087803b1580156123e257600080fd5b505af11580156123f6573d6000803e3d6000fd5b50505050508080612406906133ed565b915050612272565b60005b8160400151518110156111cb5760006124468360400151838151811061243957612439613355565b60200260200101516125a4565b8351604051633894ca5760e01b81526001600160d81b0319831660048201529192506000916001600160a01b0390911690633894ca5790602401602060405180830381865afa15801561249d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c19190613416565b90506001600160a01b03811633146125295760405162461bcd60e51b815260206004820152602560248201527f5f6163636570744d6f6f6e4361743a20696e76616c6964206d6f6f6e6361742060448201526437bbb732b960d91b60648201526084016106c5565b83516040516301be705160e41b81526001600160d81b0319841660048201526001600160a01b0390911690631be7051090602401600060405180830381600087803b15801561257757600080fd5b505af115801561258b573d6000803e3d6000fd5b505050505050808061259c906133ed565b915050612411565b6040805160208082528183019092526000918291906020820181803683375050506020810184815260405191925060059081830190600a8401905b818310156125f75780518352602092830192016125df565b505060058352601f01601f191660405250602001519392505050565b60006020828403121561262557600080fd5b81356001600160e01b03198116811461263d57600080fd5b9392505050565b6001600160a01b03811681146106d857600080fd5b60006020828403121561266b57600080fd5b813561263d81612644565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156126ae576126ae612676565b60405290565b604051606081016001600160401b03811182821017156126ae576126ae612676565b604051602081016001600160401b03811182821017156126ae576126ae612676565b6040516101a081016001600160401b03811182821017156126ae576126ae612676565b60405161016081016001600160401b03811182821017156126ae576126ae612676565b60405160c081016001600160401b03811182821017156126ae576126ae612676565b60405161020081016001600160401b03811182821017156126ae576126ae612676565b604051601f8201601f191681016001600160401b03811182821017156127ab576127ab612676565b604052919050565b60006001600160401b038211156127cc576127cc612676565b5060051b60200190565b600082601f8301126127e757600080fd5b813560206127fc6127f7836127b3565b612783565b82815260059290921b8401810191818101908684111561281b57600080fd5b8286015b8481101561283f57803561283281612644565b835291830191830161281f565b509695505050505050565b600082601f83011261285b57600080fd5b8135602061286b6127f7836127b3565b82815260059290921b8401810191818101908684111561288a57600080fd5b8286015b8481101561283f578035835291830191830161288e565b6000604082840312156128b757600080fd5b6128bf61268c565b905081356001600160401b03808211156128d857600080fd5b6128e4858386016127d6565b835260208401359150808211156128fa57600080fd5b506129078482850161284a565b60208301525092915050565b60006001600160401b0382111561292c5761292c612676565b50601f01601f191660200190565b600082601f83011261294b57600080fd5b81356129596127f782612913565b81815284602083860101111561296e57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261299c57600080fd5b813560206129ac6127f7836127b3565b82815260059290921b840181019181810190868411156129cb57600080fd5b8286015b8481101561283f5780356001600160401b03808211156129ef5760008081fd5b908801906060828b03601f1901811315612a095760008081fd5b612a116126b4565b838801358152604080850135828a0152918401359183831115612a345760008081fd5b612a428d8a8588010161293a565b9082015286525050509183019183016129cf565b600082601f830112612a6757600080fd5b81356020612a776127f7836127b3565b82815260059290921b84018101918181019086841115612a9657600080fd5b8286015b8481101561283f5780356001600160401b0380821115612aba5760008081fd5b90880190818a03601f1901861315612ad25760008081fd5b612ada6126d6565b8683013582811115612aec5760008081fd5b612afa8c898387010161293a565b82525085525050918301918301612a9a565b60008060008060808587031215612b2257600080fd5b84356001600160401b0380821115612b3957600080fd5b612b45888389016128a5565b95506020870135915080821115612b5b57600080fd5b612b678883890161298b565b94506040870135915080821115612b7d57600080fd5b612b8988838901612a56565b93506060870135915080821115612b9f57600080fd5b50612bac878288016127d6565b91505092959194509250565b60008083601f840112612bca57600080fd5b5081356001600160401b03811115612be157600080fd5b602083019150836020828501011115612bf957600080fd5b9250929050565b600080600080600060808688031215612c1857600080fd5b8535612c2381612644565b94506020860135612c3381612644565b93506040860135925060608601356001600160401b03811115612c5557600080fd5b612c6188828901612bb8565b969995985093965092949392505050565b60008083601f840112612c8457600080fd5b5081356001600160401b03811115612c9b57600080fd5b6020830191508360208260051b8501011115612bf957600080fd5b60008060008060608587031215612ccc57600080fd5b8435612cd781612644565b935060208501356001600160401b03811115612cf257600080fd5b612cfe87828801612c72565b9094509250506040850135612d1281612644565b939692955090935050565b60008060408385031215612d3057600080fd5b8235612d3b81612644565b91506020830135612d4b81612644565b809150509250929050565b80151581146106d857600080fd5b600060208284031215612d7657600080fd5b813561263d81612d56565b600060208284031215612d9357600080fd5b81356001600160401b03811115612da957600080fd5b612db58482850161298b565b949350505050565b600080600060608486031215612dd257600080fd5b8335612ddd81612644565b92506020840135612ded81612644565b929592945050506040919091013590565b60008060008060008060808789031215612e1757600080fd5b8635612e2281612644565b955060208701356001600160401b0380821115612e3e57600080fd5b612e4a8a838b01612c72565b90975095506040890135915080821115612e6357600080fd5b50612e7089828a01612c72565b9094509250506060870135612e8481612644565b809150509295509295509295565b60008060008060008060008060a0898b031215612eae57600080fd5b8835612eb981612644565b97506020890135612ec981612644565b965060408901356001600160401b0380821115612ee557600080fd5b612ef18c838d01612c72565b909850965060608b0135915080821115612f0a57600080fd5b612f168c838d01612c72565b909650945060808b0135915080821115612f2f57600080fd5b50612f3c8b828c01612bb8565b999c989b5096995094979396929594505050565b600082601f830112612f6157600080fd5b81356020612f716127f7836127b3565b82815260059290921b84018101918181019086841115612f9057600080fd5b8286015b8481101561283f5780356001600160401b0380821115612fb45760008081fd5b908801906060828b03601f1901811315612fce5760008081fd5b612fd66126b4565b87840135612fe381612644565b815260408481013584811115612ff95760008081fd5b6130078e8b838901016127d6565b838b01525091840135918383111561301f5760008081fd5b61302d8d8a8588010161284a565b908201528652505050918301918301612f94565b600082601f83011261305257600080fd5b813560206130626127f7836127b3565b82815260059290921b8401810191818101908684111561308157600080fd5b8286015b8481101561283f5780356001600160401b03808211156130a55760008081fd5b908801906060828b03601f19018113156130bf5760008081fd5b6130c76126b4565b878401356130d481612644565b8152604084810135848111156130ea5760008081fd5b6130f88e8b8389010161284a565b838b0152509184013591838311156131105760008081fd5b61311e8d8a8588010161284a565b908201528652505050918301918301613085565b60008060008060008060c0878903121561314b57600080fd5b86356001600160401b038082111561316257600080fd5b61316e8a838b016128a5565b9750602089013591508082111561318457600080fd5b6131908a838b01612f50565b965060408901359150808211156131a657600080fd5b6131b28a838b01613041565b955060608901359150808211156131c857600080fd5b6131d48a838b01612a56565b945060808901359150808211156131ea57600080fd5b6131f68a838b0161298b565b935060a089013591508082111561320c57600080fd5b5061321989828a016127d6565b9150509295509295509295565b6000806000806060858703121561323c57600080fd5b843561324781612644565b93506020850135925060408501356001600160401b0381111561326957600080fd5b61327587828801612bb8565b95989497509550505050565b60008060008060008060a0878903121561329a57600080fd5b86356132a581612644565b955060208701356132b581612644565b9450604087013593506060870135925060808701356001600160401b038111156132de57600080fd5b6132ea89828a01612bb8565b979a9699509497509295939492505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133aa578181015183820152602001613392565b838111156109c35750506000910152565b600082516133cd81846020870161338f565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016133ff576133ff6133d7565b5060010190565b805161341181612644565b919050565b60006020828403121561342857600080fd5b815161263d81612644565b60006020828403121561344557600080fd5b5051919050565b805161341181612d56565b60006020828403121561346957600080fd5b815161263d81612d56565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600082198211156134bf576134bf6133d7565b500190565b60008160001904831182151516156134de576134de6133d7565b500290565b60008261350057634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561351a57600080fd5b835161352581612644565b602085015190935061353681612d56565b604085015190925061354781612d56565b809150509250925092565b600082601f83011261356357600080fd5b81516135716127f782612913565b81815284602083860101111561358657600080fd5b612db582602083016020870161338f565b600082601f8301126135a857600080fd5b815160206135b86127f7836127b3565b82815260059290921b840181019181810190868411156135d757600080fd5b8286015b8481101561283f5780516001600160401b03808211156135fb5760008081fd5b908801906040828b03601f19018113156136155760008081fd5b61361d61268c565b8388015181529083015190828211156136365760008081fd5b6136448c8984870101613552565b8189015286525050509183019183016135db565b805160ff8116811461341157600080fd5b600082601f83011261367a57600080fd5b8151602061368a6127f7836127b3565b82815260059290921b840181019181810190868411156136a957600080fd5b8286015b8481101561283f5780516001600160401b03808211156136cd5760008081fd5b908801906101a0828b03601f19018113156136e85760008081fd5b6136f06126f8565b8784015181526040613703818601613406565b89830152606080860151828401526080915081860151818401525060a0808601518284015260c0915081860151818401525060e0613742818701613406565b828401526101009150818601518581111561375d5760008081fd5b61376b8f8c838a0101613552565b82850152505061012080860151858111156137865760008081fd5b6137948f8c838a0101613597565b8385015250610140945084860151818401525050610160808501518483015261018093506137c3848601613658565b908201526137d2848301613658565b92810192909252508452509183019183016136ad565b80516008811061341157600080fd5b600082601f83011261380857600080fd5b815160206138186127f7836127b3565b82815260069290921b8401810191818101908684111561383757600080fd5b8286015b8481101561283f57604081890312156138545760008081fd5b61385c61268c565b815181528482015161386d81612644565b8186015283529183019160400161383b565b600082601f83011261389057600080fd5b815160206138a06127f7836127b3565b82815260059290921b840181019181810190868411156138bf57600080fd5b8286015b8481101561283f5780516001600160401b03808211156138e35760008081fd5b90880190610160828b03601f19018113156138fe5760008081fd5b61390661271b565b6139118885016137e8565b815260408085015189830152606080860151828401526080915081860151818401525060a0808601518284015260c0915061394d828701613406565b9083015260e085810151858111156139655760008081fd5b6139738f8c838a0101613552565b8385015250610100915081860151818401525061012080860151828401526101409150818601518184015250828501519250838311156139b35760008081fd5b6139c18d8a858801016137f7565b9082015286525050509183019183016138c3565b600060c082840312156139e757600080fd5b6139ef61273e565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151613a2181612644565b608082015260a0820151613a3481612d56565b60a082015292915050565b600060208284031215613a5157600080fd5b81516001600160401b0380821115613a6857600080fd5b908301906101608286031215613a7d57600080fd5b613a8561273e565b825182811115613a9457600080fd5b613aa087828601613669565b825250602083015182811115613ab557600080fd5b613ac18782860161387f565b602083015250613ad486604085016139d5565b604082015261010083015160608201526101208301516080820152613afc6101408401613658565b60a082015295945050505050565b60006020808385031215613b1d57600080fd5b82516001600160401b03811115613b3357600080fd5b8301601f81018513613b4457600080fd5b8051613b526127f7826127b3565b81815260069190911b82018301908381019087831115613b7157600080fd5b928401925b82841015613bbd5760408489031215613b8f5760008081fd5b613b9761268c565b8451613ba281612644565b81528486015186820152825260409093019290840190613b76565b979650505050505050565b60006020808385031215613bdb57600080fd5b82516001600160401b03811115613bf157600080fd5b8301601f81018513613c0257600080fd5b8051613c106127f7826127b3565b81815260609182028301840191848201919088841115613c2f57600080fd5b938501935b83851015613c825780858a031215613c4c5760008081fd5b613c546126b4565b8551613c5f81612644565b815285870151878201526040808701519082015283529384019391850191613c34565b50979650505050505050565b60006102008284031215613ca157600080fd5b613ca9612760565b9050613cb48261344c565b8152613cc260208301613406565b6020820152613cd360408301613406565b6040820152606082015160608201526080820151608082015260a082015160a0820152613d0260c08301613406565b60c0820152613d1360e08301613406565b60e08201526101008281015190820152610120808301519082015261014080830151908201526101608083015190820152610180808301516001600160401b03811115613d5f57600080fd5b613d6b85828601613552565b8284015250506101a0613d7f818401613658565b908201526101c082810151908201526101e09182015191810191909152919050565b60008060408385031215613db457600080fd5b82516001600160401b0380821115613dcb57600080fd5b9084019060c08287031215613ddf57600080fd5b613de761273e565b8251613df281612d56565b81526020830151613e0281612644565b8060208301525060408301516040820152606083015160608201526080830151608082015260a083015182811115613e3957600080fd5b613e4588828601613552565b60a0830152506020860151909450915080821115613e6257600080fd5b50613e6f85828601613c8e565b9150509250929050565b60008151808452613e9181602086016020860161338f565b601f01601f19169290920160200192915050565b60408152600061010084511515604084015260018060a01b03602086015116606084015260408501516080840152606085015160a0840152608085015160c084015260a085015160c060e0850152613eff82850182613e79565b848103602086015285511515815290506102006020860151613f2c60208401826001600160a01b03169052565b506040860151613f4760408401826001600160a01b03169052565b50606086015160608301526080860151608083015260a086015160a083015260c0860151613f8060c08401826001600160a01b03169052565b5060e0860151613f9b60e08401826001600160a01b03169052565b50858301519282019290925261012080860151908201526101408086015190820152610160808601519082015261018080860151818301849052909290613fe482840182613e79565b935050506101a080860151613ffd8284018260ff169052565b50506101c085810151908201526101e094850151940193909352509092915050565b60008060006060848603121561403457600080fd5b835161403f81612d56565b602085015160409095015190969495509392505050565b600081518084526020808501945080840160005b838110156140865781518752958201959082019060010161406a565b509495945050505050565b6001600160a01b0385811682528416602082015260a0604082018190526000906140bd90830185614056565b82810360608401526140cf8185614056565b83810360809094019390935250506000815260200194935050505056fea264697066735822122067ba72cd3266a52aef510824fe7fc420bb4cdd92b06c9d473b5f1efa63b597c964736f6c634300080d0033
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.