More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 961,498 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Run | 65467459 | 4 mins ago | IN | 0 POL | 0.00288105 | ||||
Run | 65467445 | 4 mins ago | IN | 0 POL | 0.00288165 | ||||
Run | 65467440 | 4 mins ago | IN | 0 POL | 0.00288165 | ||||
Run | 65467433 | 5 mins ago | IN | 0 POL | 0.00307432 | ||||
Send | 65466817 | 27 mins ago | IN | 0 POL | 0.04653682 | ||||
Send | 65466816 | 27 mins ago | IN | 0 POL | 0.03364342 | ||||
Send | 65466770 | 28 mins ago | IN | 0 POL | 0.00175164 | ||||
Run | 65466609 | 34 mins ago | IN | 40 POL | 0.00971301 | ||||
Run | 65466589 | 35 mins ago | IN | 45 POL | 0.00973458 | ||||
Run | 65466506 | 38 mins ago | IN | 40 POL | 0.00971219 | ||||
Run | 65466384 | 42 mins ago | IN | 0 POL | 0.00288203 | ||||
Run | 65466332 | 44 mins ago | IN | 25 POL | 0.01036306 | ||||
Run | 65466252 | 47 mins ago | IN | 90 POL | 0.00971125 | ||||
Send | 65466223 | 48 mins ago | IN | 0 POL | 0.03242229 | ||||
Run | 65466122 | 52 mins ago | IN | 45 POL | 0.00971254 | ||||
Run | 65466063 | 54 mins ago | IN | 270 POL | 0.00971085 | ||||
Run | 65466042 | 55 mins ago | IN | 20 POL | 0.01445464 | ||||
Run | 65466041 | 55 mins ago | IN | 80 POL | 0.00971193 | ||||
Run | 65466034 | 55 mins ago | IN | 80 POL | 0.00971217 | ||||
Run | 65466031 | 55 mins ago | IN | 52.9 POL | 0.01363572 | ||||
Run | 65466029 | 55 mins ago | IN | 80 POL | 0.00971253 | ||||
Run | 65465908 | 1 hr ago | IN | 45 POL | 0.00971253 | ||||
Run | 65465671 | 1 hr ago | IN | 2.4 POL | 0.06243639 | ||||
Run | 65465595 | 1 hr ago | IN | 4 POL | 0.06130134 | ||||
Run | 65465557 | 1 hr ago | IN | 2 POL | 0.06069057 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
65467459 | 4 mins ago | 45 POL | ||||
65467459 | 4 mins ago | 45 POL | ||||
65467445 | 4 mins ago | 45 POL | ||||
65467445 | 4 mins ago | 45 POL | ||||
65467440 | 4 mins ago | 45 POL | ||||
65467440 | 4 mins ago | 45 POL | ||||
65467433 | 5 mins ago | 44 POL | ||||
65467433 | 5 mins ago | 44 POL | ||||
65466609 | 34 mins ago | 40 POL | ||||
65466589 | 35 mins ago | 45 POL | ||||
65466506 | 38 mins ago | 40 POL | ||||
65466384 | 42 mins ago | 25 POL | ||||
65466384 | 42 mins ago | 25 POL | ||||
65466332 | 44 mins ago | 25 POL | ||||
65466252 | 47 mins ago | 90 POL | ||||
65466122 | 52 mins ago | 45 POL | ||||
65466063 | 54 mins ago | 270 POL | ||||
65466042 | 55 mins ago | 0.6 POL | ||||
65466042 | 55 mins ago | 0.6 POL | ||||
65466042 | 55 mins ago | 0.5 POL | ||||
65466042 | 55 mins ago | 0.5 POL | ||||
65466042 | 55 mins ago | 18.9 POL | ||||
65466042 | 55 mins ago | 18.9 POL | ||||
65466042 | 55 mins ago | 20 POL | ||||
65466041 | 55 mins ago | 80 POL |
Loading...
Loading
Contract Name:
MarketNG
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.0; pragma abicoder v2; import './IWETH.sol'; import './IMintable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC1155/IERC1155.sol'; import '@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; contract MarketNG is IERC721Receiver, IERC1155Receiver, ReentrancyGuard, Ownable, Pausable { using SafeERC20 for IERC20; uint8 public constant KIND_SELL = 1; uint8 public constant KIND_BUY = 2; uint8 public constant KIND_AUCTION = 3; uint8 public constant STATUS_OPEN = 0; uint8 public constant STATUS_DONE = 1; uint8 public constant STATUS_CANCELLED = 2; uint8 public constant OP_MIN = 0; // invalid, for checks only uint8 public constant OP_COMPLETE_SELL = 1; // complete sell (off-chain) uint8 public constant OP_COMPLETE_BUY = 2; // complete buy (off-chain) uint8 public constant OP_BUY = 3; // create KIND_BUY uint8 public constant OP_ACCEPT_BUY = 4; // complete KIND_BUY uint8 public constant OP_CANCEL_BUY = 5; // cancel KIND_BUY uint8 public constant OP_REJECT_BUY = 6; // reject KIND_BUY uint8 public constant OP_BID = 7; // bid (create or update KIND_AUCTION) uint8 public constant OP_COMPLETE_AUCTION = 8; // complete auction (by anyone) uint8 public constant OP_ACCEPT_AUCTION = 9; // accept auction in an early stage (by seller) uint8 public constant OP_MAX = 10; uint8 public constant TOKEN_MINT = 0; // mint token (do anything) uint8 public constant TOKEN_721 = 1; // 721 token uint8 public constant TOKEN_1155 = 2; // 1155 token uint256 public constant RATE_BASE = 1e6; struct Pair721 { // swap only IERC721 token; uint256 tokenId; } struct TokenPair { address token; // token contract address uint256 tokenId; // token id (if applicable) uint256 amount; // token amount (if applicable) uint8 kind; // token kind (721/1151/mint) bytes mintData; // mint data (if applicable) } struct Inventory { address seller; address buyer; IERC20 currency; uint256 price; // display price uint256 netPrice; // actual price (auction: minus incentive) uint256 deadline; // deadline for the inventory uint8 kind; uint8 status; } struct Intention { address user; TokenPair[] bundle; IERC20 currency; uint256 price; uint256 deadline; bytes32 salt; uint8 kind; } struct Detail { bytes32 intentionHash; address signer; uint256 txDeadline; // deadline for the transaction bytes32 salt; uint256 id; // inventory id uint8 opcode; // OP_* address caller; IERC20 currency; uint256 price; uint256 incentiveRate; Settlement settlement; TokenPair[] bundle; uint256 deadline; // deadline for buy offer } struct Settlement { uint256[] coupons; uint256 feeRate; uint256 royaltyRate; uint256 buyerCashbackRate; address feeAddress; address royaltyAddress; } struct Swap { bytes32 salt; address creator; uint256 deadline; Pair721[] has; Pair721[] wants; } // events event EvCouponSpent(uint256 indexed id, uint256 indexed couponId); event EvInventoryUpdate(uint256 indexed id, Inventory inventory); event EvAuctionRefund(uint256 indexed id, address bidder, uint256 refund); event EvSettingsUpdated(); event EvMarketSignerUpdate(address addr, bool isRemoval); event EvSwapped(Swap req, bytes signature, address swapper); // vars IWETH public immutable weth; mapping(uint256 => Inventory) public inventories; mapping(uint256 => bool) public couponSpent; mapping(uint256 => mapping(uint256 => TokenPair)) public inventoryTokens; mapping(uint256 => uint256) public inventoryTokenCounts; mapping(address => bool) public marketSigners; // initialized with default value uint256 public minAuctionIncrement = (5 * RATE_BASE) / 100; uint256 public minAuctionDuration = 10 * 60; // internal vars bool internal _canReceive = false; // constructor constructor(IWETH weth_) { weth = weth_; } function updateSettings(uint256 minAuctionIncrement_, uint256 minAuctionDuration_) public onlyOwner { minAuctionDuration = minAuctionDuration_; minAuctionIncrement = minAuctionIncrement_; emit EvSettingsUpdated(); } function updateSigner(address addr, bool remove) public onlyOwner { if (remove) { delete marketSigners[addr]; } else { marketSigners[addr] = true; } emit EvMarketSignerUpdate(addr, remove); } // impls receive() external payable {} function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external view override _onTransferOnly returns (bytes4) { (operator); (from); (tokenId); (data); return this.onERC721Received.selector; } function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external view override _onTransferOnly returns (bytes4) { (operator); (from); (id); (value); (data); return this.onERC1155Received.selector; } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external view override _onTransferOnly returns (bytes4) { (operator); (from); (ids); (values); (data); return this.onERC1155BatchReceived.selector; } modifier _onTransferOnly() { require(_canReceive, 'can not transfer token directly'); _; } modifier _allowTransfer() { _canReceive = true; _; _canReceive = false; } // public function supportsInterface(bytes4 interfaceId) external pure override returns (bool) { return (interfaceId == type(IERC721Receiver).interfaceId) || (interfaceId == type(IERC1155Receiver).interfaceId); } function run( Intention calldata intent, Detail calldata detail, bytes calldata sigIntent, bytes calldata sigDetail ) public payable nonReentrant whenNotPaused { require(detail.txDeadline > block.timestamp, 'transaction deadline reached'); require(marketSigners[detail.signer], 'unknown market signer'); _validateOpCode(detail.opcode); require( isSignatureValid(sigDetail, keccak256(abi.encode(detail)), detail.signer), 'offer signature error' ); if (hasSignedIntention(detail.opcode)) { bytes memory encodedInt = abi.encode(intent); require(keccak256(encodedInt) == detail.intentionHash, 'intention hash does not match'); require( isSignatureValid(sigIntent, keccak256(encodedInt), intent.user), 'intention signature error' ); } if (detail.opcode == OP_COMPLETE_SELL) { _assertSender(detail.caller); require(intent.kind == KIND_SELL, 'intent.kind should be KIND_SELL'); _newSellDeal( detail.id, intent.user, intent.bundle, intent.currency, intent.price, intent.deadline, detail.caller, detail.settlement ); } else if (detail.opcode == OP_COMPLETE_BUY) { _assertSender(detail.caller); require(intent.kind == KIND_BUY, 'intent.kind should be KIND_BUY'); _newBuyDeal( detail.id, intent.user, // buyer detail.caller, // seller intent.bundle, intent.currency, intent.price, intent.deadline, detail.settlement ); } else if (detail.opcode == OP_BUY) { _assertSender(detail.caller); _newBuy( detail.id, detail.caller, detail.currency, detail.price, detail.bundle, detail.deadline ); } else if (detail.opcode == OP_ACCEPT_BUY) { _assertSender(detail.caller); _acceptBuy(detail.id, detail.caller, detail.settlement); } else if (detail.opcode == OP_CANCEL_BUY) { _cancelBuyAnyway(detail.id); } else if (detail.opcode == OP_REJECT_BUY) { _rejectBuy(detail.id); } else if (detail.opcode == OP_BID) { _assertSender(detail.caller); require(intent.kind == KIND_AUCTION, 'intent.kind should be KIND_AUCTION'); _bid( detail.id, intent.user, intent.bundle, intent.currency, intent.price, intent.deadline, detail.caller, detail.price, detail.incentiveRate ); } else if (detail.opcode == OP_COMPLETE_AUCTION) { _completeAuction(detail.id, detail.settlement); } else if (detail.opcode == OP_ACCEPT_AUCTION) { _assertSender(detail.caller); require(detail.caller == intent.user, 'only seller can call'); _acceptAuction(detail.id, detail.settlement); } else { revert('impossible'); } } function cancelBuys(uint256[] calldata ids) public nonReentrant whenNotPaused { for (uint256 i = 0; i < ids.length; i++) { _cancelBuy(ids[i]); } } function inCaseMoneyGetsStuck(address to, IERC20 currency, uint256 amount) public onlyOwner { _transfer(currency, to, amount); } // emergency method for flaky contracts function emergencyCancelAuction(uint256 id, bool noBundle) public onlyOwner { require(isAuction(id), 'not auction'); require(isStatusOpen(id), 'not open'); Inventory storage inv = inventories[id]; if (!noBundle) { _transferBundle(id, address(this), inv.seller, false); } _transfer(inv.currency, inv.buyer, inv.netPrice); inv.status = STATUS_CANCELLED; emit EvInventoryUpdate(id, inv); } function swap(Swap memory req, bytes memory signature) public nonReentrant whenNotPaused { require(req.deadline > block.timestamp, 'deadline reached'); require( isSignatureValid(signature, keccak256(abi.encode(req)), req.creator), 'signature error' ); for (uint256 i = 0; i < req.wants.length; i++) { req.wants[i].token.safeTransferFrom(msg.sender, req.creator, req.wants[i].tokenId); } for (uint256 i = 0; i < req.has.length; i++) { req.has[i].token.safeTransferFrom(req.creator, msg.sender, req.has[i].tokenId); } emit EvSwapped(req, signature, msg.sender); } function send(address to, Pair721[] memory tokens) public nonReentrant whenNotPaused { for (uint256 i = 0; i < tokens.length; i++) { Pair721 memory p = tokens[i]; p.token.safeTransferFrom(msg.sender, to, p.tokenId); } } // internal function _assertSender(address sender) internal view { require(sender == msg.sender, 'wrong sender'); } function _validateOpCode(uint8 opCode) internal pure { require(opCode > OP_MIN && opCode < OP_MAX, 'invalid opcode'); } function _saveBundle(uint256 invId, TokenPair[] calldata bundle) internal { require(bundle.length > 0, 'empty bundle'); inventoryTokenCounts[invId] = bundle.length; for (uint256 i = 0; i < bundle.length; i++) { inventoryTokens[invId][i] = bundle[i]; } } // buyer create function _newBuy( uint256 id, address buyer, IERC20 currency, uint256 price, TokenPair[] calldata bundle, uint256 deadline ) internal { require(!hasInv(id), 'inventoryId already exists'); require(deadline > block.timestamp, 'deadline must be greater than now'); _saveBundle(id, bundle); if (_isNative(currency)) { require(price == msg.value, 'price == msg.value'); weth.deposit{value: price}(); // convert to erc20 (weth) } else { currency.safeTransferFrom(buyer, address(this), price); } inventories[id] = Inventory({ seller: address(0), buyer: buyer, currency: currency, price: price, netPrice: price, kind: KIND_BUY, status: STATUS_OPEN, deadline: deadline }); emit EvInventoryUpdate(id, inventories[id]); } // buyer cancel/expired function _cancelBuy(uint256 id) internal { Inventory storage inv = inventories[id]; require(inv.buyer == msg.sender || isExpired(id), 'caller is not buyer'); _cancelBuyAnyway(id); } // cancel without checking caller function _cancelBuyAnyway(uint256 id) internal { require(isBuy(id) && isStatusOpen(id), 'not open buy'); Inventory storage inv = inventories[id]; inv.status = STATUS_CANCELLED; _transfer(inv.currency, inv.buyer, inv.netPrice); emit EvInventoryUpdate(id, inventories[id]); } function _rejectBuy(uint256 id) internal { address caller = msg.sender; require(isBuy(id) && isStatusOpen(id), 'not open buy'); for (uint256 i = 0; i < inventoryTokenCounts[id]; i++) { TokenPair storage p = inventoryTokens[id][i]; if (p.kind == TOKEN_721) { IERC721 t = IERC721(p.token); require(t.ownerOf(p.tokenId) == caller, 'caller does not own token'); } else { revert('cannot reject non-721 token'); } } _cancelBuyAnyway(id); } // seller call function _acceptBuy( uint256 id, address seller, Settlement calldata settlement ) internal { require(isBuy(id), 'id does not exist'); Inventory storage inv = inventories[id]; require(isStatusOpen(id), 'not open'); require(isBundleApproved(id, seller), 'bundle not approved'); require(!isExpired(id), 'buy offer expired'); inv.status = STATUS_DONE; inv.seller = seller; _transferBundle(id, seller, inv.buyer, true); emit EvInventoryUpdate(id, inventories[id]); _completeTransaction(id, settlement); } function _newBuyDeal( uint256 id, address buyer, address seller, TokenPair[] calldata bundle, IERC20 currency, uint256 price, uint256 deadline, Settlement calldata settlement ) internal { require(!hasInv(id), 'inventory already exists'); require(deadline > block.timestamp, 'buy has already ended'); require(!_isNative(currency), 'cannot use native token'); _saveBundle(id, bundle); _transferBundle(id, seller, buyer, true); currency.safeTransferFrom(buyer, address(this), price); inventories[id] = Inventory({ seller: seller, buyer: buyer, currency: currency, price: price, netPrice: price, kind: KIND_BUY, status: STATUS_DONE, deadline: deadline }); emit EvInventoryUpdate(id, inventories[id]); _completeTransaction(id, settlement); } // new sell deal / new auction direct buy function _newSellDeal( uint256 id, address seller, TokenPair[] calldata bundle, IERC20 currency, uint256 price, uint256 deadline, address buyer, Settlement calldata settlement ) internal { require(!hasInv(id), 'duplicate id'); require(deadline > block.timestamp, 'sell has already ended'); _saveBundle(id, bundle); _transferBundle(id, seller, buyer, true); if (_isNative(currency)) { require(price == msg.value, 'price == msg.value'); weth.deposit{value: price}(); // convert to erc20 (weth) } else { currency.safeTransferFrom(buyer, address(this), price); } inventories[id] = Inventory({ seller: seller, buyer: buyer, currency: currency, price: price, netPrice: price, kind: KIND_SELL, status: STATUS_DONE, deadline: deadline }); emit EvInventoryUpdate(id, inventories[id]); _completeTransaction(id, settlement); } function _bid( uint256 id, address seller, TokenPair[] calldata bundle, IERC20 currency, uint256 startPrice, uint256 deadline, address buyer, uint256 price, uint256 incentiveRate ) internal _allowTransfer { require(incentiveRate < RATE_BASE, 'incentiveRate too large'); if (_isNative(currency)) { require(price == msg.value, 'price == msg.value'); weth.deposit{value: price}(); // convert to erc20 (weth) } else { currency.safeTransferFrom(buyer, address(this), price); } if (isAuction(id)) { Inventory storage auc = inventories[id]; require(auc.seller == seller, 'seller does not match'); // TODO check more require(auc.status == STATUS_OPEN, 'auction not open'); require(auc.deadline > block.timestamp, 'auction ended'); require( price >= auc.price + ((auc.price * minAuctionIncrement) / RATE_BASE), 'bid price too low' ); uint256 incentive = (price * incentiveRate) / RATE_BASE; _transfer(currency, auc.buyer, auc.netPrice + incentive); emit EvAuctionRefund(id, auc.buyer, auc.netPrice + incentive); auc.buyer = buyer; auc.price = price; auc.netPrice = price - incentive; if (block.timestamp + minAuctionDuration >= auc.deadline) { auc.deadline += minAuctionDuration; } } else { require(!hasInv(id), 'inventory is not auction'); require(price >= startPrice, 'bid lower than start price'); require(deadline > block.timestamp, 'auction ended'); uint256 deadline0 = deadline; if (block.timestamp + minAuctionDuration >= deadline) { deadline0 += minAuctionDuration; } inventories[id] = Inventory({ seller: seller, buyer: buyer, currency: currency, price: price, netPrice: price, deadline: deadline0, status: STATUS_OPEN, kind: KIND_AUCTION }); _saveBundle(id, bundle); _transferBundle(id, seller, address(this), false); } emit EvInventoryUpdate(id, inventories[id]); } function _completeAuction(uint256 id, Settlement calldata settlement) internal { require(inventories[id].deadline < block.timestamp, 'auction still going'); _acceptAuction(id, settlement); } function _acceptAuction(uint256 id, Settlement calldata settlement) internal { require(isAuction(id), 'auction does not exist'); require(isStatusOpen(id), 'auction not open'); Inventory storage auc = inventories[id]; auc.status = STATUS_DONE; emit EvInventoryUpdate(id, inventories[id]); _transferBundle(id, address(this), auc.buyer, true); _completeTransaction(id, settlement); } function _completeTransaction(uint256 id, Settlement calldata settlement) internal { Inventory storage inv = inventories[id]; require(hasInv(id) && inv.status == STATUS_DONE, 'no inventory or state error'); // sanity _markCoupon(id, settlement.coupons); uint256 price = inv.price; uint256 fee = (price * settlement.feeRate) / RATE_BASE; uint256 royalty = (price * settlement.royaltyRate) / RATE_BASE; uint256 buyerAmount = (price * settlement.buyerCashbackRate) / RATE_BASE; uint256 sellerAmount = inv.netPrice - fee - royalty - buyerAmount; _transfer(inv.currency, inv.seller, sellerAmount); _transfer(inv.currency, inv.buyer, buyerAmount); _transfer(inv.currency, settlement.feeAddress, fee); _transfer(inv.currency, settlement.royaltyAddress, royalty); } function _markCoupon(uint256 invId, uint256[] calldata coupons) internal { for (uint256 i = 0; i < coupons.length; i++) { uint256 id = coupons[i]; require(!couponSpent[id], 'coupon already spent'); couponSpent[id] = true; emit EvCouponSpent(invId, id); } } function _isNative(IERC20 currency) internal pure returns (bool) { return address(currency) == address(0); } function _transfer( IERC20 currency, address to, uint256 amount ) internal { if (amount == 0) { return; } require(to != address(0), 'cannot transfer to address(0)'); if (_isNative(currency)) { weth.withdraw(amount); payable(to).transfer(amount); } else { currency.safeTransfer(to, amount); } } function _transferBundle( uint256 invId, address from, address to, bool doMint ) internal { uint256 tokenCount = inventoryTokenCounts[invId]; for (uint256 i = 0; i < tokenCount; i++) { TokenPair storage p = inventoryTokens[invId][i]; if (p.kind == TOKEN_MINT) { if (doMint) { // sanity check require( to != address(0) && to != address(this), 'mint target cannot be zero or market' ); IMintable(p.token).mint(to, p.mintData); } } else if (p.kind == TOKEN_721) { IERC721(p.token).safeTransferFrom(from, to, p.tokenId); } else if (p.kind == TOKEN_1155) { IERC1155(p.token).safeTransferFrom(from, to, p.tokenId, p.amount, ''); } else { revert('unsupported token'); } } } // public helpers // also checks the right owner function isBundleApproved(uint256 invId, address owner) public view returns (bool) { require(hasInv(invId), 'no inventory'); for (uint256 i = 0; i < inventoryTokenCounts[invId]; i++) { TokenPair storage p = inventoryTokens[invId][i]; if (p.kind == TOKEN_MINT) { // pass } else if (p.kind == TOKEN_721) { IERC721 t = IERC721(p.token); if ( t.ownerOf(p.tokenId) == owner && (t.getApproved(p.tokenId) == address(this) || t.isApprovedForAll(owner, address(this))) ) { // pass } else { return false; } } else if (p.kind == TOKEN_1155) { IERC1155 t = IERC1155(p.token); if ( t.balanceOf(owner, p.tokenId) >= p.amount && t.isApprovedForAll(owner, address(this)) ) { // pass } else { return false; } } else { revert('unsupported token'); } } return true; } function isAuctionOpen(uint256 id) public view returns (bool) { return isAuction(id) && inventories[id].status == STATUS_OPEN && inventories[id].deadline > block.timestamp; } function isBuyOpen(uint256 id) public view returns (bool) { return isBuy(id) && inventories[id].status == STATUS_OPEN && inventories[id].deadline > block.timestamp; } function isAuction(uint256 id) public view returns (bool) { return inventories[id].kind == KIND_AUCTION; } function isBuy(uint256 id) public view returns (bool) { return inventories[id].kind == KIND_BUY; } function isSell(uint256 id) public view returns (bool) { return inventories[id].kind == KIND_SELL; } function hasInv(uint256 id) public view returns (bool) { return inventories[id].kind != 0; } function isStatusOpen(uint256 id) public view returns (bool) { return inventories[id].status == STATUS_OPEN; } function isExpired(uint256 id) public view returns (bool) { return block.timestamp >= inventories[id].deadline; } function isSignatureValid( bytes memory signature, bytes32 hash, address signer ) public pure returns (bool) { // verify hash signed via `personal_sign` return ECDSA.recover(ECDSA.toEthSignedMessageHash(hash), signature) == signer; } function hasSignedIntention(uint8 op) public pure returns (bool) { return op != OP_BUY && op != OP_CANCEL_BUY && op != OP_ACCEPT_BUY && op != OP_REJECT_BUY; } }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.0; pragma abicoder v2; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.0; pragma abicoder v2; interface IMintable { function mint(address to, bytes memory data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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 pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IWETH","name":"weth_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"EvAuctionRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"couponId","type":"uint256"}],"name":"EvCouponSpent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"netPrice","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"uint8","name":"status","type":"uint8"}],"indexed":false,"internalType":"struct MarketNG.Inventory","name":"inventory","type":"tuple"}],"name":"EvInventoryUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"isRemoval","type":"bool"}],"name":"EvMarketSignerUpdate","type":"event"},{"anonymous":false,"inputs":[],"name":"EvSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"has","type":"tuple[]"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"wants","type":"tuple[]"}],"indexed":false,"internalType":"struct MarketNG.Swap","name":"req","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"},{"indexed":false,"internalType":"address","name":"swapper","type":"address"}],"name":"EvSwapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"KIND_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KIND_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KIND_SELL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_ACCEPT_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_ACCEPT_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_BID","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_CANCEL_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_SELL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_MAX","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_MIN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_REJECT_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELLED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_DONE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_OPEN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_1155","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_721","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_MINT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"cancelBuys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"couponSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bool","name":"noBundle","type":"bool"}],"name":"emergencyCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"hasInv","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"op","type":"uint8"}],"name":"hasSignedIntention","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"inCaseMoneyGetsStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventories","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"netPrice","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"uint8","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventoryTokenCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventoryTokens","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isAuctionOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"invId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"isBundleApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isBuy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isBuyOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isSell","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"}],"name":"isSignatureValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isStatusOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketSigners","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuctionDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuctionIncrement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"internalType":"struct MarketNG.TokenPair[]","name":"bundle","type":"tuple[]"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint8","name":"kind","type":"uint8"}],"internalType":"struct MarketNG.Intention","name":"intent","type":"tuple"},{"components":[{"internalType":"bytes32","name":"intentionHash","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"txDeadline","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"opcode","type":"uint8"},{"internalType":"address","name":"caller","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"incentiveRate","type":"uint256"},{"components":[{"internalType":"uint256[]","name":"coupons","type":"uint256[]"},{"internalType":"uint256","name":"feeRate","type":"uint256"},{"internalType":"uint256","name":"royaltyRate","type":"uint256"},{"internalType":"uint256","name":"buyerCashbackRate","type":"uint256"},{"internalType":"address","name":"feeAddress","type":"address"},{"internalType":"address","name":"royaltyAddress","type":"address"}],"internalType":"struct MarketNG.Settlement","name":"settlement","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"internalType":"struct MarketNG.TokenPair[]","name":"bundle","type":"tuple[]"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct MarketNG.Detail","name":"detail","type":"tuple"},{"internalType":"bytes","name":"sigIntent","type":"bytes"},{"internalType":"bytes","name":"sigDetail","type":"bytes"}],"name":"run","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"tokens","type":"tuple[]"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"has","type":"tuple[]"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"wants","type":"tuple[]"}],"internalType":"struct MarketNG.Swap","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAuctionIncrement_","type":"uint256"},{"internalType":"uint256","name":"minAuctionDuration_","type":"uint256"}],"name":"updateSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"remove","type":"bool"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052606462000016620f424060056200013f565b6200002291906200011c565b6007556102586008556009805460ff191690553480156200004257600080fd5b5060405162005ad338038062005ad38339810160408190526200006591620000ea565b6001600055620000753362000098565b6001805460ff60a01b1916905560601b6001600160601b0319166080526200016d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208284031215620000fd57600080fd5b81516001600160a01b03811681146200011557600080fd5b9392505050565b6000826200013a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200016857634e487b7160e01b600052601160045260246000fd5b500290565b60805160601c61592b620001a860003960008181610509015281816123100152818161259101528181612b4c015261321d015261592b6000f3fe6080604052600436106103055760003560e01c80638704f2a311610191578063c477be20116100e2578063ee98ce9111610090578063ee98ce911461091f578063f09541601461093f578063f0d250ba14610559578063f23a6e6114610954578063f2fde38b14610974578063f460590b14610994578063f4a33e0d146109b4578063f5116bc9146109d457600080fd5b8063c477be201461046d578063cd78ba01146107e8578063d9548e53146108ac578063e1784a0214610559578063e7d4a999146108df578063e91274f3146108ff578063eb374261146105f057600080fd5b8063afd76a0b1161013f578063afd76a0b14610724578063b4533aad14610744578063b50a2a5514610559578063ba84775914610775578063bc197c8114610788578063bdf52b45146107a8578063c1c30e80146107c857600080fd5b80638704f2a3146106845780638da5cb5b146106ba5780638f18439e1461046d57806390c2b10e146104585780639e57feb5146106cf578063a80d33fb146106e4578063ac5e2cb11461070457600080fd5b806354134876116102565780637234d8f2116102045780637234d8f2146105f0578063740db2801461046d578063781dc70a146106055780637ae1ace01461062557806380bc688f1461063a57806381787a851461065a5780638456cb591461066f578063853ca41a1461045857600080fd5b806354134876146105435780635a4e5a15146105595780635c975abb1461056e5780635fd34298146105835780636acc65db146105b0578063708d4d35146105c5578063715018a6146105db57600080fd5b80631bb03ca9116102b35780631bb03ca91461044357806324f8515b1461045857806325593ac21461046d5780632bcd27df146104825780633ed9ffb7146104b25780633f4ba83a146104e25780633fc8cef3146104f757600080fd5b8063015af8ee1461031157806301ffc9a7146103335780630873c6ec146103685780630ad486281461038d57806311f0794c146103ad578063150b7a02146103d45780631b01e72c1461040d57600080fd5b3661030c57005b600080fd5b34801561031d57600080fd5b5061033161032c366004614c1c565b6109f4565b005b34801561033f57600080fd5b5061035361034e36600461499c565b610a63565b60405190151581526020015b60405180910390f35b34801561037457600080fd5b5061037f620f424081565b60405190815260200161035f565b34801561039957600080fd5b506103536103a8366004614ba0565b610a9a565b3480156103b957600080fd5b506103c2600481565b60405160ff909116815260200161035f565b3480156103e057600080fd5b506103f46103ef366004614788565b610af5565b6040516001600160e01b0319909116815260200161035f565b34801561041957600080fd5b50610353610428366004614ba0565b60009081526002602052604090206006015460ff1660011490565b34801561044f57600080fd5b506103c2600681565b34801561046457600080fd5b506103c2600081565b34801561047957600080fd5b506103c2600181565b34801561048e57600080fd5b5061035361049d366004614690565b60066020526000908152604090205460ff1681565b3480156104be57600080fd5b506103536104cd366004614ba0565b60036020526000908152604090205460ff1681565b3480156104ee57600080fd5b50610331610b2c565b34801561050357600080fd5b5061052b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161035f565b34801561054f57600080fd5b5061037f60085481565b34801561056557600080fd5b506103c2600281565b34801561057a57600080fd5b50610353610b65565b34801561058f57600080fd5b5061037f61059e366004614ba0565b60056020526000908152604090205481565b3480156105bc57600080fd5b506103c2600881565b3480156105d157600080fd5b5061037f60075481565b3480156105e757600080fd5b50610331610b75565b3480156105fc57600080fd5b506103c2600381565b34801561061157600080fd5b506103536106203660046149c6565b610bae565b34801561063157600080fd5b506103c2600981565b34801561064657600080fd5b506103316106553660046148fd565b610c2e565b34801561066657600080fd5b506103c2600781565b34801561067b57600080fd5b50610331610c6d565b34801561069057600080fd5b5061035361069f366004614ba0565b60009081526002602052604090206006015460ff1660031490565b3480156106c657600080fd5b5061052b610ca4565b3480156106db57600080fd5b506103c2600581565b3480156106f057600080fd5b506103536106ff366004614ba0565b610cb3565b34801561071057600080fd5b5061035361071f366004614c3e565b610ccf565b34801561073057600080fd5b5061033161073f366004614875565b610d0e565b34801561075057600080fd5b5061076461075f366004614c1c565b610e0d565b60405161035f95949392919061506d565b610331610783366004614a20565b610ede565b34801561079457600080fd5b506103f46107a33660046146ca565b611724565b3480156107b457600080fd5b506103536107c3366004614ba0565b61175e565b3480156107d457600080fd5b506103316107e336600461493e565b611769565b3480156107f457600080fd5b5061085b610803366004614ba0565b600260208190526000918252604090912080546001820154928201546003830154600484015460058501546006909501546001600160a01b039485169685169593909416939192909160ff8082169161010090041688565b604080516001600160a01b03998a168152978916602089015295909716948601949094526060850192909252608084015260a083015260ff90811660c083015290911660e08201526101000161035f565b3480156108b857600080fd5b506103536108c7366004614ba0565b60009081526002602052604090206005015442101590565b3480156108eb57600080fd5b506103316108fa366004614bf7565b6117f4565b34801561090b57600080fd5b5061033161091a366004614ace565b611932565b34801561092b57600080fd5b5061035361093a366004614ba0565b611c14565b34801561094b57600080fd5b506103c2600a81565b34801561096057600080fd5b506103f461096f3660046147fa565b611c32565b34801561098057600080fd5b5061033161098f366004614690565b611c6a565b3480156109a057600080fd5b506103316109af3660046148c4565b611d0a565b3480156109c057600080fd5b506103536109cf366004614bd2565b611dcf565b3480156109e057600080fd5b506103536109ef366004614ba0565b612164565b336109fd610ca4565b6001600160a01b031614610a2c5760405162461bcd60e51b8152600401610a23906151dc565b60405180910390fd5b600881905560078290556040517f6c06ac894de6b71964f14d152b6674a4465a9b5d3f9cf9f216b8e7ea6146751990600090a15050565b60006001600160e01b03198216630a85bd0160e11b1480610a9457506001600160e01b03198216630271189760e51b145b92915050565b60008181526002602052604081206006015460ff166003145b8015610ad65750600082815260026020526040902060060154610100900460ff16155b8015610a94575050600090815260026020526040902060050154421090565b60095460009060ff16610b1a5760405162461bcd60e51b8152600401610a23906151a5565b50630a85bd0160e11b95945050505050565b33610b35610ca4565b6001600160a01b031614610b5b5760405162461bcd60e51b8152600401610a23906151dc565b610b6361217e565b565b600154600160a01b900460ff1690565b33610b7e610ca4565b6001600160a01b031614610ba45760405162461bcd60e51b8152600401610a23906151dc565b610b636000612216565b6000816001600160a01b0316610c1a610c14856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86612268565b6001600160a01b03161490505b9392505050565b33610c37610ca4565b6001600160a01b031614610c5d5760405162461bcd60e51b8152600401610a23906151dc565b610c6882848361228c565b505050565b33610c76610ca4565b6001600160a01b031614610c9c5760405162461bcd60e51b8152600401610a23906151dc565b610b636123c4565b6001546001600160a01b031690565b60009081526002602081905260409091206006015460ff161490565b600060ff8216600314801590610ce9575060ff8216600514155b8015610cf9575060ff8216600414155b8015610a94575060ff82166006141592915050565b60026000541415610d315760405162461bcd60e51b8152600401610a2390615211565b6002600055610d3e610b65565b15610d5b5760405162461bcd60e51b8152600401610a239061517b565b60005b8151811015610e03576000828281518110610d7b57610d7b6157c9565b6020026020010151905080600001516001600160a01b03166342842e0e338684602001516040518463ffffffff1660e01b8152600401610dbd93929190614f9b565b600060405180830381600087803b158015610dd757600080fd5b505af1158015610deb573d6000803e3d6000fd5b50505050508080610dfb90615782565b915050610d5e565b5050600160005550565b60046020818152600093845260408085209091529183529120805460018201546002830154600384015494840180546001600160a01b03909416959294919360ff90931692610e5b9061574d565b80601f0160208091040260200160405190810160405280929190818152602001828054610e879061574d565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b5050505050905085565b60026000541415610f015760405162461bcd60e51b8152600401610a2390615211565b6002600055610f0e610b65565b15610f2b5760405162461bcd60e51b8152600401610a239061517b565b42856040013511610f7e5760405162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e20646561646c696e652072656163686564000000006044820152606401610a23565b60066000610f926040880160208901614690565b6001600160a01b0316815260208101919091526040016000205460ff16610ff35760405162461bcd60e51b81526020600482015260156024820152743ab735b737bbb71036b0b935b2ba1039b4b3b732b960591b6044820152606401610a23565b61100b61100660c0870160a08801614c3e565b612424565b61107e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516110559250899150602001615248565b604051602081830303815290604052805190602001208760200160208101906106209190614690565b6110c25760405162461bcd60e51b815260206004820152601560248201527437b33332b91039b4b3b730ba3ab9329032b93937b960591b6044820152606401610a23565b6110d561071f60c0870160a08801614c3e565b156111f1576000866040516020016110ed9190615356565b60408051601f19818403018152919052805160208201209091508635146111565760405162461bcd60e51b815260206004820152601d60248201527f696e74656e74696f6e206861736820646f6573206e6f74206d617463680000006044820152606401610a23565b6111a785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250508451602080870191909120925061062091508b018b614690565b6111ef5760405162461bcd60e51b815260206004820152601960248201527834b73a32b73a34b7b71039b4b3b730ba3ab9329032b93937b960391b6044820152606401610a23565b505b600161120360c0870160a08801614c3e565b60ff1614156112ea5761122461121f60e0870160c08801614690565b612476565b600161123660e0880160c08901614c3e565b60ff16146112865760405162461bcd60e51b815260206004820152601f60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f53454c4c006044820152606401610a23565b6112e5608086013561129b6020890189614690565b6112a860208a018a615455565b6112b860608c0160408d01614690565b60608c013560808d01356112d260e08e0160c08f01614690565b6112e06101408f018f61549e565b6124bd565b611717565b60026112fc60c0870160a08801614c3e565b60ff1614156113d95761131861121f60e0870160c08801614690565b600261132a60e0880160c08901614c3e565b60ff161461137a5760405162461bcd60e51b815260206004820152601e60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f42555900006044820152606401610a23565b6112e5608086013561138f6020890189614690565b61139f60e0890160c08a01614690565b6113ac60208b018b615455565b6113bc60608d0160408e01614690565b60608d013560808e01356113d46101408f018f61549e565b6127c4565b60036113eb60c0870160a08801614c3e565b60ff16141561144f5761140761121f60e0870160c08801614690565b6112e5608086013561141f60e0880160c08901614690565b611430610100890160e08a01614690565b6101008901356114446101608b018b615455565b8b6101800135612a63565b600461146160c0870160a08801614c3e565b60ff1614156114a85761147d61121f60e0870160c08801614690565b6112e5608086013561149560e0880160c08901614690565b6114a361014089018961549e565b612d74565b60056114ba60c0870160a08801614c3e565b60ff1614156114d0576112e58560800135612f19565b60066114e260c0870160a08801614c3e565b60ff1614156114f8576112e58560800135612fd1565b600761150a60c0870160a08801614c3e565b60ff1614156115f05761152661121f60e0870160c08801614690565b600361153860e0880160c08901614c3e565b60ff16146115935760405162461bcd60e51b815260206004820152602260248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f415543544960448201526127a760f11b6064820152608401610a23565b6112e560808601356115a86020890189614690565b6115b560208a018a615455565b6115c560608c0160408d01614690565b60608c013560808d01356115df60e08e0160c08f01614690565b8d61010001358e6101200135613195565b600861160260c0870160a08801614c3e565b60ff161415611626576112e5608086013561162161014088018861549e565b6137a5565b600961163860c0870160a08801614c3e565b60ff1614156116e25761165461121f60e0870160c08801614690565b6116616020870187614690565b6001600160a01b031661167a60e0870160c08801614690565b6001600160a01b0316146116c75760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e481cd95b1b195c8818d85b8818d85b1b60621b6044820152606401610a23565b6112e560808601356116dd61014088018861549e565b613801565b60405162461bcd60e51b815260206004820152600a602482015269696d706f737369626c6560b01b6044820152606401610a23565b5050600160005550505050565b60095460009060ff166117495760405162461bcd60e51b8152600401610a23906151a5565b5063bc197c8160e01b98975050505050505050565b6000610ab382610cb3565b6002600054141561178c5760405162461bcd60e51b8152600401610a2390615211565b6002600055611799610b65565b156117b65760405162461bcd60e51b8152600401610a239061517b565b60005b81811015610e03576117e28383838181106117d6576117d66157c9565b905060200201356138fb565b806117ec81615782565b9150506117b9565b336117fd610ca4565b6001600160a01b0316146118235760405162461bcd60e51b8152600401610a23906151dc565b6118428260009081526002602052604090206006015460ff1660031490565b61187c5760405162461bcd60e51b815260206004820152600b60248201526a3737ba1030bab1ba34b7b760a91b6044820152606401610a23565b61188582611c14565b6118a15760405162461bcd60e51b8152600401610a23906150e2565b6000828152600260205260409020816118ce5780546118ce90849030906001600160a01b03166000613980565b6002810154600182015460048301546118f4926001600160a01b0390811692169061228c565b60068101805461ff00191661020017905560405183906000805160206158d6833981519152906119259084906153f5565b60405180910390a2505050565b600260005414156119555760405162461bcd60e51b8152600401610a2390615211565b6002600055611962610b65565b1561197f5760405162461bcd60e51b8152600401610a239061517b565b428260400151116119c55760405162461bcd60e51b815260206004820152601060248201526f191958591b1a5b99481c995858da195960821b6044820152606401610a23565b6119fa81836040516020016119da9190615404565b604051602081830303815290604052805190602001208460200151610bae565b611a385760405162461bcd60e51b815260206004820152600f60248201526e39b4b3b730ba3ab9329032b93937b960891b6044820152606401610a23565b60005b826080015151811015611b035782608001518181518110611a5e57611a5e6157c9565b6020026020010151600001516001600160a01b03166342842e0e33856020015186608001518581518110611a9457611a946157c9565b6020026020010151602001516040518463ffffffff1660e01b8152600401611abe93929190614f9b565b600060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b505050508080611afb90615782565b915050611a3b565b5060005b826060015151811015611bcf5782606001518181518110611b2a57611b2a6157c9565b6020026020010151600001516001600160a01b03166342842e0e84602001513386606001518581518110611b6057611b606157c9565b6020026020010151602001516040518463ffffffff1660e01b8152600401611b8a93929190614f9b565b600060405180830381600087803b158015611ba457600080fd5b505af1158015611bb8573d6000803e3d6000fd5b505050508080611bc790615782565b915050611b07565b507f92060d15ec9a14885865b744d2efb1fff3cab53411058a530f51d480288a864c828233604051611c0393929190615417565b60405180910390a150506001600055565b600090815260026020526040902060060154610100900460ff161590565b60095460009060ff16611c575760405162461bcd60e51b8152600401610a23906151a5565b5063f23a6e6160e01b9695505050505050565b33611c73610ca4565b6001600160a01b031614611c995760405162461bcd60e51b8152600401610a23906151dc565b6001600160a01b038116611cfe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a23565b611d0781612216565b50565b33611d13610ca4565b6001600160a01b031614611d395760405162461bcd60e51b8152600401610a23906151dc565b8015611d64576001600160a01b0382166000908152600660205260409020805460ff19169055611d88565b6001600160a01b0382166000908152600660205260409020805460ff191660011790555b604080516001600160a01b038416815282151560208201527f90d56af4745c314d9b45054b55dc973378c558c1ad1554bccc70d39aa63a2cc5910160405180910390a15050565b6000611dda83612164565b611e155760405162461bcd60e51b815260206004820152600c60248201526b6e6f20696e76656e746f727960a01b6044820152606401610a23565b60005b60008481526005602052604090205481101561215a5760008481526004602090815260408083208484529091529020600381015460ff16611e5857612147565b600381015460ff166001141561203557805460018201546040516331a9108f60e11b81526001600160a01b03928316928716918391636352211e91611ea39160040190815260200190565b60206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef391906146ad565b6001600160a01b03161480156120195750600182015460405163020604bf60e21b815230916001600160a01b0384169163081812fc91611f399160040190815260200190565b60206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8991906146ad565b6001600160a01b03161480612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c5906044015b60206040518083038186803b158015611fe157600080fd5b505afa158015611ff5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612019919061497f565b156120235761202f565b60009350505050610a94565b50612147565b600381015460ff166002141561210b57805460028201546001830154604051627eeac760e11b81526001600160a01b0390931692839162fdd58e9161207e918a91600401615054565b60206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce9190614bb9565b10158015612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c590604401611fc9565b60405162461bcd60e51b81526020600482015260116024820152703ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610a23565b508061215281615782565b915050611e18565b5060019392505050565b60009081526002602052604090206006015460ff16151590565b612186610b65565b6121c95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a23565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008060006122778585613b79565b9150915061228481613be9565b509392505050565b8061229657505050565b6001600160a01b0382166122ec5760405162461bcd60e51b815260206004820152601d60248201527f63616e6e6f74207472616e7366657220746f20616464726573732830290000006044820152606401610a23565b6001600160a01b0383166123b057604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561235c57600080fd5b505af1158015612370573d6000803e3d6000fd5b50506040516001600160a01b038516925083156108fc02915083906000818181858888f193505050501580156123aa573d6000803e3d6000fd5b50505050565b610c686001600160a01b0384168383613d9f565b6123cc610b65565b156123e95760405162461bcd60e51b8152600401610a239061517b565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121f93390565b60ff8116158015906124395750600a60ff8216105b611d075760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f70636f646560901b6044820152606401610a23565b6001600160a01b0381163314611d075760405162461bcd60e51b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606401610a23565b6124c689612164565b156125025760405162461bcd60e51b815260206004820152600c60248201526b191d5c1b1a58d85d19481a5960a21b6044820152606401610a23565b42831161254a5760405162461bcd60e51b81526020600482015260166024820152751cd95b1b081a185cc8185b1c9958591e48195b99195960521b6044820152606401610a23565b612555898888613df5565b6125628989846001613980565b6001600160a01b0385166126085734841461258f5760405162461bcd60e51b8152600401610a23906150b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156125ea57600080fd5b505af11580156125fe573d6000803e3d6000fd5b505050505061261d565b61261d6001600160a01b038616833087613ea7565b604051806101000160405280896001600160a01b03168152602001836001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001848152602001600160ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158d6833981519152600260008c81526020019081526020016000206040516127a791906153f5565b60405180910390a26127b98982613ec8565b505050505050505050565b6127cd89612164565b156128155760405162461bcd60e51b8152602060048201526018602482015277696e76656e746f727920616c72656164792065786973747360401b6044820152606401610a23565b42821161285c5760405162461bcd60e51b8152602060048201526015602482015274189d5e481a185cc8185b1c9958591e48195b991959605a1b6044820152606401610a23565b6001600160a01b0384166128ac5760405162461bcd60e51b815260206004820152601760248201527631b0b73737ba103ab9b2903730ba34bb32903a37b5b2b760491b6044820152606401610a23565b6128b7898787613df5565b6128c489888a6001613980565b6128d96001600160a01b038516893086613ea7565b604051806101000160405280886001600160a01b03168152602001896001600160a01b03168152602001856001600160a01b03168152602001848152602001848152602001838152602001600260ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158d6833981519152600260008c81526020019081526020016000206040516127a791906153f5565b612a6c87612164565b15612ab95760405162461bcd60e51b815260206004820152601a60248201527f696e76656e746f7279496420616c7265616479206578697374730000000000006044820152606401610a23565b428111612b125760405162461bcd60e51b815260206004820152602160248201527f646561646c696e65206d7573742062652067726561746572207468616e206e6f6044820152607760f81b6064820152608401610a23565b612b1d878484613df5565b6001600160a01b038516612bc357348414612b4a5760405162461bcd60e51b8152600401610a23906150b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b5050505050612bd8565b612bd86001600160a01b038616873087613ea7565b60405180610100016040528060006001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001828152602001600260ff168152602001600060ff168152506002600089815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050866000805160206158d6833981519152600260008a8152602001908152602001600020604051612d6391906153f5565b60405180910390a250505050505050565b612d7d83610cb3565b612dbd5760405162461bcd60e51b81526020600482015260116024820152701a5908191bd95cc81b9bdd08195e1a5cdd607a1b6044820152606401610a23565b6000838152600260205260409020612dd484611c14565b612df05760405162461bcd60e51b8152600401610a23906150e2565b612dfa8484611dcf565b612e3c5760405162461bcd60e51b8152602060048201526013602482015272189d5b991b19481b9bdd08185c1c1c9bdd9959606a1b6044820152606401610a23565b6000848152600260205260409020600501544210612e905760405162461bcd60e51b8152602060048201526011602482015270189d5e481bd999995c88195e1c1a5c9959607a1b6044820152606401610a23565b60068101805461ff00191661010017905580546001600160a01b038085166001600160a01b0319909216919091178255600182810154612ed7928792879290911690613980565b836000805160206158d683398151915260026000878152602001908152602001600020604051612f0791906153f5565b60405180910390a26123aa8483613ec8565b612f2281610cb3565b8015612f325750612f3281611c14565b612f4e5760405162461bcd60e51b8152600401610a2390615155565b600081815260026020819052604090912060068101805461ff0019166102001790559081015460018201546004830154612f95926001600160a01b0390811692169061228c565b816000805160206158d683398151915260026000858152602001908152602001600020604051612fc591906153f5565b60405180910390a25050565b33612fdb82610cb3565b8015612feb5750612feb82611c14565b6130075760405162461bcd60e51b8152600401610a2390615155565b60005b6000838152600560205260409020548110156131875760008381526004602090815260408083208484529091529020600381015460ff166001141561312c57805460018201546040516331a9108f60e11b81526001600160a01b03928316928616918391636352211e916130849160040190815260200190565b60206040518083038186803b15801561309c57600080fd5b505afa1580156130b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d491906146ad565b6001600160a01b0316146131265760405162461bcd60e51b815260206004820152601960248201527831b0b63632b9103237b2b9903737ba1037bbb7103a37b5b2b760391b6044820152606401610a23565b50613174565b60405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f742072656a656374206e6f6e2d37323120746f6b656e00000000006044820152606401610a23565b508061317f81615782565b91505061300a565b5061319182612f19565b5050565b6009805460ff19166001179055620f424081106131ee5760405162461bcd60e51b8152602060048201526017602482015276696e63656e746976655261746520746f6f206c6172676560481b6044820152606401610a23565b6001600160a01b0386166132945734821461321b5760405162461bcd60e51b8152600401610a23906150b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327657600080fd5b505af115801561328a573d6000803e3d6000fd5b50505050506132a9565b6132a96001600160a01b038716843085613ea7565b6132c88a60009081526002602052604090206006015460ff1660031490565b156134fd5760008a815260026020526040902080546001600160a01b038b811691161461332f5760405162461bcd60e51b81526020600482015260156024820152740e6cad8d8cae440c8decae640dcdee840dac2e8c6d605b1b6044820152606401610a23565b6006810154610100900460ff16156133595760405162461bcd60e51b8152600401610a2390615104565b4281600501541161337c5760405162461bcd60e51b8152600401610a239061512e565b620f4240600754826003015461339291906155e5565b61339c91906155c3565b81600301546133ab91906155ab565b8310156133ee5760405162461bcd60e51b815260206004820152601160248201527062696420707269636520746f6f206c6f7760781b6044820152606401610a23565b6000620f42406133fe84866155e5565b61340891906155c3565b60018301546004840154919250613435918a916001600160a01b0316906134309085906155ab565b61228c565b600182015460048301548d917fa48bcf3362c21033397c03b92fb367d1962ba13b5bde0dfe491f9d88abb59e3f916001600160a01b039091169061347a9085906155ab565b604051613488929190615054565b60405180910390a26001820180546001600160a01b0319166001600160a01b038716179055600382018490556134be8185615604565b600483015560058201546008546134d590426155ab565b106134f6576008548260050160008282546134f091906155ab565b90915550505b5050613757565b6135068a612164565b1561354e5760405162461bcd60e51b815260206004820152601860248201527734b73b32b73a37b93c9034b9903737ba1030bab1ba34b7b760411b6044820152606401610a23565b8482101561359e5760405162461bcd60e51b815260206004820152601a60248201527f626964206c6f776572207468616e2073746172742070726963650000000000006044820152606401610a23565b4284116135bd5760405162461bcd60e51b8152600401610a239061512e565b600854849081906135ce90426155ab565b106135e3576008546135e090826155ab565b90505b6040518061010001604052808b6001600160a01b03168152602001856001600160a01b03168152602001886001600160a01b03168152602001848152602001848152602001828152602001600360ff168152602001600060ff16815250600260008d815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff1602179055509050506137488b8a8a613df5565b6137558b8b306000613980565b505b896000805160206158d6833981519152600260008d815260200190815260200160002060405161378791906153f5565b60405180910390a250506009805460ff191690555050505050505050565b60008281526002602052604090206005015442116137fb5760405162461bcd60e51b815260206004820152601360248201527261756374696f6e207374696c6c20676f696e6760681b6044820152606401610a23565b61319182825b6138208260009081526002602052604090206006015460ff1660031490565b6138655760405162461bcd60e51b8152602060048201526016602482015275185d58dd1a5bdb88191bd95cc81b9bdd08195e1a5cdd60521b6044820152606401610a23565b61386e82611c14565b61388a5760405162461bcd60e51b8152600401610a2390615104565b6000828152600260205260409081902060068101805461ff001916610100179055905183906000805160206158d6833981519152906138ca9084906153f5565b60405180910390a26001808201546138f191859130916001600160a01b0390911690613980565b610c688383613ec8565b600081815260026020526040902060018101546001600160a01b031633148061393557506000828152600260205260409020600501544210155b6139775760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba10313abcb2b960691b6044820152606401610a23565b61319182612f19565b600084815260056020526040812054905b81811015613b715760008681526004602090815260408083208484529091529020600381015460ff16613aa8578315613aa3576001600160a01b038516158015906139e557506001600160a01b0385163014155b613a3d5760405162461bcd60e51b8152602060048201526024808201527f6d696e74207461726765742063616e6e6f74206265207a65726f206f72206d616044820152631c9ad95d60e21b6064820152608401610a23565b805460405163b510391f60e01b81526001600160a01b039091169063b510391f90613a7090889060048087019101614fbf565b600060405180830381600087803b158015613a8a57600080fd5b505af1158015613a9e573d6000803e3d6000fd5b505050505b613b5e565b600381015460ff1660011415613aee5780546001820154604051632142170760e11b81526001600160a01b03909216916342842e0e91613a70918a918a91600401614f9b565b600381015460ff166002141561210b57805460018201546002830154604051637921219560e11b81526001600160a01b038a8116600483015289811660248301526044820193909352606481019190915260a06084820152600060a482015291169063f242432a9060c401613a70565b5080613b6981615782565b915050613991565b505050505050565b600080825160411415613bb05760208301516040840151606085015160001a613ba48782858561407f565b94509450505050613be2565b825160401415613bda5760208301516040840151613bcf868383614162565b935093505050613be2565b506000905060025b9250929050565b6000816004811115613bfd57613bfd6157b3565b1415613c065750565b6001816004811115613c1a57613c1a6157b3565b1415613c635760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a23565b6002816004811115613c7757613c776157b3565b1415613cc55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a23565b6003816004811115613cd957613cd96157b3565b1415613d325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a23565b6004816004811115613d4657613d466157b3565b1415611d075760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a23565b610c688363a9059cbb60e01b8484604051602401613dbe929190615054565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614191565b80613e315760405162461bcd60e51b815260206004820152600c60248201526b656d7074792062756e646c6560a01b6044820152606401610a23565b60008381526005602052604081208290555b818110156123aa57828282818110613e5d57613e5d6157c9565b9050602002810190613e6f91906154b4565b60008581526004602090815260408083208584529091529020613e9282826157f5565b50819050613e9f81615782565b915050613e43565b6123aa846323b872dd60e01b858585604051602401613dbe93929190614f9b565b6000828152600260205260409020613edf83612164565b8015613ef757506006810154610100900460ff166001145b613f435760405162461bcd60e51b815260206004820152601b60248201527f6e6f20696e76656e746f7279206f72207374617465206572726f7200000000006044820152606401610a23565b613f5683613f518480615455565b614263565b60038101546000620f4240613f6f6020860135846155e5565b613f7991906155c3565b90506000620f4240613f8f6040870135856155e5565b613f9991906155c3565b90506000620f4240613faf6060880135866155e5565b613fb991906155c3565b905060008183858860040154613fcf9190615604565b613fd99190615604565b613fe39190615604565b60028701548754919250614004916001600160a01b0391821691168361228c565b60028601546001870154614025916001600160a01b0390811691168461228c565b600286015461404d906001600160a01b031661404760a08a0160808b01614690565b8661228c565b6002860154614075906001600160a01b031661406f60c08a0160a08b01614690565b8561228c565b5050505050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156140ac5750600090506003614159565b8460ff16601b141580156140c457508460ff16601c14155b156140d55750600090506004614159565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614129573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661415257600060019250925050614159565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016141838782888561407f565b935093505050935093915050565b60006141e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661433d9092919063ffffffff16565b805190915015610c685780806020019051810190614204919061497f565b610c685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a23565b60005b818110156123aa576000838383818110614282576142826157c9565b60209081029290920135600081815260039093526040909220549192505060ff16156142e75760405162461bcd60e51b815260206004820152601460248201527318dbdd5c1bdb88185b1c9958591e481cdc195b9d60621b6044820152606401610a23565b600081815260036020526040808220805460ff1916600117905551829187917f6aa71aa6b7aa6036ace4e4ceefbab7d89c4afb7fcfa1a3680499d7b37d32c82f9190a3508061433581615782565b915050614266565b606061434c8484600085614354565b949350505050565b6060824710156143b55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a23565b843b6144035760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a23565b600080866001600160a01b0316858760405161441f9190614f7f565b60006040518083038185875af1925050503d806000811461445c576040519150601f19603f3d011682016040523d82523d6000602084013e614461565b606091505b509150915061447182828661447c565b979650505050505050565b6060831561448b575081610c27565b82511561449b5782518084602001fd5b8160405162461bcd60e51b8152600401610a2391906150a3565b80356144c0816158a3565b919050565b600082601f8301126144d657600080fd5b813560206001600160401b038211156144f1576144f16157df565b6144ff818360051b01615514565b80838252828201915082860187848660061b890101111561451f57600080fd5b6000805b8681101561456a57604080848c03121561453b578283fd5b6145436154ca565b843561454e816158a3565b8152848801358882015286529486019490920191600101614523565b509198975050505050505050565b60008083601f84011261458a57600080fd5b5081356001600160401b038111156145a157600080fd5b6020830191508360208260051b8501011115613be257600080fd5b60008083601f8401126145ce57600080fd5b5081356001600160401b038111156145e557600080fd5b602083019150836020828501011115613be257600080fd5b600082601f83011261460e57600080fd5b81356001600160401b03811115614627576146276157df565b61463a601f8201601f1916602001615514565b81815284602083860101111561464f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006101a0828403121561467f57600080fd5b50919050565b80356144c0816158c6565b6000602082840312156146a257600080fd5b8135610c27816158a3565b6000602082840312156146bf57600080fd5b8151610c27816158a3565b60008060008060008060008060a0898b0312156146e657600080fd5b88356146f1816158a3565b97506020890135614701816158a3565b965060408901356001600160401b038082111561471d57600080fd5b6147298c838d01614578565b909850965060608b013591508082111561474257600080fd5b61474e8c838d01614578565b909650945060808b013591508082111561476757600080fd5b506147748b828c016145bc565b999c989b5096995094979396929594505050565b6000806000806000608086880312156147a057600080fd5b85356147ab816158a3565b945060208601356147bb816158a3565b93506040860135925060608601356001600160401b038111156147dd57600080fd5b6147e9888289016145bc565b969995985093965092949392505050565b60008060008060008060a0878903121561481357600080fd5b863561481e816158a3565b9550602087013561482e816158a3565b9450604087013593506060870135925060808701356001600160401b0381111561485757600080fd5b61486389828a016145bc565b979a9699509497509295939492505050565b6000806040838503121561488857600080fd5b8235614893816158a3565b915060208301356001600160401b038111156148ae57600080fd5b6148ba858286016144c5565b9150509250929050565b600080604083850312156148d757600080fd5b82356148e2816158a3565b915060208301356148f2816158b8565b809150509250929050565b60008060006060848603121561491257600080fd5b833561491d816158a3565b9250602084013561492d816158a3565b929592945050506040919091013590565b6000806020838503121561495157600080fd5b82356001600160401b0381111561496757600080fd5b61497385828601614578565b90969095509350505050565b60006020828403121561499157600080fd5b8151610c27816158b8565b6000602082840312156149ae57600080fd5b81356001600160e01b031981168114610c2757600080fd5b6000806000606084860312156149db57600080fd5b83356001600160401b038111156149f157600080fd5b6149fd868287016145fd565b935050602084013591506040840135614a15816158a3565b809150509250925092565b60008060008060008060808789031215614a3957600080fd5b86356001600160401b0380821115614a5057600080fd5b9088019060e0828b031215614a6457600080fd5b90965060208801359080821115614a7a57600080fd5b614a868a838b0161466c565b96506040890135915080821115614a9c57600080fd5b614aa88a838b016145bc565b90965094506060890135915080821115614ac157600080fd5b5061486389828a016145bc565b60008060408385031215614ae157600080fd5b82356001600160401b0380821115614af857600080fd5b9084019060a08287031215614b0c57600080fd5b614b146154f2565b823581526020830135614b26816158a3565b602082015260408381013590820152606083013582811115614b4757600080fd5b614b53888286016144c5565b606083015250608083013582811115614b6b57600080fd5b614b77888286016144c5565b60808301525093506020850135915080821115614b9357600080fd5b506148ba858286016145fd565b600060208284031215614bb257600080fd5b5035919050565b600060208284031215614bcb57600080fd5b5051919050565b60008060408385031215614be557600080fd5b8235915060208301356148f2816158a3565b60008060408385031215614c0a57600080fd5b8235915060208301356148f2816158b8565b60008060408385031215614c2f57600080fd5b50508035926020909101359150565b600060208284031215614c5057600080fd5b8135610c27816158c6565b6001600160a01b03169052565b600081518084526020808501945080840160005b83811015614cac57815180516001600160a01b031688528301518388015260409096019590820190600101614c7c565b509495945050505050565b81835260006020808501808196508560051b810191508460005b87811015614d9f5782840389528135609e19883603018112614cf257600080fd5b870160a08135614d01816158a3565b6001600160a01b03168652818701358787015260408083013590870152606080830135614d2d816158c6565b60ff169087015260808281013536849003601e19018112614d4d57600080fd5b830180356001600160401b03811115614d6557600080fd5b803603851315614d7457600080fd5b83838a0152614d88848a01828c8501614dac565b9d8a019d9850505093870193505050600101614cd1565b5091979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452614ded816020860160208601615721565b601f01601f19169290920160200192915050565b614e1b82614e1683546001600160a01b031690565b614c5b565b60018101546001600160a01b0316614e366020840182614c5b565b5060028101546001600160a01b0316614e526040840182614c5b565b506003810154606083015260048101546080830152600581015460a08301526006015460ff80821660c084015260089190911c1660e090910152565b6000614e9a8283615544565b60c080865285018190526001600160fb1b03811115614eb857600080fd5b60051b808260e087013760e081860101915050600081526020830135602085015260408301356040850152606083013560608501526080830135614efb816158a3565b6001600160a01b03166080850152614f1560a084016144b5565b61228460a0860182614c5b565b8051825260018060a01b036020820151166020830152604081015160408301526000606082015160a06060850152614f5d60a0850182614c68565b905060808301518482036080860152614f768282614c68565b95945050505050565b60008251614f91818460208701615721565b9190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60018060a01b03831681526000602060408184015260008454614fe18161574d565b8060408701526060600180841660008114615003576001811461501757615045565b60ff19851689840152608089019550615045565b896000528660002060005b8581101561503d5781548b8201860152908301908801615022565b8a0184019650505b50939998505050505050505050565b6001600160a01b03929092168252602082015260400190565b60018060a01b038616815284602082015283604082015260ff8316606082015260a06080820152600061447160a0830184614dd5565b602081526000610c276020830184614dd5565b6020808252601290820152717072696365203d3d206d73672e76616c756560701b604082015260600190565b6020808252600890820152673737ba1037b832b760c11b604082015260600190565b60208082526010908201526f30bab1ba34b7b7103737ba1037b832b760811b604082015260600190565b6020808252600d908201526c185d58dd1a5bdb88195b991959609a1b604082015260600190565b6020808252600c908201526b6e6f74206f70656e2062757960a01b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f63616e206e6f74207472616e7366657220746f6b656e206469726563746c7900604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208152813560208201526000615261602084016144b5565b61526e6040840182614c5b565b506040830135606083015260608301356080830152608083013560a083015261529960a08401614685565b60ff811660c0840152506152af60c084016144b5565b6152bc60e0840182614c5b565b506152c960e084016144b5565b6101006152d881850183614c5b565b610120915080850135828501525061014081850135818501526152fd8186018661558c565b9150506101a061016081818601526153196101c0860184614e8e565b925061532781870187615544565b9150610180601f198786030181880152615342858484614cb7565b970135959092019490945250929392505050565b6020815260008235615367816158a3565b60018060a01b0380821660208501526153836020860186615544565b925060e0604086015261539b61010086018483614cb7565b92505060408501356153ac816158a3565b8181166060860152505060608401356080840152608084013560a084015260a084013560c084015260c08401356153e2816158c6565b60ff1660e0939093019290925250919050565b6101008101610a948284614e01565b602081526000610c276020830184614f22565b60608152600061542a6060830186614f22565b828103602084015261543c8186614dd5565b91505060018060a01b0383166040830152949350505050565b6000808335601e1984360301811261546c57600080fd5b8301803591506001600160401b0382111561548657600080fd5b6020019150600581901b3603821315613be257600080fd5b6000823560be19833603018112614f9157600080fd5b60008235609e19833603018112614f9157600080fd5b604080519081016001600160401b03811182821017156154ec576154ec6157df565b60405290565b60405160a081016001600160401b03811182821017156154ec576154ec6157df565b604051601f8201601f191681016001600160401b038111828210171561553c5761553c6157df565b604052919050565b6000808335601e1984360301811261555b57600080fd5b83016020810192503590506001600160401b0381111561557a57600080fd5b8060051b3603831315613be257600080fd5b6000823560be198336030181126155a257600080fd5b90910192915050565b600082198211156155be576155be61579d565b500190565b6000826155e057634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156155ff576155ff61579d565b500290565b6000828210156156165761561661579d565b500390565b601f821115610c6857600081815260208120601f850160051c810160208610156156425750805b601f850160051c820191505b81811015613b715782815560010161564e565b6001600160401b03831115615678576156786157df565b61568c83615686835461574d565b8361561b565b6000601f8411600181146156c057600085156156a85750838201355b600019600387901b1c1916600186901b17835561571a565b600083815260209020601f19861690835b828110156156f157868501358255602094850194600190920191016156d1565b508682101561570e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60005b8381101561573c578181015183820152602001615724565b838111156123aa5750506000910152565b600181811c9082168061576157607f821691505b6020821081141561467f57634e487b7160e01b600052602260045260246000fd5b60006000198214156157965761579661579d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8135615800816158a3565b81546001600160a01b0319166001600160a01b03919091161781556020820135600182015560408201356002820155600381016060830135615841816158c6565b815460ff191660ff91909116179055608082013536839003601e1901811261586857600080fd5b820180356001600160401b0381111561588057600080fd5b60208201915080360382131561589557600080fd5b6123aa818360048601615661565b6001600160a01b0381168114611d0757600080fd5b8015158114611d0757600080fd5b60ff81168114611d0757600080fdfe5beea7b3b87c573953fec05007114d17712e5775d364acc106d8da9e74849033a264697066735822122063794a709c39f30f2c7c0d84e2dac3522effbca42f66df0b642c5c09bb52c6df64736f6c634300080700330000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Deployed Bytecode
0x6080604052600436106103055760003560e01c80638704f2a311610191578063c477be20116100e2578063ee98ce9111610090578063ee98ce911461091f578063f09541601461093f578063f0d250ba14610559578063f23a6e6114610954578063f2fde38b14610974578063f460590b14610994578063f4a33e0d146109b4578063f5116bc9146109d457600080fd5b8063c477be201461046d578063cd78ba01146107e8578063d9548e53146108ac578063e1784a0214610559578063e7d4a999146108df578063e91274f3146108ff578063eb374261146105f057600080fd5b8063afd76a0b1161013f578063afd76a0b14610724578063b4533aad14610744578063b50a2a5514610559578063ba84775914610775578063bc197c8114610788578063bdf52b45146107a8578063c1c30e80146107c857600080fd5b80638704f2a3146106845780638da5cb5b146106ba5780638f18439e1461046d57806390c2b10e146104585780639e57feb5146106cf578063a80d33fb146106e4578063ac5e2cb11461070457600080fd5b806354134876116102565780637234d8f2116102045780637234d8f2146105f0578063740db2801461046d578063781dc70a146106055780637ae1ace01461062557806380bc688f1461063a57806381787a851461065a5780638456cb591461066f578063853ca41a1461045857600080fd5b806354134876146105435780635a4e5a15146105595780635c975abb1461056e5780635fd34298146105835780636acc65db146105b0578063708d4d35146105c5578063715018a6146105db57600080fd5b80631bb03ca9116102b35780631bb03ca91461044357806324f8515b1461045857806325593ac21461046d5780632bcd27df146104825780633ed9ffb7146104b25780633f4ba83a146104e25780633fc8cef3146104f757600080fd5b8063015af8ee1461031157806301ffc9a7146103335780630873c6ec146103685780630ad486281461038d57806311f0794c146103ad578063150b7a02146103d45780631b01e72c1461040d57600080fd5b3661030c57005b600080fd5b34801561031d57600080fd5b5061033161032c366004614c1c565b6109f4565b005b34801561033f57600080fd5b5061035361034e36600461499c565b610a63565b60405190151581526020015b60405180910390f35b34801561037457600080fd5b5061037f620f424081565b60405190815260200161035f565b34801561039957600080fd5b506103536103a8366004614ba0565b610a9a565b3480156103b957600080fd5b506103c2600481565b60405160ff909116815260200161035f565b3480156103e057600080fd5b506103f46103ef366004614788565b610af5565b6040516001600160e01b0319909116815260200161035f565b34801561041957600080fd5b50610353610428366004614ba0565b60009081526002602052604090206006015460ff1660011490565b34801561044f57600080fd5b506103c2600681565b34801561046457600080fd5b506103c2600081565b34801561047957600080fd5b506103c2600181565b34801561048e57600080fd5b5061035361049d366004614690565b60066020526000908152604090205460ff1681565b3480156104be57600080fd5b506103536104cd366004614ba0565b60036020526000908152604090205460ff1681565b3480156104ee57600080fd5b50610331610b2c565b34801561050357600080fd5b5061052b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6040516001600160a01b03909116815260200161035f565b34801561054f57600080fd5b5061037f60085481565b34801561056557600080fd5b506103c2600281565b34801561057a57600080fd5b50610353610b65565b34801561058f57600080fd5b5061037f61059e366004614ba0565b60056020526000908152604090205481565b3480156105bc57600080fd5b506103c2600881565b3480156105d157600080fd5b5061037f60075481565b3480156105e757600080fd5b50610331610b75565b3480156105fc57600080fd5b506103c2600381565b34801561061157600080fd5b506103536106203660046149c6565b610bae565b34801561063157600080fd5b506103c2600981565b34801561064657600080fd5b506103316106553660046148fd565b610c2e565b34801561066657600080fd5b506103c2600781565b34801561067b57600080fd5b50610331610c6d565b34801561069057600080fd5b5061035361069f366004614ba0565b60009081526002602052604090206006015460ff1660031490565b3480156106c657600080fd5b5061052b610ca4565b3480156106db57600080fd5b506103c2600581565b3480156106f057600080fd5b506103536106ff366004614ba0565b610cb3565b34801561071057600080fd5b5061035361071f366004614c3e565b610ccf565b34801561073057600080fd5b5061033161073f366004614875565b610d0e565b34801561075057600080fd5b5061076461075f366004614c1c565b610e0d565b60405161035f95949392919061506d565b610331610783366004614a20565b610ede565b34801561079457600080fd5b506103f46107a33660046146ca565b611724565b3480156107b457600080fd5b506103536107c3366004614ba0565b61175e565b3480156107d457600080fd5b506103316107e336600461493e565b611769565b3480156107f457600080fd5b5061085b610803366004614ba0565b600260208190526000918252604090912080546001820154928201546003830154600484015460058501546006909501546001600160a01b039485169685169593909416939192909160ff8082169161010090041688565b604080516001600160a01b03998a168152978916602089015295909716948601949094526060850192909252608084015260a083015260ff90811660c083015290911660e08201526101000161035f565b3480156108b857600080fd5b506103536108c7366004614ba0565b60009081526002602052604090206005015442101590565b3480156108eb57600080fd5b506103316108fa366004614bf7565b6117f4565b34801561090b57600080fd5b5061033161091a366004614ace565b611932565b34801561092b57600080fd5b5061035361093a366004614ba0565b611c14565b34801561094b57600080fd5b506103c2600a81565b34801561096057600080fd5b506103f461096f3660046147fa565b611c32565b34801561098057600080fd5b5061033161098f366004614690565b611c6a565b3480156109a057600080fd5b506103316109af3660046148c4565b611d0a565b3480156109c057600080fd5b506103536109cf366004614bd2565b611dcf565b3480156109e057600080fd5b506103536109ef366004614ba0565b612164565b336109fd610ca4565b6001600160a01b031614610a2c5760405162461bcd60e51b8152600401610a23906151dc565b60405180910390fd5b600881905560078290556040517f6c06ac894de6b71964f14d152b6674a4465a9b5d3f9cf9f216b8e7ea6146751990600090a15050565b60006001600160e01b03198216630a85bd0160e11b1480610a9457506001600160e01b03198216630271189760e51b145b92915050565b60008181526002602052604081206006015460ff166003145b8015610ad65750600082815260026020526040902060060154610100900460ff16155b8015610a94575050600090815260026020526040902060050154421090565b60095460009060ff16610b1a5760405162461bcd60e51b8152600401610a23906151a5565b50630a85bd0160e11b95945050505050565b33610b35610ca4565b6001600160a01b031614610b5b5760405162461bcd60e51b8152600401610a23906151dc565b610b6361217e565b565b600154600160a01b900460ff1690565b33610b7e610ca4565b6001600160a01b031614610ba45760405162461bcd60e51b8152600401610a23906151dc565b610b636000612216565b6000816001600160a01b0316610c1a610c14856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86612268565b6001600160a01b03161490505b9392505050565b33610c37610ca4565b6001600160a01b031614610c5d5760405162461bcd60e51b8152600401610a23906151dc565b610c6882848361228c565b505050565b33610c76610ca4565b6001600160a01b031614610c9c5760405162461bcd60e51b8152600401610a23906151dc565b610b636123c4565b6001546001600160a01b031690565b60009081526002602081905260409091206006015460ff161490565b600060ff8216600314801590610ce9575060ff8216600514155b8015610cf9575060ff8216600414155b8015610a94575060ff82166006141592915050565b60026000541415610d315760405162461bcd60e51b8152600401610a2390615211565b6002600055610d3e610b65565b15610d5b5760405162461bcd60e51b8152600401610a239061517b565b60005b8151811015610e03576000828281518110610d7b57610d7b6157c9565b6020026020010151905080600001516001600160a01b03166342842e0e338684602001516040518463ffffffff1660e01b8152600401610dbd93929190614f9b565b600060405180830381600087803b158015610dd757600080fd5b505af1158015610deb573d6000803e3d6000fd5b50505050508080610dfb90615782565b915050610d5e565b5050600160005550565b60046020818152600093845260408085209091529183529120805460018201546002830154600384015494840180546001600160a01b03909416959294919360ff90931692610e5b9061574d565b80601f0160208091040260200160405190810160405280929190818152602001828054610e879061574d565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b5050505050905085565b60026000541415610f015760405162461bcd60e51b8152600401610a2390615211565b6002600055610f0e610b65565b15610f2b5760405162461bcd60e51b8152600401610a239061517b565b42856040013511610f7e5760405162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e20646561646c696e652072656163686564000000006044820152606401610a23565b60066000610f926040880160208901614690565b6001600160a01b0316815260208101919091526040016000205460ff16610ff35760405162461bcd60e51b81526020600482015260156024820152743ab735b737bbb71036b0b935b2ba1039b4b3b732b960591b6044820152606401610a23565b61100b61100660c0870160a08801614c3e565b612424565b61107e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516110559250899150602001615248565b604051602081830303815290604052805190602001208760200160208101906106209190614690565b6110c25760405162461bcd60e51b815260206004820152601560248201527437b33332b91039b4b3b730ba3ab9329032b93937b960591b6044820152606401610a23565b6110d561071f60c0870160a08801614c3e565b156111f1576000866040516020016110ed9190615356565b60408051601f19818403018152919052805160208201209091508635146111565760405162461bcd60e51b815260206004820152601d60248201527f696e74656e74696f6e206861736820646f6573206e6f74206d617463680000006044820152606401610a23565b6111a785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250508451602080870191909120925061062091508b018b614690565b6111ef5760405162461bcd60e51b815260206004820152601960248201527834b73a32b73a34b7b71039b4b3b730ba3ab9329032b93937b960391b6044820152606401610a23565b505b600161120360c0870160a08801614c3e565b60ff1614156112ea5761122461121f60e0870160c08801614690565b612476565b600161123660e0880160c08901614c3e565b60ff16146112865760405162461bcd60e51b815260206004820152601f60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f53454c4c006044820152606401610a23565b6112e5608086013561129b6020890189614690565b6112a860208a018a615455565b6112b860608c0160408d01614690565b60608c013560808d01356112d260e08e0160c08f01614690565b6112e06101408f018f61549e565b6124bd565b611717565b60026112fc60c0870160a08801614c3e565b60ff1614156113d95761131861121f60e0870160c08801614690565b600261132a60e0880160c08901614c3e565b60ff161461137a5760405162461bcd60e51b815260206004820152601e60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f42555900006044820152606401610a23565b6112e5608086013561138f6020890189614690565b61139f60e0890160c08a01614690565b6113ac60208b018b615455565b6113bc60608d0160408e01614690565b60608d013560808e01356113d46101408f018f61549e565b6127c4565b60036113eb60c0870160a08801614c3e565b60ff16141561144f5761140761121f60e0870160c08801614690565b6112e5608086013561141f60e0880160c08901614690565b611430610100890160e08a01614690565b6101008901356114446101608b018b615455565b8b6101800135612a63565b600461146160c0870160a08801614c3e565b60ff1614156114a85761147d61121f60e0870160c08801614690565b6112e5608086013561149560e0880160c08901614690565b6114a361014089018961549e565b612d74565b60056114ba60c0870160a08801614c3e565b60ff1614156114d0576112e58560800135612f19565b60066114e260c0870160a08801614c3e565b60ff1614156114f8576112e58560800135612fd1565b600761150a60c0870160a08801614c3e565b60ff1614156115f05761152661121f60e0870160c08801614690565b600361153860e0880160c08901614c3e565b60ff16146115935760405162461bcd60e51b815260206004820152602260248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f415543544960448201526127a760f11b6064820152608401610a23565b6112e560808601356115a86020890189614690565b6115b560208a018a615455565b6115c560608c0160408d01614690565b60608c013560808d01356115df60e08e0160c08f01614690565b8d61010001358e6101200135613195565b600861160260c0870160a08801614c3e565b60ff161415611626576112e5608086013561162161014088018861549e565b6137a5565b600961163860c0870160a08801614c3e565b60ff1614156116e25761165461121f60e0870160c08801614690565b6116616020870187614690565b6001600160a01b031661167a60e0870160c08801614690565b6001600160a01b0316146116c75760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e481cd95b1b195c8818d85b8818d85b1b60621b6044820152606401610a23565b6112e560808601356116dd61014088018861549e565b613801565b60405162461bcd60e51b815260206004820152600a602482015269696d706f737369626c6560b01b6044820152606401610a23565b5050600160005550505050565b60095460009060ff166117495760405162461bcd60e51b8152600401610a23906151a5565b5063bc197c8160e01b98975050505050505050565b6000610ab382610cb3565b6002600054141561178c5760405162461bcd60e51b8152600401610a2390615211565b6002600055611799610b65565b156117b65760405162461bcd60e51b8152600401610a239061517b565b60005b81811015610e03576117e28383838181106117d6576117d66157c9565b905060200201356138fb565b806117ec81615782565b9150506117b9565b336117fd610ca4565b6001600160a01b0316146118235760405162461bcd60e51b8152600401610a23906151dc565b6118428260009081526002602052604090206006015460ff1660031490565b61187c5760405162461bcd60e51b815260206004820152600b60248201526a3737ba1030bab1ba34b7b760a91b6044820152606401610a23565b61188582611c14565b6118a15760405162461bcd60e51b8152600401610a23906150e2565b6000828152600260205260409020816118ce5780546118ce90849030906001600160a01b03166000613980565b6002810154600182015460048301546118f4926001600160a01b0390811692169061228c565b60068101805461ff00191661020017905560405183906000805160206158d6833981519152906119259084906153f5565b60405180910390a2505050565b600260005414156119555760405162461bcd60e51b8152600401610a2390615211565b6002600055611962610b65565b1561197f5760405162461bcd60e51b8152600401610a239061517b565b428260400151116119c55760405162461bcd60e51b815260206004820152601060248201526f191958591b1a5b99481c995858da195960821b6044820152606401610a23565b6119fa81836040516020016119da9190615404565b604051602081830303815290604052805190602001208460200151610bae565b611a385760405162461bcd60e51b815260206004820152600f60248201526e39b4b3b730ba3ab9329032b93937b960891b6044820152606401610a23565b60005b826080015151811015611b035782608001518181518110611a5e57611a5e6157c9565b6020026020010151600001516001600160a01b03166342842e0e33856020015186608001518581518110611a9457611a946157c9565b6020026020010151602001516040518463ffffffff1660e01b8152600401611abe93929190614f9b565b600060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b505050508080611afb90615782565b915050611a3b565b5060005b826060015151811015611bcf5782606001518181518110611b2a57611b2a6157c9565b6020026020010151600001516001600160a01b03166342842e0e84602001513386606001518581518110611b6057611b606157c9565b6020026020010151602001516040518463ffffffff1660e01b8152600401611b8a93929190614f9b565b600060405180830381600087803b158015611ba457600080fd5b505af1158015611bb8573d6000803e3d6000fd5b505050508080611bc790615782565b915050611b07565b507f92060d15ec9a14885865b744d2efb1fff3cab53411058a530f51d480288a864c828233604051611c0393929190615417565b60405180910390a150506001600055565b600090815260026020526040902060060154610100900460ff161590565b60095460009060ff16611c575760405162461bcd60e51b8152600401610a23906151a5565b5063f23a6e6160e01b9695505050505050565b33611c73610ca4565b6001600160a01b031614611c995760405162461bcd60e51b8152600401610a23906151dc565b6001600160a01b038116611cfe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a23565b611d0781612216565b50565b33611d13610ca4565b6001600160a01b031614611d395760405162461bcd60e51b8152600401610a23906151dc565b8015611d64576001600160a01b0382166000908152600660205260409020805460ff19169055611d88565b6001600160a01b0382166000908152600660205260409020805460ff191660011790555b604080516001600160a01b038416815282151560208201527f90d56af4745c314d9b45054b55dc973378c558c1ad1554bccc70d39aa63a2cc5910160405180910390a15050565b6000611dda83612164565b611e155760405162461bcd60e51b815260206004820152600c60248201526b6e6f20696e76656e746f727960a01b6044820152606401610a23565b60005b60008481526005602052604090205481101561215a5760008481526004602090815260408083208484529091529020600381015460ff16611e5857612147565b600381015460ff166001141561203557805460018201546040516331a9108f60e11b81526001600160a01b03928316928716918391636352211e91611ea39160040190815260200190565b60206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef391906146ad565b6001600160a01b03161480156120195750600182015460405163020604bf60e21b815230916001600160a01b0384169163081812fc91611f399160040190815260200190565b60206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8991906146ad565b6001600160a01b03161480612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c5906044015b60206040518083038186803b158015611fe157600080fd5b505afa158015611ff5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612019919061497f565b156120235761202f565b60009350505050610a94565b50612147565b600381015460ff166002141561210b57805460028201546001830154604051627eeac760e11b81526001600160a01b0390931692839162fdd58e9161207e918a91600401615054565b60206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce9190614bb9565b10158015612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c590604401611fc9565b60405162461bcd60e51b81526020600482015260116024820152703ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610a23565b508061215281615782565b915050611e18565b5060019392505050565b60009081526002602052604090206006015460ff16151590565b612186610b65565b6121c95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a23565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008060006122778585613b79565b9150915061228481613be9565b509392505050565b8061229657505050565b6001600160a01b0382166122ec5760405162461bcd60e51b815260206004820152601d60248201527f63616e6e6f74207472616e7366657220746f20616464726573732830290000006044820152606401610a23565b6001600160a01b0383166123b057604051632e1a7d4d60e01b8152600481018290527f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561235c57600080fd5b505af1158015612370573d6000803e3d6000fd5b50506040516001600160a01b038516925083156108fc02915083906000818181858888f193505050501580156123aa573d6000803e3d6000fd5b50505050565b610c686001600160a01b0384168383613d9f565b6123cc610b65565b156123e95760405162461bcd60e51b8152600401610a239061517b565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121f93390565b60ff8116158015906124395750600a60ff8216105b611d075760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f70636f646560901b6044820152606401610a23565b6001600160a01b0381163314611d075760405162461bcd60e51b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606401610a23565b6124c689612164565b156125025760405162461bcd60e51b815260206004820152600c60248201526b191d5c1b1a58d85d19481a5960a21b6044820152606401610a23565b42831161254a5760405162461bcd60e51b81526020600482015260166024820152751cd95b1b081a185cc8185b1c9958591e48195b99195960521b6044820152606401610a23565b612555898888613df5565b6125628989846001613980565b6001600160a01b0385166126085734841461258f5760405162461bcd60e51b8152600401610a23906150b6565b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156125ea57600080fd5b505af11580156125fe573d6000803e3d6000fd5b505050505061261d565b61261d6001600160a01b038616833087613ea7565b604051806101000160405280896001600160a01b03168152602001836001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001848152602001600160ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158d6833981519152600260008c81526020019081526020016000206040516127a791906153f5565b60405180910390a26127b98982613ec8565b505050505050505050565b6127cd89612164565b156128155760405162461bcd60e51b8152602060048201526018602482015277696e76656e746f727920616c72656164792065786973747360401b6044820152606401610a23565b42821161285c5760405162461bcd60e51b8152602060048201526015602482015274189d5e481a185cc8185b1c9958591e48195b991959605a1b6044820152606401610a23565b6001600160a01b0384166128ac5760405162461bcd60e51b815260206004820152601760248201527631b0b73737ba103ab9b2903730ba34bb32903a37b5b2b760491b6044820152606401610a23565b6128b7898787613df5565b6128c489888a6001613980565b6128d96001600160a01b038516893086613ea7565b604051806101000160405280886001600160a01b03168152602001896001600160a01b03168152602001856001600160a01b03168152602001848152602001848152602001838152602001600260ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158d6833981519152600260008c81526020019081526020016000206040516127a791906153f5565b612a6c87612164565b15612ab95760405162461bcd60e51b815260206004820152601a60248201527f696e76656e746f7279496420616c7265616479206578697374730000000000006044820152606401610a23565b428111612b125760405162461bcd60e51b815260206004820152602160248201527f646561646c696e65206d7573742062652067726561746572207468616e206e6f6044820152607760f81b6064820152608401610a23565b612b1d878484613df5565b6001600160a01b038516612bc357348414612b4a5760405162461bcd60e51b8152600401610a23906150b6565b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b5050505050612bd8565b612bd86001600160a01b038616873087613ea7565b60405180610100016040528060006001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001828152602001600260ff168152602001600060ff168152506002600089815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050866000805160206158d6833981519152600260008a8152602001908152602001600020604051612d6391906153f5565b60405180910390a250505050505050565b612d7d83610cb3565b612dbd5760405162461bcd60e51b81526020600482015260116024820152701a5908191bd95cc81b9bdd08195e1a5cdd607a1b6044820152606401610a23565b6000838152600260205260409020612dd484611c14565b612df05760405162461bcd60e51b8152600401610a23906150e2565b612dfa8484611dcf565b612e3c5760405162461bcd60e51b8152602060048201526013602482015272189d5b991b19481b9bdd08185c1c1c9bdd9959606a1b6044820152606401610a23565b6000848152600260205260409020600501544210612e905760405162461bcd60e51b8152602060048201526011602482015270189d5e481bd999995c88195e1c1a5c9959607a1b6044820152606401610a23565b60068101805461ff00191661010017905580546001600160a01b038085166001600160a01b0319909216919091178255600182810154612ed7928792879290911690613980565b836000805160206158d683398151915260026000878152602001908152602001600020604051612f0791906153f5565b60405180910390a26123aa8483613ec8565b612f2281610cb3565b8015612f325750612f3281611c14565b612f4e5760405162461bcd60e51b8152600401610a2390615155565b600081815260026020819052604090912060068101805461ff0019166102001790559081015460018201546004830154612f95926001600160a01b0390811692169061228c565b816000805160206158d683398151915260026000858152602001908152602001600020604051612fc591906153f5565b60405180910390a25050565b33612fdb82610cb3565b8015612feb5750612feb82611c14565b6130075760405162461bcd60e51b8152600401610a2390615155565b60005b6000838152600560205260409020548110156131875760008381526004602090815260408083208484529091529020600381015460ff166001141561312c57805460018201546040516331a9108f60e11b81526001600160a01b03928316928616918391636352211e916130849160040190815260200190565b60206040518083038186803b15801561309c57600080fd5b505afa1580156130b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d491906146ad565b6001600160a01b0316146131265760405162461bcd60e51b815260206004820152601960248201527831b0b63632b9103237b2b9903737ba1037bbb7103a37b5b2b760391b6044820152606401610a23565b50613174565b60405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f742072656a656374206e6f6e2d37323120746f6b656e00000000006044820152606401610a23565b508061317f81615782565b91505061300a565b5061319182612f19565b5050565b6009805460ff19166001179055620f424081106131ee5760405162461bcd60e51b8152602060048201526017602482015276696e63656e746976655261746520746f6f206c6172676560481b6044820152606401610a23565b6001600160a01b0386166132945734821461321b5760405162461bcd60e51b8152600401610a23906150b6565b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327657600080fd5b505af115801561328a573d6000803e3d6000fd5b50505050506132a9565b6132a96001600160a01b038716843085613ea7565b6132c88a60009081526002602052604090206006015460ff1660031490565b156134fd5760008a815260026020526040902080546001600160a01b038b811691161461332f5760405162461bcd60e51b81526020600482015260156024820152740e6cad8d8cae440c8decae640dcdee840dac2e8c6d605b1b6044820152606401610a23565b6006810154610100900460ff16156133595760405162461bcd60e51b8152600401610a2390615104565b4281600501541161337c5760405162461bcd60e51b8152600401610a239061512e565b620f4240600754826003015461339291906155e5565b61339c91906155c3565b81600301546133ab91906155ab565b8310156133ee5760405162461bcd60e51b815260206004820152601160248201527062696420707269636520746f6f206c6f7760781b6044820152606401610a23565b6000620f42406133fe84866155e5565b61340891906155c3565b60018301546004840154919250613435918a916001600160a01b0316906134309085906155ab565b61228c565b600182015460048301548d917fa48bcf3362c21033397c03b92fb367d1962ba13b5bde0dfe491f9d88abb59e3f916001600160a01b039091169061347a9085906155ab565b604051613488929190615054565b60405180910390a26001820180546001600160a01b0319166001600160a01b038716179055600382018490556134be8185615604565b600483015560058201546008546134d590426155ab565b106134f6576008548260050160008282546134f091906155ab565b90915550505b5050613757565b6135068a612164565b1561354e5760405162461bcd60e51b815260206004820152601860248201527734b73b32b73a37b93c9034b9903737ba1030bab1ba34b7b760411b6044820152606401610a23565b8482101561359e5760405162461bcd60e51b815260206004820152601a60248201527f626964206c6f776572207468616e2073746172742070726963650000000000006044820152606401610a23565b4284116135bd5760405162461bcd60e51b8152600401610a239061512e565b600854849081906135ce90426155ab565b106135e3576008546135e090826155ab565b90505b6040518061010001604052808b6001600160a01b03168152602001856001600160a01b03168152602001886001600160a01b03168152602001848152602001848152602001828152602001600360ff168152602001600060ff16815250600260008d815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff1602179055509050506137488b8a8a613df5565b6137558b8b306000613980565b505b896000805160206158d6833981519152600260008d815260200190815260200160002060405161378791906153f5565b60405180910390a250506009805460ff191690555050505050505050565b60008281526002602052604090206005015442116137fb5760405162461bcd60e51b815260206004820152601360248201527261756374696f6e207374696c6c20676f696e6760681b6044820152606401610a23565b61319182825b6138208260009081526002602052604090206006015460ff1660031490565b6138655760405162461bcd60e51b8152602060048201526016602482015275185d58dd1a5bdb88191bd95cc81b9bdd08195e1a5cdd60521b6044820152606401610a23565b61386e82611c14565b61388a5760405162461bcd60e51b8152600401610a2390615104565b6000828152600260205260409081902060068101805461ff001916610100179055905183906000805160206158d6833981519152906138ca9084906153f5565b60405180910390a26001808201546138f191859130916001600160a01b0390911690613980565b610c688383613ec8565b600081815260026020526040902060018101546001600160a01b031633148061393557506000828152600260205260409020600501544210155b6139775760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba10313abcb2b960691b6044820152606401610a23565b61319182612f19565b600084815260056020526040812054905b81811015613b715760008681526004602090815260408083208484529091529020600381015460ff16613aa8578315613aa3576001600160a01b038516158015906139e557506001600160a01b0385163014155b613a3d5760405162461bcd60e51b8152602060048201526024808201527f6d696e74207461726765742063616e6e6f74206265207a65726f206f72206d616044820152631c9ad95d60e21b6064820152608401610a23565b805460405163b510391f60e01b81526001600160a01b039091169063b510391f90613a7090889060048087019101614fbf565b600060405180830381600087803b158015613a8a57600080fd5b505af1158015613a9e573d6000803e3d6000fd5b505050505b613b5e565b600381015460ff1660011415613aee5780546001820154604051632142170760e11b81526001600160a01b03909216916342842e0e91613a70918a918a91600401614f9b565b600381015460ff166002141561210b57805460018201546002830154604051637921219560e11b81526001600160a01b038a8116600483015289811660248301526044820193909352606481019190915260a06084820152600060a482015291169063f242432a9060c401613a70565b5080613b6981615782565b915050613991565b505050505050565b600080825160411415613bb05760208301516040840151606085015160001a613ba48782858561407f565b94509450505050613be2565b825160401415613bda5760208301516040840151613bcf868383614162565b935093505050613be2565b506000905060025b9250929050565b6000816004811115613bfd57613bfd6157b3565b1415613c065750565b6001816004811115613c1a57613c1a6157b3565b1415613c635760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a23565b6002816004811115613c7757613c776157b3565b1415613cc55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a23565b6003816004811115613cd957613cd96157b3565b1415613d325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a23565b6004816004811115613d4657613d466157b3565b1415611d075760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a23565b610c688363a9059cbb60e01b8484604051602401613dbe929190615054565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614191565b80613e315760405162461bcd60e51b815260206004820152600c60248201526b656d7074792062756e646c6560a01b6044820152606401610a23565b60008381526005602052604081208290555b818110156123aa57828282818110613e5d57613e5d6157c9565b9050602002810190613e6f91906154b4565b60008581526004602090815260408083208584529091529020613e9282826157f5565b50819050613e9f81615782565b915050613e43565b6123aa846323b872dd60e01b858585604051602401613dbe93929190614f9b565b6000828152600260205260409020613edf83612164565b8015613ef757506006810154610100900460ff166001145b613f435760405162461bcd60e51b815260206004820152601b60248201527f6e6f20696e76656e746f7279206f72207374617465206572726f7200000000006044820152606401610a23565b613f5683613f518480615455565b614263565b60038101546000620f4240613f6f6020860135846155e5565b613f7991906155c3565b90506000620f4240613f8f6040870135856155e5565b613f9991906155c3565b90506000620f4240613faf6060880135866155e5565b613fb991906155c3565b905060008183858860040154613fcf9190615604565b613fd99190615604565b613fe39190615604565b60028701548754919250614004916001600160a01b0391821691168361228c565b60028601546001870154614025916001600160a01b0390811691168461228c565b600286015461404d906001600160a01b031661404760a08a0160808b01614690565b8661228c565b6002860154614075906001600160a01b031661406f60c08a0160a08b01614690565b8561228c565b5050505050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156140ac5750600090506003614159565b8460ff16601b141580156140c457508460ff16601c14155b156140d55750600090506004614159565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614129573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661415257600060019250925050614159565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016141838782888561407f565b935093505050935093915050565b60006141e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661433d9092919063ffffffff16565b805190915015610c685780806020019051810190614204919061497f565b610c685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a23565b60005b818110156123aa576000838383818110614282576142826157c9565b60209081029290920135600081815260039093526040909220549192505060ff16156142e75760405162461bcd60e51b815260206004820152601460248201527318dbdd5c1bdb88185b1c9958591e481cdc195b9d60621b6044820152606401610a23565b600081815260036020526040808220805460ff1916600117905551829187917f6aa71aa6b7aa6036ace4e4ceefbab7d89c4afb7fcfa1a3680499d7b37d32c82f9190a3508061433581615782565b915050614266565b606061434c8484600085614354565b949350505050565b6060824710156143b55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a23565b843b6144035760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a23565b600080866001600160a01b0316858760405161441f9190614f7f565b60006040518083038185875af1925050503d806000811461445c576040519150601f19603f3d011682016040523d82523d6000602084013e614461565b606091505b509150915061447182828661447c565b979650505050505050565b6060831561448b575081610c27565b82511561449b5782518084602001fd5b8160405162461bcd60e51b8152600401610a2391906150a3565b80356144c0816158a3565b919050565b600082601f8301126144d657600080fd5b813560206001600160401b038211156144f1576144f16157df565b6144ff818360051b01615514565b80838252828201915082860187848660061b890101111561451f57600080fd5b6000805b8681101561456a57604080848c03121561453b578283fd5b6145436154ca565b843561454e816158a3565b8152848801358882015286529486019490920191600101614523565b509198975050505050505050565b60008083601f84011261458a57600080fd5b5081356001600160401b038111156145a157600080fd5b6020830191508360208260051b8501011115613be257600080fd5b60008083601f8401126145ce57600080fd5b5081356001600160401b038111156145e557600080fd5b602083019150836020828501011115613be257600080fd5b600082601f83011261460e57600080fd5b81356001600160401b03811115614627576146276157df565b61463a601f8201601f1916602001615514565b81815284602083860101111561464f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006101a0828403121561467f57600080fd5b50919050565b80356144c0816158c6565b6000602082840312156146a257600080fd5b8135610c27816158a3565b6000602082840312156146bf57600080fd5b8151610c27816158a3565b60008060008060008060008060a0898b0312156146e657600080fd5b88356146f1816158a3565b97506020890135614701816158a3565b965060408901356001600160401b038082111561471d57600080fd5b6147298c838d01614578565b909850965060608b013591508082111561474257600080fd5b61474e8c838d01614578565b909650945060808b013591508082111561476757600080fd5b506147748b828c016145bc565b999c989b5096995094979396929594505050565b6000806000806000608086880312156147a057600080fd5b85356147ab816158a3565b945060208601356147bb816158a3565b93506040860135925060608601356001600160401b038111156147dd57600080fd5b6147e9888289016145bc565b969995985093965092949392505050565b60008060008060008060a0878903121561481357600080fd5b863561481e816158a3565b9550602087013561482e816158a3565b9450604087013593506060870135925060808701356001600160401b0381111561485757600080fd5b61486389828a016145bc565b979a9699509497509295939492505050565b6000806040838503121561488857600080fd5b8235614893816158a3565b915060208301356001600160401b038111156148ae57600080fd5b6148ba858286016144c5565b9150509250929050565b600080604083850312156148d757600080fd5b82356148e2816158a3565b915060208301356148f2816158b8565b809150509250929050565b60008060006060848603121561491257600080fd5b833561491d816158a3565b9250602084013561492d816158a3565b929592945050506040919091013590565b6000806020838503121561495157600080fd5b82356001600160401b0381111561496757600080fd5b61497385828601614578565b90969095509350505050565b60006020828403121561499157600080fd5b8151610c27816158b8565b6000602082840312156149ae57600080fd5b81356001600160e01b031981168114610c2757600080fd5b6000806000606084860312156149db57600080fd5b83356001600160401b038111156149f157600080fd5b6149fd868287016145fd565b935050602084013591506040840135614a15816158a3565b809150509250925092565b60008060008060008060808789031215614a3957600080fd5b86356001600160401b0380821115614a5057600080fd5b9088019060e0828b031215614a6457600080fd5b90965060208801359080821115614a7a57600080fd5b614a868a838b0161466c565b96506040890135915080821115614a9c57600080fd5b614aa88a838b016145bc565b90965094506060890135915080821115614ac157600080fd5b5061486389828a016145bc565b60008060408385031215614ae157600080fd5b82356001600160401b0380821115614af857600080fd5b9084019060a08287031215614b0c57600080fd5b614b146154f2565b823581526020830135614b26816158a3565b602082015260408381013590820152606083013582811115614b4757600080fd5b614b53888286016144c5565b606083015250608083013582811115614b6b57600080fd5b614b77888286016144c5565b60808301525093506020850135915080821115614b9357600080fd5b506148ba858286016145fd565b600060208284031215614bb257600080fd5b5035919050565b600060208284031215614bcb57600080fd5b5051919050565b60008060408385031215614be557600080fd5b8235915060208301356148f2816158a3565b60008060408385031215614c0a57600080fd5b8235915060208301356148f2816158b8565b60008060408385031215614c2f57600080fd5b50508035926020909101359150565b600060208284031215614c5057600080fd5b8135610c27816158c6565b6001600160a01b03169052565b600081518084526020808501945080840160005b83811015614cac57815180516001600160a01b031688528301518388015260409096019590820190600101614c7c565b509495945050505050565b81835260006020808501808196508560051b810191508460005b87811015614d9f5782840389528135609e19883603018112614cf257600080fd5b870160a08135614d01816158a3565b6001600160a01b03168652818701358787015260408083013590870152606080830135614d2d816158c6565b60ff169087015260808281013536849003601e19018112614d4d57600080fd5b830180356001600160401b03811115614d6557600080fd5b803603851315614d7457600080fd5b83838a0152614d88848a01828c8501614dac565b9d8a019d9850505093870193505050600101614cd1565b5091979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452614ded816020860160208601615721565b601f01601f19169290920160200192915050565b614e1b82614e1683546001600160a01b031690565b614c5b565b60018101546001600160a01b0316614e366020840182614c5b565b5060028101546001600160a01b0316614e526040840182614c5b565b506003810154606083015260048101546080830152600581015460a08301526006015460ff80821660c084015260089190911c1660e090910152565b6000614e9a8283615544565b60c080865285018190526001600160fb1b03811115614eb857600080fd5b60051b808260e087013760e081860101915050600081526020830135602085015260408301356040850152606083013560608501526080830135614efb816158a3565b6001600160a01b03166080850152614f1560a084016144b5565b61228460a0860182614c5b565b8051825260018060a01b036020820151166020830152604081015160408301526000606082015160a06060850152614f5d60a0850182614c68565b905060808301518482036080860152614f768282614c68565b95945050505050565b60008251614f91818460208701615721565b9190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60018060a01b03831681526000602060408184015260008454614fe18161574d565b8060408701526060600180841660008114615003576001811461501757615045565b60ff19851689840152608089019550615045565b896000528660002060005b8581101561503d5781548b8201860152908301908801615022565b8a0184019650505b50939998505050505050505050565b6001600160a01b03929092168252602082015260400190565b60018060a01b038616815284602082015283604082015260ff8316606082015260a06080820152600061447160a0830184614dd5565b602081526000610c276020830184614dd5565b6020808252601290820152717072696365203d3d206d73672e76616c756560701b604082015260600190565b6020808252600890820152673737ba1037b832b760c11b604082015260600190565b60208082526010908201526f30bab1ba34b7b7103737ba1037b832b760811b604082015260600190565b6020808252600d908201526c185d58dd1a5bdb88195b991959609a1b604082015260600190565b6020808252600c908201526b6e6f74206f70656e2062757960a01b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f63616e206e6f74207472616e7366657220746f6b656e206469726563746c7900604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208152813560208201526000615261602084016144b5565b61526e6040840182614c5b565b506040830135606083015260608301356080830152608083013560a083015261529960a08401614685565b60ff811660c0840152506152af60c084016144b5565b6152bc60e0840182614c5b565b506152c960e084016144b5565b6101006152d881850183614c5b565b610120915080850135828501525061014081850135818501526152fd8186018661558c565b9150506101a061016081818601526153196101c0860184614e8e565b925061532781870187615544565b9150610180601f198786030181880152615342858484614cb7565b970135959092019490945250929392505050565b6020815260008235615367816158a3565b60018060a01b0380821660208501526153836020860186615544565b925060e0604086015261539b61010086018483614cb7565b92505060408501356153ac816158a3565b8181166060860152505060608401356080840152608084013560a084015260a084013560c084015260c08401356153e2816158c6565b60ff1660e0939093019290925250919050565b6101008101610a948284614e01565b602081526000610c276020830184614f22565b60608152600061542a6060830186614f22565b828103602084015261543c8186614dd5565b91505060018060a01b0383166040830152949350505050565b6000808335601e1984360301811261546c57600080fd5b8301803591506001600160401b0382111561548657600080fd5b6020019150600581901b3603821315613be257600080fd5b6000823560be19833603018112614f9157600080fd5b60008235609e19833603018112614f9157600080fd5b604080519081016001600160401b03811182821017156154ec576154ec6157df565b60405290565b60405160a081016001600160401b03811182821017156154ec576154ec6157df565b604051601f8201601f191681016001600160401b038111828210171561553c5761553c6157df565b604052919050565b6000808335601e1984360301811261555b57600080fd5b83016020810192503590506001600160401b0381111561557a57600080fd5b8060051b3603831315613be257600080fd5b6000823560be198336030181126155a257600080fd5b90910192915050565b600082198211156155be576155be61579d565b500190565b6000826155e057634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156155ff576155ff61579d565b500290565b6000828210156156165761561661579d565b500390565b601f821115610c6857600081815260208120601f850160051c810160208610156156425750805b601f850160051c820191505b81811015613b715782815560010161564e565b6001600160401b03831115615678576156786157df565b61568c83615686835461574d565b8361561b565b6000601f8411600181146156c057600085156156a85750838201355b600019600387901b1c1916600186901b17835561571a565b600083815260209020601f19861690835b828110156156f157868501358255602094850194600190920191016156d1565b508682101561570e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60005b8381101561573c578181015183820152602001615724565b838111156123aa5750506000910152565b600181811c9082168061576157607f821691505b6020821081141561467f57634e487b7160e01b600052602260045260246000fd5b60006000198214156157965761579661579d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8135615800816158a3565b81546001600160a01b0319166001600160a01b03919091161781556020820135600182015560408201356002820155600381016060830135615841816158c6565b815460ff191660ff91909116179055608082013536839003601e1901811261586857600080fd5b820180356001600160401b0381111561588057600080fd5b60208201915080360382131561589557600080fd5b6123aa818360048601615661565b6001600160a01b0381168114611d0757600080fd5b8015158114611d0757600080fd5b60ff81168114611d0757600080fdfe5beea7b3b87c573953fec05007114d17712e5775d364acc106d8da9e74849033a264697066735822122063794a709c39f30f2c7c0d84e2dac3522effbca42f66df0b642c5c09bb52c6df64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
-----Decoded View---------------
Arg [0] : weth_ (address): 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ARB | 86.90% | $3,914.44 | 36.7615 | $143,900.69 | |
ARB | 0.01% | $3,917.5 | 0.00557116 | $21.83 | |
ARB | <0.01% | $0.999999 | 8.2 | $8.2 | |
POL | 9.01% | $0.617528 | 24,167.1454 | $14,923.89 | |
POL | 1.33% | $3,915.67 | 0.5622 | $2,201.35 | |
POL | Polygon (POL) | 0.02% | $0.617277 | 44.1411 | $27.25 |
POL | <0.01% | $0.999354 | 10.0187 | $10.01 | |
CRONOS | 1.87% | $0.183499 | 16,870.5136 | $3,095.72 | |
CRONOS | <0.01% | $0.183408 | 10.695 | $1.96 | |
CRONOS | <0.01% | $0.219176 | 4.4165 | $0.9679 | |
OP | 0.79% | $3,914.02 | 0.3344 | $1,308.95 | |
ZKSYNC | 0.04% | $3,918.49 | 0.0166 | $65.05 | |
ETH | 0.01% | $3,918.49 | 0.00628 | $24.61 | |
BASE | <0.01% | $3,917.46 | 0.0014 | $5.48 |
[ 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.