Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15631253 | 695 days ago | IN | 0 ETH | 0.03919986 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
16511933 | 572 days ago | 0 ETH | |||||
16510164 | 572 days ago | 0 ETH | |||||
16509959 | 572 days ago | 0 ETH | |||||
16509956 | 572 days ago | 0 ETH | |||||
16509954 | 572 days ago | 0 ETH | |||||
16438204 | 582 days ago | 0 ETH | |||||
16425525 | 584 days ago | 0 ETH | |||||
16424020 | 584 days ago | 0 ETH | |||||
16167657 | 620 days ago | 0 ETH | |||||
16166882 | 620 days ago | 0 ETH | |||||
16130691 | 625 days ago | 0 ETH | |||||
16039205 | 638 days ago | 0 ETH | |||||
16039203 | 638 days ago | 0 ETH | |||||
16038895 | 638 days ago | 0 ETH | |||||
15979290 | 646 days ago | 0 ETH | |||||
15979069 | 646 days ago | 0 ETH | |||||
15978465 | 646 days ago | 0 ETH | |||||
15977478 | 646 days ago | 0 ETH | |||||
15974912 | 647 days ago | 0 ETH | |||||
15974838 | 647 days ago | 0 ETH | |||||
15974556 | 647 days ago | 0 ETH | |||||
15974463 | 647 days ago | 0 ETH | |||||
15974111 | 647 days ago | 0 ETH | |||||
15973895 | 647 days ago | 0 ETH | |||||
15973602 | 647 days ago | 0 ETH |
Loading...
Loading
Contract Name:
Sales721ForEth
Compiler Version
v0.6.12+commit.27d51765
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.6.12; pragma experimental ABIEncoderV2; import "./Dependencies/Ownable.sol"; import "./Dependencies/SafeMath.sol"; import "./Dependencies/SafeERC20.sol"; import "./Dependencies/IERC20.sol"; import "./Dependencies/IERC721.sol"; import "./Dependencies/ReentrancyGuard.sol"; contract Sales721ForEth is Ownable, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // set the saleIDCounter initial value to 1 uint256 private saleIDCounter = 1; bool private onlyInitOnce; struct BaseSale { // the sale setter address seller; // addresses of token to sell address tokenAddresses; // tokenIDs of token to sell uint256[] tokenIDs; // address of token to pay address payTokenAddress; // price of token to pay uint256 price; // address of receiver address receiver; uint256 startTime; uint256 endTime; // whether the sale is available bool isAvailable; } struct FlashSale { BaseSale base; // max number of token could be bought from an address uint256 purchaseLimitation; } struct Auction { BaseSale base; // the minimum increment in a bid uint256 minBidIncrement; // the highest price so far uint256 highestBidPrice; // the highest bidder so far address highestBidder; } struct Activity { uint256 limitation; uint256 activityId; uint256[] salesIDs; bool isEnable; } struct WhitelistActivity { bool isWhitelist; mapping(address => bool) userInWhitelists; } // whitelist to set sale mapping(address => bool) public whitelist; // sale ID -> flash sale mapping(uint256 => FlashSale) flashSales; // sale ID -> mapping(address => how many tokens have bought) mapping(uint256 => mapping(address => uint256)) flashSaleIDToPurchaseRecord; // sale ID -> auction mapping(uint256 => Auction) auctions; // filter to check repetition mapping(address => mapping(uint256 => bool)) repetitionFilter; address public testServerAddress; address public serverAddress; // sale ID -> server hash mapping(bytes32 => uint256) serverHashMap; // whitelist to set sale mapping(uint256 => bool) public flashSaleOnProd; //activityId => activity mapping(uint256 => Activity) public activityMap; //salesId => activityId mapping(uint256 => uint256) public activityIndex; //activityID => WhitelistActivity mapping(uint256 => WhitelistActivity) public activityWhitelist; event SetWhitelist(address _member, bool _isAdded); event SetFlashSale( uint256 _saleID, address _flashSaleSetter, address _tokenAddresses, uint256[] _tokenIDs, address _payTokenAddress, uint256 _price, address _receiver, uint256 _purchaseLimitation, uint256 _startTime, uint256 _endTime ); event UpdateFlashSale( uint256 _saleID, address _operator, address _newTokenAddresses, uint256[] _newTokenIDs, address _newPayTokenAddress, uint256 _newPrice, address _newReceiver, uint256 _newPurchaseLimitation, uint256 _newStartTime, uint256 _newEndTime ); event CancelFlashSale(uint256 _saleID, address _operator); event FlashSaleExpired(uint256 _saleID, address _operator); event Purchase( uint256 _saleID, address _buyer, address _tokenAddresses, uint256[] _tokenIDs, address _payTokenAddress, uint256 _totalPayment ); event SetAuction( uint256 _saleID, address _auctionSetter, address _tokenAddresses, uint256[] _tokenIDs, address _payTokenAddress, uint256 _initialPrice, address _receiver, uint256 _minBidIncrement, uint256 _startTime, uint256 _endTime ); event UpdateAuction( uint256 _saleID, address _operator, address _newTokenAddresses, uint256[] _newTokenIDs, address _newPayTokenAddress, uint256 _newInitialPrice, address _newReceiver, uint256 _newMinBidIncrement, uint256 _newStartTime, uint256 _newEndTime ); event RefundToPreviousBidder( uint256 _saleID, address _previousBidder, address _payTokenAddress, uint256 _refundAmount ); event CancelAuction(uint256 _saleID, address _operator); event NewBidderTransfer(uint256 _saleID, address _newBidder, address _payTokenAddress, uint256 _bidPrice); event SettleAuction( uint256 _saleID, address _operator, address _receiver, address _highestBidder, address _tokenAddresses, uint256[] _tokenIDs, address _payTokenAddress, uint256 _highestBidPrice ); event MainCoin(uint256 totalPayment); modifier onlyWhitelist() { require(whitelist[msg.sender], "the caller isn't in the whitelist"); _; } function init(address _newOwner) public { require(!onlyInitOnce, "already initialized"); _transferOwnership(_newOwner); onlyInitOnce = true; } function getActivity(uint256 id) external view returns (Activity memory) { return activityMap[id]; } //return the amount of all sales function getActivityTotalAmount(uint256 activityId, address puchaser) public view returns (uint256) { Activity memory activity = activityMap[activityId]; uint256 total; for (uint256 i = 0; i < activity.salesIDs.length; i++) { uint256 saleId = activity.salesIDs[i]; total = total + flashSaleIDToPurchaseRecord[saleId][puchaser]; } return total; } function setActivity(Activity memory activity) external onlyOwner { activityMap[activity.activityId] = activity; for (uint256 i = 0; i < activity.salesIDs.length; i++) { uint256 saleId = activity.salesIDs[i]; activityIndex[saleId] = activity.activityId; } } function setWhitelist(address _member, bool _status) external onlyOwner { whitelist[_member] = _status; emit SetWhitelist(_member, _status); } // set auction by the member in whitelist function setAuction( address _tokenAddresses, uint256[] memory _tokenIDs, address _payTokenAddress, uint256 _initialPrice, address _receiver, uint256 _minBidIncrement, uint256 _startTime, uint256 _duration ) external nonReentrant onlyWhitelist { // 1. check the validity of params _checkAuctionParams( msg.sender, _tokenAddresses, _tokenIDs, _initialPrice, _minBidIncrement, _startTime, _duration ); // 2. build auction Auction memory auction = Auction({ base: BaseSale({ seller: msg.sender, tokenAddresses: _tokenAddresses, tokenIDs: _tokenIDs, payTokenAddress: _payTokenAddress, price: _initialPrice, receiver: _receiver, startTime: _startTime, endTime: _startTime.add(_duration), isAvailable: true }), minBidIncrement: _minBidIncrement, highestBidPrice: 0, highestBidder: address(0) }); // 3. store auction uint256 currentSaleID = saleIDCounter; saleIDCounter = saleIDCounter.add(1); auctions[currentSaleID] = auction; emit SetAuction( currentSaleID, auction.base.seller, auction.base.tokenAddresses, auction.base.tokenIDs, auction.base.payTokenAddress, auction.base.price, auction.base.receiver, auction.minBidIncrement, auction.base.startTime, auction.base.endTime ); } // update auction by the member in whitelist function updateAuction( uint256 _saleID, address _tokenAddresses, uint256[] memory _tokenIDs, address _payTokenAddress, uint256 _initialPrice, address _receiver, uint256 _minBidIncrement, uint256 _startTime, uint256 _duration ) external nonReentrant onlyWhitelist { Auction memory auction = _getAuctionByID(_saleID); // 1. make sure that the auction doesn't start require(auction.base.startTime > now, "it's not allowed to update the auction after the start of it"); require(auction.base.isAvailable, "the auction has been cancelled"); require(auction.base.seller == msg.sender, "the auction can only be updated by its setter"); // 2. check the validity of params to update _checkAuctionParams( msg.sender, _tokenAddresses, _tokenIDs, _initialPrice, _minBidIncrement, _startTime, _duration ); // 3. update the auction auction.base.tokenAddresses = _tokenAddresses; auction.base.tokenIDs = _tokenIDs; auction.base.payTokenAddress = _payTokenAddress; auction.base.price = _initialPrice; auction.base.receiver = _receiver; auction.base.startTime = _startTime; auction.base.endTime = _startTime.add(_duration); auction.minBidIncrement = _minBidIncrement; auctions[_saleID] = auction; emit UpdateAuction( _saleID, auction.base.seller, auction.base.tokenAddresses, auction.base.tokenIDs, auction.base.payTokenAddress, auction.base.price, auction.base.receiver, auction.minBidIncrement, auction.base.startTime, auction.base.endTime ); } // cancel the auction function cancelAuction(uint256 _saleID) external nonReentrant onlyWhitelist { Auction memory auction = _getAuctionByID(_saleID); require(auction.base.isAvailable, "the auction isn't available"); require(auction.base.seller == msg.sender, "the auction can only be cancelled by its setter"); if (auction.highestBidPrice != 0) { // some bid has paid for this auction IERC20(auction.base.payTokenAddress).safeTransfer(auction.highestBidder, auction.highestBidPrice); emit RefundToPreviousBidder( _saleID, auction.highestBidder, auction.base.payTokenAddress, auction.highestBidPrice ); } auctions[_saleID].base.isAvailable = false; emit CancelAuction(_saleID, msg.sender); } // bid for the target auction function bid(uint256 _saleID, uint256 _bidPrice) external nonReentrant { Auction memory auction = _getAuctionByID(_saleID); // check the validity of the target auction require(auction.base.isAvailable, "the auction isn't available"); require(auction.base.seller != msg.sender, "the setter can't bid for its own auction"); uint256 currentTime = now; require(currentTime >= auction.base.startTime, "the auction doesn't start"); require(currentTime < auction.base.endTime, "the auction has expired"); IERC20 payToken = IERC20(auction.base.payTokenAddress); // check bid price in auction if (auction.highestBidPrice != 0) { // not first bid require( _bidPrice.sub(auction.highestBidPrice) >= auction.minBidIncrement, "the bid price must be larger than the sum of current highest one and minimum bid increment" ); // refund to the previous highest bidder from this contract payToken.safeTransfer(auction.highestBidder, auction.highestBidPrice); emit RefundToPreviousBidder( _saleID, auction.highestBidder, auction.base.payTokenAddress, auction.highestBidPrice ); } else { // first bid require(_bidPrice == auction.base.price, "first bid must follow the initial price set in the auction"); } // update storage auctions auctions[_saleID].highestBidPrice = _bidPrice; auctions[_saleID].highestBidder = msg.sender; // transfer the bid price into this contract payToken.safeApprove(address(this), 0); payToken.safeApprove(address(this), _bidPrice); payToken.safeTransferFrom(msg.sender, address(this), _bidPrice); emit NewBidderTransfer(_saleID, msg.sender, auction.base.payTokenAddress, _bidPrice); } // settle the auction by the member in whitelist function settleAuction(uint256 _saleID) external nonReentrant onlyWhitelist { Auction memory auction = _getAuctionByID(_saleID); // check the validity of the target auction require(auction.base.isAvailable, "only the available auction can be settled"); require(auction.base.endTime <= now, "the auction can only be settled after its end time"); if (auction.highestBidPrice != 0) { // the auction has been bidden // transfer pay token to the receiver from this contract IERC20(auction.base.payTokenAddress).safeTransfer(auction.base.receiver, auction.highestBidPrice); // transfer erc721s to the bidder who keeps the highest price for (uint256 i = 0; i < auction.base.tokenIDs.length; i++) { IERC721(auction.base.tokenAddresses).safeTransferFrom( auction.base.seller, auction.highestBidder, auction.base.tokenIDs[i] ); } } // close the auction auctions[_saleID].base.isAvailable = false; emit SettleAuction( _saleID, msg.sender, auction.base.receiver, auction.highestBidder, auction.base.tokenAddresses, auction.base.tokenIDs, auction.base.payTokenAddress, auction.highestBidPrice ); } event AddTokens(uint256[] _tokenIds, uint256 _saleID); function addTokenIdToSale( uint256 _saleID, address _tokenAddresses, uint256[] memory _tokenIDs ) external onlyWhitelist { uint256 standardLen = _tokenIDs.length; require(standardLen > 0, "length of tokenAddresses must be > 0"); require(flashSales[_saleID].base.startTime > now, "it's not allowed to update the sale after the start of it"); require(flashSales[_saleID].base.seller == msg.sender, "the sale can only be updated by its setter"); IERC721 tokenAddressCached = IERC721(_tokenAddresses); for (uint256 i = 0; i < _tokenIDs.length; i++) { uint256 tokenId = _tokenIDs[i]; require( tokenAddressCached.ownerOf(tokenId) == flashSales[_saleID].base.seller, "unmatched ownership of target ERC721 token" ); flashSales[_saleID].base.tokenIDs.push(tokenId); } emit AddTokens(_tokenIDs, _saleID); } // set flash sale by the member in whitelist // NOTE: set 0 duration if you don't want an endTime function setFlashSale( address _tokenAddresses, uint256[] memory _tokenIDs, address _payTokenAddress, uint256 _price, address _receiver, uint256 _purchaseLimitation, uint256 _startTime, uint256 _duration, bool prod ) external nonReentrant onlyWhitelist { // 1. check the validity of params _checkFlashSaleParams(msg.sender, _tokenAddresses, _tokenIDs, _price, _startTime, _purchaseLimitation); // 2. build flash sale uint256 endTime; if (_duration != 0) { endTime = _startTime.add(_duration); } FlashSale memory flashSale = FlashSale({ base: BaseSale({ seller: msg.sender, tokenAddresses: _tokenAddresses, tokenIDs: _tokenIDs, payTokenAddress: _payTokenAddress, price: _price, receiver: _receiver, startTime: _startTime, endTime: endTime, isAvailable: true }), purchaseLimitation: _purchaseLimitation }); // 3. store flash sale uint256 currentSaleID = saleIDCounter; saleIDCounter = saleIDCounter.add(1); flashSales[currentSaleID] = flashSale; //if true then prod env else test env flashSaleOnProd[currentSaleID] = prod; emit SetFlashSale( currentSaleID, flashSale.base.seller, flashSale.base.tokenAddresses, flashSale.base.tokenIDs, flashSale.base.payTokenAddress, flashSale.base.price, flashSale.base.receiver, flashSale.purchaseLimitation, flashSale.base.startTime, flashSale.base.endTime ); } // update the flash sale before starting // NOTE: set 0 duration if you don't want an endTime function updateFlashSale( uint256 _saleID, address _tokenAddresses, uint256[] memory _tokenIDs, address _payTokenAddress, uint256 _price, address _receiver, uint256 _purchaseLimitation, uint256 _startTime, uint256 _duration ) external nonReentrant onlyWhitelist { FlashSale memory flashSale = _getFlashSaleByID(_saleID); // 1. make sure that the flash sale doesn't start require(flashSale.base.startTime > now, "it's not allowed to update the flash sale after the start of it"); require(flashSale.base.isAvailable, "the flash sale has been cancelled"); require(flashSale.base.seller == msg.sender, "the flash sale can only be updated by its setter"); // 2. check the validity of params to update _checkFlashSaleParams(msg.sender, _tokenAddresses, _tokenIDs, _price, _startTime, _purchaseLimitation); // 3. update flash sale uint256 endTime; if (_duration != 0) { endTime = _startTime.add(_duration); } flashSale.base.tokenAddresses = _tokenAddresses; flashSale.base.tokenIDs = _tokenIDs; flashSale.base.payTokenAddress = _payTokenAddress; flashSale.base.price = _price; flashSale.base.receiver = _receiver; flashSale.base.startTime = _startTime; flashSale.base.endTime = endTime; flashSale.purchaseLimitation = _purchaseLimitation; flashSales[_saleID] = flashSale; emit UpdateFlashSale( _saleID, flashSale.base.seller, flashSale.base.tokenAddresses, flashSale.base.tokenIDs, flashSale.base.payTokenAddress, flashSale.base.price, flashSale.base.receiver, flashSale.purchaseLimitation, flashSale.base.startTime, flashSale.base.endTime ); } // cancel the flash sale function cancelFlashSale(uint256 _saleID) external onlyWhitelist { FlashSale memory flashSale = _getFlashSaleByID(_saleID); require(flashSale.base.isAvailable, "the flash sale isn't available"); require(flashSale.base.seller == msg.sender, "the flash sale can only be cancelled by its setter"); flashSales[_saleID].base.isAvailable = false; emit CancelFlashSale(_saleID, msg.sender); } function setServerAddress(address targetAddress) public onlyOwner { serverAddress = targetAddress; } function setTestServerAddress(address targetAddress) public onlyOwner { testServerAddress = targetAddress; } function setFlashSaleEnv(uint256 _saleID, bool isProd) public nonReentrant onlyOwner { flashSaleOnProd[_saleID] = isProd; } function setActivityWhitelist(uint256 _activityId, address[] calldata users) external onlyOwner { activityWhitelist[_activityId].isWhitelist = true; for (uint256 i = 0; i < users.length; i++) { activityWhitelist[_activityId].userInWhitelists[users[i]] = true; } } function deleteActivityWhitelist(uint256 _activityId, address[] calldata users) external onlyOwner { for (uint256 i = 0; i < users.length; i++) { activityWhitelist[_activityId].userInWhitelists[users[i]] = false; } } function checkUserInActivityWhitelist(uint256 _activityId, address[] calldata users) external view returns (bool[] memory) { bool[] memory userInActivityWhitelist = new bool[](users.length); for (uint256 i = 0; i < users.length; i++) { userInActivityWhitelist[i] = activityWhitelist[_activityId].userInWhitelists[users[i]]; } return userInActivityWhitelist; } // rush to purchase by anyone function purchase( uint256 _saleID, uint256 _amount, bytes32 hash, uint8 v, bytes32 r, bytes32 s ) external payable nonReentrant { if (flashSaleOnProd[_saleID] == true) { require(ecrecover(hash, v, r, s) == serverAddress, "verify prod server sign failed"); } else { require(ecrecover(hash, v, r, s) == testServerAddress, "verify test server sign failed"); } // we have set saleIDCounter initial value to 1 to prevent when _saleID = 0 from can not being purchased require(serverHashMap[hash] != _saleID, "sign hash repeat"); FlashSale memory flashSale = _getFlashSaleByID(_saleID); // check the validity require(_amount > 0, "amount should be > 0"); require(flashSale.base.isAvailable, "the flash sale isn't available"); require(flashSale.base.seller != msg.sender, "the setter can't make a purchase from its own flash sale"); uint256 currentTime = now; require(currentTime >= flashSale.base.startTime, "the flash sale doesn't start"); // check whether the end time arrives if (flashSale.base.endTime != 0 && flashSale.base.endTime <= currentTime) { // the flash sale has been set an end time and expired flashSales[_saleID].base.isAvailable = false; emit FlashSaleExpired(_saleID, msg.sender); return; } // check the purchase record of the buyer uint256 newPurchaseRecord = flashSaleIDToPurchaseRecord[_saleID][msg.sender].add(_amount); //activity model uint256 activityId = activityIndex[_saleID]; if (activityMap[activityId].isEnable) { //check if need the whitelist require( !activityWhitelist[activityId].isWhitelist || activityWhitelist[activityId].userInWhitelists[msg.sender], "Not in the Whitelist" ); Activity memory activity = activityMap[activityId]; uint256 activityAmount = getActivityTotalAmount(activity.activityId, msg.sender); require( activityAmount.add(_amount) <= activity.limitation, "total amount to purchase for activity exceeds the limitation of an address" ); } require( newPurchaseRecord <= flashSale.purchaseLimitation, "total amount to purchase exceeds the limitation of an address" ); // check whether the amount of token rest in flash sale is sufficient for this trade require(_amount <= flashSale.base.tokenIDs.length, "insufficient amount of token for this trade"); // pay the receiver flashSaleIDToPurchaseRecord[_saleID][msg.sender] = newPurchaseRecord; uint256 totalPayment = flashSale.base.price.mul(_amount); //IERC20(flashSale.base.payTokenAddress).safeTransferFrom(msg.sender, flashSale.base.receiver, totalPayment); if (flashSale.base.payTokenAddress != address(0)) { IERC20(flashSale.base.payTokenAddress).safeTransferFrom(msg.sender, flashSale.base.receiver, totalPayment); } else { require(msg.value >= totalPayment, "amount should be > totalPayment"); emit MainCoin(totalPayment); payable(flashSale.base.receiver).transfer(totalPayment); } // transfer erc721 tokens to buyer uint256[] memory tokenIDsRecord = new uint256[](_amount); uint256 targetIndex = flashSale.base.tokenIDs.length - 1; for (uint256 i = 0; i < _amount; i++) { IERC721(flashSale.base.tokenAddresses).safeTransferFrom( flashSale.base.seller, msg.sender, flashSale.base.tokenIDs[targetIndex] ); tokenIDsRecord[i] = flashSale.base.tokenIDs[targetIndex]; targetIndex--; flashSales[_saleID].base.tokenIDs.pop(); } if (flashSales[_saleID].base.tokenIDs.length == 0) { flashSales[_saleID].base.isAvailable = false; } serverHashMap[hash] = _saleID; //event Purchase(uint _saleID, address _buyer, address _tokenAddresses, uint[] _tokenIDs, address _payTokenAddress, uint _totalPayment); emit Purchase( _saleID, msg.sender, flashSale.base.tokenAddresses, tokenIDsRecord, flashSale.base.payTokenAddress, totalPayment ); } function getFlashSaleTokenRemaining(uint256 _saleID) public view returns (uint256) { // check whether the flash sale ID exists FlashSale memory flashSale = _getFlashSaleByID(_saleID); return flashSale.base.tokenIDs.length; } function getFlashSalePurchaseRecord(uint256 _saleID, address _buyer) public view returns (uint256) { // check whether the flash sale ID exists _getFlashSaleByID(_saleID); return flashSaleIDToPurchaseRecord[_saleID][_buyer]; } function getAuctionTokenAmount(uint256 _saleID) public view returns (uint256 amount) { Auction memory auction = auctions[_saleID]; amount = auction.base.tokenIDs.length; } function getFlashSaleTokenAmount(uint256 _saleID) public view returns (uint256 amount) { FlashSale memory flashSale = flashSales[_saleID]; amount = flashSale.base.tokenIDs.length; } function getAuction(uint256 _saleID) public view returns (Auction memory) { return _getAuctionByID(_saleID); } function getFlashSale(uint256 _saleID) public view returns (FlashSale memory) { return _getFlashSaleByID(_saleID); } function getCurrentSaleID() external view returns (uint256) { return saleIDCounter; } function _getAuctionByID(uint256 _saleID) internal view returns (Auction memory auction) { auction = auctions[_saleID]; require(auction.base.seller != address(0), "the target auction doesn't exist"); } function _getFlashSaleByID(uint256 _saleID) internal view returns (FlashSale memory flashSale) { flashSale = flashSales[_saleID]; require(flashSale.base.seller != address(0), "the target flash sale doesn't exist"); } function _checkAuctionParams( address _baseSaleSetter, address _tokenAddresses, uint256[] memory _tokenIDs, uint256 _initialPrice, uint256 _minBidIncrement, uint256 _startTime, uint256 _duration ) internal { _checkBaseSaleParams(_baseSaleSetter, _tokenAddresses, _tokenIDs, _initialPrice, _startTime); require(_minBidIncrement > 0, "minBidIncrement must be > 0"); require(_duration > 0, "duration must be > 0"); } function _checkFlashSaleParams( address _baseSaleSetter, address _tokenAddresses, uint256[] memory _tokenIDs, uint256 _price, uint256 _startTime, uint256 _purchaseLimitation ) internal { uint256 standardLen = _checkBaseSaleParams(_baseSaleSetter, _tokenAddresses, _tokenIDs, _price, _startTime); require(_purchaseLimitation > 0, "purchaseLimitation must be > 0"); /* require(_purchaseLimitation <= standardLen, "purchaseLimitation must be <= the length of tokenAddresses");*/ } function _checkBaseSaleParams( address _baseSaleSetter, address _tokenAddresses, uint256[] memory _tokenIDs, uint256 _price, uint256 _startTime ) internal returns (uint256 standardLen) { standardLen = _tokenIDs.length; // check whether the sale setter has the target tokens && approval IERC721 tokenAddressCached = IERC721(_tokenAddresses); uint256 tokenIDCached; for (uint256 i = 0; i < standardLen; i++) { tokenIDCached = _tokenIDs[i]; // check repetition require(!repetitionFilter[address(tokenAddressCached)][tokenIDCached], "repetitive ERC721 tokens"); repetitionFilter[address(tokenAddressCached)][tokenIDCached] = true; require( tokenAddressCached.ownerOf(tokenIDCached) == _baseSaleSetter, "unmatched ownership of target ERC721 token" ); require( tokenAddressCached.getApproved(tokenIDCached) == address(this) || tokenAddressCached.isApprovedForAll(_baseSaleSetter, address(this)), "the contract hasn't been approved for ERC721 transferring" ); } require(_price >= 0, "the price or the initial price must be >= 0"); require(_startTime >= now, "startTime must be >= now"); // clear filter for (uint256 i = 0; i < standardLen; i++) { repetitionFilter[_tokenAddresses][_tokenIDs[i]] = false; } } using Address for address payable; using Address for address; function withdraw( address token, address to, uint256 amount ) external onlyOwner { if (token.isContract()) { IERC20(token).safeTransfer(to, amount); } else { payable(to).sendValue(amount); } emit EmergencyWithdraw(token, to, amount); } event EmergencyWithdraw(address token, address to, uint256 amount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "./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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "./IERC20.sol"; import "./SafeMath.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) {// Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "./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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /* * @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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly {size := extcodesize(account)} return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success,) = recipient.call{value : amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value : value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"AddTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"}],"name":"CancelAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"}],"name":"CancelFlashSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"}],"name":"FlashSaleExpired","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalPayment","type":"uint256"}],"name":"MainCoin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_newBidder","type":"address"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_bidPrice","type":"uint256"}],"name":"NewBidderTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"address","name":"_tokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_totalPayment","type":"uint256"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_previousBidder","type":"address"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_refundAmount","type":"uint256"}],"name":"RefundToPreviousBidder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_auctionSetter","type":"address"},{"indexed":false,"internalType":"address","name":"_tokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_initialPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_minBidIncrement","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"SetAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_flashSaleSetter","type":"address"},{"indexed":false,"internalType":"address","name":"_tokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_purchaseLimitation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"SetFlashSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_member","type":"address"},{"indexed":false,"internalType":"bool","name":"_isAdded","type":"bool"}],"name":"SetWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"address","name":"_highestBidder","type":"address"},{"indexed":false,"internalType":"address","name":"_tokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_payTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_highestBidPrice","type":"uint256"}],"name":"SettleAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"address","name":"_newTokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_newTokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_newPayTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newInitialPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"_newReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newMinBidIncrement","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newEndTime","type":"uint256"}],"name":"UpdateAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_saleID","type":"uint256"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"address","name":"_newTokenAddresses","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_newTokenIDs","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_newPayTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"_newReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newPurchaseLimitation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newEndTime","type":"uint256"}],"name":"UpdateFlashSale","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activityIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activityMap","outputs":[{"internalType":"uint256","name":"limitation","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"bool","name":"isEnable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activityWhitelist","outputs":[{"internalType":"bool","name":"isWhitelist","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"address","name":"_tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"}],"name":"addTokenIdToSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"uint256","name":"_bidPrice","type":"uint256"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"cancelFlashSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_activityId","type":"uint256"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"checkUserInActivityWhitelist","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_activityId","type":"uint256"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"deleteActivityWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flashSaleOnProd","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getActivity","outputs":[{"components":[{"internalType":"uint256","name":"limitation","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"uint256[]","name":"salesIDs","type":"uint256[]"},{"internalType":"bool","name":"isEnable","type":"bool"}],"internalType":"struct Sales721ForEth.Activity","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"address","name":"puchaser","type":"address"}],"name":"getActivityTotalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"getAuction","outputs":[{"components":[{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"},{"internalType":"address","name":"payTokenAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"isAvailable","type":"bool"}],"internalType":"struct Sales721ForEth.BaseSale","name":"base","type":"tuple"},{"internalType":"uint256","name":"minBidIncrement","type":"uint256"},{"internalType":"uint256","name":"highestBidPrice","type":"uint256"},{"internalType":"address","name":"highestBidder","type":"address"}],"internalType":"struct Sales721ForEth.Auction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"getAuctionTokenAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentSaleID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"getFlashSale","outputs":[{"components":[{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"},{"internalType":"address","name":"payTokenAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"isAvailable","type":"bool"}],"internalType":"struct Sales721ForEth.BaseSale","name":"base","type":"tuple"},{"internalType":"uint256","name":"purchaseLimitation","type":"uint256"}],"internalType":"struct Sales721ForEth.FlashSale","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"address","name":"_buyer","type":"address"}],"name":"getFlashSalePurchaseRecord","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"getFlashSaleTokenAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"getFlashSaleTokenRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serverAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"limitation","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"uint256[]","name":"salesIDs","type":"uint256[]"},{"internalType":"bool","name":"isEnable","type":"bool"}],"internalType":"struct Sales721ForEth.Activity","name":"activity","type":"tuple"}],"name":"setActivity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_activityId","type":"uint256"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"setActivityWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"internalType":"address","name":"_payTokenAddress","type":"address"},{"internalType":"uint256","name":"_initialPrice","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_minBidIncrement","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"internalType":"address","name":"_payTokenAddress","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_purchaseLimitation","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"bool","name":"prod","type":"bool"}],"name":"setFlashSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"bool","name":"isProd","type":"bool"}],"name":"setFlashSaleEnv","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"setServerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"setTestServerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"}],"name":"settleAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"testServerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"address","name":"_tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"internalType":"address","name":"_payTokenAddress","type":"address"},{"internalType":"uint256","name":"_initialPrice","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_minBidIncrement","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"updateAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleID","type":"uint256"},{"internalType":"address","name":"_tokenAddresses","type":"address"},{"internalType":"uint256[]","name":"_tokenIDs","type":"uint256[]"},{"internalType":"address","name":"_payTokenAddress","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_purchaseLimitation","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"updateFlashSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260016002553480156200001657600080fd5b5060006200002362000077565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556200007b565b3390565b6153bf806200008b6000396000f3fe6080604052600436106102305760003560e01c80638da5cb5b1161012e578063c4f6e995116100ab578063db420fe31161006f578063db420fe3146106b1578063e21e3f4b146106c6578063eee44acb146106e6578063f25e901514610706578063f2fde38b1461072657610230565b8063c4f6e9951461061c578063d341e3951461063c578063d6f4935d1461065c578063d8199fe41461067c578063d9caed121461069157610230565b806396ec9b38116100f257806396ec9b38146105875780639b19251a146105a7578063a4a61879146105c7578063aed35df4146105e7578063b612a025146105fc57610230565b80638da5cb5b146104d85780638dccc36d146104fa578063911627da1461051a578063922635d81461053a57806396b5a7551461056757610230565b80633377cbaf116101bc57806353d6fd591161018057806353d6fd5914610427578063598647f8146104475780636c4ced8b14610467578063715018a61461049657806378bd7935146104ab57610230565b80633377cbaf14610387578063400d837b146103b457806340d1d824146103d457806347b64eb0146103f45780634fd501d81461041457610230565b80631a72e588116102035780631a72e588146102da5780631efb65d2146102fa5780632073b1d91461031a57806324ef85e1146103475780632e9936111461036757610230565b80630452b9681461023557806316918bfa1461026b57806319ab453c1461029857806319d519f4146102ba575b600080fd5b34801561024157600080fd5b50610255610250366004613dac565b610746565b6040516102629190615178565b60405180910390f35b34801561027757600080fd5b5061028b610286366004613ddc565b61075f565b60405161026291906151aa565b3480156102a457600080fd5b506102b86102b3366004613b03565b61085e565b005b3480156102c657600080fd5b506102b86102d5366004613efd565b6108a3565b3480156102e657600080fd5b506102b86102f5366004613e57565b610956565b34801561030657600080fd5b506102b8610315366004613e57565b610c47565b34801561032657600080fd5b5061033a610335366004613efd565b610f6f565b60405161026291906141a3565b34801561035357600080fd5b506102b8610362366004613c13565b611045565b34801561037357600080fd5b506102b8610382366004613dac565b6112c3565b34801561039357600080fd5b506103a76103a2366004613dac565b6114dd565b604051610262919061420b565b3480156103c057600080fd5b506102b86103cf366004613b7b565b6114f2565b3480156103e057600080fd5b5061028b6103ef366004613ddc565b611766565b34801561040057600080fd5b506102b861040f366004613b03565b61179b565b6102b8610422366004613fbb565b6117fc565b34801561043357600080fd5b506102b8610442366004613cc2565b611f76565b34801561045357600080fd5b506102b8610462366004613f9a565b612017565b34801561047357600080fd5b50610487610482366004613dac565b612277565b604051610262939291906152f8565b3480156104a257600080fd5b506102b861229b565b3480156104b757600080fd5b506104cb6104c6366004613dac565b612324565b604051610262919061512a565b3480156104e457600080fd5b506104ed612335565b604051610262919061411d565b34801561050657600080fd5b506102b8610515366004613b03565b612344565b34801561052657600080fd5b5061028b610535366004613dac565b6123a5565b34801561054657600080fd5b5061055a610555366004613dac565b6123b7565b60405161026291906150e2565b34801561057357600080fd5b506102b8610582366004613dac565b612451565b34801561059357600080fd5b5061028b6105a2366004613dac565b6125da565b3480156105b357600080fd5b506103a76105c2366004613b03565b6125fa565b3480156105d357600080fd5b506103a76105e2366004613dac565b61260f565b3480156105f357600080fd5b5061028b612624565b34801561060857600080fd5b506102b8610617366004613efd565b61262a565b34801561062857600080fd5b5061028b610637366004613dac565b6126f1565b34801561064857600080fd5b506102b8610657366004613e00565b61280d565b34801561066857600080fd5b506102b8610677366004613dac565b612a10565b34801561068857600080fd5b506104ed612aeb565b34801561069d57600080fd5b506102b86106ac366004613b3b565b612afa565b3480156106bd57600080fd5b506104ed612bbc565b3480156106d257600080fd5b506102b86106e1366004613f76565b612bcb565b3480156106f257600080fd5b5061028b610701366004613dac565b612c56565b34801561071257600080fd5b506102b8610721366004613d16565b612d8b565b34801561073257600080fd5b506102b8610741366004613b03565b612e6d565b61074e613930565b61075782612f2d565b90505b919050565b6000610769613950565b6000848152600d6020908152604091829020825160808101845281548152600182015481840152600282018054855181860281018601875281815292959394938601938301828280156107db57602002820191906000526020600020905b8154815260200190600101908083116107c7575b50505091835250506003919091015460ff16151560209091015290506000805b8260400151518110156108535760008360400151828151811061081a57fe5b60209081029190910181015160009081526006825260408082206001600160a01b038a16835290925220549290920191506001016107fb565b509150505b92915050565b60035460ff161561088a5760405162461bcd60e51b8152600401610881906148d4565b60405180910390fd5b61089381612eac565b506003805460ff19166001179055565b6108ab613059565b6001600160a01b03166108bc612335565b6001600160a01b0316146108e25760405162461bcd60e51b815260040161088190614c43565b60005b81811015610950576000848152600f602052604081206001018185858581811061090b57fe5b90506020020160208101906109209190613b03565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556001016108e5565b50505050565b600260015414156109795760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166109ad5760405162461bcd60e51b81526004016108819061457f565b6109b5613930565b6109be8a612f2d565b905042816000015160c00151116109e75760405162461bcd60e51b81526004016108819061444e565b80516101000151610a0a5760405162461bcd60e51b815260040161088190614901565b8051516001600160a01b03163314610a345760405162461bcd60e51b815260040161088190614667565b610a42338a8a89878961305d565b60008215610a5757610a548484613097565b90505b81516001600160a01b03808c16602092830152835160409081018c905284518b831660609091015284516080018a9052845189831660a090910152845160c001879052845160e00184905282850188905260008e8152600584528190208551805182549085166001600160a01b0319918216178355818601516001840180549190961691161790935590820151805186949293928492610b00926002850192919091019061397a565b5060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055505050602082015181600901559050507f929ba8b4f3c95a0f8b21c07523f66eff127cd5221441dc06fdee198ffcd5f8ad8b836000015160000151846000015160200151856000015160400151866000015160600151876000015160800151886000015160a0015189602001518a6000015160c001518b6000015160e00151604051610c2e9a9998979695949392919061528e565b60405180910390a1505060018055505050505050505050565b60026001541415610c6a5760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff16610c9e5760405162461bcd60e51b81526004016108819061457f565b610ca66139c5565b610caf8a6130bc565b905042816000015160c0015111610cd85760405162461bcd60e51b815260040161088190614f77565b80516101000151610cfb5760405162461bcd60e51b815260040161088190614c78565b8051516001600160a01b03163314610d255760405162461bcd60e51b815260040161088190614d4c565b610d34338a8a89888888613207565b80516001600160a01b03808b16602090920191909152815160400189905281518882166060909101528151608001879052815190861660a090910152805160c001839052610d828383613097565b815160e00152602080820185905260008b8152600782526040908190208351805182546001600160a01b039182166001600160a01b03199182161784558286015160018501805491909316911617905591820151805185949293928492610df2926002850192919091019061397a565b5060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff021916908315150217905550505060208201518160090155604082015181600a0155606082015181600b0160006101000a8154816001600160a01b0302191690836001600160a01b031602179055509050507fd63adfd44826c87ece3083feed98529b1adf82a87e5a6da33e21700f3f0319458a826000015160000151836000015160200151846000015160400151856000015160600151866000015160800151876000015160a001518860200151896000015160c001518a6000015160e00151604051610f579a9998979695949392919061528e565b60405180910390a15050600180555050505050505050565b6060808267ffffffffffffffff81118015610f8957600080fd5b50604051908082528060200260200182016040528015610fb3578160200160208202803683370190505b50905060005b8381101561103a576000868152600f6020526040812060010190868684818110610fdf57fe5b9050602002016020810190610ff49190613b03565b6001600160a01b03168152602081019190915260400160002054825160ff9091169083908390811061102257fe5b91151560209283029190910190910152600101610fb9565b5090505b9392505050565b600260015414156110685760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff1661109c5760405162461bcd60e51b81526004016108819061457f565b6110aa338a8a89878961305d565b600082156110bf576110bc8484613097565b90505b6110c7613930565b506040805161016081018252339181019182526001600160a01b038c81166060830152608082018c90528a811660a083015260c082018a9052881660e0820152610100810186905261012081018390526001610140820181905291815260208101879052600254909161113b908290613097565b60029081556000828152600560209081526040918290208551805182546001600160a01b039182166001600160a01b031991821617845582850151600185018054919093169116179055928301518051879592949385936111a2939085019291019061397a565b506060828101516003830180546001600160a01b039283166001600160a01b031991821617909155608080860151600486015560a0808701516005870180549190951693169290921790925560c080860151600686015560e0808701516007870155610100909601516008909501805495151560ff199687161790556020978801516009909701969096556000888152600c885260409081902080548d1515961695909517909455885180518189015182870151958301519483015193830151998c015198830151929097015195517f11ed0be6ce391c981a002586d18807296088f0ad8747d50b4d20655c51cc33b0996112a9998c99939893979695949193909261528e565b60405180910390a150506001805550505050505050505050565b600260015414156112e65760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff1661131a5760405162461bcd60e51b81526004016108819061457f565b6113226139c5565b61132b826130bc565b805161010001519091506113515760405162461bcd60e51b8152600401610881906146ff565b805160e001514210156113765760405162461bcd60e51b815260040161088190614cfa565b60408101511561145857805160a081015160408301516060909201516113a8926001600160a01b039091169190613255565b60005b81516040015151811015611456578160000151602001516001600160a01b03166342842e0e836000015160000151846060015185600001516040015185815181106113f257fe5b60200260200101516040518463ffffffff1660e01b81526004016114189392919061414b565b600060405180830381600087803b15801561143257600080fd5b505af1158015611446573d6000803e3d6000fd5b5050600190920191506113ab9050565b505b600082815260076020908152604091829020600801805460ff19169055825160a0810151606080860151938301518386015191909301518686015195517f31f1beabaa0429887bbc894478865975b3be525a1c8b6e03ba6fd41345b45458966114cd968a9633969591949093919290916151ca565b60405180910390a1505060018055565b600f6020526000908152604090205460ff1681565b600260015414156115155760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166115495760405162461bcd60e51b81526004016108819061457f565b61155833898988878787613207565b6115606139c5565b604080516101a0810190915233608082019081526001600160a01b038b811660a084015260c083018b905289811660e0840152610100830189905287166101208301526101408201859052819061016082016115bc8787613097565b81526001602091820181905291835282018790526000604083018190526060909201919091526002549192506115f3908290613097565b60029081556000828152600760209081526040918290208551805182546001600160a01b039182166001600160a01b0319918216178455828501516001850180549190931691161790559283015180518795929493859361165a939085019291019061397a565b506060828101516003830180546001600160a01b03199081166001600160a01b0393841617909155608080860151600486015560a080870151600587018054851691861691909117905560c080880151600688015560e0808901516007890155610100909801516008909701805460ff19169715159790971790965560208981015160098a01556040808b0151600a8b015599860151600b909901805490941698909416979097179091558851805181840151828a0151958301519383015198830151948c015196830151929097015198517fd38229560d70ff33a43c34fffbb9b2b4eb7ca98a70f2fe7dd1deca2c0ece3cf999610f57998c999398939796909490939290919061528e565b600061177183612f2d565b505060009182526006602090815260408084206001600160a01b0393909316845291905290205490565b6117a3613059565b6001600160a01b03166117b4612335565b6001600160a01b0316146117da5760405162461bcd60e51b815260040161088190614c43565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561181f5760405162461bcd60e51b815260040161088190614fd4565b600260019081556000878152600c602052604090205460ff16151514156118c957600a546040805160008152602001908190526001600160a01b0390911690600190611872908790879087908790614216565b6020604051602081039080840390855afa158015611894573d6000803e3d6000fd5b505050602060405103516001600160a01b0316146118c45760405162461bcd60e51b815260040161088190614942565b61194d565b6009546040805160008152602001908190526001600160a01b03909116906001906118fb908790879087908790614216565b6020604051602081039080840390855afa15801561191d573d6000803e3d6000fd5b505050602060405103516001600160a01b03161461194d5760405162461bcd60e51b81526004016108819061489d565b6000848152600b602052604090205486141561197b5760405162461bcd60e51b815260040161088190614a7b565b611983613930565b61198c87612f2d565b9050600086116119ae5760405162461bcd60e51b815260040161088190614420565b805161010001516119d15760405162461bcd60e51b81526004016108819061429e565b8051516001600160a01b03163314156119fc5760405162461bcd60e51b815260040161088190614318565b805160c001514290811015611a235760405162461bcd60e51b815260040161088190614baf565b815160e0015115801590611a3c5750815160e001518110155b15611a9b5760008881526005602052604090819020600801805460ff19169055517f90022e1d8eedbbb3c33615d39a0b09d7b55aea384712055d32661146c5a661f390611a8c908a9033906151b3565b60405180910390a15050611f6a565b6000888152600660209081526040808320338452909152812054611abf9089613097565b60008a8152600e6020908152604080832054808452600d909252909120600301549192509060ff1615611c19576000818152600f602052604090205460ff161580611b2657506000818152600f6020908152604080832033845260010190915290205460ff165b611b425760405162461bcd60e51b815260040161088190614dd0565b611b4a613950565b6000828152600d602090815260409182902082516080810184528154815260018201548184015260028201805485518186028101860187528181529295939493860193830182828015611bbc57602002820191906000526020600020905b815481526020019060010190808311611ba8575b50505091835250506003919091015460ff161515602091820152810151909150600090611be9903361075f565b8251909150611bf8828d613097565b1115611c165760405162461bcd60e51b8152600401610881906145c0565b50505b8360200151821115611c3d5760405162461bcd60e51b815260040161088190614979565b83516040015151891115611c635760405162461bcd60e51b815260040161088190614caf565b60008a81526006602090815260408083203384529091528120839055845160800151611c8f908b6132b0565b8551606001519091506001600160a01b031615611cd057845160a0810151606090910151611ccb916001600160a01b03909116903390846132ea565b611d66565b80341015611cf05760405162461bcd60e51b8152600401610881906143a3565b7fa2d23878d5ab22445fbabd6fe02046a90b67448968da82383900084d250d529281604051611d1f91906151aa565b60405180910390a1845160a001516040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611d64573d6000803e3d6000fd5b505b60608a67ffffffffffffffff81118015611d7f57600080fd5b50604051908082528060200260200182016040528015611da9578160200160208202803683370190505b50865160400151519091506000190160005b8c811015611ec8578760000151602001516001600160a01b03166342842e0e896000015160000151338b60000151604001518681518110611df857fe5b60200260200101516040518463ffffffff1660e01b8152600401611e1e9392919061414b565b600060405180830381600087803b158015611e3857600080fd5b505af1158015611e4c573d6000803e3d6000fd5b505050508760000151604001518281518110611e6457fe5b6020026020010151838281518110611e7857fe5b60209081029190910181019190915260008f815260059091526040902060020180546000199093019280611ea857fe5b600082815260208120820160001990810191909155019055600101611dbb565b5060008d815260056020526040902060020154611ef95760008d8152600560205260409020600801805460ff191690555b8c600b60008d8152602001908152602001600020819055507fe266a5c8012d7c80c559afb035891cd33e867ac3350c54c4bca825ade265088d8d33896000015160200151858b600001516060015188604051611f5a96959493929190615225565b60405180910390a1505050505050505b50506001805550505050565b611f7e613059565b6001600160a01b0316611f8f612335565b6001600160a01b031614611fb55760405162461bcd60e51b815260040161088190614c43565b6001600160a01b03821660009081526004602052604090819020805460ff1916831515179055517ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb9061200b908490849061416f565b60405180910390a15050565b6002600154141561203a5760405162461bcd60e51b815260040161088190614fd4565b60026001556120476139c5565b612050836130bc565b805161010001519091506120765760405162461bcd60e51b815260040161088190614aa5565b8051516001600160a01b03163314156120a15760405162461bcd60e51b8152600401610881906146b7565b805160c0015142908110156120c85760405162461bcd60e51b815260040161088190614a0d565b815160e0015181106120ec5760405162461bcd60e51b8152600401610881906150ab565b81516060015160408301511561219f576020830151604084015161211190869061330b565b101561212f5760405162461bcd60e51b815260040161088190614e4d565b6060830151604084015161214d916001600160a01b03841691613255565b7fe8f267296dd98f54fe66007a36688e8b79a64988383c42d63995938d8e143dd985846060015185600001516060015186604001516040516121929493929190615269565b60405180910390a16121c3565b82516080015184146121c35760405162461bcd60e51b815260040161088190614be6565b6000858152600760205260408120600a8101869055600b0180546001600160a01b03191633179055612201906001600160a01b038316903090613333565b6122156001600160a01b0382163086613333565b61222a6001600160a01b0382163330876132ea565b8251606001516040517fc96310726d5afa93813f4276097a5d37645001323ca859d67ed71d1db0785dfb9161226491889133918990615269565b60405180910390a1505060018055505050565b600d6020526000908152604090208054600182015460039092015490919060ff1683565b6122a3613059565b6001600160a01b03166122b4612335565b6001600160a01b0316146122da5760405162461bcd60e51b815260040161088190614c43565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61232c6139c5565b610757826130bc565b6000546001600160a01b031690565b61234c613059565b6001600160a01b031661235d612335565b6001600160a01b0316146123835760405162461bcd60e51b815260040161088190614c43565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205481565b6123bf613950565b6000828152600d60209081526040918290208251608081018452815481526001820154818401526002820180548551818602810186018752818152929593949386019383018282801561243157602002820191906000526020600020905b81548152602001906001019080831161241d575b50505091835250506003919091015460ff16151560209091015292915050565b600260015414156124745760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166124a85760405162461bcd60e51b81526004016108819061457f565b6124b06139c5565b6124b9826130bc565b805161010001519091506124df5760405162461bcd60e51b815260040161088190614aa5565b8051516001600160a01b031633146125095760405162461bcd60e51b815260040161088190614dfe565b60408101511561258f57612541816060015182604001518360000151606001516001600160a01b03166132559092919063ffffffff16565b7fe8f267296dd98f54fe66007a36688e8b79a64988383c42d63995938d8e143dd982826060015183600001516060015184604001516040516125869493929190615269565b60405180910390a15b60008281526007602052604090819020600801805460ff19169055517f2a6445a420b30cbabfffd85287bfa6c0c8f9b5f65d48637922da74abf357e52b906114cd90849033906151b3565b60006125e4613930565b6125ed83612f2d565b5160400151519392505050565b60046020526000908152604090205460ff1681565b600c6020526000908152604090205460ff1681565b60025490565b612632613059565b6001600160a01b0316612643612335565b6001600160a01b0316146126695760405162461bcd60e51b815260040161088190614c43565b6000838152600f60205260408120805460ff191660011790555b81811015610950576000848152600f60205260408120600191908201908585858181106126ac57fe5b90506020020160208101906126c19190613b03565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600101612683565b60006126fb613930565b60008381526005602090815260409182902082516101608101845281546001600160a01b0390811682860190815260018401549091166060830152600283018054865181870281018701909752808752929593948694929386936080870193909290919083018282801561278e57602002820191906000526020600020905b81548152602001906001019080831161277a575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154909216606084015260068401546080840152600784015460a084015260089093015460ff16151560c09092019190915291835260099390930154919092015290510151519392505050565b3360009081526004602052604090205460ff1661283c5760405162461bcd60e51b81526004016108819061457f565b80518061285b5760405162461bcd60e51b81526004016108819061477f565b600084815260056020526040902060060154421061288b5760405162461bcd60e51b815260040161088190614adc565b6000848152600560205260409020546001600160a01b031633146128c15760405162461bcd60e51b815260040161088190614534565b8260005b83518110156129cf5760008482815181106128dc57fe5b602090810291909101810151600089815260059092526040918290205491516331a9108f60e11b81529092506001600160a01b0391821691851690636352211e9061292b9085906004016151aa565b60206040518083038186803b15801561294357600080fd5b505afa158015612957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297b9190613b1f565b6001600160a01b0316146129a15760405162461bcd60e51b81526004016108819061500b565b60008781526005602090815260408220600201805460018181018355918452919092200191909155016128c5565b507f9fb33f4b0149c5f78fc6753547dba139088c5f19b41fa58239d32f85eaa229358386604051612a019291906141e9565b60405180910390a15050505050565b3360009081526004602052604090205460ff16612a3f5760405162461bcd60e51b81526004016108819061457f565b612a47613930565b612a5082612f2d565b80516101000151909150612a765760405162461bcd60e51b81526004016108819061429e565b8051516001600160a01b03163314612aa05760405162461bcd60e51b8152600401610881906144e2565b60008281526005602052604090819020600801805460ff19169055517ff3da86c38149b3ff13eb97ec00d936dffd9cb29a827e1c0fc9dae4a939137fc89061200b90849033906151b3565b6009546001600160a01b031681565b612b02613059565b6001600160a01b0316612b13612335565b6001600160a01b031614612b395760405162461bcd60e51b815260040161088190614c43565b612b4b836001600160a01b03166133f6565b15612b6957612b646001600160a01b0384168383613255565b612b7c565b612b7c6001600160a01b038316826133fc565b7ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f3883328504838383604051612baf9392919061414b565b60405180910390a1505050565b600a546001600160a01b031681565b60026001541415612bee5760405162461bcd60e51b815260040161088190614fd4565b6002600155612bfb613059565b6001600160a01b0316612c0c612335565b6001600160a01b031614612c325760405162461bcd60e51b815260040161088190614c43565b6000918252600c6020526040909120805460ff191691151591909117905560018055565b6000612c606139c5565b60008381526007602090815260409182902082516101a08101845281546001600160a01b0390811660808301908152600184015490911660a08301526002830180548651818702810187019097528087529295939486949293869360c08701939092909190830182828015612cf457602002820191906000526020600020905b815481526020019060010190808311612ce0575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154831660608086019190915260068601546080860152600786015460a086015260089095015460ff16151560c090940193909352938552600986015493850193909352600a85015484820152600b9094015490911691015290510151519392505050565b612d93613059565b6001600160a01b0316612da4612335565b6001600160a01b031614612dca5760405162461bcd60e51b815260040161088190614c43565b602080820180516000908152600d8352604090819020845181559151600183015583015180518493612e0392600285019291019061397a565b50606091909101516003909101805460ff191691151591909117905560005b816040015151811015612e6957600082604001518281518110612e4157fe5b602090810291909101810151848201516000918252600e909252604090205550600101612e22565b5050565b612e75613059565b6001600160a01b0316612e86612335565b6001600160a01b031614612eac5760405162461bcd60e51b815260040161088190614c43565b6001600160a01b038116612ed25760405162461bcd60e51b8152600401610881906143da565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b612f35613930565b60008281526005602090815260409182902082516101608101845281546001600160a01b03908116828601908152600184015490911660608301526002830180548651818702810187019097528087529295939486949293869360808701939092909190830182828015612fc857602002820191906000526020600020905b815481526020019060010190808311612fb4575b505050918352505060038201546001600160a01b039081166020808401919091526004840154604084015260058401548216606084015260068401546080840152600784015460a084015260089093015460ff16151560c0909201919091529183526009939093015491909201528151519192501661075a5760405162461bcd60e51b8152600401610881906142d5565b3390565b600061306c8787878787613498565b90506000821161308e5760405162461bcd60e51b8152600401610881906149d6565b50505050505050565b60008282018381101561103e5760405162461bcd60e51b8152600401610881906144ab565b6130c46139c5565b60008281526007602090815260409182902082516101a08101845281546001600160a01b0390811660808301908152600184015490911660a08301526002830180548651818702810187019097528087529295939486949293869360c0870193909290919083018282801561315857602002820191906000526020600020905b815481526020019060010190808311613144575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154831660608086019190915260068601546080860152600786015460a086015260089095015460ff16151560c090940193909352938552600986015493850193909352600a85015490840152600b90930154811691909201528151519192501661075a5760405162461bcd60e51b815260040161088190614b39565b6132148787878786613498565b50600083116132355760405162461bcd60e51b815260040161088190614630565b6000811161308e5760405162461bcd60e51b815260040161088190614375565b6132ab8363a9059cbb60e01b848460405160240161327492919061418a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613790565b505050565b6000826132bf57506000610858565b828202828482816132cc57fe5b041461103e5760405162461bcd60e51b815260040161088190614b6e565b610950846323b872dd60e01b8585856040516024016132749392919061414b565b60008282111561332d5760405162461bcd60e51b815260040161088190614748565b50900390565b8015806133bb5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906133699030908690600401614131565b60206040518083038186803b15801561338157600080fd5b505afa158015613395573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133b99190613dc4565b155b6133d75760405162461bcd60e51b815260040161088190615055565b6132ab8363095ea7b360e01b848460405160240161327492919061418a565b3b151590565b8047101561341c5760405162461bcd60e51b815260040161088190614820565b6000826001600160a01b0316826040516134359061411a565b60006040518083038185875af1925050503d8060008114613472576040519150601f19603f3d011682016040523d82523d6000602084013e613477565b606091505b50509050806132ab5760405162461bcd60e51b8152600401610881906147c3565b8251846000805b838110156136ff578681815181106134b357fe5b6020908102919091018101516001600160a01b0385166000908152600883526040808220838352909352919091205490925060ff16156135055760405162461bcd60e51b815260040161088190614a44565b6001600160a01b03808416600081815260086020908152604080832087845290915290819020805460ff19166001179055516331a9108f60e11b8152918b1691636352211e906135599086906004016151aa565b60206040518083038186803b15801561357157600080fd5b505afa158015613585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a99190613b1f565b6001600160a01b0316146135cf5760405162461bcd60e51b81526004016108819061500b565b60405163020604bf60e21b815230906001600160a01b0385169063081812fc906135fd9086906004016151aa565b60206040518083038186803b15801561361557600080fd5b505afa158015613629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364d9190613b1f565b6001600160a01b031614806136db575060405163e985e9c560e01b81526001600160a01b0384169063e985e9c59061368b908c903090600401614131565b60206040518083038186803b1580156136a357600080fd5b505afa1580156136b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136db9190613cfa565b6136f75760405162461bcd60e51b815260040161088190614ed0565b60010161349f565b50428410156137205760405162461bcd60e51b815260040161088190614267565b60005b83811015613784576001600160a01b0388166000908152600860205260408120885182908a908590811061375357fe5b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101613723565b50505095945050505050565b60606137e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661381f9092919063ffffffff16565b8051909150156132ab57808060200190518101906138039190613cfa565b6132ab5760405162461bcd60e51b815260040161088190614f2d565b606061382e8484600085613836565b949350505050565b6060824710156138585760405162461bcd60e51b815260040161088190614857565b613861856133f6565b61387d5760405162461bcd60e51b815260040161088190614d99565b60006060866001600160a01b0316858760405161389a91906140fe565b60006040518083038185875af1925050503d80600081146138d7576040519150601f19603f3d011682016040523d82523d6000602084013e6138dc565b606091505b50915091506138ec8282866138f7565b979650505050505050565b6060831561390657508161103e565b8251156139165782518084602001fd5b8160405162461bcd60e51b81526004016108819190614234565b60405180604001604052806139436139fc565b8152602001600081525090565b60405180608001604052806000815260200160008152602001606081526020016000151581525090565b8280548282559060005260206000209081019282156139b5579160200282015b828111156139b557825182559160200191906001019061399a565b506139c1929150613a6e565b5090565b60405180608001604052806139d86139fc565b8152602001600081526020016000815260200160006001600160a01b031681525090565b60405180610120016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000151581525090565b5b808211156139c15760008155600101613a6f565b600082601f830112613a93578081fd5b813567ffffffffffffffff811115613aa9578182fd5b6020808202613ab9828201615310565b83815293508184018583018287018401881015613ad557600080fd5b600092505b84831015613af8578035825260019290920191908301908301613ada565b505050505092915050565b600060208284031215613b14578081fd5b813561103e81615363565b600060208284031215613b30578081fd5b815161103e81615363565b600080600060608486031215613b4f578182fd5b8335613b5a81615363565b92506020840135613b6a81615363565b929592945050506040919091013590565b600080600080600080600080610100898b031215613b97578384fd5b8835613ba281615363565b9750602089013567ffffffffffffffff811115613bbd578485fd5b613bc98b828c01613a83565b9750506040890135613bda81615363565b9550606089013594506080890135613bf181615363565b979a969950949793969560a0850135955060c08501359460e001359350915050565b60008060008060008060008060006101208a8c031215613c31578081fd5b8935613c3c81615363565b985060208a013567ffffffffffffffff811115613c57578182fd5b613c638c828d01613a83565b98505060408a0135613c7481615363565b965060608a0135955060808a0135613c8b81615363565b945060a08a0135935060c08a0135925060e08a013591506101008a0135613cb18161537b565b809150509295985092959850929598565b60008060408385031215613cd4578182fd5b8235613cdf81615363565b91506020830135613cef8161537b565b809150509250929050565b600060208284031215613d0b578081fd5b815161103e8161537b565b600060208284031215613d27578081fd5b813567ffffffffffffffff80821115613d3e578283fd5b9083019060808286031215613d51578283fd5b613d5b6080615310565b8235815260208301356020820152604083013582811115613d7a578485fd5b613d8687828601613a83565b60408301525060608301359250613d9c8361537b565b6060810192909252509392505050565b600060208284031215613dbd578081fd5b5035919050565b600060208284031215613dd5578081fd5b5051919050565b60008060408385031215613dee578182fd5b823591506020830135613cef81615363565b600080600060608486031215613e14578081fd5b833592506020840135613e2681615363565b9150604084013567ffffffffffffffff811115613e41578182fd5b613e4d86828701613a83565b9150509250925092565b60008060008060008060008060006101208a8c031215613e75578283fd5b8935985060208a0135613e8781615363565b975060408a013567ffffffffffffffff811115613ea2578384fd5b613eae8c828d01613a83565b97505060608a0135613ebf81615363565b955060808a0135945060a08a0135613ed681615363565b8094505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b600080600060408486031215613f11578081fd5b83359250602084013567ffffffffffffffff80821115613f2f578283fd5b818601915086601f830112613f42578283fd5b813581811115613f50578384fd5b8760208083028501011115613f63578384fd5b6020830194508093505050509250925092565b60008060408385031215613f88578182fd5b823591506020830135613cef8161537b565b60008060408385031215613fac578182fd5b50508035926020909101359150565b60008060008060008060c08789031215613fd3578384fd5b863595506020870135945060408701359350606087013560ff81168114613ff8578283fd5b9598949750929560808101359460a0909101359350915050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561404e57815187529582019590820190600101614032565b509495945050505050565b15159052565b600061012060018060a01b03835116845260208301516140826020860182614012565b50604083015181604086015261409a8286018261401f565b91505060608301516140af6060860182614012565b506080830151608085015260a08301516140cc60a0860182614012565b5060c083015160c085015260e083015160e0850152610100808401516140f482870182614059565b5090949350505050565b60008251614110818460208701615337565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156141dd5783511515835292840192918401916001016141bf565b50909695505050505050565b6000604082526141fc604083018561401f565b90508260208301529392505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152614253816040850160208701615337565b601f01601f19169190910160400192915050565b60208082526018908201527f737461727454696d65206d757374206265203e3d206e6f770000000000000000604082015260600190565b6020808252601e908201527f74686520666c6173682073616c652069736e277420617661696c61626c650000604082015260600190565b60208082526023908201527f7468652074617267657420666c6173682073616c6520646f65736e27742065786040820152621a5cdd60ea1b606082015260800190565b60208082526038908201527f746865207365747465722063616e2774206d616b65206120707572636861736560408201527f2066726f6d20697473206f776e20666c6173682073616c650000000000000000606082015260800190565b60208082526014908201527306475726174696f6e206d757374206265203e20360641b604082015260600190565b6020808252601f908201527f616d6f756e742073686f756c64206265203e20746f74616c5061796d656e7400604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601490820152730616d6f756e742073686f756c64206265203e20360641b604082015260600190565b6020808252603f908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865206660408201527f6c6173682073616c6520616674657220746865207374617274206f6620697400606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526032908201527f74686520666c6173682073616c652063616e206f6e6c792062652063616e6365604082015271363632b210313c9034ba399039b2ba3a32b960711b606082015260800190565b6020808252602b908201527f746865202073616c652063616e206f6e6c79206265207570646174656420627960408201526a1034ba399039b2ba3a32b960a91b606082015260800190565b60208082526021908201527f7468652063616c6c65722069736e277420696e207468652077686974656c69736040820152601d60fa1b606082015260800190565b6020808252604a908201527f746f74616c20616d6f756e7420746f20707572636861736520666f722061637460408201527f6976697479206578636565647320746865206c696d69746174696f6e206f6620606082015269616e206164647265737360b01b608082015260a00190565b6020808252601b908201527f6d696e426964496e6372656d656e74206d757374206265203e20300000000000604082015260600190565b60208082526030908201527f74686520666c6173682073616c652063616e206f6e6c7920626520757064617460408201526f32b210313c9034ba399039b2ba3a32b960811b606082015260800190565b60208082526028908201527f746865207365747465722063616e27742062696420666f7220697473206f776e6040820152671030bab1ba34b7b760c11b606082015260800190565b60208082526029908201527f6f6e6c792074686520617661696c61626c652061756374696f6e2063616e206260408201526819481cd95d1d1b195960ba1b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526024908201527f6c656e677468206f6620746f6b656e416464726573736573206d7573742062656040820152630203e20360e41b606082015260800190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601e908201527f766572696679207465737420736572766572207369676e206661696c65640000604082015260600190565b602080825260139082015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604082015260600190565b60208082526021908201527f74686520666c6173682073616c6520686173206265656e2063616e63656c6c656040820152601960fa1b606082015260800190565b6020808252601e908201527f7665726966792070726f6420736572766572207369676e206661696c65640000604082015260600190565b6020808252603d908201527f746f74616c20616d6f756e7420746f207075726368617365206578636565647360408201527f20746865206c696d69746174696f6e206f6620616e2061646472657373000000606082015260800190565b6020808252601e908201527f70757263686173654c696d69746174696f6e206d757374206265203e20300000604082015260600190565b60208082526019908201527f7468652061756374696f6e20646f65736e277420737461727400000000000000604082015260600190565b60208082526018908201527f726570657469746976652045524337323120746f6b656e730000000000000000604082015260600190565b60208082526010908201526f1cda59db881a185cda081c995c19585d60821b604082015260600190565b6020808252601b908201527f7468652061756374696f6e2069736e277420617661696c61626c650000000000604082015260600190565b6020808252603a908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865202060408201527f73616c6520616674657220746865207374617274206f66206974000000000000606082015260800190565b6020808252818101527f746865207461726765742061756374696f6e20646f65736e2774206578697374604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601c908201527f74686520666c6173682073616c6520646f65736e277420737461727400000000604082015260600190565b6020808252603a908201527f666972737420626964206d75737420666f6c6c6f772074686520696e6974696160408201527f6c2070726963652073657420696e207468652061756374696f6e000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601e908201527f7468652061756374696f6e20686173206265656e2063616e63656c6c65640000604082015260600190565b6020808252602b908201527f696e73756666696369656e7420616d6f756e74206f6620746f6b656e20666f7260408201526a207468697320747261646560a81b606082015260800190565b60208082526032908201527f7468652061756374696f6e2063616e206f6e6c7920626520736574746c65642060408201527161667465722069747320656e642074696d6560701b606082015260800190565b6020808252602d908201527f7468652061756374696f6e2063616e206f6e6c7920626520757064617465642060408201526c313c9034ba399039b2ba3a32b960991b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b602080825260149082015273139bdd081a5b881d1a194815da1a5d195b1a5cdd60621b604082015260600190565b6020808252602f908201527f7468652061756374696f6e2063616e206f6e6c792062652063616e63656c6c6560408201526e3210313c9034ba399039b2ba3a32b960891b606082015260800190565b6020808252605a908201527f74686520626964207072696365206d757374206265206c61726765722074686160408201527f6e207468652073756d206f662063757272656e742068696768657374206f6e6560608201527f20616e64206d696e696d756d2062696420696e6372656d656e74000000000000608082015260a00190565b60208082526039908201527f74686520636f6e7472616374206861736e2774206265656e20617070726f766560408201527f6420666f7220455243373231207472616e7366657272696e6700000000000000606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252603c908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865206160408201527f756374696f6e20616674657220746865207374617274206f6620697400000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602a908201527f756e6d617463686564206f776e657273686970206f6620746172676574204552604082015269219b9918903a37b5b2b760b11b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b60208082526017908201527f7468652061756374696f6e206861732065787069726564000000000000000000604082015260600190565b600060208252825160208301526020830151604083015260408301516080606084015261511260a084018261401f565b90506060840151151560808401528091505092915050565b60006020825282516080602084015261514660a084018261405f565b9050602084015160408401526040840151606084015260018060a01b0360608501511660808401528091505092915050565b600060208252825160406020840152615194606084018261405f565b9050602084015160408401528091505092915050565b90815260200190565b9182526001600160a01b0316602082015260400190565b8881526001600160a01b03888116602083015287811660408301528681166060830152858116608083015261010060a0830181905260009161520e8483018861401f565b951660c0840152505060e001529695505050505050565b600087825260018060a01b038088166020840152808716604084015260c0606084015261525560c084018761401f565b941660808301525060a00152949350505050565b9384526001600160a01b03928316602085015291166040830152606082015260800190565b8a81526001600160a01b038a811660208301528981166040830152610140606083018190526000916152c28483018c61401f565b998116608085015260a084019890985250509390941660c084015260e08301919091526101008201526101200152949350505050565b92835260208301919091521515604082015260600190565b60405181810167ffffffffffffffff8111828210171561532f57600080fd5b604052919050565b60005b8381101561535257818101518382015260200161533a565b838111156109505750506000910152565b6001600160a01b038116811461537857600080fd5b50565b801515811461537857600080fdfea2646970667358221220dd2685cc04fa3e99e20e48cfab7a51f48a3f237935b16df095e99c7e1927cfff64736f6c634300060c0033
Deployed Bytecode
0x6080604052600436106102305760003560e01c80638da5cb5b1161012e578063c4f6e995116100ab578063db420fe31161006f578063db420fe3146106b1578063e21e3f4b146106c6578063eee44acb146106e6578063f25e901514610706578063f2fde38b1461072657610230565b8063c4f6e9951461061c578063d341e3951461063c578063d6f4935d1461065c578063d8199fe41461067c578063d9caed121461069157610230565b806396ec9b38116100f257806396ec9b38146105875780639b19251a146105a7578063a4a61879146105c7578063aed35df4146105e7578063b612a025146105fc57610230565b80638da5cb5b146104d85780638dccc36d146104fa578063911627da1461051a578063922635d81461053a57806396b5a7551461056757610230565b80633377cbaf116101bc57806353d6fd591161018057806353d6fd5914610427578063598647f8146104475780636c4ced8b14610467578063715018a61461049657806378bd7935146104ab57610230565b80633377cbaf14610387578063400d837b146103b457806340d1d824146103d457806347b64eb0146103f45780634fd501d81461041457610230565b80631a72e588116102035780631a72e588146102da5780631efb65d2146102fa5780632073b1d91461031a57806324ef85e1146103475780632e9936111461036757610230565b80630452b9681461023557806316918bfa1461026b57806319ab453c1461029857806319d519f4146102ba575b600080fd5b34801561024157600080fd5b50610255610250366004613dac565b610746565b6040516102629190615178565b60405180910390f35b34801561027757600080fd5b5061028b610286366004613ddc565b61075f565b60405161026291906151aa565b3480156102a457600080fd5b506102b86102b3366004613b03565b61085e565b005b3480156102c657600080fd5b506102b86102d5366004613efd565b6108a3565b3480156102e657600080fd5b506102b86102f5366004613e57565b610956565b34801561030657600080fd5b506102b8610315366004613e57565b610c47565b34801561032657600080fd5b5061033a610335366004613efd565b610f6f565b60405161026291906141a3565b34801561035357600080fd5b506102b8610362366004613c13565b611045565b34801561037357600080fd5b506102b8610382366004613dac565b6112c3565b34801561039357600080fd5b506103a76103a2366004613dac565b6114dd565b604051610262919061420b565b3480156103c057600080fd5b506102b86103cf366004613b7b565b6114f2565b3480156103e057600080fd5b5061028b6103ef366004613ddc565b611766565b34801561040057600080fd5b506102b861040f366004613b03565b61179b565b6102b8610422366004613fbb565b6117fc565b34801561043357600080fd5b506102b8610442366004613cc2565b611f76565b34801561045357600080fd5b506102b8610462366004613f9a565b612017565b34801561047357600080fd5b50610487610482366004613dac565b612277565b604051610262939291906152f8565b3480156104a257600080fd5b506102b861229b565b3480156104b757600080fd5b506104cb6104c6366004613dac565b612324565b604051610262919061512a565b3480156104e457600080fd5b506104ed612335565b604051610262919061411d565b34801561050657600080fd5b506102b8610515366004613b03565b612344565b34801561052657600080fd5b5061028b610535366004613dac565b6123a5565b34801561054657600080fd5b5061055a610555366004613dac565b6123b7565b60405161026291906150e2565b34801561057357600080fd5b506102b8610582366004613dac565b612451565b34801561059357600080fd5b5061028b6105a2366004613dac565b6125da565b3480156105b357600080fd5b506103a76105c2366004613b03565b6125fa565b3480156105d357600080fd5b506103a76105e2366004613dac565b61260f565b3480156105f357600080fd5b5061028b612624565b34801561060857600080fd5b506102b8610617366004613efd565b61262a565b34801561062857600080fd5b5061028b610637366004613dac565b6126f1565b34801561064857600080fd5b506102b8610657366004613e00565b61280d565b34801561066857600080fd5b506102b8610677366004613dac565b612a10565b34801561068857600080fd5b506104ed612aeb565b34801561069d57600080fd5b506102b86106ac366004613b3b565b612afa565b3480156106bd57600080fd5b506104ed612bbc565b3480156106d257600080fd5b506102b86106e1366004613f76565b612bcb565b3480156106f257600080fd5b5061028b610701366004613dac565b612c56565b34801561071257600080fd5b506102b8610721366004613d16565b612d8b565b34801561073257600080fd5b506102b8610741366004613b03565b612e6d565b61074e613930565b61075782612f2d565b90505b919050565b6000610769613950565b6000848152600d6020908152604091829020825160808101845281548152600182015481840152600282018054855181860281018601875281815292959394938601938301828280156107db57602002820191906000526020600020905b8154815260200190600101908083116107c7575b50505091835250506003919091015460ff16151560209091015290506000805b8260400151518110156108535760008360400151828151811061081a57fe5b60209081029190910181015160009081526006825260408082206001600160a01b038a16835290925220549290920191506001016107fb565b509150505b92915050565b60035460ff161561088a5760405162461bcd60e51b8152600401610881906148d4565b60405180910390fd5b61089381612eac565b506003805460ff19166001179055565b6108ab613059565b6001600160a01b03166108bc612335565b6001600160a01b0316146108e25760405162461bcd60e51b815260040161088190614c43565b60005b81811015610950576000848152600f602052604081206001018185858581811061090b57fe5b90506020020160208101906109209190613b03565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556001016108e5565b50505050565b600260015414156109795760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166109ad5760405162461bcd60e51b81526004016108819061457f565b6109b5613930565b6109be8a612f2d565b905042816000015160c00151116109e75760405162461bcd60e51b81526004016108819061444e565b80516101000151610a0a5760405162461bcd60e51b815260040161088190614901565b8051516001600160a01b03163314610a345760405162461bcd60e51b815260040161088190614667565b610a42338a8a89878961305d565b60008215610a5757610a548484613097565b90505b81516001600160a01b03808c16602092830152835160409081018c905284518b831660609091015284516080018a9052845189831660a090910152845160c001879052845160e00184905282850188905260008e8152600584528190208551805182549085166001600160a01b0319918216178355818601516001840180549190961691161790935590820151805186949293928492610b00926002850192919091019061397a565b5060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055505050602082015181600901559050507f929ba8b4f3c95a0f8b21c07523f66eff127cd5221441dc06fdee198ffcd5f8ad8b836000015160000151846000015160200151856000015160400151866000015160600151876000015160800151886000015160a0015189602001518a6000015160c001518b6000015160e00151604051610c2e9a9998979695949392919061528e565b60405180910390a1505060018055505050505050505050565b60026001541415610c6a5760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff16610c9e5760405162461bcd60e51b81526004016108819061457f565b610ca66139c5565b610caf8a6130bc565b905042816000015160c0015111610cd85760405162461bcd60e51b815260040161088190614f77565b80516101000151610cfb5760405162461bcd60e51b815260040161088190614c78565b8051516001600160a01b03163314610d255760405162461bcd60e51b815260040161088190614d4c565b610d34338a8a89888888613207565b80516001600160a01b03808b16602090920191909152815160400189905281518882166060909101528151608001879052815190861660a090910152805160c001839052610d828383613097565b815160e00152602080820185905260008b8152600782526040908190208351805182546001600160a01b039182166001600160a01b03199182161784558286015160018501805491909316911617905591820151805185949293928492610df2926002850192919091019061397a565b5060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff021916908315150217905550505060208201518160090155604082015181600a0155606082015181600b0160006101000a8154816001600160a01b0302191690836001600160a01b031602179055509050507fd63adfd44826c87ece3083feed98529b1adf82a87e5a6da33e21700f3f0319458a826000015160000151836000015160200151846000015160400151856000015160600151866000015160800151876000015160a001518860200151896000015160c001518a6000015160e00151604051610f579a9998979695949392919061528e565b60405180910390a15050600180555050505050505050565b6060808267ffffffffffffffff81118015610f8957600080fd5b50604051908082528060200260200182016040528015610fb3578160200160208202803683370190505b50905060005b8381101561103a576000868152600f6020526040812060010190868684818110610fdf57fe5b9050602002016020810190610ff49190613b03565b6001600160a01b03168152602081019190915260400160002054825160ff9091169083908390811061102257fe5b91151560209283029190910190910152600101610fb9565b5090505b9392505050565b600260015414156110685760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff1661109c5760405162461bcd60e51b81526004016108819061457f565b6110aa338a8a89878961305d565b600082156110bf576110bc8484613097565b90505b6110c7613930565b506040805161016081018252339181019182526001600160a01b038c81166060830152608082018c90528a811660a083015260c082018a9052881660e0820152610100810186905261012081018390526001610140820181905291815260208101879052600254909161113b908290613097565b60029081556000828152600560209081526040918290208551805182546001600160a01b039182166001600160a01b031991821617845582850151600185018054919093169116179055928301518051879592949385936111a2939085019291019061397a565b506060828101516003830180546001600160a01b039283166001600160a01b031991821617909155608080860151600486015560a0808701516005870180549190951693169290921790925560c080860151600686015560e0808701516007870155610100909601516008909501805495151560ff199687161790556020978801516009909701969096556000888152600c885260409081902080548d1515961695909517909455885180518189015182870151958301519483015193830151998c015198830151929097015195517f11ed0be6ce391c981a002586d18807296088f0ad8747d50b4d20655c51cc33b0996112a9998c99939893979695949193909261528e565b60405180910390a150506001805550505050505050505050565b600260015414156112e65760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff1661131a5760405162461bcd60e51b81526004016108819061457f565b6113226139c5565b61132b826130bc565b805161010001519091506113515760405162461bcd60e51b8152600401610881906146ff565b805160e001514210156113765760405162461bcd60e51b815260040161088190614cfa565b60408101511561145857805160a081015160408301516060909201516113a8926001600160a01b039091169190613255565b60005b81516040015151811015611456578160000151602001516001600160a01b03166342842e0e836000015160000151846060015185600001516040015185815181106113f257fe5b60200260200101516040518463ffffffff1660e01b81526004016114189392919061414b565b600060405180830381600087803b15801561143257600080fd5b505af1158015611446573d6000803e3d6000fd5b5050600190920191506113ab9050565b505b600082815260076020908152604091829020600801805460ff19169055825160a0810151606080860151938301518386015191909301518686015195517f31f1beabaa0429887bbc894478865975b3be525a1c8b6e03ba6fd41345b45458966114cd968a9633969591949093919290916151ca565b60405180910390a1505060018055565b600f6020526000908152604090205460ff1681565b600260015414156115155760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166115495760405162461bcd60e51b81526004016108819061457f565b61155833898988878787613207565b6115606139c5565b604080516101a0810190915233608082019081526001600160a01b038b811660a084015260c083018b905289811660e0840152610100830189905287166101208301526101408201859052819061016082016115bc8787613097565b81526001602091820181905291835282018790526000604083018190526060909201919091526002549192506115f3908290613097565b60029081556000828152600760209081526040918290208551805182546001600160a01b039182166001600160a01b0319918216178455828501516001850180549190931691161790559283015180518795929493859361165a939085019291019061397a565b506060828101516003830180546001600160a01b03199081166001600160a01b0393841617909155608080860151600486015560a080870151600587018054851691861691909117905560c080880151600688015560e0808901516007890155610100909801516008909701805460ff19169715159790971790965560208981015160098a01556040808b0151600a8b015599860151600b909901805490941698909416979097179091558851805181840151828a0151958301519383015198830151948c015196830151929097015198517fd38229560d70ff33a43c34fffbb9b2b4eb7ca98a70f2fe7dd1deca2c0ece3cf999610f57998c999398939796909490939290919061528e565b600061177183612f2d565b505060009182526006602090815260408084206001600160a01b0393909316845291905290205490565b6117a3613059565b6001600160a01b03166117b4612335565b6001600160a01b0316146117da5760405162461bcd60e51b815260040161088190614c43565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561181f5760405162461bcd60e51b815260040161088190614fd4565b600260019081556000878152600c602052604090205460ff16151514156118c957600a546040805160008152602001908190526001600160a01b0390911690600190611872908790879087908790614216565b6020604051602081039080840390855afa158015611894573d6000803e3d6000fd5b505050602060405103516001600160a01b0316146118c45760405162461bcd60e51b815260040161088190614942565b61194d565b6009546040805160008152602001908190526001600160a01b03909116906001906118fb908790879087908790614216565b6020604051602081039080840390855afa15801561191d573d6000803e3d6000fd5b505050602060405103516001600160a01b03161461194d5760405162461bcd60e51b81526004016108819061489d565b6000848152600b602052604090205486141561197b5760405162461bcd60e51b815260040161088190614a7b565b611983613930565b61198c87612f2d565b9050600086116119ae5760405162461bcd60e51b815260040161088190614420565b805161010001516119d15760405162461bcd60e51b81526004016108819061429e565b8051516001600160a01b03163314156119fc5760405162461bcd60e51b815260040161088190614318565b805160c001514290811015611a235760405162461bcd60e51b815260040161088190614baf565b815160e0015115801590611a3c5750815160e001518110155b15611a9b5760008881526005602052604090819020600801805460ff19169055517f90022e1d8eedbbb3c33615d39a0b09d7b55aea384712055d32661146c5a661f390611a8c908a9033906151b3565b60405180910390a15050611f6a565b6000888152600660209081526040808320338452909152812054611abf9089613097565b60008a8152600e6020908152604080832054808452600d909252909120600301549192509060ff1615611c19576000818152600f602052604090205460ff161580611b2657506000818152600f6020908152604080832033845260010190915290205460ff165b611b425760405162461bcd60e51b815260040161088190614dd0565b611b4a613950565b6000828152600d602090815260409182902082516080810184528154815260018201548184015260028201805485518186028101860187528181529295939493860193830182828015611bbc57602002820191906000526020600020905b815481526020019060010190808311611ba8575b50505091835250506003919091015460ff161515602091820152810151909150600090611be9903361075f565b8251909150611bf8828d613097565b1115611c165760405162461bcd60e51b8152600401610881906145c0565b50505b8360200151821115611c3d5760405162461bcd60e51b815260040161088190614979565b83516040015151891115611c635760405162461bcd60e51b815260040161088190614caf565b60008a81526006602090815260408083203384529091528120839055845160800151611c8f908b6132b0565b8551606001519091506001600160a01b031615611cd057845160a0810151606090910151611ccb916001600160a01b03909116903390846132ea565b611d66565b80341015611cf05760405162461bcd60e51b8152600401610881906143a3565b7fa2d23878d5ab22445fbabd6fe02046a90b67448968da82383900084d250d529281604051611d1f91906151aa565b60405180910390a1845160a001516040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611d64573d6000803e3d6000fd5b505b60608a67ffffffffffffffff81118015611d7f57600080fd5b50604051908082528060200260200182016040528015611da9578160200160208202803683370190505b50865160400151519091506000190160005b8c811015611ec8578760000151602001516001600160a01b03166342842e0e896000015160000151338b60000151604001518681518110611df857fe5b60200260200101516040518463ffffffff1660e01b8152600401611e1e9392919061414b565b600060405180830381600087803b158015611e3857600080fd5b505af1158015611e4c573d6000803e3d6000fd5b505050508760000151604001518281518110611e6457fe5b6020026020010151838281518110611e7857fe5b60209081029190910181019190915260008f815260059091526040902060020180546000199093019280611ea857fe5b600082815260208120820160001990810191909155019055600101611dbb565b5060008d815260056020526040902060020154611ef95760008d8152600560205260409020600801805460ff191690555b8c600b60008d8152602001908152602001600020819055507fe266a5c8012d7c80c559afb035891cd33e867ac3350c54c4bca825ade265088d8d33896000015160200151858b600001516060015188604051611f5a96959493929190615225565b60405180910390a1505050505050505b50506001805550505050565b611f7e613059565b6001600160a01b0316611f8f612335565b6001600160a01b031614611fb55760405162461bcd60e51b815260040161088190614c43565b6001600160a01b03821660009081526004602052604090819020805460ff1916831515179055517ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb9061200b908490849061416f565b60405180910390a15050565b6002600154141561203a5760405162461bcd60e51b815260040161088190614fd4565b60026001556120476139c5565b612050836130bc565b805161010001519091506120765760405162461bcd60e51b815260040161088190614aa5565b8051516001600160a01b03163314156120a15760405162461bcd60e51b8152600401610881906146b7565b805160c0015142908110156120c85760405162461bcd60e51b815260040161088190614a0d565b815160e0015181106120ec5760405162461bcd60e51b8152600401610881906150ab565b81516060015160408301511561219f576020830151604084015161211190869061330b565b101561212f5760405162461bcd60e51b815260040161088190614e4d565b6060830151604084015161214d916001600160a01b03841691613255565b7fe8f267296dd98f54fe66007a36688e8b79a64988383c42d63995938d8e143dd985846060015185600001516060015186604001516040516121929493929190615269565b60405180910390a16121c3565b82516080015184146121c35760405162461bcd60e51b815260040161088190614be6565b6000858152600760205260408120600a8101869055600b0180546001600160a01b03191633179055612201906001600160a01b038316903090613333565b6122156001600160a01b0382163086613333565b61222a6001600160a01b0382163330876132ea565b8251606001516040517fc96310726d5afa93813f4276097a5d37645001323ca859d67ed71d1db0785dfb9161226491889133918990615269565b60405180910390a1505060018055505050565b600d6020526000908152604090208054600182015460039092015490919060ff1683565b6122a3613059565b6001600160a01b03166122b4612335565b6001600160a01b0316146122da5760405162461bcd60e51b815260040161088190614c43565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61232c6139c5565b610757826130bc565b6000546001600160a01b031690565b61234c613059565b6001600160a01b031661235d612335565b6001600160a01b0316146123835760405162461bcd60e51b815260040161088190614c43565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205481565b6123bf613950565b6000828152600d60209081526040918290208251608081018452815481526001820154818401526002820180548551818602810186018752818152929593949386019383018282801561243157602002820191906000526020600020905b81548152602001906001019080831161241d575b50505091835250506003919091015460ff16151560209091015292915050565b600260015414156124745760405162461bcd60e51b815260040161088190614fd4565b60026001553360009081526004602052604090205460ff166124a85760405162461bcd60e51b81526004016108819061457f565b6124b06139c5565b6124b9826130bc565b805161010001519091506124df5760405162461bcd60e51b815260040161088190614aa5565b8051516001600160a01b031633146125095760405162461bcd60e51b815260040161088190614dfe565b60408101511561258f57612541816060015182604001518360000151606001516001600160a01b03166132559092919063ffffffff16565b7fe8f267296dd98f54fe66007a36688e8b79a64988383c42d63995938d8e143dd982826060015183600001516060015184604001516040516125869493929190615269565b60405180910390a15b60008281526007602052604090819020600801805460ff19169055517f2a6445a420b30cbabfffd85287bfa6c0c8f9b5f65d48637922da74abf357e52b906114cd90849033906151b3565b60006125e4613930565b6125ed83612f2d565b5160400151519392505050565b60046020526000908152604090205460ff1681565b600c6020526000908152604090205460ff1681565b60025490565b612632613059565b6001600160a01b0316612643612335565b6001600160a01b0316146126695760405162461bcd60e51b815260040161088190614c43565b6000838152600f60205260408120805460ff191660011790555b81811015610950576000848152600f60205260408120600191908201908585858181106126ac57fe5b90506020020160208101906126c19190613b03565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600101612683565b60006126fb613930565b60008381526005602090815260409182902082516101608101845281546001600160a01b0390811682860190815260018401549091166060830152600283018054865181870281018701909752808752929593948694929386936080870193909290919083018282801561278e57602002820191906000526020600020905b81548152602001906001019080831161277a575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154909216606084015260068401546080840152600784015460a084015260089093015460ff16151560c09092019190915291835260099390930154919092015290510151519392505050565b3360009081526004602052604090205460ff1661283c5760405162461bcd60e51b81526004016108819061457f565b80518061285b5760405162461bcd60e51b81526004016108819061477f565b600084815260056020526040902060060154421061288b5760405162461bcd60e51b815260040161088190614adc565b6000848152600560205260409020546001600160a01b031633146128c15760405162461bcd60e51b815260040161088190614534565b8260005b83518110156129cf5760008482815181106128dc57fe5b602090810291909101810151600089815260059092526040918290205491516331a9108f60e11b81529092506001600160a01b0391821691851690636352211e9061292b9085906004016151aa565b60206040518083038186803b15801561294357600080fd5b505afa158015612957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297b9190613b1f565b6001600160a01b0316146129a15760405162461bcd60e51b81526004016108819061500b565b60008781526005602090815260408220600201805460018181018355918452919092200191909155016128c5565b507f9fb33f4b0149c5f78fc6753547dba139088c5f19b41fa58239d32f85eaa229358386604051612a019291906141e9565b60405180910390a15050505050565b3360009081526004602052604090205460ff16612a3f5760405162461bcd60e51b81526004016108819061457f565b612a47613930565b612a5082612f2d565b80516101000151909150612a765760405162461bcd60e51b81526004016108819061429e565b8051516001600160a01b03163314612aa05760405162461bcd60e51b8152600401610881906144e2565b60008281526005602052604090819020600801805460ff19169055517ff3da86c38149b3ff13eb97ec00d936dffd9cb29a827e1c0fc9dae4a939137fc89061200b90849033906151b3565b6009546001600160a01b031681565b612b02613059565b6001600160a01b0316612b13612335565b6001600160a01b031614612b395760405162461bcd60e51b815260040161088190614c43565b612b4b836001600160a01b03166133f6565b15612b6957612b646001600160a01b0384168383613255565b612b7c565b612b7c6001600160a01b038316826133fc565b7ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f3883328504838383604051612baf9392919061414b565b60405180910390a1505050565b600a546001600160a01b031681565b60026001541415612bee5760405162461bcd60e51b815260040161088190614fd4565b6002600155612bfb613059565b6001600160a01b0316612c0c612335565b6001600160a01b031614612c325760405162461bcd60e51b815260040161088190614c43565b6000918252600c6020526040909120805460ff191691151591909117905560018055565b6000612c606139c5565b60008381526007602090815260409182902082516101a08101845281546001600160a01b0390811660808301908152600184015490911660a08301526002830180548651818702810187019097528087529295939486949293869360c08701939092909190830182828015612cf457602002820191906000526020600020905b815481526020019060010190808311612ce0575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154831660608086019190915260068601546080860152600786015460a086015260089095015460ff16151560c090940193909352938552600986015493850193909352600a85015484820152600b9094015490911691015290510151519392505050565b612d93613059565b6001600160a01b0316612da4612335565b6001600160a01b031614612dca5760405162461bcd60e51b815260040161088190614c43565b602080820180516000908152600d8352604090819020845181559151600183015583015180518493612e0392600285019291019061397a565b50606091909101516003909101805460ff191691151591909117905560005b816040015151811015612e6957600082604001518281518110612e4157fe5b602090810291909101810151848201516000918252600e909252604090205550600101612e22565b5050565b612e75613059565b6001600160a01b0316612e86612335565b6001600160a01b031614612eac5760405162461bcd60e51b815260040161088190614c43565b6001600160a01b038116612ed25760405162461bcd60e51b8152600401610881906143da565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b612f35613930565b60008281526005602090815260409182902082516101608101845281546001600160a01b03908116828601908152600184015490911660608301526002830180548651818702810187019097528087529295939486949293869360808701939092909190830182828015612fc857602002820191906000526020600020905b815481526020019060010190808311612fb4575b505050918352505060038201546001600160a01b039081166020808401919091526004840154604084015260058401548216606084015260068401546080840152600784015460a084015260089093015460ff16151560c0909201919091529183526009939093015491909201528151519192501661075a5760405162461bcd60e51b8152600401610881906142d5565b3390565b600061306c8787878787613498565b90506000821161308e5760405162461bcd60e51b8152600401610881906149d6565b50505050505050565b60008282018381101561103e5760405162461bcd60e51b8152600401610881906144ab565b6130c46139c5565b60008281526007602090815260409182902082516101a08101845281546001600160a01b0390811660808301908152600184015490911660a08301526002830180548651818702810187019097528087529295939486949293869360c0870193909290919083018282801561315857602002820191906000526020600020905b815481526020019060010190808311613144575b505050918352505060038201546001600160a01b0390811660208084019190915260048401546040808501919091526005850154831660608086019190915260068601546080860152600786015460a086015260089095015460ff16151560c090940193909352938552600986015493850193909352600a85015490840152600b90930154811691909201528151519192501661075a5760405162461bcd60e51b815260040161088190614b39565b6132148787878786613498565b50600083116132355760405162461bcd60e51b815260040161088190614630565b6000811161308e5760405162461bcd60e51b815260040161088190614375565b6132ab8363a9059cbb60e01b848460405160240161327492919061418a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613790565b505050565b6000826132bf57506000610858565b828202828482816132cc57fe5b041461103e5760405162461bcd60e51b815260040161088190614b6e565b610950846323b872dd60e01b8585856040516024016132749392919061414b565b60008282111561332d5760405162461bcd60e51b815260040161088190614748565b50900390565b8015806133bb5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906133699030908690600401614131565b60206040518083038186803b15801561338157600080fd5b505afa158015613395573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133b99190613dc4565b155b6133d75760405162461bcd60e51b815260040161088190615055565b6132ab8363095ea7b360e01b848460405160240161327492919061418a565b3b151590565b8047101561341c5760405162461bcd60e51b815260040161088190614820565b6000826001600160a01b0316826040516134359061411a565b60006040518083038185875af1925050503d8060008114613472576040519150601f19603f3d011682016040523d82523d6000602084013e613477565b606091505b50509050806132ab5760405162461bcd60e51b8152600401610881906147c3565b8251846000805b838110156136ff578681815181106134b357fe5b6020908102919091018101516001600160a01b0385166000908152600883526040808220838352909352919091205490925060ff16156135055760405162461bcd60e51b815260040161088190614a44565b6001600160a01b03808416600081815260086020908152604080832087845290915290819020805460ff19166001179055516331a9108f60e11b8152918b1691636352211e906135599086906004016151aa565b60206040518083038186803b15801561357157600080fd5b505afa158015613585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a99190613b1f565b6001600160a01b0316146135cf5760405162461bcd60e51b81526004016108819061500b565b60405163020604bf60e21b815230906001600160a01b0385169063081812fc906135fd9086906004016151aa565b60206040518083038186803b15801561361557600080fd5b505afa158015613629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364d9190613b1f565b6001600160a01b031614806136db575060405163e985e9c560e01b81526001600160a01b0384169063e985e9c59061368b908c903090600401614131565b60206040518083038186803b1580156136a357600080fd5b505afa1580156136b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136db9190613cfa565b6136f75760405162461bcd60e51b815260040161088190614ed0565b60010161349f565b50428410156137205760405162461bcd60e51b815260040161088190614267565b60005b83811015613784576001600160a01b0388166000908152600860205260408120885182908a908590811061375357fe5b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101613723565b50505095945050505050565b60606137e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661381f9092919063ffffffff16565b8051909150156132ab57808060200190518101906138039190613cfa565b6132ab5760405162461bcd60e51b815260040161088190614f2d565b606061382e8484600085613836565b949350505050565b6060824710156138585760405162461bcd60e51b815260040161088190614857565b613861856133f6565b61387d5760405162461bcd60e51b815260040161088190614d99565b60006060866001600160a01b0316858760405161389a91906140fe565b60006040518083038185875af1925050503d80600081146138d7576040519150601f19603f3d011682016040523d82523d6000602084013e6138dc565b606091505b50915091506138ec8282866138f7565b979650505050505050565b6060831561390657508161103e565b8251156139165782518084602001fd5b8160405162461bcd60e51b81526004016108819190614234565b60405180604001604052806139436139fc565b8152602001600081525090565b60405180608001604052806000815260200160008152602001606081526020016000151581525090565b8280548282559060005260206000209081019282156139b5579160200282015b828111156139b557825182559160200191906001019061399a565b506139c1929150613a6e565b5090565b60405180608001604052806139d86139fc565b8152602001600081526020016000815260200160006001600160a01b031681525090565b60405180610120016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000151581525090565b5b808211156139c15760008155600101613a6f565b600082601f830112613a93578081fd5b813567ffffffffffffffff811115613aa9578182fd5b6020808202613ab9828201615310565b83815293508184018583018287018401881015613ad557600080fd5b600092505b84831015613af8578035825260019290920191908301908301613ada565b505050505092915050565b600060208284031215613b14578081fd5b813561103e81615363565b600060208284031215613b30578081fd5b815161103e81615363565b600080600060608486031215613b4f578182fd5b8335613b5a81615363565b92506020840135613b6a81615363565b929592945050506040919091013590565b600080600080600080600080610100898b031215613b97578384fd5b8835613ba281615363565b9750602089013567ffffffffffffffff811115613bbd578485fd5b613bc98b828c01613a83565b9750506040890135613bda81615363565b9550606089013594506080890135613bf181615363565b979a969950949793969560a0850135955060c08501359460e001359350915050565b60008060008060008060008060006101208a8c031215613c31578081fd5b8935613c3c81615363565b985060208a013567ffffffffffffffff811115613c57578182fd5b613c638c828d01613a83565b98505060408a0135613c7481615363565b965060608a0135955060808a0135613c8b81615363565b945060a08a0135935060c08a0135925060e08a013591506101008a0135613cb18161537b565b809150509295985092959850929598565b60008060408385031215613cd4578182fd5b8235613cdf81615363565b91506020830135613cef8161537b565b809150509250929050565b600060208284031215613d0b578081fd5b815161103e8161537b565b600060208284031215613d27578081fd5b813567ffffffffffffffff80821115613d3e578283fd5b9083019060808286031215613d51578283fd5b613d5b6080615310565b8235815260208301356020820152604083013582811115613d7a578485fd5b613d8687828601613a83565b60408301525060608301359250613d9c8361537b565b6060810192909252509392505050565b600060208284031215613dbd578081fd5b5035919050565b600060208284031215613dd5578081fd5b5051919050565b60008060408385031215613dee578182fd5b823591506020830135613cef81615363565b600080600060608486031215613e14578081fd5b833592506020840135613e2681615363565b9150604084013567ffffffffffffffff811115613e41578182fd5b613e4d86828701613a83565b9150509250925092565b60008060008060008060008060006101208a8c031215613e75578283fd5b8935985060208a0135613e8781615363565b975060408a013567ffffffffffffffff811115613ea2578384fd5b613eae8c828d01613a83565b97505060608a0135613ebf81615363565b955060808a0135945060a08a0135613ed681615363565b8094505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b600080600060408486031215613f11578081fd5b83359250602084013567ffffffffffffffff80821115613f2f578283fd5b818601915086601f830112613f42578283fd5b813581811115613f50578384fd5b8760208083028501011115613f63578384fd5b6020830194508093505050509250925092565b60008060408385031215613f88578182fd5b823591506020830135613cef8161537b565b60008060408385031215613fac578182fd5b50508035926020909101359150565b60008060008060008060c08789031215613fd3578384fd5b863595506020870135945060408701359350606087013560ff81168114613ff8578283fd5b9598949750929560808101359460a0909101359350915050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561404e57815187529582019590820190600101614032565b509495945050505050565b15159052565b600061012060018060a01b03835116845260208301516140826020860182614012565b50604083015181604086015261409a8286018261401f565b91505060608301516140af6060860182614012565b506080830151608085015260a08301516140cc60a0860182614012565b5060c083015160c085015260e083015160e0850152610100808401516140f482870182614059565b5090949350505050565b60008251614110818460208701615337565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156141dd5783511515835292840192918401916001016141bf565b50909695505050505050565b6000604082526141fc604083018561401f565b90508260208301529392505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152614253816040850160208701615337565b601f01601f19169190910160400192915050565b60208082526018908201527f737461727454696d65206d757374206265203e3d206e6f770000000000000000604082015260600190565b6020808252601e908201527f74686520666c6173682073616c652069736e277420617661696c61626c650000604082015260600190565b60208082526023908201527f7468652074617267657420666c6173682073616c6520646f65736e27742065786040820152621a5cdd60ea1b606082015260800190565b60208082526038908201527f746865207365747465722063616e2774206d616b65206120707572636861736560408201527f2066726f6d20697473206f776e20666c6173682073616c650000000000000000606082015260800190565b60208082526014908201527306475726174696f6e206d757374206265203e20360641b604082015260600190565b6020808252601f908201527f616d6f756e742073686f756c64206265203e20746f74616c5061796d656e7400604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601490820152730616d6f756e742073686f756c64206265203e20360641b604082015260600190565b6020808252603f908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865206660408201527f6c6173682073616c6520616674657220746865207374617274206f6620697400606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526032908201527f74686520666c6173682073616c652063616e206f6e6c792062652063616e6365604082015271363632b210313c9034ba399039b2ba3a32b960711b606082015260800190565b6020808252602b908201527f746865202073616c652063616e206f6e6c79206265207570646174656420627960408201526a1034ba399039b2ba3a32b960a91b606082015260800190565b60208082526021908201527f7468652063616c6c65722069736e277420696e207468652077686974656c69736040820152601d60fa1b606082015260800190565b6020808252604a908201527f746f74616c20616d6f756e7420746f20707572636861736520666f722061637460408201527f6976697479206578636565647320746865206c696d69746174696f6e206f6620606082015269616e206164647265737360b01b608082015260a00190565b6020808252601b908201527f6d696e426964496e6372656d656e74206d757374206265203e20300000000000604082015260600190565b60208082526030908201527f74686520666c6173682073616c652063616e206f6e6c7920626520757064617460408201526f32b210313c9034ba399039b2ba3a32b960811b606082015260800190565b60208082526028908201527f746865207365747465722063616e27742062696420666f7220697473206f776e6040820152671030bab1ba34b7b760c11b606082015260800190565b60208082526029908201527f6f6e6c792074686520617661696c61626c652061756374696f6e2063616e206260408201526819481cd95d1d1b195960ba1b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526024908201527f6c656e677468206f6620746f6b656e416464726573736573206d7573742062656040820152630203e20360e41b606082015260800190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601e908201527f766572696679207465737420736572766572207369676e206661696c65640000604082015260600190565b602080825260139082015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604082015260600190565b60208082526021908201527f74686520666c6173682073616c6520686173206265656e2063616e63656c6c656040820152601960fa1b606082015260800190565b6020808252601e908201527f7665726966792070726f6420736572766572207369676e206661696c65640000604082015260600190565b6020808252603d908201527f746f74616c20616d6f756e7420746f207075726368617365206578636565647360408201527f20746865206c696d69746174696f6e206f6620616e2061646472657373000000606082015260800190565b6020808252601e908201527f70757263686173654c696d69746174696f6e206d757374206265203e20300000604082015260600190565b60208082526019908201527f7468652061756374696f6e20646f65736e277420737461727400000000000000604082015260600190565b60208082526018908201527f726570657469746976652045524337323120746f6b656e730000000000000000604082015260600190565b60208082526010908201526f1cda59db881a185cda081c995c19585d60821b604082015260600190565b6020808252601b908201527f7468652061756374696f6e2069736e277420617661696c61626c650000000000604082015260600190565b6020808252603a908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865202060408201527f73616c6520616674657220746865207374617274206f66206974000000000000606082015260800190565b6020808252818101527f746865207461726765742061756374696f6e20646f65736e2774206578697374604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601c908201527f74686520666c6173682073616c6520646f65736e277420737461727400000000604082015260600190565b6020808252603a908201527f666972737420626964206d75737420666f6c6c6f772074686520696e6974696160408201527f6c2070726963652073657420696e207468652061756374696f6e000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601e908201527f7468652061756374696f6e20686173206265656e2063616e63656c6c65640000604082015260600190565b6020808252602b908201527f696e73756666696369656e7420616d6f756e74206f6620746f6b656e20666f7260408201526a207468697320747261646560a81b606082015260800190565b60208082526032908201527f7468652061756374696f6e2063616e206f6e6c7920626520736574746c65642060408201527161667465722069747320656e642074696d6560701b606082015260800190565b6020808252602d908201527f7468652061756374696f6e2063616e206f6e6c7920626520757064617465642060408201526c313c9034ba399039b2ba3a32b960991b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b602080825260149082015273139bdd081a5b881d1a194815da1a5d195b1a5cdd60621b604082015260600190565b6020808252602f908201527f7468652061756374696f6e2063616e206f6e6c792062652063616e63656c6c6560408201526e3210313c9034ba399039b2ba3a32b960891b606082015260800190565b6020808252605a908201527f74686520626964207072696365206d757374206265206c61726765722074686160408201527f6e207468652073756d206f662063757272656e742068696768657374206f6e6560608201527f20616e64206d696e696d756d2062696420696e6372656d656e74000000000000608082015260a00190565b60208082526039908201527f74686520636f6e7472616374206861736e2774206265656e20617070726f766560408201527f6420666f7220455243373231207472616e7366657272696e6700000000000000606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252603c908201527f69742773206e6f7420616c6c6f77656420746f2075706461746520746865206160408201527f756374696f6e20616674657220746865207374617274206f6620697400000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602a908201527f756e6d617463686564206f776e657273686970206f6620746172676574204552604082015269219b9918903a37b5b2b760b11b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b60208082526017908201527f7468652061756374696f6e206861732065787069726564000000000000000000604082015260600190565b600060208252825160208301526020830151604083015260408301516080606084015261511260a084018261401f565b90506060840151151560808401528091505092915050565b60006020825282516080602084015261514660a084018261405f565b9050602084015160408401526040840151606084015260018060a01b0360608501511660808401528091505092915050565b600060208252825160406020840152615194606084018261405f565b9050602084015160408401528091505092915050565b90815260200190565b9182526001600160a01b0316602082015260400190565b8881526001600160a01b03888116602083015287811660408301528681166060830152858116608083015261010060a0830181905260009161520e8483018861401f565b951660c0840152505060e001529695505050505050565b600087825260018060a01b038088166020840152808716604084015260c0606084015261525560c084018761401f565b941660808301525060a00152949350505050565b9384526001600160a01b03928316602085015291166040830152606082015260800190565b8a81526001600160a01b038a811660208301528981166040830152610140606083018190526000916152c28483018c61401f565b998116608085015260a084019890985250509390941660c084015260e08301919091526101008201526101200152949350505050565b92835260208301919091521515604082015260600190565b60405181810167ffffffffffffffff8111828210171561532f57600080fd5b604052919050565b60005b8381101561535257818101518382015260200161533a565b838111156109505750506000910152565b6001600160a01b038116811461537857600080fd5b50565b801515811461537857600080fdfea2646970667358221220dd2685cc04fa3e99e20e48cfab7a51f48a3f237935b16df095e99c7e1927cfff64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.