More Info
Private Name Tags
ContractCreator
Multi Chain
Multichain Addresses
19 addresses found via
Latest 25 from a total of 568,339 transactions (+12 Pending)
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0xe7a2e2254433832bbf3bc5230de9781d0a1bf70a43f4134db9726f920798c1be | Match Ask With T... | (pending) | 3 days 19 hrs ago | IN | 0.00039 ETH | (Pending) | |||
0x8792866acc3aa597d8f74aa5152bd4c0cee78c6f710a5c00f44a9e7657674f68 | Match Ask With T... | (pending) | 3 days 23 hrs ago | IN | 0.00059 ETH | (Pending) | |||
0x7b5e3a0d0f42cbde19ce2d4ba64826456a244fdf0d5f0f4abf74b09f867715e3 | Match Ask With T... | (pending) | 4 days 42 mins ago | IN | 0.0009 ETH | (Pending) | |||
0x22a30d44b28a031740a1431f048995dcdafaa00c5cb8ad21676f0003a35631fb | Match Ask With T... | (pending) | 4 days 1 hr ago | IN | 0.0001 ETH | (Pending) | |||
0xc2f73c55cae63bdeb5150180c7088bdec73e4353243bbcffa02dbe0588f7a317 | Match Ask With T... | (pending) | 4 days 3 hrs ago | IN | 0.00011 ETH | (Pending) | |||
0xe46487bf20e4edcb898085db938e1b0d78622934c8e0c27634c47ef14d1c7976 | Match Ask With T... | (pending) | 4 days 4 hrs ago | IN | 0.0001 ETH | (Pending) | |||
0x9f806b656b7d7323090d41c25e8f7a40b142737d291f83e9b5e9c3f065bd3954 | Match Ask With T... | (pending) | 4 days 5 hrs ago | IN | 0.0001 ETH | (Pending) | |||
0x378709984f7ccd1be1410795881fe6e7b3d329415fd6d69458b93394678d97f8 | Match Ask With T... | (pending) | 4 days 5 hrs ago | IN | 0.0001 ETH | (Pending) | |||
0x5b46199ebe4516dd0dcc5d058d1a85ce6783325eff2a197492396a9a2e48b9ab | Match Ask With T... | (pending) | 4 days 5 hrs ago | IN | 0.00001 ETH | (Pending) | |||
0xb756b9cf74b95790f9db313ee2a7d6e4c8980bdc628f317d4ea3564cd37ca932 | Match Ask With T... | (pending) | 4 days 5 hrs ago | IN | 0.0001 ETH | (Pending) | |||
0x30a1d4ccc8c20c2e2abf30a3b83468ce4fcc92dde09a1ef6f93cb26c7f2272bc | Match Ask With T... | (pending) | 4 days 6 hrs ago | IN | 0.0001 ETH | (Pending) | |||
0xd6adf46cd60b568c0b9664aa843a5a697aa92f37d00381386f363488e1e9992f | Match Ask With T... | (pending) | 11 days 2 hrs ago | IN | 0.001 ETH | (Pending) | |||
Match Ask With T... | 18109326 | 17 days 7 hrs ago | IN | 0.0065 ETH | 0.0005726 | ||||
Match Ask With T... | 18045210 | 26 days 7 hrs ago | IN | 0.0035 ETH | 0.00054084 | ||||
Cancel Multiple ... | 17890389 | 47 days 23 hrs ago | IN | 0 ETH | 0.00058701 | ||||
Cancel Multiple ... | 17446532 | 110 days 6 hrs ago | IN | 0 ETH | 0.000642 | ||||
Cancel Multiple ... | 17446532 | 110 days 6 hrs ago | IN | 0 ETH | 0.00153629 | ||||
Match Ask With T... | 17417499 | 114 days 8 hrs ago | IN | 0.015 ETH | 0.00135437 | ||||
Match Ask With T... | 17363745 | 121 days 22 hrs ago | IN | 0.03 ETH | 0.00222699 | ||||
Match Ask With T... | 17363709 | 121 days 22 hrs ago | IN | 0.03 ETH | 0.00214444 | ||||
Match Ask With T... | 17362223 | 122 days 3 hrs ago | IN | 0.03 ETH | 0.00190176 | ||||
Match Ask With T... | 17361186 | 122 days 6 hrs ago | IN | 0.025 ETH | 0.00210649 | ||||
Match Ask With T... | 17340223 | 125 days 5 hrs ago | IN | 0.03 ETH | 0.00193933 | ||||
Match Ask With T... | 17340185 | 125 days 5 hrs ago | IN | 0.03 ETH | 0.00228636 | ||||
Match Ask With T... | 17340137 | 125 days 5 hrs ago | IN | 0.03 ETH | 0.00228881 |
Latest 25 internal transactions (View All)
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
18210088 | 3 days 4 hrs ago | 0.002 ETH | ||||
18210088 | 3 days 4 hrs ago | 0.002 ETH | ||||
18109326 | 17 days 7 hrs ago | 0.0065 ETH | ||||
18045210 | 26 days 7 hrs ago | 0.0035 ETH | ||||
17731075 | 70 days 6 hrs ago | 0.03 ETH | ||||
17731075 | 70 days 6 hrs ago | 0.03 ETH | ||||
17730481 | 70 days 8 hrs ago | 0.03 ETH | ||||
17730481 | 70 days 8 hrs ago | 0.03 ETH | ||||
17730479 | 70 days 8 hrs ago | 0.03 ETH | ||||
17730479 | 70 days 8 hrs ago | 0.03 ETH | ||||
17563889 | 93 days 18 hrs ago | 0.055 ETH | ||||
17563889 | 93 days 18 hrs ago | 0.055 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563849 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563813 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563813 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563813 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563813 | 93 days 18 hrs ago | 0.05 ETH | ||||
17563813 | 93 days 18 hrs ago | 0.052 ETH |
Loading...
Loading
Contract Name:
LooksRareExchange
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 888888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // OpenZeppelin contracts import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // LooksRare interfaces import {ICurrencyManager} from "./interfaces/ICurrencyManager.sol"; import {IExecutionManager} from "./interfaces/IExecutionManager.sol"; import {IExecutionStrategy} from "./interfaces/IExecutionStrategy.sol"; import {IRoyaltyFeeManager} from "./interfaces/IRoyaltyFeeManager.sol"; import {ILooksRareExchange} from "./interfaces/ILooksRareExchange.sol"; import {ITransferManagerNFT} from "./interfaces/ITransferManagerNFT.sol"; import {ITransferSelectorNFT} from "./interfaces/ITransferSelectorNFT.sol"; import {IWETH} from "./interfaces/IWETH.sol"; // LooksRare libraries import {OrderTypes} from "./libraries/OrderTypes.sol"; import {SignatureChecker} from "./libraries/SignatureChecker.sol"; /** * @title LooksRareExchange * @notice It is the core contract of the LooksRare exchange. LOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRAR'''''''''''''''''''''''''''''''''''OOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKS:. .;OOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOO,. .,KSRARELOOKSRARELOOKSR LOOKSRARELOOKSRAREL' ..',;:LOOKS::;,'.. 'RARELOOKSRARELOOKSR LOOKSRARELOOKSRAR. .,:LOOKSRARELOOKSRARELO:,. .RELOOKSRARELOOKSR LOOKSRARELOOKS:. .;RARELOOKSRARELOOKSRARELOOKSl;. .:OOKSRARELOOKSR LOOKSRARELOO;. .'OKSRARELOOKSRARELOOKSRARELOOKSRARE'. .;KSRARELOOKSR LOOKSRAREL,. .,LOOKSRARELOOK:;;:"""":;;;lELOOKSRARELO,. .,RARELOOKSR LOOKSRAR. .;okLOOKSRAREx:. .;OOKSRARELOOK;. .RELOOKSR LOOKS:. .:dOOOLOOKSRARE' .''''.. .OKSRARELOOKSR:. .LOOKSR LOx;. .cKSRARELOOKSRAR' 'LOOKSRAR' .KSRARELOOKSRARc.. .OKSR L;. .cxOKSRARELOOKSRAR. .LOOKS.RARE' ;kRARELOOKSRARExc. .;R LO' .;oOKSRARELOOKSRAl. .LOOKS.RARE. :kRARELOOKSRAREo;. 'SR LOOK;. .,KSRARELOOKSRAx, .;LOOKSR;. .oSRARELOOKSRAo,. .;OKSR LOOKSk:. .'RARELOOKSRARd;. .... 'oOOOOOOOOOOxc'. .:LOOKSR LOOKSRARc. .:dLOOKSRAREko;. .,lxOOOOOOOOOd:. .ARELOOKSR LOOKSRARELo' .;oOKSRARELOOxoc;,....,;:ldkOOOOOOOOkd;. 'SRARELOOKSR LOOKSRARELOOd,. .,lSRARELOOKSRARELOOKSRARELOOKSRkl,. .,OKSRARELOOKSR LOOKSRARELOOKSx;. ..;oxELOOKSRARELOOKSRARELOkxl:.. .:LOOKSRARELOOKSR LOOKSRARELOOKSRARc. .':cOKSRARELOOKSRALOc;'. .ARELOOKSRARELOOKSR LOOKSRARELOOKSRARELl' ...'',,,,''... 'SRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOo,. .,OKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSx;. .;xOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLO:. .:SRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKl. .lOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRo'. .'oLOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARd;. .;xRELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARELO:. .:kRARELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKl. .cOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRo' 'oLOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRARE,. .,dRELOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSR LOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSRARELOOKSRARELOOKSRLOOKSRARELOOKSRARELOOKSR */ contract LooksRareExchange is ILooksRareExchange, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using OrderTypes for OrderTypes.MakerOrder; using OrderTypes for OrderTypes.TakerOrder; address public immutable WETH; bytes32 public immutable DOMAIN_SEPARATOR; address public protocolFeeRecipient; ICurrencyManager public currencyManager; IExecutionManager public executionManager; IRoyaltyFeeManager public royaltyFeeManager; ITransferSelectorNFT public transferSelectorNFT; mapping(address => uint256) public userMinOrderNonce; mapping(address => mapping(uint256 => bool)) private _isUserOrderNonceExecutedOrCancelled; event CancelAllOrders(address indexed user, uint256 newMinNonce); event CancelMultipleOrders(address indexed user, uint256[] orderNonces); event NewCurrencyManager(address indexed currencyManager); event NewExecutionManager(address indexed executionManager); event NewProtocolFeeRecipient(address indexed protocolFeeRecipient); event NewRoyaltyFeeManager(address indexed royaltyFeeManager); event NewTransferSelectorNFT(address indexed transferSelectorNFT); event RoyaltyPayment( address indexed collection, uint256 indexed tokenId, address indexed royaltyRecipient, address currency, uint256 amount ); event TakerAsk( bytes32 orderHash, // bid hash of the maker order uint256 orderNonce, // user order nonce address indexed taker, // sender address for the taker ask order address indexed maker, // maker address of the initial bid order address indexed strategy, // strategy that defines the execution address currency, // currency address address collection, // collection address uint256 tokenId, // tokenId transferred uint256 amount, // amount of tokens transferred uint256 price // final transacted price ); event TakerBid( bytes32 orderHash, // ask hash of the maker order uint256 orderNonce, // user order nonce address indexed taker, // sender address for the taker bid order address indexed maker, // maker address of the initial ask order address indexed strategy, // strategy that defines the execution address currency, // currency address address collection, // collection address uint256 tokenId, // tokenId transferred uint256 amount, // amount of tokens transferred uint256 price // final transacted price ); /** * @notice Constructor * @param _currencyManager currency manager address * @param _executionManager execution manager address * @param _royaltyFeeManager royalty fee manager address * @param _WETH wrapped ether address (for other chains, use wrapped native asset) * @param _protocolFeeRecipient protocol fee recipient */ constructor( address _currencyManager, address _executionManager, address _royaltyFeeManager, address _WETH, address _protocolFeeRecipient ) { // Calculate the domain separator DOMAIN_SEPARATOR = keccak256( abi.encode( 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f, // keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") 0xda9101ba92939daf4bb2e18cd5f942363b9297fbc3232c9dd964abb1fb70ed71, // keccak256("LooksRareExchange") 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6, // keccak256(bytes("1")) for versionId = 1 block.chainid, address(this) ) ); currencyManager = ICurrencyManager(_currencyManager); executionManager = IExecutionManager(_executionManager); royaltyFeeManager = IRoyaltyFeeManager(_royaltyFeeManager); WETH = _WETH; protocolFeeRecipient = _protocolFeeRecipient; } /** * @notice Cancel all pending orders for a sender * @param minNonce minimum user nonce */ function cancelAllOrdersForSender(uint256 minNonce) external { require(minNonce > userMinOrderNonce[msg.sender], "Cancel: Order nonce lower than current"); require(minNonce < userMinOrderNonce[msg.sender] + 500000, "Cancel: Cannot cancel more orders"); userMinOrderNonce[msg.sender] = minNonce; emit CancelAllOrders(msg.sender, minNonce); } /** * @notice Cancel maker orders * @param orderNonces array of order nonces */ function cancelMultipleMakerOrders(uint256[] calldata orderNonces) external { require(orderNonces.length > 0, "Cancel: Cannot be empty"); for (uint256 i = 0; i < orderNonces.length; i++) { require(orderNonces[i] >= userMinOrderNonce[msg.sender], "Cancel: Order nonce lower than current"); _isUserOrderNonceExecutedOrCancelled[msg.sender][orderNonces[i]] = true; } emit CancelMultipleOrders(msg.sender, orderNonces); } /** * @notice Match ask with a taker bid order using ETH * @param takerBid taker bid order * @param makerAsk maker ask order */ function matchAskWithTakerBidUsingETHAndWETH( OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk ) external payable override nonReentrant { require((makerAsk.isOrderAsk) && (!takerBid.isOrderAsk), "Order: Wrong sides"); require(makerAsk.currency == WETH, "Order: Currency must be WETH"); require(msg.sender == takerBid.taker, "Order: Taker must be the sender"); // If not enough ETH to cover the price, use WETH if (takerBid.price > msg.value) { IERC20(WETH).safeTransferFrom(msg.sender, address(this), (takerBid.price - msg.value)); } else { require(takerBid.price == msg.value, "Order: Msg.value too high"); } // Wrap ETH sent to this contract IWETH(WETH).deposit{value: msg.value}(); // Check the maker ask order bytes32 askHash = makerAsk.hash(); _validateOrder(makerAsk, askHash); // Retrieve execution parameters (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy) .canExecuteTakerBid(takerBid, makerAsk); require(isExecutionValid, "Strategy: Execution invalid"); // Update maker ask order status to true (prevents replay) _isUserOrderNonceExecutedOrCancelled[makerAsk.signer][makerAsk.nonce] = true; // Execution part 1/2 _transferFeesAndFundsWithWETH( makerAsk.strategy, makerAsk.collection, tokenId, makerAsk.signer, takerBid.price, makerAsk.minPercentageToAsk ); // Execution part 2/2 _transferNonFungibleToken(makerAsk.collection, makerAsk.signer, takerBid.taker, tokenId, amount); emit TakerBid( askHash, makerAsk.nonce, takerBid.taker, makerAsk.signer, makerAsk.strategy, makerAsk.currency, makerAsk.collection, tokenId, amount, takerBid.price ); } /** * @notice Match a takerBid with a matchAsk * @param takerBid taker bid order * @param makerAsk maker ask order */ function matchAskWithTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external override nonReentrant { require((makerAsk.isOrderAsk) && (!takerBid.isOrderAsk), "Order: Wrong sides"); require(msg.sender == takerBid.taker, "Order: Taker must be the sender"); // Check the maker ask order bytes32 askHash = makerAsk.hash(); _validateOrder(makerAsk, askHash); (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy) .canExecuteTakerBid(takerBid, makerAsk); require(isExecutionValid, "Strategy: Execution invalid"); // Update maker ask order status to true (prevents replay) _isUserOrderNonceExecutedOrCancelled[makerAsk.signer][makerAsk.nonce] = true; // Execution part 1/2 _transferFeesAndFunds( makerAsk.strategy, makerAsk.collection, tokenId, makerAsk.currency, msg.sender, makerAsk.signer, takerBid.price, makerAsk.minPercentageToAsk ); // Execution part 2/2 _transferNonFungibleToken(makerAsk.collection, makerAsk.signer, takerBid.taker, tokenId, amount); emit TakerBid( askHash, makerAsk.nonce, takerBid.taker, makerAsk.signer, makerAsk.strategy, makerAsk.currency, makerAsk.collection, tokenId, amount, takerBid.price ); } /** * @notice Match a takerAsk with a makerBid * @param takerAsk taker ask order * @param makerBid maker bid order */ function matchBidWithTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external override nonReentrant { require((!makerBid.isOrderAsk) && (takerAsk.isOrderAsk), "Order: Wrong sides"); require(msg.sender == takerAsk.taker, "Order: Taker must be the sender"); // Check the maker bid order bytes32 bidHash = makerBid.hash(); _validateOrder(makerBid, bidHash); (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerBid.strategy) .canExecuteTakerAsk(takerAsk, makerBid); require(isExecutionValid, "Strategy: Execution invalid"); // Update maker bid order status to true (prevents replay) _isUserOrderNonceExecutedOrCancelled[makerBid.signer][makerBid.nonce] = true; // Execution part 1/2 _transferNonFungibleToken(makerBid.collection, msg.sender, makerBid.signer, tokenId, amount); // Execution part 2/2 _transferFeesAndFunds( makerBid.strategy, makerBid.collection, tokenId, makerBid.currency, makerBid.signer, takerAsk.taker, takerAsk.price, takerAsk.minPercentageToAsk ); emit TakerAsk( bidHash, makerBid.nonce, takerAsk.taker, makerBid.signer, makerBid.strategy, makerBid.currency, makerBid.collection, tokenId, amount, takerAsk.price ); } /** * @notice Update currency manager * @param _currencyManager new currency manager address */ function updateCurrencyManager(address _currencyManager) external onlyOwner { require(_currencyManager != address(0), "Owner: Cannot be null address"); currencyManager = ICurrencyManager(_currencyManager); emit NewCurrencyManager(_currencyManager); } /** * @notice Update execution manager * @param _executionManager new execution manager address */ function updateExecutionManager(address _executionManager) external onlyOwner { require(_executionManager != address(0), "Owner: Cannot be null address"); executionManager = IExecutionManager(_executionManager); emit NewExecutionManager(_executionManager); } /** * @notice Update protocol fee and recipient * @param _protocolFeeRecipient new recipient for protocol fees */ function updateProtocolFeeRecipient(address _protocolFeeRecipient) external onlyOwner { protocolFeeRecipient = _protocolFeeRecipient; emit NewProtocolFeeRecipient(_protocolFeeRecipient); } /** * @notice Update royalty fee manager * @param _royaltyFeeManager new fee manager address */ function updateRoyaltyFeeManager(address _royaltyFeeManager) external onlyOwner { require(_royaltyFeeManager != address(0), "Owner: Cannot be null address"); royaltyFeeManager = IRoyaltyFeeManager(_royaltyFeeManager); emit NewRoyaltyFeeManager(_royaltyFeeManager); } /** * @notice Update transfer selector NFT * @param _transferSelectorNFT new transfer selector address */ function updateTransferSelectorNFT(address _transferSelectorNFT) external onlyOwner { require(_transferSelectorNFT != address(0), "Owner: Cannot be null address"); transferSelectorNFT = ITransferSelectorNFT(_transferSelectorNFT); emit NewTransferSelectorNFT(_transferSelectorNFT); } /** * @notice Check whether user order nonce is executed or cancelled * @param user address of user * @param orderNonce nonce of the order */ function isUserOrderNonceExecutedOrCancelled(address user, uint256 orderNonce) external view returns (bool) { return _isUserOrderNonceExecutedOrCancelled[user][orderNonce]; } /** * @notice Transfer fees and funds to royalty recipient, protocol, and seller * @param strategy address of the execution strategy * @param collection non fungible token address for the transfer * @param tokenId tokenId * @param currency currency being used for the purchase (e.g., WETH/USDC) * @param from sender of the funds * @param to seller's recipient * @param amount amount being transferred (in currency) * @param minPercentageToAsk minimum percentage of the gross amount that goes to ask */ function _transferFeesAndFunds( address strategy, address collection, uint256 tokenId, address currency, address from, address to, uint256 amount, uint256 minPercentageToAsk ) internal { // Initialize the final amount that is transferred to seller uint256 finalSellerAmount = amount; // 1. Protocol fee { uint256 protocolFeeAmount = _calculateProtocolFee(strategy, amount); // Check if the protocol fee is different than 0 for this strategy if ((protocolFeeRecipient != address(0)) && (protocolFeeAmount != 0)) { IERC20(currency).safeTransferFrom(from, protocolFeeRecipient, protocolFeeAmount); finalSellerAmount -= protocolFeeAmount; } } // 2. Royalty fee { (address royaltyFeeRecipient, uint256 royaltyFeeAmount) = royaltyFeeManager .calculateRoyaltyFeeAndGetRecipient(collection, tokenId, amount); // Check if there is a royalty fee and that it is different to 0 if ((royaltyFeeRecipient != address(0)) && (royaltyFeeAmount != 0)) { IERC20(currency).safeTransferFrom(from, royaltyFeeRecipient, royaltyFeeAmount); finalSellerAmount -= royaltyFeeAmount; emit RoyaltyPayment(collection, tokenId, royaltyFeeRecipient, currency, royaltyFeeAmount); } } require((finalSellerAmount * 10000) >= (minPercentageToAsk * amount), "Fees: Higher than expected"); // 3. Transfer final amount (post-fees) to seller { IERC20(currency).safeTransferFrom(from, to, finalSellerAmount); } } /** * @notice Transfer fees and funds to royalty recipient, protocol, and seller * @param strategy address of the execution strategy * @param collection non fungible token address for the transfer * @param tokenId tokenId * @param to seller's recipient * @param amount amount being transferred (in currency) * @param minPercentageToAsk minimum percentage of the gross amount that goes to ask */ function _transferFeesAndFundsWithWETH( address strategy, address collection, uint256 tokenId, address to, uint256 amount, uint256 minPercentageToAsk ) internal { // Initialize the final amount that is transferred to seller uint256 finalSellerAmount = amount; // 1. Protocol fee { uint256 protocolFeeAmount = _calculateProtocolFee(strategy, amount); // Check if the protocol fee is different than 0 for this strategy if ((protocolFeeRecipient != address(0)) && (protocolFeeAmount != 0)) { IERC20(WETH).safeTransfer(protocolFeeRecipient, protocolFeeAmount); finalSellerAmount -= protocolFeeAmount; } } // 2. Royalty fee { (address royaltyFeeRecipient, uint256 royaltyFeeAmount) = royaltyFeeManager .calculateRoyaltyFeeAndGetRecipient(collection, tokenId, amount); // Check if there is a royalty fee and that it is different to 0 if ((royaltyFeeRecipient != address(0)) && (royaltyFeeAmount != 0)) { IERC20(WETH).safeTransfer(royaltyFeeRecipient, royaltyFeeAmount); finalSellerAmount -= royaltyFeeAmount; emit RoyaltyPayment(collection, tokenId, royaltyFeeRecipient, address(WETH), royaltyFeeAmount); } } require((finalSellerAmount * 10000) >= (minPercentageToAsk * amount), "Fees: Higher than expected"); // 3. Transfer final amount (post-fees) to seller { IERC20(WETH).safeTransfer(to, finalSellerAmount); } } /** * @notice Transfer NFT * @param collection address of the token collection * @param from address of the sender * @param to address of the recipient * @param tokenId tokenId * @param amount amount of tokens (1 for ERC721, 1+ for ERC1155) * @dev For ERC721, amount is not used */ function _transferNonFungibleToken( address collection, address from, address to, uint256 tokenId, uint256 amount ) internal { // Retrieve the transfer manager address address transferManager = transferSelectorNFT.checkTransferManagerForToken(collection); // If no transfer manager found, it returns address(0) require(transferManager != address(0), "Transfer: No NFT transfer manager available"); // If one is found, transfer the token ITransferManagerNFT(transferManager).transferNonFungibleToken(collection, from, to, tokenId, amount); } /** * @notice Calculate protocol fee for an execution strategy * @param executionStrategy strategy * @param amount amount to transfer */ function _calculateProtocolFee(address executionStrategy, uint256 amount) internal view returns (uint256) { uint256 protocolFee = IExecutionStrategy(executionStrategy).viewProtocolFee(); return (protocolFee * amount) / 10000; } /** * @notice Verify the validity of the maker order * @param makerOrder maker order * @param orderHash computed hash for the order */ function _validateOrder(OrderTypes.MakerOrder calldata makerOrder, bytes32 orderHash) internal view { // Verify whether order nonce has expired require( (!_isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.nonce]) && (makerOrder.nonce >= userMinOrderNonce[makerOrder.signer]), "Order: Matching order expired" ); // Verify the signer is not address(0) require(makerOrder.signer != address(0), "Order: Invalid signer"); // Verify the amount is not 0 require(makerOrder.amount > 0, "Order: Amount cannot be 0"); // Verify the validity of the signature require( SignatureChecker.verify( orderHash, makerOrder.signer, makerOrder.v, makerOrder.r, makerOrder.s, DOMAIN_SEPARATOR ), "Signature: Invalid" ); // Verify whether the currency is whitelisted require(currencyManager.isCurrencyWhitelisted(makerOrder.currency), "Currency: Not whitelisted"); // Verify whether strategy can be executed require(executionManager.isStrategyWhitelisted(makerOrder.strategy), "Strategy: Not whitelisted"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) 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 making 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) 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; interface ICurrencyManager { function addCurrency(address currency) external; function removeCurrency(address currency) external; function isCurrencyWhitelisted(address currency) external view returns (bool); function viewWhitelistedCurrencies(uint256 cursor, uint256 size) external view returns (address[] memory, uint256); function viewCountWhitelistedCurrencies() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IExecutionManager { function addStrategy(address strategy) external; function removeStrategy(address strategy) external; function isStrategyWhitelisted(address strategy) external view returns (bool); function viewWhitelistedStrategies(uint256 cursor, uint256 size) external view returns (address[] memory, uint256); function viewCountWhitelistedStrategies() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {OrderTypes} from "../libraries/OrderTypes.sol"; interface IExecutionStrategy { function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external view returns ( bool, uint256, uint256 ); function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external view returns ( bool, uint256, uint256 ); function viewProtocolFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRoyaltyFeeManager { function calculateRoyaltyFeeAndGetRecipient( address collection, uint256 tokenId, uint256 amount ) external view returns (address, uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {OrderTypes} from "../libraries/OrderTypes.sol"; interface ILooksRareExchange { function matchAskWithTakerBidUsingETHAndWETH( OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk ) external payable; function matchAskWithTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external; function matchBidWithTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITransferManagerNFT { function transferNonFungibleToken( address collection, address from, address to, uint256 tokenId, uint256 amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITransferSelectorNFT { function checkTransferManagerForToken(address collection) external view returns (address); }
// SPDX-License-Identifier: GNU pragma solidity >=0.5.0; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title OrderTypes * @notice This library contains order types for the LooksRare exchange. */ library OrderTypes { // keccak256("MakerOrder(bool isOrderAsk,address signer,address collection,uint256 price,uint256 tokenId,uint256 amount,address strategy,address currency,uint256 nonce,uint256 startTime,uint256 endTime,uint256 minPercentageToAsk,bytes params)") bytes32 internal constant MAKER_ORDER_HASH = 0x40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a85028; struct MakerOrder { bool isOrderAsk; // true --> ask / false --> bid address signer; // signer of the maker order address collection; // collection address uint256 price; // price (used as ) uint256 tokenId; // id of the token uint256 amount; // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155) address strategy; // strategy for trade execution (e.g., DutchAuction, StandardSaleForFixedPrice) address currency; // currency (e.g., WETH) uint256 nonce; // order nonce (must be unique unless new maker order is meant to override existing one e.g., lower ask price) uint256 startTime; // startTime in timestamp uint256 endTime; // endTime in timestamp uint256 minPercentageToAsk; // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // additional parameters uint8 v; // v: parameter (27 or 28) bytes32 r; // r: parameter bytes32 s; // s: parameter } struct TakerOrder { bool isOrderAsk; // true --> ask / false --> bid address taker; // msg.sender uint256 price; // final price for the purchase uint256 tokenId; uint256 minPercentageToAsk; // // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // other params (e.g., tokenId) } function hash(MakerOrder memory makerOrder) internal pure returns (bytes32) { return keccak256( abi.encode( MAKER_ORDER_HASH, makerOrder.isOrderAsk, makerOrder.signer, makerOrder.collection, makerOrder.price, makerOrder.tokenId, makerOrder.amount, makerOrder.strategy, makerOrder.currency, makerOrder.nonce, makerOrder.startTime, makerOrder.endTime, makerOrder.minPercentageToAsk, keccak256(makerOrder.params) ) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol"; /** * @title SignatureChecker * @notice This library allows verification of signatures for both EOAs and contracts. */ library SignatureChecker { /** * @notice Recovers the signer of a signature (for EOA) * @param hash the hash containing the signed mesage * @param v parameter (27 or 28). This prevents maleability since the public key recovery equation has two possible solutions. * @param r parameter * @param s parameter */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { // https://ethereum.stackexchange.com/questions/83174/is-it-best-practice-to-check-signature-malleability-in-ecrecover // https://crypto.iacr.org/2019/affevents/wac/medias/Heninger-BiasedNonceSense.pdf require( uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Signature: Invalid s parameter" ); require(v == 27 || v == 28, "Signature: Invalid v parameter"); // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "Signature: Invalid signer"); return signer; } /** * @notice Returns whether the signer matches the signed message * @param hash the hash containing the signed mesage * @param signer the signer address to confirm message validity * @param v parameter (27 or 28) * @param r parameter * @param s parameter * @param domainSeparator paramer to prevent signature being executed in other chains and environments * @return true --> if valid // false --> if invalid */ function verify( bytes32 hash, address signer, uint8 v, bytes32 r, bytes32 s, bytes32 domainSeparator ) internal view returns (bool) { // \x19\x01 is the standardized encoding prefix // https://eips.ethereum.org/EIPS/eip-712#specification bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, hash)); if (Address.isContract(signer)) { // 0x1626ba7e is the interfaceId for signature contracts (see IERC1271) return IERC1271(signer).isValidSignature(digest, abi.encodePacked(r, s, v)) == 0x1626ba7e; } else { return recover(digest, v, r, s) == signer; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) 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 // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
{ "optimizer": { "enabled": true, "runs": 888888 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_currencyManager","type":"address"},{"internalType":"address","name":"_executionManager","type":"address"},{"internalType":"address","name":"_royaltyFeeManager","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_protocolFeeRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"newMinNonce","type":"uint256"}],"name":"CancelAllOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"CancelMultipleOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currencyManager","type":"address"}],"name":"NewCurrencyManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executionManager","type":"address"}],"name":"NewExecutionManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"protocolFeeRecipient","type":"address"}],"name":"NewProtocolFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"royaltyFeeManager","type":"address"}],"name":"NewRoyaltyFeeManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"transferSelectorNFT","type":"address"}],"name":"NewTransferSelectorNFT","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":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltyPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"orderNonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"taker","type":"address"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"TakerAsk","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"orderNonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"taker","type":"address"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"TakerBid","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minNonce","type":"uint256"}],"name":"cancelAllOrdersForSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"cancelMultipleMakerOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currencyManager","outputs":[{"internalType":"contract ICurrencyManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executionManager","outputs":[{"internalType":"contract IExecutionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"orderNonce","type":"uint256"}],"name":"isUserOrderNonceExecutedOrCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerBid","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerAsk","type":"tuple"}],"name":"matchAskWithTakerBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerBid","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerAsk","type":"tuple"}],"name":"matchAskWithTakerBidUsingETHAndWETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerAsk","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerBid","type":"tuple"}],"name":"matchBidWithTakerAsk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFeeManager","outputs":[{"internalType":"contract IRoyaltyFeeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferSelectorNFT","outputs":[{"internalType":"contract ITransferSelectorNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_currencyManager","type":"address"}],"name":"updateCurrencyManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_executionManager","type":"address"}],"name":"updateExecutionManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolFeeRecipient","type":"address"}],"name":"updateProtocolFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyFeeManager","type":"address"}],"name":"updateRoyaltyFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_transferSelectorNFT","type":"address"}],"name":"updateTransferSelectorNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userMinOrderNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162004432380380620044328339810160408190526200003491620001b9565b600160005562000044336200014a565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fda9101ba92939daf4bb2e18cd5f942363b9297fbc3232c9dd964abb1fb70ed71918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051808303601f19018152919052805160209091012060a052600380546001600160a01b03199081166001600160a01b0397881617909155600480548216958716959095179094556005805485169386169390931790925560601b6001600160601b03191660805260028054909216921691909117905562000229565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620001b457600080fd5b919050565b600080600080600060a08688031215620001d257600080fd5b620001dd866200019c565b9450620001ed602087016200019c565b9350620001fd604087016200019c565b92506200020d606087016200019c565b91506200021d608087016200019c565b90509295509295909350565b60805160601c60a0516141a86200028a6000396000818161026801526122e701526000818161044b01528181611461015281816115e90152818161168501528181612c3201528181612d6501528181612dea0152612edd01526141a86000f3fe6080604052600436106101755760003560e01c8063715018a6116100cb578063b4e4b2961161007f578063d4ff41dc11610059578063d4ff41dc146104c0578063f2fde38b146104e0578063f75ff53f1461050057600080fd5b8063b4e4b2961461046d578063c549876914610480578063cbd2ec65146104a057600080fd5b80638da5cb5b116100b05780638da5cb5b146103ee5780639e53a69a14610419578063ad5c46481461043957600080fd5b8063715018a6146103ac57806387e4401f146103c157600080fd5b80633b6d032e1161012d5780635ce052d7116101075780635ce052d7146103325780635e14f68e1461035257806364df049e1461037f57600080fd5b80633b6d032e146102b85780634266581e146102d8578063483abb9f1461030557600080fd5b806331e27e271161015e57806331e27e27146101f35780633644e5151461025657806338e292091461029857600080fd5b80630f747d741461017a5780631df47f80146101d1575b600080fd5b34801561018657600080fd5b506003546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101dd57600080fd5b506101f16101ec3660046137b2565b610520565b005b3480156101ff57600080fd5b5061024661020e3660046137ec565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205460ff1690565b60405190151581526020016101c8565b34801561026257600080fd5b5061028a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101c8565b3480156102a457600080fd5b506101f16102b336600461396e565b610615565b3480156102c457600080fd5b506101f16102d336600461396e565b610b01565b3480156102e457600080fd5b5061028a6102f33660046137b2565b60076020526000908152604090205481565b34801561031157600080fd5b506004546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561033e57600080fd5b506101f161034d3660046137b2565b610f74565b34801561035e57600080fd5b506006546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561038b57600080fd5b506002546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103b857600080fd5b506101f16110e1565b3480156103cd57600080fd5b506005546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103fa57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166101a7565b34801561042557600080fd5b506101f1610434366004613846565b61116e565b34801561044557600080fd5b506101a77f000000000000000000000000000000000000000000000000000000000000000081565b6101f161047b36600461396e565b61134f565b34801561048c57600080fd5b506101f161049b3660046137b2565b6118e9565b3480156104ac57600080fd5b506101f16104bb3660046139e2565b611a56565b3480156104cc57600080fd5b506101f16104db3660046137b2565b611bee565b3480156104ec57600080fd5b506101f16104fb3660046137b2565b611d5b565b34801561050c57600080fd5b506101f161051b3660046137b2565b611e8b565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f8cffb07faa2874440346743bdc0a86b06c3335cc47dc49b327d10e77b73ceb1090600090a250565b60026000541415610682576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b600260005561069460208201826138bb565b80156106aa57506106a860208301836138bb565b155b610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b61072060408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b60006107c76107c283613f3f565b611ff8565b90506107d3828261209f565b600080806107e760e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663865781ca87876040518363ffffffff1660e01b8152600401610821929190613c19565b60606040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087191906138f5565b925092509250826108de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b6001600860006108f46040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a01358252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556109af61096c60e0870160c088016137b2565b61097c60608801604089016137b2565b8461098e6101008a0160e08b016137b2565b3361099f60408c0160208d016137b2565b8c604001358c61016001356125d6565b6109e96109c260608701604088016137b2565b6109d260408801602089016137b2565b6109e260408a0160208b016137b2565b8585612890565b6109f960e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610a1f60408701602088016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610a456040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff167f95fb6205e23ff6bda16a2d1dba56b9ad7c783f67c96fa149785052f47696f2be876101008a01803590610a929060e08d016137b2565b610aa260608d0160408e016137b2565b60408051948552602085019390935273ffffffffffffffffffffffffffffffffffffffff918216848401521660608301526080820188905260a082018790528b013560c082015260e00160405180910390a45050600160005550505050565b60026000541415610b6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b6002600055610b8060208201826138bb565b158015610b955750610b9560208301836138bb565b610bfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b610c0b60408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b6000610cad6107c283613f3f565b9050610cb9828261209f565b60008080610ccd60e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663ad2390ac87876040518363ffffffff1660e01b8152600401610d07929190613c19565b60606040518083038186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5791906138f5565b92509250925082610dc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b600160086000610dda6040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a013582529092529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001692151592909217909155610e6790610e5690606088019088016137b2565b336109e26040890160208a016137b2565b610ecb610e7a60e0870160c088016137b2565b610e8a60608801604089016137b2565b84610e9c6101008a0160e08b016137b2565b610eac60408b0160208c016137b2565b610ebc60408d0160208e016137b2565b8c604001358d608001356125d6565b610edb60e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610f0160408701602088016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610f276040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff167f68cd251d4d267c6e2034ff0088b990352b97b2002c0476587d0c4da889c11330876101008a01803590610a929060e08d016137b2565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ff5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611072576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fb4f5db40df3aced29e88a4babbc3b46e305e07d34098525d18b1497056e6383890600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b61116c6000612a80565b565b806111d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e63656c3a2043616e6e6f7420626520656d707479000000000000000000604482015260640161059d565b60005b818110156112fa5733600090815260076020526040902054838383818110611202576112026140e4565b905060200201351015611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e206360448201527f757272656e740000000000000000000000000000000000000000000000000000606482015260840161059d565b3360009081526008602052604081206001918585858181106112bb576112bb6140e4565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806112f29061407c565b9150506111d8565b503373ffffffffffffffffffffffffffffffffffffffff167ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b417328383604051611343929190613ade565b60405180910390a25050565b600260005414156113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b60026000556113ce60208201826138bb565b80156113e457506113e260208301836138bb565b155b61144a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016611492610100830160e084016137b2565b73ffffffffffffffffffffffffffffffffffffffff161461150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4f726465723a2043757272656e6379206d757374206265205745544800000000604482015260640161059d565b61151f60408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b34826040013511156116165761161133306115d2346040870135613f28565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016929190612af7565b611683565b34826040013514611683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f726465723a204d73672e76616c756520746f6f206869676800000000000000604482015260640161059d565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156116eb57600080fd5b505af11580156116ff573d6000803e3d6000fd5b50505050506000611713826107c290613f3f565b905061171f828261209f565b6000808061173360e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663865781ca87876040518363ffffffff1660e01b815260040161176d929190613c19565b60606040518083038186803b15801561178557600080fd5b505afa158015611799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bd91906138f5565b9250925092508261182a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b6001600860006118406040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a01358252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556109af6118b860e0870160c088016137b2565b6118c860608801604089016137b2565b846118d960408a0160208b016137b2565b8a604001358a6101600135612bd9565b60015473ffffffffffffffffffffffffffffffffffffffff16331461196a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff81166119e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f80e3874461ebbd918ac3e81da0a92e5e51387d70f337237c9123e48d20e5a50890600090a250565b336000908152600760205260409020548111611af4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e206360448201527f757272656e740000000000000000000000000000000000000000000000000000606482015260840161059d565b33600090815260076020526040902054611b11906207a120613e98565b8110611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f43616e63656c3a2043616e6e6f742063616e63656c206d6f7265206f7264657260448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161059d565b3360008181526007602052604090819020839055517f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a9790611be39084815260200190565b60405180910390a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611cec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f36e2a376eabc3bc60cb88f29c288f53e36874a95a7f407330ab4f166b090569890600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611ddc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161059d565b611e8881612a80565b50565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611f89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f205d78ab41afe80bd6b6aaa5d7599d5300ff8690da3ab1302c1b552f7baf7d8c90600090a250565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01518051908e01209a5160009e6120829e7f40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a850289e919d919c9b9a999897969594939201613b33565b604051602081830303815290604052805190602001209050919050565b600860006120b360408501602086016137b2565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120610100860135825290925290205460ff1615801561214f57506007600061210b60408501602086016137b2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482610100013510155b6121b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f726465723a204d61746368696e67206f726465722065787069726564000000604482015260640161059d565b60006121c760408401602085016137b2565b73ffffffffffffffffffffffffffffffffffffffff161415612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f726465723a20496e76616c6964207369676e65720000000000000000000000604482015260640161059d565b60008260a00135116122b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f726465723a20416d6f756e742063616e6e6f74206265203000000000000000604482015260640161059d565b61230b816122c760408501602086016137b2565b6122d96101c086016101a08701613a14565b856101c00135866101e001357f0000000000000000000000000000000000000000000000000000000000000000612f0d565b612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5369676e61747572653a20496e76616c69640000000000000000000000000000604482015260640161059d565b60035473ffffffffffffffffffffffffffffffffffffffff166343b938c56123a0610100850160e086016137b2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b15801561240457600080fd5b505afa158015612418573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243c91906138d8565b6124a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43757272656e63793a204e6f742077686974656c697374656400000000000000604482015260640161059d565b60045473ffffffffffffffffffffffffffffffffffffffff1663999ba27c6124d060e0850160c086016137b2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b15801561253457600080fd5b505afa158015612548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256c91906138d8565b6125d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f53747261746567793a204e6f742077686974656c697374656400000000000000604482015260640161059d565b5050565b8160006125e38a836130da565b60025490915073ffffffffffffffffffffffffffffffffffffffff161580159061260c57508015155b156126475760025461263a9073ffffffffffffffffffffffffffffffffffffffff8981169189911684612af7565b6126448183613f28565b91505b506005546040517ff4f635fa00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018a905260448201869052600092839291169063f4f635fa90606401604080518083038186803b1580156126c457600080fd5b505afa1580156126d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126fc9190613818565b909250905073ffffffffffffffffffffffffffffffffffffffff82161580159061272557508015155b156127e25761274c73ffffffffffffffffffffffffffffffffffffffff8916888484612af7565b6127568184613f28565b92508173ffffffffffffffffffffffffffffffffffffffff16898b73ffffffffffffffffffffffffffffffffffffffff167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d8b856040516127d992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a45b506127ef90508383613eeb565b6127fb82612710613eeb565b1015612863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f466565733a20486967686572207468616e206578706563746564000000000000604482015260640161059d565b61288573ffffffffffffffffffffffffffffffffffffffff8716868684612af7565b505050505050505050565b6006546040517fcc15949300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152600092169063cc1594939060240160206040518083038186803b1580156128fc57600080fd5b505afa158015612910573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061293491906137cf565b905073ffffffffffffffffffffffffffffffffffffffff81166129d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5472616e736665723a204e6f204e4654207472616e73666572206d616e61676560448201527f7220617661696c61626c65000000000000000000000000000000000000000000606482015260840161059d565b6040517f33f2fa9f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301528681166024830152858116604483015260648201859052608482018490528216906333f2fa9f9060a401600060405180830381600087803b158015612a6057600080fd5b505af1158015612a74573d6000803e3d6000fd5b50505050505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052612bd39085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261317c565b50505050565b816000612be688836130da565b60025490915073ffffffffffffffffffffffffffffffffffffffff1615801590612c0f57508015155b15612c6857600254612c5b9073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691168361328d565b612c658183613f28565b91505b506005546040517ff4f635fa00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301526024820188905260448201869052600092839291169063f4f635fa90606401604080518083038186803b158015612ce557600080fd5b505afa158015612cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1d9190613818565b909250905073ffffffffffffffffffffffffffffffffffffffff821615801590612d4657508015155b15612e4257612d8c73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016838361328d565b612d968184613f28565b92508173ffffffffffffffffffffffffffffffffffffffff16878973ffffffffffffffffffffffffffffffffffffffff167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d7f000000000000000000000000000000000000000000000000000000000000000085604051612e3992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a45b50612e4f90508383613eeb565b612e5b82612710613eeb565b1015612ec3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f466565733a20486967686572207468616e206578706563746564000000000000604482015260640161059d565b612f0473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016858361328d565b50505050505050565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018790526000908190606201604051602081830303815290604052805190602001209050612f6e873b151590565b1561309257604080516020810187905280820186905260f888901b7fff000000000000000000000000000000000000000000000000000000000000001660608201528151604181830301815260618201928390527f1626ba7e0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff891691631626ba7e91613012918591606501613bed565b60206040518083038186803b15801561302a57600080fd5b505afa15801561303e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613062919061392c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916631626ba7e60e01b149150506130d0565b8673ffffffffffffffffffffffffffffffffffffffff166130b5828888886132e3565b73ffffffffffffffffffffffffffffffffffffffff16149150505b9695505050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff16639dd1cda66040518163ffffffff1660e01b815260040160206040518083038186803b15801561312357600080fd5b505afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b91906139fb565b905061271061316a8483613eeb565b6131749190613eb0565b949350505050565b60006131de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134ef9092919063ffffffff16565b80519091501561328857808060200190518101906131fc91906138d8565b613288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161059d565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526132889084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612b51565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561336f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207320706172616d657465720000604482015260640161059d565b8360ff16601b148061338457508360ff16601c145b6133ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207620706172616d657465720000604482015260640161059d565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561343e573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166134e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5369676e61747572653a20496e76616c6964207369676e657200000000000000604482015260640161059d565b95945050505050565b60606134fe8484600085613508565b90505b9392505050565b60608247101561359a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161059d565b843b613602576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161362b9190613ac2565b60006040518083038185875af1925050503d8060008114613668576040519150601f19603f3d011682016040523d82523d6000602084013e61366d565b606091505b509150915061367d828286613688565b979650505050505050565b60608315613697575081613501565b8251156136a75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059d9190613c06565b80356136e681614142565b919050565b80356136e681614164565b600082601f83011261370757600080fd5b813567ffffffffffffffff8082111561372257613722614113565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561376857613768614113565b8160405283815286602085880101111561378157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146136e657600080fd5b6000602082840312156137c457600080fd5b813561350181614142565b6000602082840312156137e157600080fd5b815161350181614142565b600080604083850312156137ff57600080fd5b823561380a81614142565b946020939093013593505050565b6000806040838503121561382b57600080fd5b825161383681614142565b6020939093015192949293505050565b6000806020838503121561385957600080fd5b823567ffffffffffffffff8082111561387157600080fd5b818501915085601f83011261388557600080fd5b81358181111561389457600080fd5b8660208260051b85010111156138a957600080fd5b60209290920196919550909350505050565b6000602082840312156138cd57600080fd5b813561350181614164565b6000602082840312156138ea57600080fd5b815161350181614164565b60008060006060848603121561390a57600080fd5b835161391581614164565b602085015160409095015190969495509392505050565b60006020828403121561393e57600080fd5b81517fffffffff000000000000000000000000000000000000000000000000000000008116811461350157600080fd5b6000806040838503121561398157600080fd5b823567ffffffffffffffff8082111561399957600080fd5b9084019060c082870312156139ad57600080fd5b909250602084013590808211156139c357600080fd5b50830161020081860312156139d757600080fd5b809150509250929050565b6000602082840312156139f457600080fd5b5035919050565b600060208284031215613a0d57600080fd5b5051919050565b600060208284031215613a2657600080fd5b613501826137a1565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60008151808452613a90816020860160208601614050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251613ad4818460208701614050565b9190910192915050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115613b1757600080fd5b8260051b80856040850137600092016040019182525092915050565b8e81528d1515602082015273ffffffffffffffffffffffffffffffffffffffff8d811660408301528c1660608201526101c081018b60808301528a60a08301528960c0830152613b9b60e083018a73ffffffffffffffffffffffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff88166101008301526101208201969096526101408101949094526101608401929092526101808301526101a0909101529998505050505050505050565b8281526040602082015260006134fe6040830184613a78565b6020815260006135016020830184613a78565b6040815260006101008435613c2d81614164565b151560408401526020850135613c4281614142565b73ffffffffffffffffffffffffffffffffffffffff811660608501525060408501356080840152606085013560a0840152608085013560c0840152613c8a60a0860186613e2d565b60c060e0860152613c9e8386018284613a2f565b9150508381036020850152610200613cbf82613cb9886136eb565b15159052565b613ccb602087016136db565b73ffffffffffffffffffffffffffffffffffffffff166020830152613cf2604087016136db565b73ffffffffffffffffffffffffffffffffffffffff8116604084015250606086013560608301526080860135608083015260a086013560a0830152613d3960c087016136db565b73ffffffffffffffffffffffffffffffffffffffff1660c0830152613d6060e087016136db565b73ffffffffffffffffffffffffffffffffffffffff1660e0830152828601359282019290925261012080860135908201526101408086013590820152610160808601359082015261018091613db783870187613e2d565b8285850152613dc98385018284613a2f565b94505050506101a0613ddc8187016137a1565b60ff16908201526101c085810135908201526101e094850135940193909352509092915050565b604051610200810167ffffffffffffffff81118282101715613e2757613e27614113565b60405290565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613e6257600080fd5b830160208101925035905067ffffffffffffffff811115613e8257600080fd5b803603831315613e9157600080fd5b9250929050565b60008219821115613eab57613eab6140b5565b500190565b600082613ee6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f2357613f236140b5565b500290565b600082821015613f3a57613f3a6140b5565b500390565b60006102008236031215613f5257600080fd5b613f5a613e03565b613f63836136eb565b8152613f71602084016136db565b6020820152613f82604084016136db565b6040820152606083013560608201526080830135608082015260a083013560a0820152613fb160c084016136db565b60c0820152613fc260e084016136db565b60e082015261010083810135908201526101208084013590820152610140808401359082015261016080840135908201526101808084013567ffffffffffffffff81111561400f57600080fd5b61401b368287016136f6565b8284015250506101a061402f8185016137a1565b908201526101c083810135908201526101e092830135928101929092525090565b60005b8381101561406b578181015183820152602001614053565b83811115612bd35750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156140ae576140ae6140b5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611e8857600080fd5b8015158114611e8857600080fdfea26469706673582212201fee9147a39a3fd0821b926c8884d29779b6f7bddf40082661fb084d1787146464736f6c63430008070033000000000000000000000000c881addf409ee2c4b6bbc8b607c2c5cafab93d250000000000000000000000009cc58bf22a173c0fa8791c13df396d18185d62b20000000000000000000000007358182024c9f1b2e6b0153e60bf6156b7ef4906000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101755760003560e01c8063715018a6116100cb578063b4e4b2961161007f578063d4ff41dc11610059578063d4ff41dc146104c0578063f2fde38b146104e0578063f75ff53f1461050057600080fd5b8063b4e4b2961461046d578063c549876914610480578063cbd2ec65146104a057600080fd5b80638da5cb5b116100b05780638da5cb5b146103ee5780639e53a69a14610419578063ad5c46481461043957600080fd5b8063715018a6146103ac57806387e4401f146103c157600080fd5b80633b6d032e1161012d5780635ce052d7116101075780635ce052d7146103325780635e14f68e1461035257806364df049e1461037f57600080fd5b80633b6d032e146102b85780634266581e146102d8578063483abb9f1461030557600080fd5b806331e27e271161015e57806331e27e27146101f35780633644e5151461025657806338e292091461029857600080fd5b80630f747d741461017a5780631df47f80146101d1575b600080fd5b34801561018657600080fd5b506003546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101dd57600080fd5b506101f16101ec3660046137b2565b610520565b005b3480156101ff57600080fd5b5061024661020e3660046137ec565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205460ff1690565b60405190151581526020016101c8565b34801561026257600080fd5b5061028a7fad4d53a9c11a3edbe96e78e969291ab5248faeb3b8d4552c21e6bc72edb8cab381565b6040519081526020016101c8565b3480156102a457600080fd5b506101f16102b336600461396e565b610615565b3480156102c457600080fd5b506101f16102d336600461396e565b610b01565b3480156102e457600080fd5b5061028a6102f33660046137b2565b60076020526000908152604090205481565b34801561031157600080fd5b506004546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561033e57600080fd5b506101f161034d3660046137b2565b610f74565b34801561035e57600080fd5b506006546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561038b57600080fd5b506002546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103b857600080fd5b506101f16110e1565b3480156103cd57600080fd5b506005546101a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103fa57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166101a7565b34801561042557600080fd5b506101f1610434366004613846565b61116e565b34801561044557600080fd5b506101a77f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6101f161047b36600461396e565b61134f565b34801561048c57600080fd5b506101f161049b3660046137b2565b6118e9565b3480156104ac57600080fd5b506101f16104bb3660046139e2565b611a56565b3480156104cc57600080fd5b506101f16104db3660046137b2565b611bee565b3480156104ec57600080fd5b506101f16104fb3660046137b2565b611d5b565b34801561050c57600080fd5b506101f161051b3660046137b2565b611e8b565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f8cffb07faa2874440346743bdc0a86b06c3335cc47dc49b327d10e77b73ceb1090600090a250565b60026000541415610682576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b600260005561069460208201826138bb565b80156106aa57506106a860208301836138bb565b155b610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b61072060408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b60006107c76107c283613f3f565b611ff8565b90506107d3828261209f565b600080806107e760e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663865781ca87876040518363ffffffff1660e01b8152600401610821929190613c19565b60606040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087191906138f5565b925092509250826108de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b6001600860006108f46040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a01358252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556109af61096c60e0870160c088016137b2565b61097c60608801604089016137b2565b8461098e6101008a0160e08b016137b2565b3361099f60408c0160208d016137b2565b8c604001358c61016001356125d6565b6109e96109c260608701604088016137b2565b6109d260408801602089016137b2565b6109e260408a0160208b016137b2565b8585612890565b6109f960e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610a1f60408701602088016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610a456040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff167f95fb6205e23ff6bda16a2d1dba56b9ad7c783f67c96fa149785052f47696f2be876101008a01803590610a929060e08d016137b2565b610aa260608d0160408e016137b2565b60408051948552602085019390935273ffffffffffffffffffffffffffffffffffffffff918216848401521660608301526080820188905260a082018790528b013560c082015260e00160405180910390a45050600160005550505050565b60026000541415610b6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b6002600055610b8060208201826138bb565b158015610b955750610b9560208301836138bb565b610bfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b610c0b60408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b6000610cad6107c283613f3f565b9050610cb9828261209f565b60008080610ccd60e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663ad2390ac87876040518363ffffffff1660e01b8152600401610d07929190613c19565b60606040518083038186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5791906138f5565b92509250925082610dc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b600160086000610dda6040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a013582529092529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001692151592909217909155610e6790610e5690606088019088016137b2565b336109e26040890160208a016137b2565b610ecb610e7a60e0870160c088016137b2565b610e8a60608801604089016137b2565b84610e9c6101008a0160e08b016137b2565b610eac60408b0160208c016137b2565b610ebc60408d0160208e016137b2565b8c604001358d608001356125d6565b610edb60e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610f0160408701602088016137b2565b73ffffffffffffffffffffffffffffffffffffffff16610f276040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff167f68cd251d4d267c6e2034ff0088b990352b97b2002c0476587d0c4da889c11330876101008a01803590610a929060e08d016137b2565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ff5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611072576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fb4f5db40df3aced29e88a4babbc3b46e305e07d34098525d18b1497056e6383890600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b61116c6000612a80565b565b806111d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e63656c3a2043616e6e6f7420626520656d707479000000000000000000604482015260640161059d565b60005b818110156112fa5733600090815260076020526040902054838383818110611202576112026140e4565b905060200201351015611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e206360448201527f757272656e740000000000000000000000000000000000000000000000000000606482015260840161059d565b3360009081526008602052604081206001918585858181106112bb576112bb6140e4565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806112f29061407c565b9150506111d8565b503373ffffffffffffffffffffffffffffffffffffffff167ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b417328383604051611343929190613ade565b60405180910390a25050565b600260005414156113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b60026000556113ce60208201826138bb565b80156113e457506113e260208301836138bb565b155b61144a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4f726465723a2057726f6e672073696465730000000000000000000000000000604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216611492610100830160e084016137b2565b73ffffffffffffffffffffffffffffffffffffffff161461150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4f726465723a2043757272656e6379206d757374206265205745544800000000604482015260640161059d565b61151f60408301602084016137b2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604482015260640161059d565b34826040013511156116165761161133306115d2346040870135613f28565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216929190612af7565b611683565b34826040013514611683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f726465723a204d73672e76616c756520746f6f206869676800000000000000604482015260640161059d565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156116eb57600080fd5b505af11580156116ff573d6000803e3d6000fd5b50505050506000611713826107c290613f3f565b905061171f828261209f565b6000808061173360e0860160c087016137b2565b73ffffffffffffffffffffffffffffffffffffffff1663865781ca87876040518363ffffffff1660e01b815260040161176d929190613c19565b60606040518083038186803b15801561178557600080fd5b505afa158015611799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bd91906138f5565b9250925092508261182a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604482015260640161059d565b6001600860006118406040890160208a016137b2565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081206101008a01358252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556109af6118b860e0870160c088016137b2565b6118c860608801604089016137b2565b846118d960408a0160208b016137b2565b8a604001358a6101600135612bd9565b60015473ffffffffffffffffffffffffffffffffffffffff16331461196a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff81166119e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f80e3874461ebbd918ac3e81da0a92e5e51387d70f337237c9123e48d20e5a50890600090a250565b336000908152600760205260409020548111611af4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e206360448201527f757272656e740000000000000000000000000000000000000000000000000000606482015260840161059d565b33600090815260076020526040902054611b11906207a120613e98565b8110611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f43616e63656c3a2043616e6e6f742063616e63656c206d6f7265206f7264657260448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161059d565b3360008181526007602052604090819020839055517f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a9790611be39084815260200190565b60405180910390a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611cec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f36e2a376eabc3bc60cb88f29c288f53e36874a95a7f407330ab4f166b090569890600090a250565b60015473ffffffffffffffffffffffffffffffffffffffff163314611ddc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161059d565b611e8881612a80565b50565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b73ffffffffffffffffffffffffffffffffffffffff8116611f89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604482015260640161059d565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f205d78ab41afe80bd6b6aaa5d7599d5300ff8690da3ab1302c1b552f7baf7d8c90600090a250565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01518051908e01209a5160009e6120829e7f40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a850289e919d919c9b9a999897969594939201613b33565b604051602081830303815290604052805190602001209050919050565b600860006120b360408501602086016137b2565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120610100860135825290925290205460ff1615801561214f57506007600061210b60408501602086016137b2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482610100013510155b6121b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f726465723a204d61746368696e67206f726465722065787069726564000000604482015260640161059d565b60006121c760408401602085016137b2565b73ffffffffffffffffffffffffffffffffffffffff161415612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f726465723a20496e76616c6964207369676e65720000000000000000000000604482015260640161059d565b60008260a00135116122b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f726465723a20416d6f756e742063616e6e6f74206265203000000000000000604482015260640161059d565b61230b816122c760408501602086016137b2565b6122d96101c086016101a08701613a14565b856101c00135866101e001357fad4d53a9c11a3edbe96e78e969291ab5248faeb3b8d4552c21e6bc72edb8cab3612f0d565b612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5369676e61747572653a20496e76616c69640000000000000000000000000000604482015260640161059d565b60035473ffffffffffffffffffffffffffffffffffffffff166343b938c56123a0610100850160e086016137b2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b15801561240457600080fd5b505afa158015612418573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243c91906138d8565b6124a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43757272656e63793a204e6f742077686974656c697374656400000000000000604482015260640161059d565b60045473ffffffffffffffffffffffffffffffffffffffff1663999ba27c6124d060e0850160c086016137b2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b15801561253457600080fd5b505afa158015612548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256c91906138d8565b6125d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f53747261746567793a204e6f742077686974656c697374656400000000000000604482015260640161059d565b5050565b8160006125e38a836130da565b60025490915073ffffffffffffffffffffffffffffffffffffffff161580159061260c57508015155b156126475760025461263a9073ffffffffffffffffffffffffffffffffffffffff8981169189911684612af7565b6126448183613f28565b91505b506005546040517ff4f635fa00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018a905260448201869052600092839291169063f4f635fa90606401604080518083038186803b1580156126c457600080fd5b505afa1580156126d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126fc9190613818565b909250905073ffffffffffffffffffffffffffffffffffffffff82161580159061272557508015155b156127e25761274c73ffffffffffffffffffffffffffffffffffffffff8916888484612af7565b6127568184613f28565b92508173ffffffffffffffffffffffffffffffffffffffff16898b73ffffffffffffffffffffffffffffffffffffffff167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d8b856040516127d992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a45b506127ef90508383613eeb565b6127fb82612710613eeb565b1015612863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f466565733a20486967686572207468616e206578706563746564000000000000604482015260640161059d565b61288573ffffffffffffffffffffffffffffffffffffffff8716868684612af7565b505050505050505050565b6006546040517fcc15949300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152600092169063cc1594939060240160206040518083038186803b1580156128fc57600080fd5b505afa158015612910573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061293491906137cf565b905073ffffffffffffffffffffffffffffffffffffffff81166129d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5472616e736665723a204e6f204e4654207472616e73666572206d616e61676560448201527f7220617661696c61626c65000000000000000000000000000000000000000000606482015260840161059d565b6040517f33f2fa9f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301528681166024830152858116604483015260648201859052608482018490528216906333f2fa9f9060a401600060405180830381600087803b158015612a6057600080fd5b505af1158015612a74573d6000803e3d6000fd5b50505050505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052612bd39085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261317c565b50505050565b816000612be688836130da565b60025490915073ffffffffffffffffffffffffffffffffffffffff1615801590612c0f57508015155b15612c6857600254612c5b9073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2811691168361328d565b612c658183613f28565b91505b506005546040517ff4f635fa00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301526024820188905260448201869052600092839291169063f4f635fa90606401604080518083038186803b158015612ce557600080fd5b505afa158015612cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1d9190613818565b909250905073ffffffffffffffffffffffffffffffffffffffff821615801590612d4657508015155b15612e4257612d8c73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216838361328d565b612d968184613f28565b92508173ffffffffffffffffffffffffffffffffffffffff16878973ffffffffffffffffffffffffffffffffffffffff167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc285604051612e3992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a45b50612e4f90508383613eeb565b612e5b82612710613eeb565b1015612ec3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f466565733a20486967686572207468616e206578706563746564000000000000604482015260640161059d565b612f0473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216858361328d565b50505050505050565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018790526000908190606201604051602081830303815290604052805190602001209050612f6e873b151590565b1561309257604080516020810187905280820186905260f888901b7fff000000000000000000000000000000000000000000000000000000000000001660608201528151604181830301815260618201928390527f1626ba7e0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff891691631626ba7e91613012918591606501613bed565b60206040518083038186803b15801561302a57600080fd5b505afa15801561303e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613062919061392c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916631626ba7e60e01b149150506130d0565b8673ffffffffffffffffffffffffffffffffffffffff166130b5828888886132e3565b73ffffffffffffffffffffffffffffffffffffffff16149150505b9695505050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff16639dd1cda66040518163ffffffff1660e01b815260040160206040518083038186803b15801561312357600080fd5b505afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b91906139fb565b905061271061316a8483613eeb565b6131749190613eb0565b949350505050565b60006131de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134ef9092919063ffffffff16565b80519091501561328857808060200190518101906131fc91906138d8565b613288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161059d565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526132889084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612b51565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561336f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207320706172616d657465720000604482015260640161059d565b8360ff16601b148061338457508360ff16601c145b6133ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207620706172616d657465720000604482015260640161059d565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561343e573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166134e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5369676e61747572653a20496e76616c6964207369676e657200000000000000604482015260640161059d565b95945050505050565b60606134fe8484600085613508565b90505b9392505050565b60608247101561359a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161059d565b843b613602576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161362b9190613ac2565b60006040518083038185875af1925050503d8060008114613668576040519150601f19603f3d011682016040523d82523d6000602084013e61366d565b606091505b509150915061367d828286613688565b979650505050505050565b60608315613697575081613501565b8251156136a75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059d9190613c06565b80356136e681614142565b919050565b80356136e681614164565b600082601f83011261370757600080fd5b813567ffffffffffffffff8082111561372257613722614113565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561376857613768614113565b8160405283815286602085880101111561378157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146136e657600080fd5b6000602082840312156137c457600080fd5b813561350181614142565b6000602082840312156137e157600080fd5b815161350181614142565b600080604083850312156137ff57600080fd5b823561380a81614142565b946020939093013593505050565b6000806040838503121561382b57600080fd5b825161383681614142565b6020939093015192949293505050565b6000806020838503121561385957600080fd5b823567ffffffffffffffff8082111561387157600080fd5b818501915085601f83011261388557600080fd5b81358181111561389457600080fd5b8660208260051b85010111156138a957600080fd5b60209290920196919550909350505050565b6000602082840312156138cd57600080fd5b813561350181614164565b6000602082840312156138ea57600080fd5b815161350181614164565b60008060006060848603121561390a57600080fd5b835161391581614164565b602085015160409095015190969495509392505050565b60006020828403121561393e57600080fd5b81517fffffffff000000000000000000000000000000000000000000000000000000008116811461350157600080fd5b6000806040838503121561398157600080fd5b823567ffffffffffffffff8082111561399957600080fd5b9084019060c082870312156139ad57600080fd5b909250602084013590808211156139c357600080fd5b50830161020081860312156139d757600080fd5b809150509250929050565b6000602082840312156139f457600080fd5b5035919050565b600060208284031215613a0d57600080fd5b5051919050565b600060208284031215613a2657600080fd5b613501826137a1565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60008151808452613a90816020860160208601614050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251613ad4818460208701614050565b9190910192915050565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115613b1757600080fd5b8260051b80856040850137600092016040019182525092915050565b8e81528d1515602082015273ffffffffffffffffffffffffffffffffffffffff8d811660408301528c1660608201526101c081018b60808301528a60a08301528960c0830152613b9b60e083018a73ffffffffffffffffffffffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff88166101008301526101208201969096526101408101949094526101608401929092526101808301526101a0909101529998505050505050505050565b8281526040602082015260006134fe6040830184613a78565b6020815260006135016020830184613a78565b6040815260006101008435613c2d81614164565b151560408401526020850135613c4281614142565b73ffffffffffffffffffffffffffffffffffffffff811660608501525060408501356080840152606085013560a0840152608085013560c0840152613c8a60a0860186613e2d565b60c060e0860152613c9e8386018284613a2f565b9150508381036020850152610200613cbf82613cb9886136eb565b15159052565b613ccb602087016136db565b73ffffffffffffffffffffffffffffffffffffffff166020830152613cf2604087016136db565b73ffffffffffffffffffffffffffffffffffffffff8116604084015250606086013560608301526080860135608083015260a086013560a0830152613d3960c087016136db565b73ffffffffffffffffffffffffffffffffffffffff1660c0830152613d6060e087016136db565b73ffffffffffffffffffffffffffffffffffffffff1660e0830152828601359282019290925261012080860135908201526101408086013590820152610160808601359082015261018091613db783870187613e2d565b8285850152613dc98385018284613a2f565b94505050506101a0613ddc8187016137a1565b60ff16908201526101c085810135908201526101e094850135940193909352509092915050565b604051610200810167ffffffffffffffff81118282101715613e2757613e27614113565b60405290565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613e6257600080fd5b830160208101925035905067ffffffffffffffff811115613e8257600080fd5b803603831315613e9157600080fd5b9250929050565b60008219821115613eab57613eab6140b5565b500190565b600082613ee6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f2357613f236140b5565b500290565b600082821015613f3a57613f3a6140b5565b500390565b60006102008236031215613f5257600080fd5b613f5a613e03565b613f63836136eb565b8152613f71602084016136db565b6020820152613f82604084016136db565b6040820152606083013560608201526080830135608082015260a083013560a0820152613fb160c084016136db565b60c0820152613fc260e084016136db565b60e082015261010083810135908201526101208084013590820152610140808401359082015261016080840135908201526101808084013567ffffffffffffffff81111561400f57600080fd5b61401b368287016136f6565b8284015250506101a061402f8185016137a1565b908201526101c083810135908201526101e092830135928101929092525090565b60005b8381101561406b578181015183820152602001614053565b83811115612bd35750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156140ae576140ae6140b5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611e8857600080fd5b8015158114611e8857600080fdfea26469706673582212201fee9147a39a3fd0821b926c8884d29779b6f7bddf40082661fb084d1787146464736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c881addf409ee2c4b6bbc8b607c2c5cafab93d250000000000000000000000009cc58bf22a173c0fa8791c13df396d18185d62b20000000000000000000000007358182024c9f1b2e6b0153e60bf6156b7ef4906000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _currencyManager (address): 0xC881ADdf409eE2C4b6bBc8B607c2C5CAFaB93d25
Arg [1] : _executionManager (address): 0x9Cc58bf22a173C0Fa8791c13Df396d18185d62b2
Arg [2] : _royaltyFeeManager (address): 0x7358182024c9f1B2e6b0153e60bf6156B7eF4906
Arg [3] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [4] : _protocolFeeRecipient (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c881addf409ee2c4b6bbc8b607c2c5cafab93d25
Arg [1] : 0000000000000000000000009cc58bf22a173c0fa8791c13df396d18185d62b2
Arg [2] : 0000000000000000000000007358182024c9f1b2e6b0153e60bf6156b7ef4906
Arg [3] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ 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.