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 25 from a total of 34 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Accept Offer | 16254151 | 620 days ago | IN | 0 ETH | 0.00285518 | ||||
Create Offer | 16253926 | 620 days ago | IN | 0 ETH | 0.00583532 | ||||
Accept Offer | 15319070 | 755 days ago | IN | 0 ETH | 0.00114304 | ||||
Accept Offer | 15318987 | 755 days ago | IN | 0 ETH | 0.0046795 | ||||
Cancel Offer | 15306245 | 757 days ago | IN | 0 ETH | 0.00167751 | ||||
Cancel Offer | 15306241 | 757 days ago | IN | 0 ETH | 0.00120727 | ||||
Create Offer | 15301571 | 758 days ago | IN | 0 ETH | 0.01047638 | ||||
Close Expired Of... | 15300379 | 758 days ago | IN | 0 ETH | 0.00181325 | ||||
Accept Offer | 15291028 | 759 days ago | IN | 0 ETH | 0.00238043 | ||||
Accept Offer | 15230164 | 769 days ago | IN | 0 ETH | 0.0056453 | ||||
Accept Offer | 15230152 | 769 days ago | IN | 0 ETH | 0.00302953 | ||||
Create Offer | 15230134 | 769 days ago | IN | 0 ETH | 0.00384153 | ||||
Create Offer | 15194195 | 774 days ago | IN | 0 ETH | 0.00603907 | ||||
Create Offer | 15194110 | 774 days ago | IN | 0 ETH | 0.00648558 | ||||
Create Offer | 15192909 | 775 days ago | IN | 0 ETH | 0.01111848 | ||||
Cancel Offer | 15134369 | 784 days ago | IN | 0 ETH | 0.00975621 | ||||
Accept Offer | 15134307 | 784 days ago | IN | 0.03168918 ETH | 0.00580674 | ||||
Create Offer | 15134303 | 784 days ago | IN | 0 ETH | 0.0196192 | ||||
Cancel Offer | 15134274 | 784 days ago | IN | 0 ETH | 0.00725274 | ||||
Accept Offer | 15134265 | 784 days ago | IN | 0.01 ETH | 0.00675103 | ||||
Create Offer | 15134256 | 784 days ago | IN | 0 ETH | 0.01230311 | ||||
Cancel Offer | 15134249 | 784 days ago | IN | 0 ETH | 0.00282987 | ||||
Accept Offer | 15134218 | 784 days ago | IN | 0 ETH | 0.00502352 | ||||
Create Offer | 15134203 | 784 days ago | IN | 0.1 ETH | 0.01159183 | ||||
Cancel Offer | 15133777 | 784 days ago | IN | 0 ETH | 0.00456772 |
Loading...
Loading
Contract Name:
MarsBaseExchange
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "./MarsBaseCommon.sol"; import "./IMarsbaseExchange.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; using SafeERC20 for IERC20; // import "hardhat/console.sol"; /// @title MarsBaseExchange /// @author dOTC Marsbase /// @notice This contract contains the public facing elements of the marsbase exchange. contract MarsBaseExchange //is IMarsbaseExchange { address owner; uint256 nextOfferId = 0; uint256 activeOffersCount = 0; uint256 minimumFee = 0; address commissionWallet; address commissionExchanger; bool locked = false; mapping(uint256 => MarsBaseCommon.MBOffer) public offers; constructor(uint256 startOfferId) { owner = msg.sender; commissionWallet = msg.sender; nextOfferId = startOfferId; } // onlyOwner modifier modifier onlyOwner { require(msg.sender == owner, "403"); _; } modifier unlocked { require(!locked, "409"); _; } function setCommissionAddress(address wallet) onlyOwner public { commissionWallet = wallet; } function getCommissionAddress() public view returns (address) { return commissionWallet; } function setExchangerAddress(address exchangeContract) onlyOwner public { commissionExchanger = exchangeContract; } function getExchangerAddress() public view returns (address) { return commissionExchanger; } function setMinimumFee(uint256 _minimumFee) onlyOwner public { minimumFee = _minimumFee; } function getMinimumFee() public view returns (uint256) { return minimumFee; } function setNextOfferId(uint256 _nextOfferId) onlyOwner public { nextOfferId = _nextOfferId; } function getNextOfferId() public view returns (uint256) { return nextOfferId; } function getOffer(uint256 offerId) public view returns (MarsBaseCommon.MBOffer memory) { return offers[offerId]; } function getOwner() public view returns (address) { return owner; } function changeOwner(address newOwner) onlyOwner public { owner = newOwner; } uint256 constant MAX_UINT256 = type(uint256).max; uint256 constant POW_2_128 = 2**128; uint256 constant POW_2_64 = 2**64; uint256 constant POW_2_32 = 2**32; uint256 constant POW_2_16 = 2**16; uint256 constant POW_2_8 = 2**8; uint256 constant POW_2_4 = 2**4; uint256 constant POW_2_2 = 2**2; uint256 constant POW_2_1 = 2**1; function log2(uint256 x) public pure returns (uint8 n) { if (x >= POW_2_128) { x >>= 128; n += 128; } if (x >= POW_2_64) { x >>= 64; n += 64; } if (x >= POW_2_32) { x >>= 32; n += 32; } if (x >= POW_2_16) { x >>= 16; n += 16; } if (x >= POW_2_8) { x >>= 8; n += 8; } if (x >= POW_2_4) { x >>= 4; n += 4; } if (x >= POW_2_2) { x >>= 2; n += 2; } if (x >= 2) { n += 1; } } /** Price calculation is approximate, but it's good enough for our purposes. We don't need the exact amount of tokens, we just need a close enough approximation. */ function price( uint256 amountAlice, uint256 offerAmountAlice, uint256 offerAmountBob ) public pure returns (uint256) { uint16 amountAliceLog2 = log2(amountAlice); uint16 offerAmountBobLog2 = log2(offerAmountBob); if ((amountAliceLog2 + offerAmountBobLog2) < 240) // TODO: check bounds for 255 instead of 240 { return (amountAlice * offerAmountBob) / offerAmountAlice; // uint256 numerator = amountAlice * offerAmountBob; // uint256 finalPrice = numerator / offerAmountAlice; // return finalPrice; } // otherwise, just divide the bigger value if (amountAlice >= offerAmountBob) { // return (amountAlice * offerAmountBob) / offerAmountAlice; // return amountAlice * offerAmountBob / offerAmountAlice; // return amountAlice / offerAmountAlice * offerAmountBob; // return (amountAlice / offerAmountAlice) * offerAmountBob; return (amountAlice / offerAmountAlice) * offerAmountBob; } else { // return (amountAlice * offerAmountBob) / offerAmountAlice; // return amountAlice * offerAmountBob / offerAmountAlice; // return amountAlice * offerAmountBob / offerAmountAlice; // return amountAlice * (offerAmountBob / offerAmountAlice); return amountAlice * (offerAmountBob / offerAmountAlice); } } // max safe uint256 constant that can be calculated for 1e4 fee uint256 constant MAX_SAFE_TARGET_AMOUNT = MAX_UINT256 / (1e4); function afterFee(uint256 amountBeforeFee, uint256 feePercent) public pure returns (uint256 amountAfterFee, uint256 fee) { return _afterFee(amountBeforeFee, feePercent, 1e3, MAX_SAFE_TARGET_AMOUNT); } function _afterFee(uint256 amountBeforeFee, uint256 feePercent, uint256 scale, uint256 safeAmount) public pure returns (uint256 amountAfterFee, uint256 fee) { if (feePercent == 0) return (amountBeforeFee, 0); if (feePercent >= scale) return (0, amountBeforeFee); if (amountBeforeFee < safeAmount) fee = (amountBeforeFee * feePercent) / scale; else fee = (amountBeforeFee / scale) * feePercent; amountAfterFee = amountBeforeFee - fee; return (amountAfterFee, fee); } // TODO: rename to `getAllActiveOffers` function getAllOffers() public view returns (MarsBaseCommon.MBOffer[] memory) { MarsBaseCommon.MBOffer[] memory offersArray = new MarsBaseCommon.MBOffer[](activeOffersCount); uint256 i = 0; for (uint256 offerId = 0; offerId < nextOfferId; offerId++) { if (offers[offerId].active) { offersArray[i] = offers[offerId]; i++; } } return offersArray; } function limitMinimumSize9999(uint256 minimumSize, uint256 amountAlice) public pure returns (uint256) { if (minimumSize == 0) return minimumSize; (uint256 amountAfterFee, ) = _afterFee(amountAlice, 1, 1e4, MAX_UINT256 / 1e5); if (minimumSize > amountAfterFee) { minimumSize = amountAfterFee; } return minimumSize; } function createOffer( address tokenAlice, address[] calldata tokenBob, uint256 amountAlice, uint256[] calldata amountBob, MarsBaseCommon.OfferParams calldata offerParameters ) unlocked public payable { // require(!offerParameters.cancelEnabled, "NI - cancelEnabled"); require(!offerParameters.modifyEnabled, "NI-ME"); // Modify Enabled // require(!offerParameters.holdTokens, "NI - holdTokens"); // require(offerParameters.feeAlice == 0, "NI - feeAlice"); // require(offerParameters.feeBob == 0, "NI - feeBob"); // require(offerParameters.smallestChunkSize == 0, "NI - smallestChunkSize"); // require(offerParameters.deadline == 0, "NI - deadline"); // require(offerParameters.minimumSize == 0, "NI - minimumSize"); if (offerParameters.deadline > 0) require(offerParameters.deadline > block.timestamp, "405-OD"); // require(tokenAlice != address(0), "NI - tokenAlice ETH"); require(amountAlice > 0, "400-AAL"); require(tokenBob.length > 0, "400-BE"); require(amountBob.length == tokenBob.length, "400-BLMM"); // Bob Length MisMatch // for (uint256 i = 0; i < tokenBob.length; i++) // { // require(tokenBob[i] != address(0), "NI - tokenBob ETH"); // } // take tokens from alice if (tokenAlice == address(0)) require(amountAlice == msg.value, "402-E"); else IERC20(tokenAlice).safeTransferFrom(msg.sender, address(this), amountAlice); // create offer object uint256 offerId = nextOfferId++; activeOffersCount++; offers[offerId] = MarsBaseCommon.MBOffer( true, false, MarsBaseCommon.OfferType.MinimumChunkedPurchase, offerId, amountAlice, offerParameters.feeAlice, offerParameters.feeBob, limitMinimumSize9999(offerParameters.smallestChunkSize, amountAlice), limitMinimumSize9999(offerParameters.minimumSize, amountAlice), offerParameters.deadline, amountAlice, msg.sender, msg.sender, tokenAlice, [offerParameters.modifyEnabled, offerParameters.cancelEnabled, offerParameters.holdTokens], amountBob, new uint256[](0), new uint256[](0), new address[](0), new address[](0), tokenBob ); // console.log(amountAlice); emit MarsBaseCommon.OfferCreated(offerId, msg.sender, block.timestamp, offers[offerId]); } function sendTokensAfterFeeFrom( address token, uint256 amount, address from, address to, uint256 feePercent ) private returns (uint256 /* amountAfterFee */, uint256 /* fee */) { if (commissionWallet == address(0)) feePercent = 0; (uint256 amountAfterFee, uint256 fee) = afterFee(amount, feePercent); // send tokens to receiver if (from == address(this)) IERC20(token).safeTransfer(to, amountAfterFee); else IERC20(token).safeTransferFrom(from, to, amountAfterFee); if (fee > 0) { require(commissionExchanger == address(0), "NI - commissionExchanger"); // send fee to commission wallet if (from == address(this)) IERC20(token).safeTransfer(commissionWallet, fee); else IERC20(token).safeTransferFrom(from, commissionWallet, fee); } return (amountAfterFee, fee); } function _sendEthAfterFee( uint256 amount, address to, uint256 feePercent ) private returns (uint256 /* amountAfterFee */, uint256 /* fee */) { if (commissionWallet == address(0)) feePercent = 0; (uint256 amountAfterFee, uint256 fee) = afterFee(amount, feePercent); (bool success, ) = to.call{value: amountAfterFee, gas: 30000}(""); require(success, "404-C1"); if (fee > 0) { require(commissionExchanger == address(0), "NI - commissionExchanger"); // send fee to commission wallet (bool success2, ) = commissionWallet.call{value: fee, gas: 30000}(""); require(success2, "404-C2"); } return (amountAfterFee, fee); } function acceptOffer( uint256 offerId, address tokenBob, uint256 amountBob ) unlocked public payable { require(amountBob > 0, "400-ABL"); MarsBaseCommon.MBOffer memory offer = offers[offerId]; require(offer.active, "404"); // check that deadline has not passed if (offer.deadline > 0) require(offer.deadline >= block.timestamp, "405-D"); // deadline has passed // check that tokenBob is accepted in the offer uint256 offerAmountBob = 0; { // split to block to prevent solidity stack issues bool accepted = false; for (uint256 i = 0; i < offer.tokenBob.length; i++) { if (offer.tokenBob[i] == tokenBob) { accepted = true; offerAmountBob = offer.amountBob[i]; break; } } require(accepted, "404-TBI"); // Token Bob is Incorrect } // calculate how much tokenAlice should be sent uint256 amountAlice = price(amountBob, offerAmountBob, offer.amountAlice); // check that amountAlice is not too low (if smallestChunkSize is 0 it's also okay) require(amountAlice >= min(offer.smallestChunkSize, offer.amountRemaining), "400-AAL"); // check that amountAlice is not too high require(amountAlice <= offer.amountRemaining, "400-AAH"); // Amount Alice is too High // we don't throw here so it's possible to "overspend" // e.g.: // swap 100 $ALICE to 33 $BOB // 1 $BOB = 3.333 $ALICE (rounded to 3 due to integer arithmetics) // minbid is 11 $BOB // Bob buys 33 $ALICE for 11 $BOB (67 $ALICE remaining) // Charlie buys 33 $ALICE for 11 $BOB (34 $ALICE remaining) // David wants to buy all 34 $ALICE, but: // if he tries to send 11 $BOB he will receive only 33 $ALICE // if he tries to send 12 $BOB, amountAlice will be 36 $ALICE and tx will revert // so we need to let David send a little more $BOB than the limit // if (amountAlice > offer.amountRemaining) // amountAlice = offer.amountRemaining; // unfortunately, to prevent front-running we need to make sure // that the bidder really expects to get less tokens // TODO: we can enable this functionality by providing expected amountAlice into this method (dex-style) // update offer offers[offerId].amountRemaining -= amountAlice; offer = offers[offerId]; // send tokens to participants or schedule for sending later bool holdTokens = offer.capabilities[2]; if (!holdTokens && minimumCovered(offer)) { // console.log("instant"); // console.log(amountBob); // console.log(amountAlice); _swapAllHeldTokens(offers[offerId]); _swapInstantTokens(offer, tokenBob, amountBob, amountAlice); } else { // console.log("hold"); // console.log(amountBob); // console.log(amountAlice); _scheduleTokenSwap(offer, tokenBob, amountBob, amountAlice, msg.sender); } offer = offers[offerId]; if (offer.amountRemaining <= (offer.amountAlice / 10000)) { _swapAllHeldTokens(offers[offerId]); _destroyOffer(offerId, MarsBaseCommon.OfferCloseReason.Success); } } function max(uint256 a, uint256 b) public pure returns (uint256) { return a >= b ? a : b; } function min(uint256 a, uint256 b) public pure returns (uint256) { return a >= b ? b : a; } function minimumCovered(MarsBaseCommon.MBOffer memory offer) pure public returns (bool result) { uint256 amountSold = offer.amountAlice - offer.amountRemaining; result = amountSold >= offer.minimumSize; } function isEligibleToPayout(MarsBaseCommon.MBOffer memory offer) pure public returns (bool eligible) { return minimumCovered(offer); } function cancelOffer(uint256 offerId) unlocked public payable { MarsBaseCommon.MBOffer memory offer = offers[offerId]; require(offer.active, "404"); require(offer.capabilities[1], "400-CE"); require(offer.offerer == msg.sender, "403"); if (isEligibleToPayout(offer)) _swapAllHeldTokens(offer); _destroyOffer(offerId, MarsBaseCommon.OfferCloseReason.CancelledBySeller); } function _emitOfferAcceptedForScheduledSwap( MarsBaseCommon.MBOffer memory offer, uint256 i ) private { (uint256 aliceSentToBob, uint256 feeAliceDeducted) = afterFee(offer.minimumOrderAmountsAlice[i], offer.feeAlice); (uint256 bobSentToAlice, uint256 feeBobDeducted) = afterFee(offer.minimumOrderAmountsBob[i], offer.feeBob); // emit event emit MarsBaseCommon.OfferAccepted( // uint256 offerId, offer.offerId, // address sender, offer.minimumOrderAddresses[i], // uint256 blockTimestamp, block.timestamp, // uint256 amountAliceReceived, aliceSentToBob, // uint256 amountBobReceived, bobSentToAlice, // address tokenAddressAlice, offer.tokenAlice, // address tokenAddressBob, offer.minimumOrderTokens[i], // MarsBaseCommon.OfferType offerType, offer.offerType, // uint256 feeAlice, feeAliceDeducted, // uint256 feeBob feeBobDeducted ); } function _scheduleTokenSwap( MarsBaseCommon.MBOffer memory offer, address tokenBob, uint256 amountBob, uint256 amountAlice, address bob ) private { uint256 index = offers[offer.offerId].minimumOrderAddresses.length; // console.log("_scheduleTokenSwap"); // console.log(amountBob); if (tokenBob == address(0)) { require(msg.value == amountBob, "403-C1"); } else { IERC20(tokenBob).safeTransferFrom(bob, address(this), amountBob); } offers[offer.offerId].minimumOrderAmountsAlice.push(amountAlice); offers[offer.offerId].minimumOrderAmountsBob.push(amountBob); offers[offer.offerId].minimumOrderAddresses.push(bob); offers[offer.offerId].minimumOrderTokens.push(tokenBob); _emitOfferAcceptedForScheduledSwap(offers[offer.offerId], index); } function _swapInstantTokens( MarsBaseCommon.MBOffer memory offer, address tokenBob, uint256 amountBob, uint256 amountAlice ) private { // send Bob tokens to Alice uint256 bobSentToAlice; uint256 feeBobDeducted; if (tokenBob == address(0)) { (bobSentToAlice, feeBobDeducted) = _sendEthAfterFee(amountBob, offer.offerer, offer.feeBob); } else { (bobSentToAlice, feeBobDeducted) = sendTokensAfterFeeFrom( // address token, tokenBob, // uint256 amount, amountBob, // address from, msg.sender, // address to, offer.offerer, // uint256 feePercent offer.feeBob ); } // send Alice tokens to Bob uint256 aliceSentToBob; uint256 feeAliceDeducted; if (offer.tokenAlice == address(0)) { (aliceSentToBob, feeAliceDeducted) = _sendEthAfterFee(amountAlice, msg.sender, offer.feeAlice); } else { (aliceSentToBob, feeAliceDeducted) = sendTokensAfterFeeFrom( // address token, offer.tokenAlice, // uint256 amount, amountAlice, // address from, address(this), // address to, msg.sender, // uint256 feePercent offer.feeAlice ); } // emit event emit MarsBaseCommon.OfferAccepted( // uint256 offerId, offer.offerId, // address sender, msg.sender, // uint256 blockTimestamp, block.timestamp, // uint256 amountAliceReceived, aliceSentToBob, // uint256 amountBobReceived, bobSentToAlice, // address tokenAddressAlice, offer.tokenAlice, // address tokenAddressBob, tokenBob, // MarsBaseCommon.OfferType offerType, offer.offerType, // uint256 feeAlice, feeAliceDeducted, // uint256 feeBob feeBobDeducted ); } function _swapAllHeldTokens(MarsBaseCommon.MBOffer memory offer) private { uint256 offerId = offer.offerId; // trade all remaining tokens for (uint256 i = 0; i < offer.minimumOrderTokens.length; i++) { // address tokenBob = offer.minimumOrderTokens[i]; // uint256 amountBob = offer.minimumOrderAmountsBob[i]; uint256 amountAlice = offer.minimumOrderAmountsAlice[i]; require(amountAlice > 0, "500-AAL"); // Amount Alice is too Low // just to future-proof double entry protection in case of refactoring offers[offerId].minimumOrderAmountsAlice[i] = 0; _swapHeldTokens(offer, i); } // drop used arrays offers[offerId].minimumOrderAmountsAlice = new uint256[](0); offers[offerId].minimumOrderAmountsBob = new uint256[](0); offers[offerId].minimumOrderAddresses = new address[](0); offers[offerId].minimumOrderTokens = new address[](0); } function _swapHeldTokens(MarsBaseCommon.MBOffer memory offer, uint256 i) private { // send Bob tokens to Alice if (offer.minimumOrderTokens[i] == address(0)) { _sendEthAfterFee(offer.minimumOrderAmountsBob[i], offer.offerer, offer.feeBob); } else { sendTokensAfterFeeFrom( // address token, offer.minimumOrderTokens[i], // uint256 amount, offer.minimumOrderAmountsBob[i], // address from, address(this), // address to, offer.offerer, // uint256 feePercent offer.feeBob ); } // send Alice tokens to Bob if (offer.tokenAlice == address(0)) { _sendEthAfterFee(offer.minimumOrderAmountsAlice[i], offer.minimumOrderAddresses[i], offer.feeAlice); } else { sendTokensAfterFeeFrom( // address token, offer.tokenAlice, // uint256 amount, offer.minimumOrderAmountsAlice[i], // address from, address(this), // address to, offer.minimumOrderAddresses[i], // uint256 feePercent offer.feeAlice ); } // do not emit event (it was emit before) // // emit event // emit OfferAccepted( // // uint256 offerId, // offer.offerId, // // address sender, // msg.sender, // // uint256 blockTimestamp, // block.timestamp, // // uint256 amountAliceReceived, // aliceSentToBob, // // uint256 amountBobReceived, // bobSentToAlice, // // address tokenAddressAlice, // offer.tokenAlice, // // address tokenAddressBob, // offer.minimumOrderTokens[i], // // MarsBaseCommon.OfferType offerType, // offer.offerType, // // uint256 feeAlice, // feeAliceDeducted, // // uint256 feeBob // feeBobDeducted // ); } function closeExpiredOffer(uint256 offerId) unlocked public { MarsBaseCommon.MBOffer memory offer = offers[offerId]; require(offer.active, "404"); // require offer to be expired require((offer.deadline > 0) && (offer.deadline < block.timestamp), "400-NE"); // Not Expired // if minimum covered // uint256 amountSold = offer.amountAlice - offer.amountRemaining; // bool minimumCovered = amountSold >= offer.minimumSize; // bool minimumCovered = (offer.amountAlice - offer.amountRemaining) >= offer.minimumSize; if ((offer.amountAlice - offer.amountRemaining) < offer.minimumSize) { _destroyOffer(offerId, MarsBaseCommon.OfferCloseReason.DeadlinePassed); return; } // if any tokens are still held in the offer if (offer.minimumOrderTokens.length > 0) { _swapAllHeldTokens(offer); } _destroyOffer(offerId, MarsBaseCommon.OfferCloseReason.Success); } function _destroyOffer(uint256 offerId, MarsBaseCommon.OfferCloseReason reason) private { MarsBaseCommon.MBOffer memory offer = offers[offerId]; require(offer.active, "404"); // require(offer.minimumSize == 0, "NI - offer.minimumSize"); // is this excessive for double-entry prevention? offers[offerId].active = false; // send remaining tokens to Alice if (offer.amountRemaining > 0) { if (offer.tokenAlice == address(0)) _sendEthAfterFee(offer.amountRemaining, offer.offerer, 0); else IERC20(offer.tokenAlice).safeTransfer(offer.offerer, offer.amountRemaining); } // if any tokens are still held in the offer if (offer.minimumOrderTokens.length > 0) { // revert all tokens to their owners for (uint256 i = 0; i < offer.minimumOrderTokens.length; i++) { if (offer.minimumOrderTokens[i] == address(0)) _sendEthAfterFee(offer.minimumOrderAmountsBob[i], offer.minimumOrderAddresses[i], 0); else IERC20(offer.minimumOrderTokens[i]).safeTransfer(offer.minimumOrderAddresses[i], offer.minimumOrderAmountsBob[i]); if (offer.tokenAlice == address(0)) _sendEthAfterFee(offer.minimumOrderAmountsAlice[i], offer.offerer, 0); else IERC20(offer.tokenAlice).safeTransfer(offer.offerer, offer.minimumOrderAmountsAlice[i]); } } delete offers[offerId]; activeOffersCount--; emit MarsBaseCommon.OfferClosed( // uint256 offerId, offerId, // MarsBaseCommon.OfferCloseReason reason, reason, // uint256 blockTimestamp block.timestamp ); } // function changeOfferParams( // uint256 offerId, // address[] calldata tokenBob, // uint256[] calldata amountBob, // MarsBaseCommon.OfferParams calldata offerParameters // ) unlocked public // { // require(false, "NI - changeOfferParams"); // } // function cancelBid(uint256 offerId) unlocked public // { // require(false, "NI - cancelBid"); // } // function cancelExpiredOffers() public payable // { // require(false, "NI - cancelExpiredOffers"); // } function migrateContract() onlyOwner unlocked public payable { lockContract(); cancelOffers(0, nextOfferId); } function lockContract() onlyOwner public { locked = true; } function cancelOffers(uint256 from, uint256 to) onlyOwner public payable { for (uint256 i = from; i < to; i++) { MarsBaseCommon.MBOffer memory offer = offers[i]; if (offer.active) { if (isEligibleToPayout(offer)) _swapAllHeldTokens(offer); _destroyOffer(i, MarsBaseCommon.OfferCloseReason.CancelledBySeller); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; /// @title MarsBase Common /// @author dOTC Marsbase /// @notice This library contains struct and enum definitions for the MarsBase Exchange and MarsBase Contracts. library MarsBaseCommon { enum OfferType { FullPurchase, LimitedTime, ChunkedPurchase, LimitedTimeChunkedPurchase, MinimumChunkedPurchase, LimitedTimeMinimumPurchase, LimitedTimeMinimumChunkedPurchase, LimitedTimeMinimumChunkedDeadlinePurchase } enum OfferCloseReason { Success, CancelledBySeller, DeadlinePassed } /// @dev Offers is a simple offer type, that does the exchange immediately in all cases. /// @dev Minimum Offers can hold tokens until certain criteria are met. enum ContractType { Offers, MinimumOffers } struct OfferParams { bool cancelEnabled; bool modifyEnabled; bool holdTokens; uint256 feeAlice; uint256 feeBob; uint256 smallestChunkSize; uint256 deadline; uint256 minimumSize; } /// @notice Primary Offer Data Structure /// @notice Primary Offer Data Structure /// @notice smallestChunkSize - Smallest amount that may be purchased in one transaction struct MBOffer { bool active; bool minimumMet; OfferType offerType; uint256 offerId; uint256 amountAlice; uint256 feeAlice; uint256 feeBob; uint256 smallestChunkSize; uint256 minimumSize; uint256 deadline; uint256 amountRemaining; address offerer; address payoutAddress; address tokenAlice; // capabilities[0] = Modifiable // capabilities[1] = Cancel Enabled // capabilities[2] = Should not distribute tokens until deadline (for minimum Offers) bool[3] capabilities; uint256[] amountBob; uint256[] minimumOrderAmountsAlice; uint256[] minimumOrderAmountsBob; address[] minimumOrderAddresses; address[] minimumOrderTokens; address[] tokenBob; } /// Emitted when an offer is created event OfferCreated( uint256 offerId, address sender, uint256 blockTimestamp, MarsBaseCommon.MBOffer offer ); /// Emitted when an offer has it's parameters or capabilities modified event OfferModified( uint256 offerId, address sender, uint256 blockTimestamp, MarsBaseCommon.OfferParams offerParameters ); /// Emitted when an offer is accepted. /// This includes partial transactions, where the whole offer is not bought out and those where the exchange is not finallized immediatley. event OfferAccepted( uint256 offerId, address sender, uint256 blockTimestamp, uint256 amountAliceReceived, uint256 amountBobReceived, address tokenAddressAlice, address tokenAddressBob, MarsBaseCommon.OfferType offerType, uint256 feeAlice, uint256 feeBob ); /// Emitted when the offer is cancelled either by the creator or because of an unsuccessful auction event OfferCancelled( uint256 offerId, address sender, uint256 blockTimestamp ); event OfferClosed( uint256 offerId, MarsBaseCommon.OfferCloseReason reason, uint256 blockTimestamp ); event ContractMigrated(); /// Emitted when a buyer cancels their bid for a offer were tokens have not been exchanged yet and are still held by the contract. event BidCancelled(uint256 offerId, address sender, uint256 blockTimestamp); /// Emitted only for testing usage event Log(uint256 log); struct MBAddresses { address offersContract; address minimumOffersContract; } }
pragma solidity >=0.8.0 <0.9.0; import "./MarsBaseCommon.sol"; interface IMarsbaseExchange { function setCommissionAddress(address wallet) external; function setExchangerAddress(address exchangeContract) external; function setMinimumFee(uint256 _minimumFee) external; function getMinimumFee() external view returns (uint256); function setNextOfferId(uint256 _nextOfferId) external; function getOffer(uint256 offerId) external view returns (MarsBaseCommon.MBOffer memory); function getNextOfferId() external view returns (uint256); function getOwner() external view returns (address); function changeOwner(address newOwner) external; function getAllOffers() external view returns (MarsBaseCommon.MBOffer[] memory); function createOffer( address tokenAlice, address[] calldata tokenBob, uint256 amountAlice, uint256[] calldata amountBob, MarsBaseCommon.OfferParams calldata offerParameters ) external payable; function cancelOffer(uint256 offerId) external payable; function price( uint256 amountAlice, uint256 offerAmountAlice, uint256 offerAmountBob ) external pure returns (uint256); function acceptOffer( uint256 offerId, address tokenBob, uint256 amountBob ) external payable; function changeOfferParams( uint256 offerId, address[] calldata tokenBob, uint256[] calldata amountBob, MarsBaseCommon.OfferParams calldata offerParameters ) external; function cancelBid(uint256 offerId) external; function cancelExpiredOffers() external payable; function migrateContract() external payable; function lockContract() external; function cancelOffers(uint256 from, uint256 to) external payable; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "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
[{"inputs":[{"internalType":"uint256","name":"startOfferId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"amountBeforeFee","type":"uint256"},{"internalType":"uint256","name":"feePercent","type":"uint256"},{"internalType":"uint256","name":"scale","type":"uint256"},{"internalType":"uint256","name":"safeAmount","type":"uint256"}],"name":"_afterFee","outputs":[{"internalType":"uint256","name":"amountAfterFee","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"address","name":"tokenBob","type":"address"},{"internalType":"uint256","name":"amountBob","type":"uint256"}],"name":"acceptOffer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountBeforeFee","type":"uint256"},{"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"afterFee","outputs":[{"internalType":"uint256","name":"amountAfterFee","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"offerId","type":"uint256"}],"name":"cancelOffer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"cancelOffers","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"offerId","type":"uint256"}],"name":"closeExpiredOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAlice","type":"address"},{"internalType":"address[]","name":"tokenBob","type":"address[]"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256[]","name":"amountBob","type":"uint256[]"},{"components":[{"internalType":"bool","name":"cancelEnabled","type":"bool"},{"internalType":"bool","name":"modifyEnabled","type":"bool"},{"internalType":"bool","name":"holdTokens","type":"bool"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"}],"internalType":"struct MarsBaseCommon.OfferParams","name":"offerParameters","type":"tuple"}],"name":"createOffer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAllOffers","outputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"minimumMet","type":"bool"},{"internalType":"enum MarsBaseCommon.OfferType","name":"offerType","type":"uint8"},{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"payoutAddress","type":"address"},{"internalType":"address","name":"tokenAlice","type":"address"},{"internalType":"bool[3]","name":"capabilities","type":"bool[3]"},{"internalType":"uint256[]","name":"amountBob","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsAlice","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsBob","type":"uint256[]"},{"internalType":"address[]","name":"minimumOrderAddresses","type":"address[]"},{"internalType":"address[]","name":"minimumOrderTokens","type":"address[]"},{"internalType":"address[]","name":"tokenBob","type":"address[]"}],"internalType":"struct MarsBaseCommon.MBOffer[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCommissionAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExchangerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinimumFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextOfferId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offerId","type":"uint256"}],"name":"getOffer","outputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"minimumMet","type":"bool"},{"internalType":"enum MarsBaseCommon.OfferType","name":"offerType","type":"uint8"},{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"payoutAddress","type":"address"},{"internalType":"address","name":"tokenAlice","type":"address"},{"internalType":"bool[3]","name":"capabilities","type":"bool[3]"},{"internalType":"uint256[]","name":"amountBob","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsAlice","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsBob","type":"uint256[]"},{"internalType":"address[]","name":"minimumOrderAddresses","type":"address[]"},{"internalType":"address[]","name":"minimumOrderTokens","type":"address[]"},{"internalType":"address[]","name":"tokenBob","type":"address[]"}],"internalType":"struct MarsBaseCommon.MBOffer","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"minimumMet","type":"bool"},{"internalType":"enum MarsBaseCommon.OfferType","name":"offerType","type":"uint8"},{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"payoutAddress","type":"address"},{"internalType":"address","name":"tokenAlice","type":"address"},{"internalType":"bool[3]","name":"capabilities","type":"bool[3]"},{"internalType":"uint256[]","name":"amountBob","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsAlice","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsBob","type":"uint256[]"},{"internalType":"address[]","name":"minimumOrderAddresses","type":"address[]"},{"internalType":"address[]","name":"minimumOrderTokens","type":"address[]"},{"internalType":"address[]","name":"tokenBob","type":"address[]"}],"internalType":"struct MarsBaseCommon.MBOffer","name":"offer","type":"tuple"}],"name":"isEligibleToPayout","outputs":[{"internalType":"bool","name":"eligible","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"}],"name":"limitMinimumSize9999","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"log2","outputs":[{"internalType":"uint8","name":"n","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"migrateContract","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"minimumMet","type":"bool"},{"internalType":"enum MarsBaseCommon.OfferType","name":"offerType","type":"uint8"},{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"payoutAddress","type":"address"},{"internalType":"address","name":"tokenAlice","type":"address"},{"internalType":"bool[3]","name":"capabilities","type":"bool[3]"},{"internalType":"uint256[]","name":"amountBob","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsAlice","type":"uint256[]"},{"internalType":"uint256[]","name":"minimumOrderAmountsBob","type":"uint256[]"},{"internalType":"address[]","name":"minimumOrderAddresses","type":"address[]"},{"internalType":"address[]","name":"minimumOrderTokens","type":"address[]"},{"internalType":"address[]","name":"tokenBob","type":"address[]"}],"internalType":"struct MarsBaseCommon.MBOffer","name":"offer","type":"tuple"}],"name":"minimumCovered","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"offers","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"minimumMet","type":"bool"},{"internalType":"enum MarsBaseCommon.OfferType","name":"offerType","type":"uint8"},{"internalType":"uint256","name":"offerId","type":"uint256"},{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"feeAlice","type":"uint256"},{"internalType":"uint256","name":"feeBob","type":"uint256"},{"internalType":"uint256","name":"smallestChunkSize","type":"uint256"},{"internalType":"uint256","name":"minimumSize","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"payoutAddress","type":"address"},{"internalType":"address","name":"tokenAlice","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountAlice","type":"uint256"},{"internalType":"uint256","name":"offerAmountAlice","type":"uint256"},{"internalType":"uint256","name":"offerAmountBob","type":"uint256"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"setCommissionAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"exchangeContract","type":"address"}],"name":"setExchangerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumFee","type":"uint256"}],"name":"setMinimumFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nextOfferId","type":"uint256"}],"name":"setNextOfferId","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600181905560028190556003556005805460ff60a01b191690553480156200002d57600080fd5b5060405162005d2838038062005d2883398101604081905262000050916200007b565b60008054336001600160a01b0319918216811790925560048054909116909117905560015562000095565b6000602082840312156200008e57600080fd5b5051919050565b615c8380620000a56000396000f3fe6080604052600436106101c25760003560e01c8063753868e3116100f75780639a6ed3e611610095578063e27fbdfe11610064578063e27fbdfe14610595578063ec782ac1146105b5578063ef706adf146105bd578063f4923857146105d057600080fd5b80639a6ed3e614610522578063a165527814610540578063a6f9dae114610562578063d92557b31461058257600080fd5b8063893d20e8116100d1578063893d20e8146104205780638a72ea6a1461043e5780638ea242bf146104ef5780639589d7b91461050f57600080fd5b8063753868e3146103cb5780637883feca146103e05780637ae2b5c71461040057600080fd5b806340fff80c116101645780634c7ae1301161013e5780634c7ae130146103445780634cd370b9146103645780635456bf13146103795780636d5433e6146103ab57600080fd5b806340fff80c146102c257806344ab0402146102e25780634579268a1461031757600080fd5b80631d73add8116101a05780631d73add81461021c5780632071a9f414610240578063296382f614610260578063347158c51461029257600080fd5b80630ee1d0f6146101c75780631007d58c146101dc578063182a7506146101fc575b600080fd5b6101da6101d5366004614e93565b6105f0565b005b3480156101e857600080fd5b506101da6101f7366004614f3b565b610bb5565b34801561020857600080fd5b506101da610217366004614f56565b610c01565b34801561022857600080fd5b506001545b6040519081526020015b60405180910390f35b34801561024c57600080fd5b5061022d61025b366004614f6f565b610c30565b34801561026c57600080fd5b506004546001600160a01b03165b6040516001600160a01b039091168152602001610237565b34801561029e57600080fd5b506102b26102ad36600461519c565b610cbc565b6040519015158152602001610237565b3480156102ce57600080fd5b506101da6102dd366004614f3b565b610ccd565b3480156102ee57600080fd5b506103026102fd36600461539f565b610d19565b60408051928352602083019190915201610237565b34801561032357600080fd5b50610337610332366004614f56565b610d93565b6040516102379190615630565b34801561035057600080fd5b5061030261035f366004615643565b611118565b34801561037057600080fd5b5060035461022d565b34801561038557600080fd5b50610399610394366004614f56565b61113d565b60405160ff9091168152602001610237565b3480156103b757600080fd5b5061022d6103c6366004615643565b611226565b3480156103d757600080fd5b506101da61123d565b3480156103ec57600080fd5b5061022d6103fb366004615643565b61127c565b34801561040c57600080fd5b5061022d61041b366004615643565b6112be565b34801561042c57600080fd5b506000546001600160a01b031661027a565b34801561044a57600080fd5b506104d5610459366004614f56565b600660208190526000918252604090912080546001820154600283015460038401546004850154600586015496860154600787015460088801546009890154600a8a0154600b909a015460ff808b169c6101008c0482169c62010000909c049091169a90959493926001600160a01b039081169291811691168e565b6040516102379e9d9c9b9a99989796959493929190615665565b3480156104fb57600080fd5b506102b261050a36600461519c565b6112d4565b6101da61051d366004615700565b6112fd565b34801561052e57600080fd5b506005546001600160a01b031661027a565b34801561054c57600080fd5b50610555612411565b6040516102379190615735565b34801561056e57600080fd5b506101da61057d366004614f3b565b61284d565b6101da610590366004615643565b612899565b3480156105a157600080fd5b506101da6105b0366004614f56565b612c87565b6101da612cb6565b6101da6105cb366004614f56565b612d21565b3480156105dc57600080fd5b506101da6105eb366004614f56565b613174565b600554600160a01b900460ff16156106235760405162461bcd60e51b815260040161061a90615797565b60405180910390fd5b61063360408201602083016157b4565b156106685760405162461bcd60e51b81526020600482015260056024820152644e492d4d4560d81b604482015260640161061a565b60c0810135156106ae57428160c00135116106ae5760405162461bcd60e51b81526020600482015260066024820152650d0c0d4b53d160d21b604482015260640161061a565b600084116106e85760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50505360ca1b604482015260640161061a565b8461071e5760405162461bcd60e51b81526020600482015260066024820152653430302d424560d01b604482015260640161061a565b8185146107585760405162461bcd60e51b81526020600482015260086024820152673430302d424c4d4d60c01b604482015260640161061a565b6001600160a01b0387166107a25734841461079d5760405162461bcd60e51b81526020600482015260056024820152643430322d4560d81b604482015260640161061a565b6107b7565b6107b76001600160a01b0388163330876135d2565b60018054600091826107c8836157e7565b909155506002805491925060006107de836157e7565b9091555050604080516102a08101825260018152600060208201529081016004815260200182815260200186815260200183606001358152602001836080013581526020016108318460a001358861127c565b81526020016108448460e001358861127c565b81526020018360c001358152602001868152602001336001600160a01b03168152602001336001600160a01b03168152602001896001600160a01b0316815260200160405180606001604052808560200160208101906108a491906157b4565b151581526020908101906108ba908701876157b4565b151581526020016108d160608701604088016157b4565b15151515815250815260200185858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604080518381526020808201835280860191909152815184815280820183528286015281518481528082018352606086015281519384528381018252608085019390935280518b840281810185019092528b815260a090940193928c92508b918291850190849080828437600092018290525093909452505083815260066020908152604091829020845181549286015161ffff1990931690151561ff0019161761010092151592909202919091178082559184015190925090829062ff00001916620100008360078111156109e9576109e96153d1565b0217905550606082015160018201556080820151600282015560a082015160038083019190915560c0830151600483015560e083015160058301556101008301516006830155610120830151600783015561014083015160088301556101608301516009830180546001600160a01b039283166001600160a01b031991821617909155610180850151600a850180549184169183169190911790556101a0850151600b850180549190931691161790556101c0830151610aae91600c84019190614c07565b506101e08201518051610acb91600d840191602090910190614c99565b506102008201518051610ae891600e840191602090910190614c99565b506102208201518051610b0591600f840191602090910190614c99565b506102408201518051610b22916010840191602090910190614cd4565b506102608201518051610b3f916011840191602090910190614cd4565b506102808201518051610b5c916012840191602090910190614cd4565b5050506000818152600660205260409081902090517fcfd1adab0b04b484cab64ce95c198e4638932529b0e947976ef8c9a5a9052cc691610ba39184913391429190615873565b60405180910390a15050505050505050565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161061a90615a20565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610c2b5760405162461bcd60e51b815260040161061a90615a20565b600355565b600080610c3c8561113d565b60ff1690506000610c4c8461113d565b60ff16905060f0610c5d8284615a3d565b61ffff161015610c855784610c728588615a63565b610c7c9190615a82565b92505050610cb5565b838610610ca15783610c978688615a82565b610c7c9190615a63565b610cab8585615a82565b610c7c9087615a63565b9392505050565b6000610cc7826112d4565b92915050565b6000546001600160a01b03163314610cf75760405162461bcd60e51b815260040161061a90615a20565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008084600003610d2f57508490506000610d8a565b838510610d4157506000905084610d8a565b82861015610d655783610d548688615a63565b610d5e9190615a82565b9050610d7d565b84610d708588615a82565b610d7a9190615a63565b90505b610d878187615aa4565b91505b94509492505050565b610d9b614d29565b60008281526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452909391929184019162010000909104166007811115610df257610df26153d1565b6007811115610e0357610e036153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610eaa57905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015610f3257602002820191906000526020600020905b815481526020019060010190808311610f1e575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015610f8a57602002820191906000526020600020905b815481526020019060010190808311610f76575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015610fe257602002820191906000526020600020905b815481526020019060010190808311610fce575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561104457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611026575b50505050508152602001601182018054806020026020016040519081016040528092919081815260200182805480156110a657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611088575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561110857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116110ea575b5050505050815250509050919050565b60008061113184846103e86102fd612710600019615a82565b915091505b9250929050565b6000600160801b821061115d57608091821c9161115a9082615abb565b90505b68010000000000000000821061118057604091821c9161117d9082615abb565b90505b640100000000821061119f57602091821c9161119c9082615abb565b90505b6201000082106111bc57601091821c916111b99082615abb565b90505b61010082106111d857600891821c916111d59082615abb565b90505b601082106111f357600491821c916111f09082615abb565b90505b6004821061120e57600291821c9161120b9082615abb565b90505b6002821061122157610cc7600182615abb565b919050565b6000818310156112365781610cb5565b5090919050565b6000546001600160a01b031633146112675760405162461bcd60e51b815260040161061a90615a20565b6005805460ff60a01b1916600160a01b179055565b60008260000361128d575081610cc7565b60006112a78360016127106102fd620186a0600019615a82565b509050808411156112b6578093505b509192915050565b6000818310156112ce5782610cb5565b50919050565b60008082610140015183608001516112ec9190615aa4565b610100909301519092101592915050565b600554600160a01b900460ff16156113275760405162461bcd60e51b815260040161061a90615797565b600081116113615760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50509360ca1b604482015260640161061a565b600083815260066020908152604080832081516102a081018352815460ff808216151583526101008204811615159583019590955290939192840191620100009091041660078111156113b6576113b66153d1565b60078111156113c7576113c76153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161146e57905050505050508152602001600d82018054806020026020016040519081016040528092919081815260200182805480156114f657602002820191906000526020600020905b8154815260200190600101908083116114e2575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561154e57602002820191906000526020600020905b81548152602001906001019080831161153a575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156115a657602002820191906000526020600020905b815481526020019060010190808311611592575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561160857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115ea575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561166a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161164c575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156116cc57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116116ae575b505050505081525050905080600001516116f85760405162461bcd60e51b815260040161061a90615ae0565b61012081015115611740574281610120015110156117405760405162461bcd60e51b81526020600482015260056024820152640d0c0d4b5160da1b604482015260640161061a565b60008060005b836102800151518110156117c757856001600160a01b0316846102800151828151811061177557611775615afd565b60200260200101516001600160a01b0316036117b55760019150836101e0015181815181106117a6576117a6615afd565b602002602001015192506117c7565b806117bf816157e7565b915050611746565b50806117ff5760405162461bcd60e51b81526020600482015260076024820152663430342d54424960c81b604482015260640161061a565b50600061181184838560800151610c30565b90506118268360e001518461014001516112be565b81101561185f5760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50505360ca1b604482015260640161061a565b82610140015181111561189e5760405162461bcd60e51b815260206004820152600760248201526606860605a8282960cb1b604482015260640161061a565b600086815260066020526040812060080180548392906118bf908490615aa4565b909155505060008681526006602090815260409182902082516102a081018452815460ff808216151583526101008204811615159483019490945290939192918401916201000090910416600781111561191b5761191b6153d1565b600781111561192c5761192c6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116119d357905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015611a5b57602002820191906000526020600020905b815481526020019060010190808311611a47575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015611ab357602002820191906000526020600020905b815481526020019060010190808311611a9f575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015611b0b57602002820191906000526020600020905b815481526020019060010190808311611af7575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015611b6d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b4f575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015611bcf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bb1575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015611c3157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c13575b50505050508152505092506000836101c00151600260038110611c5657611c56615afd565b6020020151905080158015611c6f5750611c6f846112d4565b156120025760008781526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452611ff19491939184019162010000909104166007811115611ccd57611ccd6153d1565b6007811115611cde57611cde6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411611d8557905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015611e0d57602002820191906000526020600020905b815481526020019060010190808311611df9575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015611e6557602002820191906000526020600020905b815481526020019060010190808311611e51575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015611ebd57602002820191906000526020600020905b815481526020019060010190808311611ea9575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015611f1f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f01575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015611f8157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f63575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015611fe357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fc5575b505050505081525050613643565b611ffd848787856137be565b61200f565b61200f84878785336138a4565b60008781526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452909391929184019162010000909104166007811115612066576120666153d1565b6007811115612077576120776153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161211e57905050505050508152602001600d82018054806020026020016040519081016040528092919081815260200182805480156121a657602002820191906000526020600020905b815481526020019060010190808311612192575b50505050508152602001600e82018054806020026020016040519081016040528092919081815260200182805480156121fe57602002820191906000526020600020905b8154815260200190600101908083116121ea575b50505050508152602001600f820180548060200260200160405190810160405280929190818152602001828054801561225657602002820191906000526020600020905b815481526020019060010190808311612242575b50505050508152602001601082018054806020026020016040519081016040528092919081815260200182805480156122b857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161229a575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561231a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122fc575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561237c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161235e575b505050505081525050935061271084608001516123999190615a82565b846101400151116124085760008781526006602090815260409182902082516102a081018452815460ff80821615158352610100820481161515948301949094526123fd9491939184019162010000909104166007811115611ccd57611ccd6153d1565b612408876000613d39565b50505050505050565b6060600060025467ffffffffffffffff81111561243057612430614f9b565b60405190808252806020026020018201604052801561246957816020015b612456614d29565b81526020019060019003908161244e5790505b5090506000805b6001548110156128455760008181526006602052604090205460ff16156128335760008181526006602090815260409182902082516102a081018452815460ff80821615158352610100820481161515948301949094529093919291840191620100009091041660078111156124e8576124e86153d1565b60078111156124f9576124f96153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116125a057905050505050508152602001600d820180548060200260200160405190810160405280929190818152602001828054801561262857602002820191906000526020600020905b815481526020019060010190808311612614575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561268057602002820191906000526020600020905b81548152602001906001019080831161266c575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156126d857602002820191906000526020600020905b8154815260200190600101908083116126c4575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561273a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161271c575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561279c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161277e575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156127fe57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116127e0575b50505050508152505083838151811061281957612819615afd565b6020026020010181905250818061282f906157e7565b9250505b8061283d816157e7565b915050612470565b509092915050565b6000546001600160a01b031633146128775760405162461bcd60e51b815260040161061a90615a20565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146128c35760405162461bcd60e51b815260040161061a90615a20565b815b81811015612c8257600081815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115612922576129226153d1565b6007811115612933576129336153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116129da57905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015612a6257602002820191906000526020600020905b815481526020019060010190808311612a4e575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015612aba57602002820191906000526020600020905b815481526020019060010190808311612aa6575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015612b1257602002820191906000526020600020905b815481526020019060010190808311612afe575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015612b7457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612b56575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015612bd657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612bb8575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015612c3857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c1a575b5050505050815250509050806000015115612c6f57612c5681610cbc565b15612c6457612c6481613643565b612c6f826001613d39565b5080612c7a816157e7565b9150506128c5565b505050565b6000546001600160a01b03163314612cb15760405162461bcd60e51b815260040161061a90615a20565b600155565b6000546001600160a01b03163314612ce05760405162461bcd60e51b815260040161061a90615a20565b600554600160a01b900460ff1615612d0a5760405162461bcd60e51b815260040161061a90615797565b612d1261123d565b612d1f6000600154612899565b565b600554600160a01b900460ff1615612d4b5760405162461bcd60e51b815260040161061a90615797565b600081815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115612da057612da06153d1565b6007811115612db157612db16153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411612e5857905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015612ee057602002820191906000526020600020905b815481526020019060010190808311612ecc575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015612f3857602002820191906000526020600020905b815481526020019060010190808311612f24575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015612f9057602002820191906000526020600020905b815481526020019060010190808311612f7c575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015612ff257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612fd4575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561305457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613036575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156130b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613098575b505050505081525050905080600001516130e25760405162461bcd60e51b815260040161061a90615ae0565b6101c0810151602001516131215760405162461bcd60e51b81526020600482015260066024820152653430302d434560d01b604482015260640161061a565b6101608101516001600160a01b0316331461314e5760405162461bcd60e51b815260040161061a90615a20565b61315781610cbc565b156131655761316581613643565b613170826001613d39565b5050565b600554600160a01b900460ff161561319e5760405162461bcd60e51b815260040161061a90615797565b600081815260066020908152604080832081516102a081018352815460ff808216151583526101008204811615159583019590955290939192840191620100009091041660078111156131f3576131f36153d1565b6007811115613204576132046153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116132ab57905050505050508152602001600d820180548060200260200160405190810160405280929190818152602001828054801561333357602002820191906000526020600020905b81548152602001906001019080831161331f575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561338b57602002820191906000526020600020905b815481526020019060010190808311613377575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156133e357602002820191906000526020600020905b8154815260200190600101908083116133cf575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561344557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613427575b50505050508152602001601182018054806020026020016040519081016040528092919081815260200182805480156134a757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613489575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561350957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134eb575b505050505081525050905080600001516135355760405162461bcd60e51b815260040161061a90615ae0565b600081610120015111801561354e575042816101200151105b6135835760405162461bcd60e51b81526020600482015260066024820152653430302d4e4560d01b604482015260640161061a565b806101000151816101400151826080015161359e9190615aa4565b10156135af57613170826002613d39565b61026081015151156135c4576135c481613643565b613170826000613d39565b50565b6040516001600160a01b038085166024830152831660448201526064810182905261363d9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261443b565b50505050565b606081015160005b82610260015151811015613702576000836102000151828151811061367257613672615afd565b60200260200101519050600081116136b65760405162461bcd60e51b81526020600482015260076024820152660d4c0c0b50505360ca1b604482015260640161061a565b6000838152600660205260408120600e018054849081106136d9576136d9615afd565b6000918252602090912001556136ef848361450d565b50806136fa816157e7565b91505061364b565b5060408051600080825260208083018085528583526006909152929020905161373192600e9092019190614c99565b5060408051600080825260208083018085528583526006909152929020905161376092600f9092019190614c99565b5060408051600080825260208083018085528583526006909152929020905161378f9260109092019190614cd4565b50604080516000808252602080830180855285835260069091529290209051612c829260119092019190614cd4565b6000806001600160a01b0385166137ed576137e3848761016001518860c00151614683565b9092509050613809565b6138038585338961016001518a60c00151614839565b90925090505b6101a086015160009081906001600160a01b031661383a5761383085338a60a00151614683565b9092509050613856565b613850886101a001518630338c60a00151614839565b90925090505b7fb35d284b8657c3283a620131bd081449735620dbd8ab663f15900a3b85f596978860600151334285888d6101a001518d8f60400151898c604051610ba39a99989796959493929190615b13565b60608501516000908152600660205260409020601001546001600160a01b038516613906578334146139015760405162461bcd60e51b81526020600482015260066024820152653430332d433160d01b604482015260640161061a565b61391b565b61391b6001600160a01b0386168330876135d2565b6060860180516000908152600660209081526040808320600e018054600181810183559185528385200188905584518452818420600f01805480830182559085528385200189905584518452818420601001805480830182559085528385200180546001600160a01b03808a166001600160a01b031992831617909255865186528386206011018054938401815586528486209092018054918c1691909216179055925182529082902082516102a081018452815460ff8082161515835261010082048116151594830194909452613d319491939184019162010000909104166007811115613a0c57613a0c6153d1565b6007811115613a1d57613a1d6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613ac457905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015613b4c57602002820191906000526020600020905b815481526020019060010190808311613b38575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015613ba457602002820191906000526020600020905b815481526020019060010190808311613b90575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015613bfc57602002820191906000526020600020905b815481526020019060010190808311613be8575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015613c5e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613c40575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015613cc057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613ca2575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015613d2257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613d04575b50505050508152505082614956565b505050505050565b600082815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115613d8e57613d8e6153d1565b6007811115613d9f57613d9f6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613e4657905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015613ece57602002820191906000526020600020905b815481526020019060010190808311613eba575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015613f2657602002820191906000526020600020905b815481526020019060010190808311613f12575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015613f7e57602002820191906000526020600020905b815481526020019060010190808311613f6a575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015613fe057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613fc2575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561404257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311614024575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156140a457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311614086575b505050505081525050905080600001516140d05760405162461bcd60e51b815260040161061a90615ae0565b6000838152600660205260409020805460ff191690556101408101511561414e576101a08101516001600160a01b03166141215761411a8161014001518261016001516000614683565b505061414e565b61414e816101600151826101400151836101a001516001600160a01b0316614a569092919063ffffffff16565b610260810151511561430d5760005b8161026001515181101561430b5760006001600160a01b0316826102600151828151811061418d5761418d615afd565b60200260200101516001600160a01b0316036141f2576141eb82610220015182815181106141bd576141bd615afd565b602002602001015183610240015183815181106141dc576141dc615afd565b60200260200101516000614683565b505061426a565b61426a826102400151828151811061420c5761420c615afd565b6020026020010151836102200151838151811061422b5761422b615afd565b6020026020010151846102600151848151811061424a5761424a615afd565b60200260200101516001600160a01b0316614a569092919063ffffffff16565b6101a08201516001600160a01b03166142b3576142ac826102000151828151811061429757614297615afd565b60200260200101518361016001516000614683565b50506142f9565b6142f982610160015183610200015183815181106142d3576142d3615afd565b6020026020010151846101a001516001600160a01b0316614a569092919063ffffffff16565b80614303816157e7565b91505061415d565b505b60008381526006602081905260408220805462ffffff19168155600181018390556002810183905560038101839055600481018390556005810183905590810182905560078101829055600881018290556009810180546001600160a01b0319908116909155600a8201805482169055600b820180549091169055600c81018290559061439e600d83016000614dea565b6143ac600e83016000614dea565b6143ba600f83016000614dea565b6143c8601083016000614dea565b6143d6601183016000614dea565b6143e4601283016000614dea565b5050600280549060006143f683615b76565b91905055507fb8f7d5c4c1553c6b29c86aa7f8a0f2f47c7b501b5f53195ea15bce7ae8dd9ac183834260405161442e93929190615b8d565b60405180910390a1505050565b6000614490826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a869092919063ffffffff16565b805190915015612c8257808060200190518101906144ae9190615bb5565b612c825760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b60006001600160a01b0316826102600151828151811061452f5761452f615afd565b60200260200101516001600160a01b03160361457e57614577826102200151828151811061455f5761455f615afd565b60200260200101518361016001518460c00151614683565b50506145d3565b6145d0826102600151828151811061459857614598615afd565b602002602001015183610220015183815181106145b7576145b7615afd565b6020026020010151308561016001518660c00151614839565b50505b6101a08201516001600160a01b03166146315761363d826102000151828151811061460057614600615afd565b6020026020010151836102400151838151811061461f5761461f615afd565b60200260200101518460a00151614683565b61363d826101a00151836102000151838151811061465157614651615afd565b602002602001015130856102400151858151811061467157614671615afd565b60200260200101518660a00151614839565b60045460009081906001600160a01b031661469d57600092505b6000806146aa8786611118565b915091506000866001600160a01b03168361753090604051600060405180830381858888f193505050503d8060008114614700576040519150601f19603f3d011682016040523d82523d6000602084013e614705565b606091505b505090508061473f5760405162461bcd60e51b81526020600482015260066024820152653430342d433160d01b604482015260640161061a565b811561482c576005546001600160a01b0316156147995760405162461bcd60e51b8152602060048201526018602482015277272490169031b7b6b6b4b9b9b4b7b722bc31b430b733b2b960411b604482015260640161061a565b6004546040516000916001600160a01b03169061753090859084818181858888f193505050503d80600081146147eb576040519150601f19603f3d011682016040523d82523d6000602084013e6147f0565b606091505b505090508061482a5760405162461bcd60e51b81526020600482015260066024820152651a181a16a19960d11b604482015260640161061a565b505b5090969095509350505050565b60045460009081906001600160a01b031661485357600092505b6000806148608886611118565b9092509050306001600160a01b0388160361488e576148896001600160a01b038a168784614a56565b6148a3565b6148a36001600160a01b038a168888856135d2565b8015614948576005546001600160a01b0316156148fd5760405162461bcd60e51b8152602060048201526018602482015277272490169031b7b6b6b4b9b9b4b7b722bc31b430b733b2b960411b604482015260640161061a565b306001600160a01b0388160361492c57600454614927906001600160a01b038b8116911683614a56565b614948565b600454614948906001600160a01b038b8116918a9116846135d2565b909890975095505050505050565b600080614985846102000151848151811061497357614973615afd565b60200260200101518560a00151611118565b915091506000806149b886610220015186815181106149a6576149a6615afd565b60200260200101518760c00151611118565b915091507fb35d284b8657c3283a620131bd081449735620dbd8ab663f15900a3b85f59697866060015187610240015187815181106149f9576149f9615afd565b60200260200101514287868b6101a001518c61026001518c81518110614a2157614a21615afd565b60200260200101518d604001518b8a604051614a469a99989796959493929190615b13565b60405180910390a1505050505050565b6040516001600160a01b038316602482015260448101829052612c8290849063a9059cbb60e01b90606401613606565b6060614a958484600085614a9d565b949350505050565b606082471015614afe5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b6001600160a01b0385163b614b555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b600080866001600160a01b03168587604051614b719190615bfe565b60006040518083038185875af1925050503d8060008114614bae576040519150601f19603f3d011682016040523d82523d6000602084013e614bb3565b606091505b5091509150614bc3828286614bce565b979650505050505050565b60608315614bdd575081610cb5565b825115614bed5782518084602001fd5b8160405162461bcd60e51b815260040161061a9190615c1a565b600183019183908215614c895791602002820160005b83821115614c5a57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c1d565b8015614c875782816101000a81549060ff0219169055600101602081600001049283019260010302614c5a565b505b50614c95929150614e04565b5090565b828054828255906000526020600020908101928215614c89579160200282015b82811115614c89578251825591602001919060010190614cb9565b828054828255906000526020600020908101928215614c89579160200282015b82811115614c8957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614cf4565b604080516102a08101825260008082526020820181905290918201908152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001614dba614e19565b81526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906135cf91905b5b80821115614c955760008155600101614e05565b60405180606001604052806003906020820280368337509192915050565b80356001600160a01b038116811461122157600080fd5b60008083601f840112614e6057600080fd5b50813567ffffffffffffffff811115614e7857600080fd5b6020830191508360208260051b850101111561113657600080fd5b6000806000806000806000878903610180811215614eb057600080fd5b614eb989614e37565b9750602089013567ffffffffffffffff80821115614ed657600080fd5b614ee28c838d01614e4e565b909950975060408b0135965060608b0135915080821115614f0257600080fd5b50614f0f8b828c01614e4e565b909550935050610100607f1982011215614f2857600080fd5b5060808801905092959891949750929550565b600060208284031215614f4d57600080fd5b610cb582614e37565b600060208284031215614f6857600080fd5b5035919050565b600080600060608486031215614f8457600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b6040516102a0810167ffffffffffffffff81118282101715614fd557614fd5614f9b565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561500457615004614f9b565b604052919050565b80151581146135cf57600080fd5b80356112218161500c565b80356008811061122157600080fd5b600082601f83011261504557600080fd5b6040516060810181811067ffffffffffffffff8211171561506857615068614f9b565b60405280606084018581111561507d57600080fd5b845b818110156150a05780356150928161500c565b83526020928301920161507f565b509195945050505050565b600067ffffffffffffffff8211156150c5576150c5614f9b565b5060051b60200190565b600082601f8301126150e057600080fd5b813560206150f56150f0836150ab565b614fdb565b82815260059290921b8401810191818101908684111561511457600080fd5b8286015b8481101561512f5780358352918301918301615118565b509695505050505050565b600082601f83011261514b57600080fd5b8135602061515b6150f0836150ab565b82815260059290921b8401810191818101908684111561517a57600080fd5b8286015b8481101561512f5761518f81614e37565b835291830191830161517e565b6000602082840312156151ae57600080fd5b813567ffffffffffffffff808211156151c657600080fd5b908301906102e082860312156151db57600080fd5b6151e3614fb1565b6151ec8361501a565b81526151fa6020840161501a565b602082015261520b60408401615025565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160615274818501614e37565b90820152610180615286848201614e37565b908201526101a0615298848201614e37565b908201526101c06152ab87858301615034565b9082015261022083810135838111156152c357600080fd5b6152cf888287016150cf565b6101e08401525061024080850135848111156152ea57600080fd5b6152f6898288016150cf565b61020085015250610260808601358581111561531157600080fd5b61531d8a8289016150cf565b84860152506102809250828601358581111561533857600080fd5b6153448a82890161513a565b83860152506102a086013591508482111561535e57600080fd5b61536a8983880161513a565b90840152506102c08401358381111561538257600080fd5b61538e8882870161513a565b918301919091525095945050505050565b600080600080608085870312156153b557600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052602160045260246000fd5b600881106153f7576153f76153d1565b9052565b8060005b600381101561363d57815115158452602093840193909101906001016153ff565b600081518084526020808501945080840160005b8381101561545057815187529582019590820190600101615434565b509495945050505050565b600081518084526020808501945080840160005b838110156154505781516001600160a01b03168752958201959082019060010161546f565b80511515825260006102e060208301516154b2602086018215159052565b5060408301516154c560408601826153e7565b50606083015160608501526080830151608085015260a083015160a085015260c083015160c085015260e083015160e085015261010080840151818601525061012080840151818601525061014080840151818601525061016080840151615537828701826001600160a01b03169052565b5050610180838101516001600160a01b0381168683015250506101a0838101516001600160a01b0381168683015250506101c08084015161557a828701826153fb565b50506101e0830151610220828187015261559683870183615420565b92506102008501519150610240868403818801526155b48484615420565b93508186015192506102609150868403828801526155d28484615420565b935080860151925050610280868403818801526155ef848461545b565b93508186015192508684036102a088015261560a848461545b565b935080860151925050508482036102c0860152615627828261545b565b95945050505050565b602081526000610cb56020830184615494565b6000806040838503121561565657600080fd5b50508035926020909101359150565b8e151581528d151560208201526101c08101615684604083018f6153e7565b8c60608301528b60808301528a60a08301528960c08301528860e08301528761010083015286610120830152856101408301526156cd6101608301866001600160a01b03169052565b6001600160a01b0384166101808301526001600160a01b0383166101a08301529f9e505050505050505050505050505050565b60008060006060848603121561571557600080fd5b8335925061572560208501614e37565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561578a57603f19888603018452615778858351615494565b9450928501929085019060010161575c565b5092979650505050505050565b60208082526003908201526234303960e81b604082015260600190565b6000602082840312156157c657600080fd5b8135610cb58161500c565b634e487b7160e01b600052601160045260246000fd5b6000600182016157f9576157f96157d1565b5060010190565b6000815480845260208085019450836000528060002060005b8381101561545057815487529582019560019182019101615819565b6000815480845260208085019450836000528060002060005b838110156154505781546001600160a01b03168752958201956001918201910161584e565b84815260018060a01b038416602082015282604082015260806060820152600082546158a66080840160ff831615159052565b6158ba60a0840160ff8360081c1615159052565b6158cd60c0840160ff8360101c166153e7565b50600183015460e08301526002830154610100830152600383015461012083015260048301546101408301526005830154610160830152600683015461018083015260078301546101a08301526008808401546101c084015260098401546001600160a01b039081166101e0850152600a8501548116610200850152600b85015416610220840152600c84015460ff80821615156102408601529181901c8216151561026085015260101c1615156102808301526102e06102a0830181905261599d6103608401600d8601615800565b607f1980858303016102c08601526159b882600e8801615800565b91508085830301838601526159d082600f8801615800565b925080858403016103008601526159ea8360108801615835565b92508085840301610320860152615a048360118801615835565b925080858403016103408601525050614bc38160128601615835565b60208082526003908201526234303360e81b604082015260600190565b600061ffff808316818516808303821115615a5a57615a5a6157d1565b01949350505050565b6000816000190483118215151615615a7d57615a7d6157d1565b500290565b600082615a9f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015615ab657615ab66157d1565b500390565b600060ff821660ff84168060ff03821115615ad857615ad86157d1565b019392505050565b6020808252600390820152620d0c0d60ea1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b8a81526001600160a01b038a81166020830152604082018a9052606082018990526080820188905286811660a0830152851660c08201526101408101615b5c60e08301866153e7565b610100820193909352610120015298975050505050505050565b600081615b8557615b856157d1565b506000190190565b8381526060810160038410615ba457615ba46153d1565b602082019390935260400152919050565b600060208284031215615bc757600080fd5b8151610cb58161500c565b60005b83811015615bed578181015183820152602001615bd5565b8381111561363d5750506000910152565b60008251615c10818460208701615bd2565b9190910192915050565b6020815260008251806020840152615c39816040850160208701615bd2565b601f01601f1916919091016040019291505056fea26469706673582212201327122e3a59d6b1768ca29e006cb85b0495dbdb5fe722cd44abd3287032966b64736f6c634300080d0033000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x6080604052600436106101c25760003560e01c8063753868e3116100f75780639a6ed3e611610095578063e27fbdfe11610064578063e27fbdfe14610595578063ec782ac1146105b5578063ef706adf146105bd578063f4923857146105d057600080fd5b80639a6ed3e614610522578063a165527814610540578063a6f9dae114610562578063d92557b31461058257600080fd5b8063893d20e8116100d1578063893d20e8146104205780638a72ea6a1461043e5780638ea242bf146104ef5780639589d7b91461050f57600080fd5b8063753868e3146103cb5780637883feca146103e05780637ae2b5c71461040057600080fd5b806340fff80c116101645780634c7ae1301161013e5780634c7ae130146103445780634cd370b9146103645780635456bf13146103795780636d5433e6146103ab57600080fd5b806340fff80c146102c257806344ab0402146102e25780634579268a1461031757600080fd5b80631d73add8116101a05780631d73add81461021c5780632071a9f414610240578063296382f614610260578063347158c51461029257600080fd5b80630ee1d0f6146101c75780631007d58c146101dc578063182a7506146101fc575b600080fd5b6101da6101d5366004614e93565b6105f0565b005b3480156101e857600080fd5b506101da6101f7366004614f3b565b610bb5565b34801561020857600080fd5b506101da610217366004614f56565b610c01565b34801561022857600080fd5b506001545b6040519081526020015b60405180910390f35b34801561024c57600080fd5b5061022d61025b366004614f6f565b610c30565b34801561026c57600080fd5b506004546001600160a01b03165b6040516001600160a01b039091168152602001610237565b34801561029e57600080fd5b506102b26102ad36600461519c565b610cbc565b6040519015158152602001610237565b3480156102ce57600080fd5b506101da6102dd366004614f3b565b610ccd565b3480156102ee57600080fd5b506103026102fd36600461539f565b610d19565b60408051928352602083019190915201610237565b34801561032357600080fd5b50610337610332366004614f56565b610d93565b6040516102379190615630565b34801561035057600080fd5b5061030261035f366004615643565b611118565b34801561037057600080fd5b5060035461022d565b34801561038557600080fd5b50610399610394366004614f56565b61113d565b60405160ff9091168152602001610237565b3480156103b757600080fd5b5061022d6103c6366004615643565b611226565b3480156103d757600080fd5b506101da61123d565b3480156103ec57600080fd5b5061022d6103fb366004615643565b61127c565b34801561040c57600080fd5b5061022d61041b366004615643565b6112be565b34801561042c57600080fd5b506000546001600160a01b031661027a565b34801561044a57600080fd5b506104d5610459366004614f56565b600660208190526000918252604090912080546001820154600283015460038401546004850154600586015496860154600787015460088801546009890154600a8a0154600b909a015460ff808b169c6101008c0482169c62010000909c049091169a90959493926001600160a01b039081169291811691168e565b6040516102379e9d9c9b9a99989796959493929190615665565b3480156104fb57600080fd5b506102b261050a36600461519c565b6112d4565b6101da61051d366004615700565b6112fd565b34801561052e57600080fd5b506005546001600160a01b031661027a565b34801561054c57600080fd5b50610555612411565b6040516102379190615735565b34801561056e57600080fd5b506101da61057d366004614f3b565b61284d565b6101da610590366004615643565b612899565b3480156105a157600080fd5b506101da6105b0366004614f56565b612c87565b6101da612cb6565b6101da6105cb366004614f56565b612d21565b3480156105dc57600080fd5b506101da6105eb366004614f56565b613174565b600554600160a01b900460ff16156106235760405162461bcd60e51b815260040161061a90615797565b60405180910390fd5b61063360408201602083016157b4565b156106685760405162461bcd60e51b81526020600482015260056024820152644e492d4d4560d81b604482015260640161061a565b60c0810135156106ae57428160c00135116106ae5760405162461bcd60e51b81526020600482015260066024820152650d0c0d4b53d160d21b604482015260640161061a565b600084116106e85760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50505360ca1b604482015260640161061a565b8461071e5760405162461bcd60e51b81526020600482015260066024820152653430302d424560d01b604482015260640161061a565b8185146107585760405162461bcd60e51b81526020600482015260086024820152673430302d424c4d4d60c01b604482015260640161061a565b6001600160a01b0387166107a25734841461079d5760405162461bcd60e51b81526020600482015260056024820152643430322d4560d81b604482015260640161061a565b6107b7565b6107b76001600160a01b0388163330876135d2565b60018054600091826107c8836157e7565b909155506002805491925060006107de836157e7565b9091555050604080516102a08101825260018152600060208201529081016004815260200182815260200186815260200183606001358152602001836080013581526020016108318460a001358861127c565b81526020016108448460e001358861127c565b81526020018360c001358152602001868152602001336001600160a01b03168152602001336001600160a01b03168152602001896001600160a01b0316815260200160405180606001604052808560200160208101906108a491906157b4565b151581526020908101906108ba908701876157b4565b151581526020016108d160608701604088016157b4565b15151515815250815260200185858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509385525050604080518381526020808201835280860191909152815184815280820183528286015281518481528082018352606086015281519384528381018252608085019390935280518b840281810185019092528b815260a090940193928c92508b918291850190849080828437600092018290525093909452505083815260066020908152604091829020845181549286015161ffff1990931690151561ff0019161761010092151592909202919091178082559184015190925090829062ff00001916620100008360078111156109e9576109e96153d1565b0217905550606082015160018201556080820151600282015560a082015160038083019190915560c0830151600483015560e083015160058301556101008301516006830155610120830151600783015561014083015160088301556101608301516009830180546001600160a01b039283166001600160a01b031991821617909155610180850151600a850180549184169183169190911790556101a0850151600b850180549190931691161790556101c0830151610aae91600c84019190614c07565b506101e08201518051610acb91600d840191602090910190614c99565b506102008201518051610ae891600e840191602090910190614c99565b506102208201518051610b0591600f840191602090910190614c99565b506102408201518051610b22916010840191602090910190614cd4565b506102608201518051610b3f916011840191602090910190614cd4565b506102808201518051610b5c916012840191602090910190614cd4565b5050506000818152600660205260409081902090517fcfd1adab0b04b484cab64ce95c198e4638932529b0e947976ef8c9a5a9052cc691610ba39184913391429190615873565b60405180910390a15050505050505050565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161061a90615a20565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610c2b5760405162461bcd60e51b815260040161061a90615a20565b600355565b600080610c3c8561113d565b60ff1690506000610c4c8461113d565b60ff16905060f0610c5d8284615a3d565b61ffff161015610c855784610c728588615a63565b610c7c9190615a82565b92505050610cb5565b838610610ca15783610c978688615a82565b610c7c9190615a63565b610cab8585615a82565b610c7c9087615a63565b9392505050565b6000610cc7826112d4565b92915050565b6000546001600160a01b03163314610cf75760405162461bcd60e51b815260040161061a90615a20565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008084600003610d2f57508490506000610d8a565b838510610d4157506000905084610d8a565b82861015610d655783610d548688615a63565b610d5e9190615a82565b9050610d7d565b84610d708588615a82565b610d7a9190615a63565b90505b610d878187615aa4565b91505b94509492505050565b610d9b614d29565b60008281526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452909391929184019162010000909104166007811115610df257610df26153d1565b6007811115610e0357610e036153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610eaa57905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015610f3257602002820191906000526020600020905b815481526020019060010190808311610f1e575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015610f8a57602002820191906000526020600020905b815481526020019060010190808311610f76575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015610fe257602002820191906000526020600020905b815481526020019060010190808311610fce575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561104457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611026575b50505050508152602001601182018054806020026020016040519081016040528092919081815260200182805480156110a657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611088575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561110857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116110ea575b5050505050815250509050919050565b60008061113184846103e86102fd612710600019615a82565b915091505b9250929050565b6000600160801b821061115d57608091821c9161115a9082615abb565b90505b68010000000000000000821061118057604091821c9161117d9082615abb565b90505b640100000000821061119f57602091821c9161119c9082615abb565b90505b6201000082106111bc57601091821c916111b99082615abb565b90505b61010082106111d857600891821c916111d59082615abb565b90505b601082106111f357600491821c916111f09082615abb565b90505b6004821061120e57600291821c9161120b9082615abb565b90505b6002821061122157610cc7600182615abb565b919050565b6000818310156112365781610cb5565b5090919050565b6000546001600160a01b031633146112675760405162461bcd60e51b815260040161061a90615a20565b6005805460ff60a01b1916600160a01b179055565b60008260000361128d575081610cc7565b60006112a78360016127106102fd620186a0600019615a82565b509050808411156112b6578093505b509192915050565b6000818310156112ce5782610cb5565b50919050565b60008082610140015183608001516112ec9190615aa4565b610100909301519092101592915050565b600554600160a01b900460ff16156113275760405162461bcd60e51b815260040161061a90615797565b600081116113615760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50509360ca1b604482015260640161061a565b600083815260066020908152604080832081516102a081018352815460ff808216151583526101008204811615159583019590955290939192840191620100009091041660078111156113b6576113b66153d1565b60078111156113c7576113c76153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161146e57905050505050508152602001600d82018054806020026020016040519081016040528092919081815260200182805480156114f657602002820191906000526020600020905b8154815260200190600101908083116114e2575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561154e57602002820191906000526020600020905b81548152602001906001019080831161153a575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156115a657602002820191906000526020600020905b815481526020019060010190808311611592575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561160857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115ea575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561166a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161164c575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156116cc57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116116ae575b505050505081525050905080600001516116f85760405162461bcd60e51b815260040161061a90615ae0565b61012081015115611740574281610120015110156117405760405162461bcd60e51b81526020600482015260056024820152640d0c0d4b5160da1b604482015260640161061a565b60008060005b836102800151518110156117c757856001600160a01b0316846102800151828151811061177557611775615afd565b60200260200101516001600160a01b0316036117b55760019150836101e0015181815181106117a6576117a6615afd565b602002602001015192506117c7565b806117bf816157e7565b915050611746565b50806117ff5760405162461bcd60e51b81526020600482015260076024820152663430342d54424960c81b604482015260640161061a565b50600061181184838560800151610c30565b90506118268360e001518461014001516112be565b81101561185f5760405162461bcd60e51b81526020600482015260076024820152660d0c0c0b50505360ca1b604482015260640161061a565b82610140015181111561189e5760405162461bcd60e51b815260206004820152600760248201526606860605a8282960cb1b604482015260640161061a565b600086815260066020526040812060080180548392906118bf908490615aa4565b909155505060008681526006602090815260409182902082516102a081018452815460ff808216151583526101008204811615159483019490945290939192918401916201000090910416600781111561191b5761191b6153d1565b600781111561192c5761192c6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116119d357905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015611a5b57602002820191906000526020600020905b815481526020019060010190808311611a47575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015611ab357602002820191906000526020600020905b815481526020019060010190808311611a9f575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015611b0b57602002820191906000526020600020905b815481526020019060010190808311611af7575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015611b6d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b4f575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015611bcf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bb1575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015611c3157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c13575b50505050508152505092506000836101c00151600260038110611c5657611c56615afd565b6020020151905080158015611c6f5750611c6f846112d4565b156120025760008781526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452611ff19491939184019162010000909104166007811115611ccd57611ccd6153d1565b6007811115611cde57611cde6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411611d8557905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015611e0d57602002820191906000526020600020905b815481526020019060010190808311611df9575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015611e6557602002820191906000526020600020905b815481526020019060010190808311611e51575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015611ebd57602002820191906000526020600020905b815481526020019060010190808311611ea9575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015611f1f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f01575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015611f8157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f63575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015611fe357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fc5575b505050505081525050613643565b611ffd848787856137be565b61200f565b61200f84878785336138a4565b60008781526006602090815260409182902082516102a081018452815460ff8082161515835261010082048116151594830194909452909391929184019162010000909104166007811115612066576120666153d1565b6007811115612077576120776153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161211e57905050505050508152602001600d82018054806020026020016040519081016040528092919081815260200182805480156121a657602002820191906000526020600020905b815481526020019060010190808311612192575b50505050508152602001600e82018054806020026020016040519081016040528092919081815260200182805480156121fe57602002820191906000526020600020905b8154815260200190600101908083116121ea575b50505050508152602001600f820180548060200260200160405190810160405280929190818152602001828054801561225657602002820191906000526020600020905b815481526020019060010190808311612242575b50505050508152602001601082018054806020026020016040519081016040528092919081815260200182805480156122b857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161229a575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561231a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122fc575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561237c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161235e575b505050505081525050935061271084608001516123999190615a82565b846101400151116124085760008781526006602090815260409182902082516102a081018452815460ff80821615158352610100820481161515948301949094526123fd9491939184019162010000909104166007811115611ccd57611ccd6153d1565b612408876000613d39565b50505050505050565b6060600060025467ffffffffffffffff81111561243057612430614f9b565b60405190808252806020026020018201604052801561246957816020015b612456614d29565b81526020019060019003908161244e5790505b5090506000805b6001548110156128455760008181526006602052604090205460ff16156128335760008181526006602090815260409182902082516102a081018452815460ff80821615158352610100820481161515948301949094529093919291840191620100009091041660078111156124e8576124e86153d1565b60078111156124f9576124f96153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116125a057905050505050508152602001600d820180548060200260200160405190810160405280929190818152602001828054801561262857602002820191906000526020600020905b815481526020019060010190808311612614575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561268057602002820191906000526020600020905b81548152602001906001019080831161266c575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156126d857602002820191906000526020600020905b8154815260200190600101908083116126c4575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561273a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161271c575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561279c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161277e575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156127fe57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116127e0575b50505050508152505083838151811061281957612819615afd565b6020026020010181905250818061282f906157e7565b9250505b8061283d816157e7565b915050612470565b509092915050565b6000546001600160a01b031633146128775760405162461bcd60e51b815260040161061a90615a20565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146128c35760405162461bcd60e51b815260040161061a90615a20565b815b81811015612c8257600081815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115612922576129226153d1565b6007811115612933576129336153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116129da57905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015612a6257602002820191906000526020600020905b815481526020019060010190808311612a4e575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015612aba57602002820191906000526020600020905b815481526020019060010190808311612aa6575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015612b1257602002820191906000526020600020905b815481526020019060010190808311612afe575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015612b7457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612b56575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015612bd657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612bb8575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015612c3857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c1a575b5050505050815250509050806000015115612c6f57612c5681610cbc565b15612c6457612c6481613643565b612c6f826001613d39565b5080612c7a816157e7565b9150506128c5565b505050565b6000546001600160a01b03163314612cb15760405162461bcd60e51b815260040161061a90615a20565b600155565b6000546001600160a01b03163314612ce05760405162461bcd60e51b815260040161061a90615a20565b600554600160a01b900460ff1615612d0a5760405162461bcd60e51b815260040161061a90615797565b612d1261123d565b612d1f6000600154612899565b565b600554600160a01b900460ff1615612d4b5760405162461bcd60e51b815260040161061a90615797565b600081815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115612da057612da06153d1565b6007811115612db157612db16153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411612e5857905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015612ee057602002820191906000526020600020905b815481526020019060010190808311612ecc575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015612f3857602002820191906000526020600020905b815481526020019060010190808311612f24575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015612f9057602002820191906000526020600020905b815481526020019060010190808311612f7c575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015612ff257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612fd4575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561305457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613036575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156130b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613098575b505050505081525050905080600001516130e25760405162461bcd60e51b815260040161061a90615ae0565b6101c0810151602001516131215760405162461bcd60e51b81526020600482015260066024820152653430302d434560d01b604482015260640161061a565b6101608101516001600160a01b0316331461314e5760405162461bcd60e51b815260040161061a90615a20565b61315781610cbc565b156131655761316581613643565b613170826001613d39565b5050565b600554600160a01b900460ff161561319e5760405162461bcd60e51b815260040161061a90615797565b600081815260066020908152604080832081516102a081018352815460ff808216151583526101008204811615159583019590955290939192840191620100009091041660078111156131f3576131f36153d1565b6007811115613204576132046153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116132ab57905050505050508152602001600d820180548060200260200160405190810160405280929190818152602001828054801561333357602002820191906000526020600020905b81548152602001906001019080831161331f575b50505050508152602001600e820180548060200260200160405190810160405280929190818152602001828054801561338b57602002820191906000526020600020905b815481526020019060010190808311613377575b50505050508152602001600f82018054806020026020016040519081016040528092919081815260200182805480156133e357602002820191906000526020600020905b8154815260200190600101908083116133cf575b505050505081526020016010820180548060200260200160405190810160405280929190818152602001828054801561344557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613427575b50505050508152602001601182018054806020026020016040519081016040528092919081815260200182805480156134a757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613489575b505050505081526020016012820180548060200260200160405190810160405280929190818152602001828054801561350957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134eb575b505050505081525050905080600001516135355760405162461bcd60e51b815260040161061a90615ae0565b600081610120015111801561354e575042816101200151105b6135835760405162461bcd60e51b81526020600482015260066024820152653430302d4e4560d01b604482015260640161061a565b806101000151816101400151826080015161359e9190615aa4565b10156135af57613170826002613d39565b61026081015151156135c4576135c481613643565b613170826000613d39565b50565b6040516001600160a01b038085166024830152831660448201526064810182905261363d9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261443b565b50505050565b606081015160005b82610260015151811015613702576000836102000151828151811061367257613672615afd565b60200260200101519050600081116136b65760405162461bcd60e51b81526020600482015260076024820152660d4c0c0b50505360ca1b604482015260640161061a565b6000838152600660205260408120600e018054849081106136d9576136d9615afd565b6000918252602090912001556136ef848361450d565b50806136fa816157e7565b91505061364b565b5060408051600080825260208083018085528583526006909152929020905161373192600e9092019190614c99565b5060408051600080825260208083018085528583526006909152929020905161376092600f9092019190614c99565b5060408051600080825260208083018085528583526006909152929020905161378f9260109092019190614cd4565b50604080516000808252602080830180855285835260069091529290209051612c829260119092019190614cd4565b6000806001600160a01b0385166137ed576137e3848761016001518860c00151614683565b9092509050613809565b6138038585338961016001518a60c00151614839565b90925090505b6101a086015160009081906001600160a01b031661383a5761383085338a60a00151614683565b9092509050613856565b613850886101a001518630338c60a00151614839565b90925090505b7fb35d284b8657c3283a620131bd081449735620dbd8ab663f15900a3b85f596978860600151334285888d6101a001518d8f60400151898c604051610ba39a99989796959493929190615b13565b60608501516000908152600660205260409020601001546001600160a01b038516613906578334146139015760405162461bcd60e51b81526020600482015260066024820152653430332d433160d01b604482015260640161061a565b61391b565b61391b6001600160a01b0386168330876135d2565b6060860180516000908152600660209081526040808320600e018054600181810183559185528385200188905584518452818420600f01805480830182559085528385200189905584518452818420601001805480830182559085528385200180546001600160a01b03808a166001600160a01b031992831617909255865186528386206011018054938401815586528486209092018054918c1691909216179055925182529082902082516102a081018452815460ff8082161515835261010082048116151594830194909452613d319491939184019162010000909104166007811115613a0c57613a0c6153d1565b6007811115613a1d57613a1d6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613ac457905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015613b4c57602002820191906000526020600020905b815481526020019060010190808311613b38575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015613ba457602002820191906000526020600020905b815481526020019060010190808311613b90575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015613bfc57602002820191906000526020600020905b815481526020019060010190808311613be8575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015613c5e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613c40575b5050505050815260200160118201805480602002602001604051908101604052809291908181526020018280548015613cc057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613ca2575b5050505050815260200160128201805480602002602001604051908101604052809291908181526020018280548015613d2257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613d04575b50505050508152505082614956565b505050505050565b600082815260066020908152604080832081516102a081018352815460ff80821615158352610100820481161515958301959095529093919284019162010000909104166007811115613d8e57613d8e6153d1565b6007811115613d9f57613d9f6153d1565b815260018201546020820152600282015460408083019190915260038084015460608085019190915260048501546080850152600585015460a0850152600685015460c0850152600785015460e0850152600885015461010085015260098501546001600160a01b03908116610120860152600a8601548116610140860152600b860154166101608501528251908101928390526101809093019291600c85019190826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613e4657905050505050508152602001600d8201805480602002602001604051908101604052809291908181526020018280548015613ece57602002820191906000526020600020905b815481526020019060010190808311613eba575b50505050508152602001600e8201805480602002602001604051908101604052809291908181526020018280548015613f2657602002820191906000526020600020905b815481526020019060010190808311613f12575b50505050508152602001600f8201805480602002602001604051908101604052809291908181526020018280548015613f7e57602002820191906000526020600020905b815481526020019060010190808311613f6a575b5050505050815260200160108201805480602002602001604051908101604052809291908181526020018280548015613fe057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613fc2575b505050505081526020016011820180548060200260200160405190810160405280929190818152602001828054801561404257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311614024575b50505050508152602001601282018054806020026020016040519081016040528092919081815260200182805480156140a457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311614086575b505050505081525050905080600001516140d05760405162461bcd60e51b815260040161061a90615ae0565b6000838152600660205260409020805460ff191690556101408101511561414e576101a08101516001600160a01b03166141215761411a8161014001518261016001516000614683565b505061414e565b61414e816101600151826101400151836101a001516001600160a01b0316614a569092919063ffffffff16565b610260810151511561430d5760005b8161026001515181101561430b5760006001600160a01b0316826102600151828151811061418d5761418d615afd565b60200260200101516001600160a01b0316036141f2576141eb82610220015182815181106141bd576141bd615afd565b602002602001015183610240015183815181106141dc576141dc615afd565b60200260200101516000614683565b505061426a565b61426a826102400151828151811061420c5761420c615afd565b6020026020010151836102200151838151811061422b5761422b615afd565b6020026020010151846102600151848151811061424a5761424a615afd565b60200260200101516001600160a01b0316614a569092919063ffffffff16565b6101a08201516001600160a01b03166142b3576142ac826102000151828151811061429757614297615afd565b60200260200101518361016001516000614683565b50506142f9565b6142f982610160015183610200015183815181106142d3576142d3615afd565b6020026020010151846101a001516001600160a01b0316614a569092919063ffffffff16565b80614303816157e7565b91505061415d565b505b60008381526006602081905260408220805462ffffff19168155600181018390556002810183905560038101839055600481018390556005810183905590810182905560078101829055600881018290556009810180546001600160a01b0319908116909155600a8201805482169055600b820180549091169055600c81018290559061439e600d83016000614dea565b6143ac600e83016000614dea565b6143ba600f83016000614dea565b6143c8601083016000614dea565b6143d6601183016000614dea565b6143e4601283016000614dea565b5050600280549060006143f683615b76565b91905055507fb8f7d5c4c1553c6b29c86aa7f8a0f2f47c7b501b5f53195ea15bce7ae8dd9ac183834260405161442e93929190615b8d565b60405180910390a1505050565b6000614490826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a869092919063ffffffff16565b805190915015612c8257808060200190518101906144ae9190615bb5565b612c825760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b60006001600160a01b0316826102600151828151811061452f5761452f615afd565b60200260200101516001600160a01b03160361457e57614577826102200151828151811061455f5761455f615afd565b60200260200101518361016001518460c00151614683565b50506145d3565b6145d0826102600151828151811061459857614598615afd565b602002602001015183610220015183815181106145b7576145b7615afd565b6020026020010151308561016001518660c00151614839565b50505b6101a08201516001600160a01b03166146315761363d826102000151828151811061460057614600615afd565b6020026020010151836102400151838151811061461f5761461f615afd565b60200260200101518460a00151614683565b61363d826101a00151836102000151838151811061465157614651615afd565b602002602001015130856102400151858151811061467157614671615afd565b60200260200101518660a00151614839565b60045460009081906001600160a01b031661469d57600092505b6000806146aa8786611118565b915091506000866001600160a01b03168361753090604051600060405180830381858888f193505050503d8060008114614700576040519150601f19603f3d011682016040523d82523d6000602084013e614705565b606091505b505090508061473f5760405162461bcd60e51b81526020600482015260066024820152653430342d433160d01b604482015260640161061a565b811561482c576005546001600160a01b0316156147995760405162461bcd60e51b8152602060048201526018602482015277272490169031b7b6b6b4b9b9b4b7b722bc31b430b733b2b960411b604482015260640161061a565b6004546040516000916001600160a01b03169061753090859084818181858888f193505050503d80600081146147eb576040519150601f19603f3d011682016040523d82523d6000602084013e6147f0565b606091505b505090508061482a5760405162461bcd60e51b81526020600482015260066024820152651a181a16a19960d11b604482015260640161061a565b505b5090969095509350505050565b60045460009081906001600160a01b031661485357600092505b6000806148608886611118565b9092509050306001600160a01b0388160361488e576148896001600160a01b038a168784614a56565b6148a3565b6148a36001600160a01b038a168888856135d2565b8015614948576005546001600160a01b0316156148fd5760405162461bcd60e51b8152602060048201526018602482015277272490169031b7b6b6b4b9b9b4b7b722bc31b430b733b2b960411b604482015260640161061a565b306001600160a01b0388160361492c57600454614927906001600160a01b038b8116911683614a56565b614948565b600454614948906001600160a01b038b8116918a9116846135d2565b909890975095505050505050565b600080614985846102000151848151811061497357614973615afd565b60200260200101518560a00151611118565b915091506000806149b886610220015186815181106149a6576149a6615afd565b60200260200101518760c00151611118565b915091507fb35d284b8657c3283a620131bd081449735620dbd8ab663f15900a3b85f59697866060015187610240015187815181106149f9576149f9615afd565b60200260200101514287868b6101a001518c61026001518c81518110614a2157614a21615afd565b60200260200101518d604001518b8a604051614a469a99989796959493929190615b13565b60405180910390a1505050505050565b6040516001600160a01b038316602482015260448101829052612c8290849063a9059cbb60e01b90606401613606565b6060614a958484600085614a9d565b949350505050565b606082471015614afe5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b6001600160a01b0385163b614b555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b600080866001600160a01b03168587604051614b719190615bfe565b60006040518083038185875af1925050503d8060008114614bae576040519150601f19603f3d011682016040523d82523d6000602084013e614bb3565b606091505b5091509150614bc3828286614bce565b979650505050505050565b60608315614bdd575081610cb5565b825115614bed5782518084602001fd5b8160405162461bcd60e51b815260040161061a9190615c1a565b600183019183908215614c895791602002820160005b83821115614c5a57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c1d565b8015614c875782816101000a81549060ff0219169055600101602081600001049283019260010302614c5a565b505b50614c95929150614e04565b5090565b828054828255906000526020600020908101928215614c89579160200282015b82811115614c89578251825591602001919060010190614cb9565b828054828255906000526020600020908101928215614c89579160200282015b82811115614c8957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614cf4565b604080516102a08101825260008082526020820181905290918201908152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001614dba614e19565b81526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906135cf91905b5b80821115614c955760008155600101614e05565b60405180606001604052806003906020820280368337509192915050565b80356001600160a01b038116811461122157600080fd5b60008083601f840112614e6057600080fd5b50813567ffffffffffffffff811115614e7857600080fd5b6020830191508360208260051b850101111561113657600080fd5b6000806000806000806000878903610180811215614eb057600080fd5b614eb989614e37565b9750602089013567ffffffffffffffff80821115614ed657600080fd5b614ee28c838d01614e4e565b909950975060408b0135965060608b0135915080821115614f0257600080fd5b50614f0f8b828c01614e4e565b909550935050610100607f1982011215614f2857600080fd5b5060808801905092959891949750929550565b600060208284031215614f4d57600080fd5b610cb582614e37565b600060208284031215614f6857600080fd5b5035919050565b600080600060608486031215614f8457600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b6040516102a0810167ffffffffffffffff81118282101715614fd557614fd5614f9b565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561500457615004614f9b565b604052919050565b80151581146135cf57600080fd5b80356112218161500c565b80356008811061122157600080fd5b600082601f83011261504557600080fd5b6040516060810181811067ffffffffffffffff8211171561506857615068614f9b565b60405280606084018581111561507d57600080fd5b845b818110156150a05780356150928161500c565b83526020928301920161507f565b509195945050505050565b600067ffffffffffffffff8211156150c5576150c5614f9b565b5060051b60200190565b600082601f8301126150e057600080fd5b813560206150f56150f0836150ab565b614fdb565b82815260059290921b8401810191818101908684111561511457600080fd5b8286015b8481101561512f5780358352918301918301615118565b509695505050505050565b600082601f83011261514b57600080fd5b8135602061515b6150f0836150ab565b82815260059290921b8401810191818101908684111561517a57600080fd5b8286015b8481101561512f5761518f81614e37565b835291830191830161517e565b6000602082840312156151ae57600080fd5b813567ffffffffffffffff808211156151c657600080fd5b908301906102e082860312156151db57600080fd5b6151e3614fb1565b6151ec8361501a565b81526151fa6020840161501a565b602082015261520b60408401615025565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160615274818501614e37565b90820152610180615286848201614e37565b908201526101a0615298848201614e37565b908201526101c06152ab87858301615034565b9082015261022083810135838111156152c357600080fd5b6152cf888287016150cf565b6101e08401525061024080850135848111156152ea57600080fd5b6152f6898288016150cf565b61020085015250610260808601358581111561531157600080fd5b61531d8a8289016150cf565b84860152506102809250828601358581111561533857600080fd5b6153448a82890161513a565b83860152506102a086013591508482111561535e57600080fd5b61536a8983880161513a565b90840152506102c08401358381111561538257600080fd5b61538e8882870161513a565b918301919091525095945050505050565b600080600080608085870312156153b557600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052602160045260246000fd5b600881106153f7576153f76153d1565b9052565b8060005b600381101561363d57815115158452602093840193909101906001016153ff565b600081518084526020808501945080840160005b8381101561545057815187529582019590820190600101615434565b509495945050505050565b600081518084526020808501945080840160005b838110156154505781516001600160a01b03168752958201959082019060010161546f565b80511515825260006102e060208301516154b2602086018215159052565b5060408301516154c560408601826153e7565b50606083015160608501526080830151608085015260a083015160a085015260c083015160c085015260e083015160e085015261010080840151818601525061012080840151818601525061014080840151818601525061016080840151615537828701826001600160a01b03169052565b5050610180838101516001600160a01b0381168683015250506101a0838101516001600160a01b0381168683015250506101c08084015161557a828701826153fb565b50506101e0830151610220828187015261559683870183615420565b92506102008501519150610240868403818801526155b48484615420565b93508186015192506102609150868403828801526155d28484615420565b935080860151925050610280868403818801526155ef848461545b565b93508186015192508684036102a088015261560a848461545b565b935080860151925050508482036102c0860152615627828261545b565b95945050505050565b602081526000610cb56020830184615494565b6000806040838503121561565657600080fd5b50508035926020909101359150565b8e151581528d151560208201526101c08101615684604083018f6153e7565b8c60608301528b60808301528a60a08301528960c08301528860e08301528761010083015286610120830152856101408301526156cd6101608301866001600160a01b03169052565b6001600160a01b0384166101808301526001600160a01b0383166101a08301529f9e505050505050505050505050505050565b60008060006060848603121561571557600080fd5b8335925061572560208501614e37565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561578a57603f19888603018452615778858351615494565b9450928501929085019060010161575c565b5092979650505050505050565b60208082526003908201526234303960e81b604082015260600190565b6000602082840312156157c657600080fd5b8135610cb58161500c565b634e487b7160e01b600052601160045260246000fd5b6000600182016157f9576157f96157d1565b5060010190565b6000815480845260208085019450836000528060002060005b8381101561545057815487529582019560019182019101615819565b6000815480845260208085019450836000528060002060005b838110156154505781546001600160a01b03168752958201956001918201910161584e565b84815260018060a01b038416602082015282604082015260806060820152600082546158a66080840160ff831615159052565b6158ba60a0840160ff8360081c1615159052565b6158cd60c0840160ff8360101c166153e7565b50600183015460e08301526002830154610100830152600383015461012083015260048301546101408301526005830154610160830152600683015461018083015260078301546101a08301526008808401546101c084015260098401546001600160a01b039081166101e0850152600a8501548116610200850152600b85015416610220840152600c84015460ff80821615156102408601529181901c8216151561026085015260101c1615156102808301526102e06102a0830181905261599d6103608401600d8601615800565b607f1980858303016102c08601526159b882600e8801615800565b91508085830301838601526159d082600f8801615800565b925080858403016103008601526159ea8360108801615835565b92508085840301610320860152615a048360118801615835565b925080858403016103408601525050614bc38160128601615835565b60208082526003908201526234303360e81b604082015260600190565b600061ffff808316818516808303821115615a5a57615a5a6157d1565b01949350505050565b6000816000190483118215151615615a7d57615a7d6157d1565b500290565b600082615a9f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015615ab657615ab66157d1565b500390565b600060ff821660ff84168060ff03821115615ad857615ad86157d1565b019392505050565b6020808252600390820152620d0c0d60ea1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b8a81526001600160a01b038a81166020830152604082018a9052606082018990526080820188905286811660a0830152851660c08201526101408101615b5c60e08301866153e7565b610100820193909352610120015298975050505050505050565b600081615b8557615b856157d1565b506000190190565b8381526060810160038410615ba457615ba46153d1565b602082019390935260400152919050565b600060208284031215615bc757600080fd5b8151610cb58161500c565b60005b83811015615bed578181015183820152602001615bd5565b8381111561363d5750506000910152565b60008251615c10818460208701615bd2565b9190910192915050565b6020815260008251806020840152615c39816040850160208701615bd2565b601f01601f1916919091016040019291505056fea26469706673582212201327122e3a59d6b1768ca29e006cb85b0495dbdb5fe722cd44abd3287032966b64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : startOfferId (uint256): 10
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.