0x Protocol's patched v2.1 Exchange contract as of 13 Jul 2019. You can learn more about the exchange contract here.
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 479,183 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Fill Order | 19946826 | 3 days ago | IN | 0 ETH | 0.00148417 | ||||
Fill Order | 19928731 | 6 days ago | IN | 0 ETH | 0.00273388 | ||||
Cancel Order | 19908753 | 9 days ago | IN | 0 ETH | 0.0002436 | ||||
Fill Order | 19880311 | 13 days ago | IN | 0 ETH | 0.00132462 | ||||
Fill Order | 19865871 | 15 days ago | IN | 0 ETH | 0.0007465 | ||||
Fill Order | 19861264 | 15 days ago | IN | 0 ETH | 0.00292717 | ||||
Fill Order | 19846516 | 17 days ago | IN | 0 ETH | 0.00259578 | ||||
Fill Order | 19829388 | 20 days ago | IN | 0 ETH | 0.00077542 | ||||
Cancel Order | 19819404 | 21 days ago | IN | 0 ETH | 0.00067679 | ||||
Fill Order | 19819348 | 21 days ago | IN | 0 ETH | 0.00162806 | ||||
Fill Order | 19809067 | 23 days ago | IN | 0 ETH | 0.00178373 | ||||
Fill Order | 19757000 | 30 days ago | IN | 0 ETH | 0.00112008 | ||||
Fill Order | 19727658 | 34 days ago | IN | 0 ETH | 0.00179877 | ||||
Fill Order | 19715808 | 36 days ago | IN | 0 ETH | 0.00366262 | ||||
Fill Order | 19714628 | 36 days ago | IN | 0 ETH | 0.00101811 | ||||
Fill Order | 19713082 | 36 days ago | IN | 0 ETH | 0.00202193 | ||||
Fill Order | 19709077 | 37 days ago | IN | 0 ETH | 0.00291931 | ||||
Fill Order | 19679880 | 41 days ago | IN | 0 ETH | 0.00272 | ||||
Fill Order | 19670863 | 42 days ago | IN | 0 ETH | 0.0014885 | ||||
Cancel Order | 19644364 | 46 days ago | IN | 0 ETH | 0.00092347 | ||||
Cancel Order | 19644343 | 46 days ago | IN | 0 ETH | 0.00097842 | ||||
Cancel Order | 19625023 | 48 days ago | IN | 0 ETH | 0.00136892 | ||||
Fill Order | 19621774 | 49 days ago | IN | 0 ETH | 0.00284808 | ||||
Fill Order | 19603413 | 51 days ago | IN | 0 ETH | 0.00242319 | ||||
Fill Order | 19589815 | 53 days ago | IN | 0 ETH | 0.00665973 |
Latest 12 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
11601859 | 1238 days ago | 0.000035 ETH | ||||
10848371 | 1354 days ago | 13 ETH | ||||
10847318 | 1354 days ago | 250 ETH | ||||
10845371 | 1355 days ago | 0.2 ETH | ||||
10806820 | 1361 days ago | 32 ETH | ||||
10792343 | 1363 days ago | 15 ETH | ||||
10789994 | 1363 days ago | 0.00004362 ETH | ||||
10789937 | 1363 days ago | 0.00009816 ETH | ||||
10789937 | 1363 days ago | 0.00000442 ETH | ||||
10775896 | 1365 days ago | 26 ETH | ||||
10762180 | 1367 days ago | 0.05652 ETH | ||||
10758649 | 1368 days ago | 0.00000107 ETH |
Loading...
Loading
Contract Name:
Exchange
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-07-13 */ /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; pragma experimental ABIEncoderV2; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; // solhint-disable max-line-length contract LibConstants { // Asset data for ZRX token. Used for fee transfers. // @TODO: Hardcode constant when we deploy. Currently // not constant to make testing easier. // The proxyId for ZRX_ASSET_DATA is bytes4(keccak256("ERC20Token(address)")) = 0xf47261b0 // Kovan ZRX address is 0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570. // The ABI encoded proxyId and address is 0xf47261b00000000000000000000000006ff6c0ff1d68b964901f986d4c9fa3ac68346570 // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xf6\xc0\xff\x1d\x68\xb9\x64\x90\x1f\x98\x6d\x4c\x9f\xa3\xac\x68\x34\x65\x70"; // Mainnet ZRX address is 0xe41d2489571d322189246dafa5ebde1f4699f498. // The ABI encoded proxyId and address is 0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498 // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x1d\x24\x89\x57\x1d\x32\x21\x89\x24\x6d\xaf\xa5\xeb\xde\x1f\x46\x99\xf4\x98"; // solhint-disable-next-line var-name-mixedcase bytes public ZRX_ASSET_DATA; // @TODO: Remove when we deploy. constructor (bytes memory zrxAssetData) public { ZRX_ASSET_DATA = zrxAssetData; } } // solhint-enable max-line-length /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract ReentrancyGuard { // Locked state of mutex bool private locked = false; /// @dev Functions with this modifer cannot be reentered. The mutex will be locked /// before function execution and unlocked after. modifier nonReentrant() { // Ensure mutex is unlocked require( !locked, "REENTRANCY_ILLEGAL" ); // Lock mutex before function call locked = true; // Perform function call _; // Unlock mutex after function call locked = false; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; pragma solidity 0.4.24; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require( c / a == b, "UINT256_OVERFLOW" ); return c; } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { require( b <= a, "UINT256_UNDERFLOW" ); return a - b; } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require( c >= a, "UINT256_OVERFLOW" ); return c; } function max64(uint64 a, uint64 b) internal pure returns (uint256) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal pure returns (uint256) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } contract LibFillResults is SafeMath { struct FillResults { uint256 makerAssetFilledAmount; // Total amount of makerAsset(s) filled. uint256 takerAssetFilledAmount; // Total amount of takerAsset(s) filled. uint256 makerFeePaid; // Total amount of ZRX paid by maker(s) to feeRecipient(s). uint256 takerFeePaid; // Total amount of ZRX paid by taker to feeRecipients(s). } struct MatchedFillResults { FillResults left; // Amounts filled and fees paid of left order. FillResults right; // Amounts filled and fees paid of right order. uint256 leftMakerAssetSpreadAmount; // Spread between price of left and right order, denominated in the left order's makerAsset, paid to taker. } /// @dev Adds properties of both FillResults instances. /// Modifies the first FillResults instance specified. /// @param totalFillResults Fill results instance that will be added onto. /// @param singleFillResults Fill results instance that will be added to totalFillResults. function addFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults) internal pure { totalFillResults.makerAssetFilledAmount = safeAdd(totalFillResults.makerAssetFilledAmount, singleFillResults.makerAssetFilledAmount); totalFillResults.takerAssetFilledAmount = safeAdd(totalFillResults.takerAssetFilledAmount, singleFillResults.takerAssetFilledAmount); totalFillResults.makerFeePaid = safeAdd(totalFillResults.makerFeePaid, singleFillResults.makerFeePaid); totalFillResults.takerFeePaid = safeAdd(totalFillResults.takerFeePaid, singleFillResults.takerFeePaid); } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract LibEIP712 { // EIP191 header for EIP712 prefix string constant internal EIP191_HEADER = "\x19\x01"; // EIP712 Domain Name value string constant internal EIP712_DOMAIN_NAME = "0x Protocol"; // EIP712 Domain Version value string constant internal EIP712_DOMAIN_VERSION = "2"; // Hash of the EIP712 Domain Separator Schema bytes32 constant internal EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH = keccak256(abi.encodePacked( "EIP712Domain(", "string name,", "string version,", "address verifyingContract", ")" )); // Hash of the EIP712 Domain Separator data // solhint-disable-next-line var-name-mixedcase bytes32 public EIP712_DOMAIN_HASH; constructor () public { EIP712_DOMAIN_HASH = keccak256(abi.encodePacked( EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH, keccak256(bytes(EIP712_DOMAIN_NAME)), keccak256(bytes(EIP712_DOMAIN_VERSION)), bytes32(address(this)) )); } /// @dev Calculates EIP712 encoding for a hash struct in this EIP712 Domain. /// @param hashStruct The EIP712 hash struct. /// @return EIP712 hash applied to this EIP712 Domain. function hashEIP712Message(bytes32 hashStruct) internal view returns (bytes32 result) { bytes32 eip712DomainHash = EIP712_DOMAIN_HASH; // Assembly for more efficient computing: // keccak256(abi.encodePacked( // EIP191_HEADER, // EIP712_DOMAIN_HASH, // hashStruct // )); assembly { // Load free memory pointer let memPtr := mload(64) mstore(memPtr, 0x1901000000000000000000000000000000000000000000000000000000000000) // EIP191 header mstore(add(memPtr, 2), eip712DomainHash) // EIP712 domain hash mstore(add(memPtr, 34), hashStruct) // Hash of struct // Compute hash result := keccak256(memPtr, 66) } return result; } } contract LibOrder is LibEIP712 { // Hash for the EIP712 Order Schema bytes32 constant internal EIP712_ORDER_SCHEMA_HASH = keccak256(abi.encodePacked( "Order(", "address makerAddress,", "address takerAddress,", "address feeRecipientAddress,", "address senderAddress,", "uint256 makerAssetAmount,", "uint256 takerAssetAmount,", "uint256 makerFee,", "uint256 takerFee,", "uint256 expirationTimeSeconds,", "uint256 salt,", "bytes makerAssetData,", "bytes takerAssetData", ")" )); // A valid order remains fillable until it is expired, fully filled, or cancelled. // An order's state is unaffected by external factors, like account balances. enum OrderStatus { INVALID, // Default value INVALID_MAKER_ASSET_AMOUNT, // Order does not have a valid maker asset amount INVALID_TAKER_ASSET_AMOUNT, // Order does not have a valid taker asset amount FILLABLE, // Order is fillable EXPIRED, // Order has already expired FULLY_FILLED, // Order is fully filled CANCELLED // Order has been cancelled } // solhint-disable max-line-length struct Order { address makerAddress; // Address that created the order. address takerAddress; // Address that is allowed to fill the order. If set to 0, any address is allowed to fill the order. address feeRecipientAddress; // Address that will recieve fees when order is filled. address senderAddress; // Address that is allowed to call Exchange contract methods that affect this order. If set to 0, any address is allowed to call these methods. uint256 makerAssetAmount; // Amount of makerAsset being offered by maker. Must be greater than 0. uint256 takerAssetAmount; // Amount of takerAsset being bid on by maker. Must be greater than 0. uint256 makerFee; // Amount of ZRX paid to feeRecipient by maker when order is filled. If set to 0, no transfer of ZRX from maker to feeRecipient will be attempted. uint256 takerFee; // Amount of ZRX paid to feeRecipient by taker when order is filled. If set to 0, no transfer of ZRX from taker to feeRecipient will be attempted. uint256 expirationTimeSeconds; // Timestamp in seconds at which order expires. uint256 salt; // Arbitrary number to facilitate uniqueness of the order's hash. bytes makerAssetData; // Encoded data that can be decoded by a specified proxy contract when transferring makerAsset. The last byte references the id of this proxy. bytes takerAssetData; // Encoded data that can be decoded by a specified proxy contract when transferring takerAsset. The last byte references the id of this proxy. } // solhint-enable max-line-length struct OrderInfo { uint8 orderStatus; // Status that describes order's validity and fillability. bytes32 orderHash; // EIP712 hash of the order (see LibOrder.getOrderHash). uint256 orderTakerAssetFilledAmount; // Amount of order that has already been filled. } /// @dev Calculates Keccak-256 hash of the order. /// @param order The order structure. /// @return Keccak-256 EIP712 hash of the order. function getOrderHash(Order memory order) internal view returns (bytes32 orderHash) { orderHash = hashEIP712Message(hashOrder(order)); return orderHash; } /// @dev Calculates EIP712 hash of the order. /// @param order The order structure. /// @return EIP712 hash of the order. function hashOrder(Order memory order) internal pure returns (bytes32 result) { bytes32 schemaHash = EIP712_ORDER_SCHEMA_HASH; bytes32 makerAssetDataHash = keccak256(order.makerAssetData); bytes32 takerAssetDataHash = keccak256(order.takerAssetData); // Assembly for more efficiently computing: // keccak256(abi.encodePacked( // EIP712_ORDER_SCHEMA_HASH, // bytes32(order.makerAddress), // bytes32(order.takerAddress), // bytes32(order.feeRecipientAddress), // bytes32(order.senderAddress), // order.makerAssetAmount, // order.takerAssetAmount, // order.makerFee, // order.takerFee, // order.expirationTimeSeconds, // order.salt, // keccak256(order.makerAssetData), // keccak256(order.takerAssetData) // )); assembly { // Calculate memory addresses that will be swapped out before hashing let pos1 := sub(order, 32) let pos2 := add(order, 320) let pos3 := add(order, 352) // Backup let temp1 := mload(pos1) let temp2 := mload(pos2) let temp3 := mload(pos3) // Hash in place mstore(pos1, schemaHash) mstore(pos2, makerAssetDataHash) mstore(pos3, takerAssetDataHash) result := keccak256(pos1, 416) // Restore mstore(pos1, temp1) mstore(pos2, temp2) mstore(pos3, temp3) } return result; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract LibMath is SafeMath { /// @dev Calculates partial value given a numerator and denominator rounded down. /// Reverts if rounding error is >= 0.1% /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target rounded down. function safeGetPartialAmountFloor( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (uint256 partialAmount) { require( denominator > 0, "DIVISION_BY_ZERO" ); require( !isRoundingErrorFloor( numerator, denominator, target ), "ROUNDING_ERROR" ); partialAmount = safeDiv( safeMul(numerator, target), denominator ); return partialAmount; } /// @dev Calculates partial value given a numerator and denominator rounded down. /// Reverts if rounding error is >= 0.1% /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target rounded up. function safeGetPartialAmountCeil( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (uint256 partialAmount) { require( denominator > 0, "DIVISION_BY_ZERO" ); require( !isRoundingErrorCeil( numerator, denominator, target ), "ROUNDING_ERROR" ); // safeDiv computes `floor(a / b)`. We use the identity (a, b integer): // ceil(a / b) = floor((a + b - 1) / b) // To implement `ceil(a / b)` using safeDiv. partialAmount = safeDiv( safeAdd( safeMul(numerator, target), safeSub(denominator, 1) ), denominator ); return partialAmount; } /// @dev Calculates partial value given a numerator and denominator rounded down. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target rounded down. function getPartialAmountFloor( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (uint256 partialAmount) { require( denominator > 0, "DIVISION_BY_ZERO" ); partialAmount = safeDiv( safeMul(numerator, target), denominator ); return partialAmount; } /// @dev Calculates partial value given a numerator and denominator rounded down. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target rounded up. function getPartialAmountCeil( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (uint256 partialAmount) { require( denominator > 0, "DIVISION_BY_ZERO" ); // safeDiv computes `floor(a / b)`. We use the identity (a, b integer): // ceil(a / b) = floor((a + b - 1) / b) // To implement `ceil(a / b)` using safeDiv. partialAmount = safeDiv( safeAdd( safeMul(numerator, target), safeSub(denominator, 1) ), denominator ); return partialAmount; } /// @dev Checks if rounding error >= 0.1% when rounding down. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to multiply with numerator/denominator. /// @return Rounding error is present. function isRoundingErrorFloor( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (bool isError) { require( denominator > 0, "DIVISION_BY_ZERO" ); // The absolute rounding error is the difference between the rounded // value and the ideal value. The relative rounding error is the // absolute rounding error divided by the absolute value of the // ideal value. This is undefined when the ideal value is zero. // // The ideal value is `numerator * target / denominator`. // Let's call `numerator * target % denominator` the remainder. // The absolute error is `remainder / denominator`. // // When the ideal value is zero, we require the absolute error to // be zero. Fortunately, this is always the case. The ideal value is // zero iff `numerator == 0` and/or `target == 0`. In this case the // remainder and absolute error are also zero. if (target == 0 || numerator == 0) { return false; } // Otherwise, we want the relative rounding error to be strictly // less than 0.1%. // The relative error is `remainder / (numerator * target)`. // We want the relative error less than 1 / 1000: // remainder / (numerator * denominator) < 1 / 1000 // or equivalently: // 1000 * remainder < numerator * target // so we have a rounding error iff: // 1000 * remainder >= numerator * target uint256 remainder = mulmod( target, numerator, denominator ); isError = safeMul(1000, remainder) >= safeMul(numerator, target); return isError; } /// @dev Checks if rounding error >= 0.1% when rounding up. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to multiply with numerator/denominator. /// @return Rounding error is present. function isRoundingErrorCeil( uint256 numerator, uint256 denominator, uint256 target ) internal pure returns (bool isError) { require( denominator > 0, "DIVISION_BY_ZERO" ); // See the comments in `isRoundingError`. if (target == 0 || numerator == 0) { // When either is zero, the ideal value and rounded value are zero // and there is no rounding error. (Although the relative error // is undefined.) return false; } // Compute remainder as before uint256 remainder = mulmod( target, numerator, denominator ); remainder = safeSub(denominator, remainder) % denominator; isError = safeMul(1000, remainder) >= safeMul(numerator, target); return isError; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IExchangeCore { /// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch /// and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress). /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled. function cancelOrdersUpTo(uint256 targetOrderEpoch) external; /// @dev Fills the input order. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrder( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public returns (LibFillResults.FillResults memory fillResults); /// @dev After calling, the order can not be filled anymore. /// @param order Order struct containing order specifications. function cancelOrder(LibOrder.Order memory order) public; /// @dev Gets information about an order: status, hash, and amount filled. /// @param order Order to gather information on. /// @return OrderInfo Information about the order and its state. /// See LibOrder.OrderInfo for a complete description. function getOrderInfo(LibOrder.Order memory order) public view returns (LibOrder.OrderInfo memory orderInfo); } contract MExchangeCore is IExchangeCore { // Fill event is emitted whenever an order is filled. event Fill( address indexed makerAddress, // Address that created the order. address indexed feeRecipientAddress, // Address that received fees. address takerAddress, // Address that filled the order. address senderAddress, // Address that called the Exchange contract (msg.sender). uint256 makerAssetFilledAmount, // Amount of makerAsset sold by maker and bought by taker. uint256 takerAssetFilledAmount, // Amount of takerAsset sold by taker and bought by maker. uint256 makerFeePaid, // Amount of ZRX paid to feeRecipient by maker. uint256 takerFeePaid, // Amount of ZRX paid to feeRecipient by taker. bytes32 indexed orderHash, // EIP712 hash of order (see LibOrder.getOrderHash). bytes makerAssetData, // Encoded data specific to makerAsset. bytes takerAssetData // Encoded data specific to takerAsset. ); // Cancel event is emitted whenever an individual order is cancelled. event Cancel( address indexed makerAddress, // Address that created the order. address indexed feeRecipientAddress, // Address that would have recieved fees if order was filled. address senderAddress, // Address that called the Exchange contract (msg.sender). bytes32 indexed orderHash, // EIP712 hash of order (see LibOrder.getOrderHash). bytes makerAssetData, // Encoded data specific to makerAsset. bytes takerAssetData // Encoded data specific to takerAsset. ); // CancelUpTo event is emitted whenever `cancelOrdersUpTo` is executed succesfully. event CancelUpTo( address indexed makerAddress, // Orders cancelled must have been created by this address. address indexed senderAddress, // Orders cancelled must have a `senderAddress` equal to this address. uint256 orderEpoch // Orders with specified makerAddress and senderAddress with a salt less than this value are considered cancelled. ); /// @dev Fills the input order. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrderInternal( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) internal returns (LibFillResults.FillResults memory fillResults); /// @dev After calling, the order can not be filled anymore. /// @param order Order struct containing order specifications. function cancelOrderInternal(LibOrder.Order memory order) internal; /// @dev Updates state with results of a fill order. /// @param order that was filled. /// @param takerAddress Address of taker who filled the order. /// @param orderTakerAssetFilledAmount Amount of order already filled. /// @return fillResults Amounts filled and fees paid by maker and taker. function updateFilledState( LibOrder.Order memory order, address takerAddress, bytes32 orderHash, uint256 orderTakerAssetFilledAmount, LibFillResults.FillResults memory fillResults ) internal; /// @dev Updates state with results of cancelling an order. /// State is only updated if the order is currently fillable. /// Otherwise, updating state would have no effect. /// @param order that was cancelled. /// @param orderHash Hash of order that was cancelled. function updateCancelledState( LibOrder.Order memory order, bytes32 orderHash ) internal; /// @dev Validates context for fillOrder. Succeeds or throws. /// @param order to be filled. /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. /// @param takerAddress Address of order taker. /// @param signature Proof that the orders was created by its maker. function assertFillableOrder( LibOrder.Order memory order, LibOrder.OrderInfo memory orderInfo, address takerAddress, bytes memory signature ) internal view; /// @dev Validates context for fillOrder. Succeeds or throws. /// @param order to be filled. /// @param orderInfo Status, orderHash, and amount already filled of order. /// @param takerAssetFillAmount Desired amount of order to fill by taker. /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered. function assertValidFill( LibOrder.Order memory order, LibOrder.OrderInfo memory orderInfo, uint256 takerAssetFillAmount, uint256 takerAssetFilledAmount, uint256 makerAssetFilledAmount ) internal view; /// @dev Validates context for cancelOrder. Succeeds or throws. /// @param order to be cancelled. /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. function assertValidCancel( LibOrder.Order memory order, LibOrder.OrderInfo memory orderInfo ) internal view; /// @dev Calculates amounts filled and fees paid by maker and taker. /// @param order to be filled. /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. /// @return fillResults Amounts filled and fees paid by maker and taker. function calculateFillResults( LibOrder.Order memory order, uint256 takerAssetFilledAmount ) internal pure returns (LibFillResults.FillResults memory fillResults); } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract ISignatureValidator { /// @dev Approves a hash on-chain using any valid signature type. /// After presigning a hash, the preSign signature type will become valid for that hash and signer. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof that the hash has been signed by signer. function preSign( bytes32 hash, address signerAddress, bytes signature ) external; /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf. /// @param validatorAddress Address of Validator contract. /// @param approval Approval or disapproval of Validator contract. function setSignatureValidatorApproval( address validatorAddress, bool approval ) external; /// @dev Verifies that a signature is valid. /// @param hash Message hash that is signed. /// @param signerAddress Address of signer. /// @param signature Proof of signing. /// @return Validity of order signature. function isValidSignature( bytes32 hash, address signerAddress, bytes memory signature ) public view returns (bool isValid); } contract MSignatureValidator is ISignatureValidator { event SignatureValidatorApproval( address indexed signerAddress, // Address that approves or disapproves a contract to verify signatures. address indexed validatorAddress, // Address of signature validator contract. bool approved // Approval or disapproval of validator contract. ); // Allowed signature types. enum SignatureType { Illegal, // 0x00, default value Invalid, // 0x01 EIP712, // 0x02 EthSign, // 0x03 Wallet, // 0x04 Validator, // 0x05 PreSigned, // 0x06 NSignatureTypes // 0x07, number of signature types. Always leave at end. } /// @dev Verifies signature using logic defined by Wallet contract. /// @param hash Any 32 byte hash. /// @param walletAddress Address that should have signed the given hash /// and defines its own signature verification method. /// @param signature Proof that the hash has been signed by signer. /// @return True if the address recovered from the provided signature matches the input signer address. function isValidWalletSignature( bytes32 hash, address walletAddress, bytes signature ) internal view returns (bool isValid); /// @dev Verifies signature using logic defined by Validator contract. /// @param validatorAddress Address of validator contract. /// @param hash Any 32 byte hash. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof that the hash has been signed by signer. /// @return True if the address recovered from the provided signature matches the input signer address. function isValidValidatorSignature( address validatorAddress, bytes32 hash, address signerAddress, bytes signature ) internal view returns (bool isValid); } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract ITransactions { /// @dev Executes an exchange method call in the context of signer. /// @param salt Arbitrary number to ensure uniqueness of transaction hash. /// @param signerAddress Address of transaction signer. /// @param data AbiV2 encoded calldata. /// @param signature Proof of signer transaction by signer. function executeTransaction( uint256 salt, address signerAddress, bytes data, bytes signature ) external; } contract MTransactions is ITransactions { // Hash for the EIP712 ZeroEx Transaction Schema bytes32 constant internal EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH = keccak256(abi.encodePacked( "ZeroExTransaction(", "uint256 salt,", "address signerAddress,", "bytes data", ")" )); /// @dev Calculates EIP712 hash of the Transaction. /// @param salt Arbitrary number to ensure uniqueness of transaction hash. /// @param signerAddress Address of transaction signer. /// @param data AbiV2 encoded calldata. /// @return EIP712 hash of the Transaction. function hashZeroExTransaction( uint256 salt, address signerAddress, bytes memory data ) internal pure returns (bytes32 result); /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`). /// If calling a fill function, this address will represent the taker. /// If calling a cancel function, this address will represent the maker. /// @return Signer of 0x transaction if entry point is `executeTransaction`. /// `msg.sender` if entry point is any other function. function getCurrentContextAddress() internal view returns (address); } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IAssetProxyDispatcher { /// @dev Registers an asset proxy to its asset proxy id. /// Once an asset proxy is registered, it cannot be unregistered. /// @param assetProxy Address of new asset proxy to register. function registerAssetProxy(address assetProxy) external; /// @dev Gets an asset proxy. /// @param assetProxyId Id of the asset proxy. /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered. function getAssetProxy(bytes4 assetProxyId) external view returns (address); } contract MAssetProxyDispatcher is IAssetProxyDispatcher { // Logs registration of new asset proxy event AssetProxyRegistered( bytes4 id, // Id of new registered AssetProxy. address assetProxy // Address of new registered AssetProxy. ); /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws. /// @param assetData Byte array encoded for the asset. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param amount Amount of token to transfer. function dispatchTransferFrom( bytes memory assetData, address from, address to, uint256 amount ) internal; } contract MixinExchangeCore is ReentrancyGuard, LibConstants, LibMath, LibOrder, LibFillResults, MAssetProxyDispatcher, MExchangeCore, MSignatureValidator, MTransactions { // Mapping of orderHash => amount of takerAsset already bought by maker mapping (bytes32 => uint256) public filled; // Mapping of orderHash => cancelled mapping (bytes32 => bool) public cancelled; // Mapping of makerAddress => senderAddress => lowest salt an order can have in order to be fillable // Orders with specified senderAddress and with a salt less than their epoch are considered cancelled mapping (address => mapping (address => uint256)) public orderEpoch; /// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch /// and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress). /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled. function cancelOrdersUpTo(uint256 targetOrderEpoch) external nonReentrant { address makerAddress = getCurrentContextAddress(); // If this function is called via `executeTransaction`, we only update the orderEpoch for the makerAddress/msg.sender combination. // This allows external filter contracts to add rules to how orders are cancelled via this function. address senderAddress = makerAddress == msg.sender ? address(0) : msg.sender; // orderEpoch is initialized to 0, so to cancelUpTo we need salt + 1 uint256 newOrderEpoch = targetOrderEpoch + 1; uint256 oldOrderEpoch = orderEpoch[makerAddress][senderAddress]; // Ensure orderEpoch is monotonically increasing require( newOrderEpoch > oldOrderEpoch, "INVALID_NEW_ORDER_EPOCH" ); // Update orderEpoch orderEpoch[makerAddress][senderAddress] = newOrderEpoch; emit CancelUpTo( makerAddress, senderAddress, newOrderEpoch ); } /// @dev Fills the input order. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrder( Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public nonReentrant returns (FillResults memory fillResults) { fillResults = fillOrderInternal( order, takerAssetFillAmount, signature ); return fillResults; } /// @dev After calling, the order can not be filled anymore. /// Throws if order is invalid or sender does not have permission to cancel. /// @param order Order to cancel. Order must be OrderStatus.FILLABLE. function cancelOrder(Order memory order) public nonReentrant { cancelOrderInternal(order); } /// @dev Gets information about an order: status, hash, and amount filled. /// @param order Order to gather information on. /// @return OrderInfo Information about the order and its state. /// See LibOrder.OrderInfo for a complete description. function getOrderInfo(Order memory order) public view returns (OrderInfo memory orderInfo) { // Compute the order hash orderInfo.orderHash = getOrderHash(order); // Fetch filled amount orderInfo.orderTakerAssetFilledAmount = filled[orderInfo.orderHash]; // If order.makerAssetAmount is zero, we also reject the order. // While the Exchange contract handles them correctly, they create // edge cases in the supporting infrastructure because they have // an 'infinite' price when computed by a simple division. if (order.makerAssetAmount == 0) { orderInfo.orderStatus = uint8(OrderStatus.INVALID_MAKER_ASSET_AMOUNT); return orderInfo; } // If order.takerAssetAmount is zero, then the order will always // be considered filled because 0 == takerAssetAmount == orderTakerAssetFilledAmount // Instead of distinguishing between unfilled and filled zero taker // amount orders, we choose not to support them. if (order.takerAssetAmount == 0) { orderInfo.orderStatus = uint8(OrderStatus.INVALID_TAKER_ASSET_AMOUNT); return orderInfo; } // Validate order availability if (orderInfo.orderTakerAssetFilledAmount >= order.takerAssetAmount) { orderInfo.orderStatus = uint8(OrderStatus.FULLY_FILLED); return orderInfo; } // Validate order expiration // solhint-disable-next-line not-rely-on-time if (block.timestamp >= order.expirationTimeSeconds) { orderInfo.orderStatus = uint8(OrderStatus.EXPIRED); return orderInfo; } // Check if order has been cancelled if (cancelled[orderInfo.orderHash]) { orderInfo.orderStatus = uint8(OrderStatus.CANCELLED); return orderInfo; } if (orderEpoch[order.makerAddress][order.senderAddress] > order.salt) { orderInfo.orderStatus = uint8(OrderStatus.CANCELLED); return orderInfo; } // All other statuses are ruled out: order is Fillable orderInfo.orderStatus = uint8(OrderStatus.FILLABLE); return orderInfo; } /// @dev Fills the input order. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrderInternal( Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) internal returns (FillResults memory fillResults) { // Fetch order info OrderInfo memory orderInfo = getOrderInfo(order); // Fetch taker address address takerAddress = getCurrentContextAddress(); // Assert that the order is fillable by taker assertFillableOrder( order, orderInfo, takerAddress, signature ); // Get amount of takerAsset to fill uint256 remainingTakerAssetAmount = safeSub(order.takerAssetAmount, orderInfo.orderTakerAssetFilledAmount); uint256 takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerAssetAmount); // Validate context assertValidFill( order, orderInfo, takerAssetFillAmount, takerAssetFilledAmount, fillResults.makerAssetFilledAmount ); // Compute proportional fill amounts fillResults = calculateFillResults(order, takerAssetFilledAmount); // Update exchange internal state updateFilledState( order, takerAddress, orderInfo.orderHash, orderInfo.orderTakerAssetFilledAmount, fillResults ); // Settle order settleOrder( order, takerAddress, fillResults ); return fillResults; } /// @dev After calling, the order can not be filled anymore. /// Throws if order is invalid or sender does not have permission to cancel. /// @param order Order to cancel. Order must be OrderStatus.FILLABLE. function cancelOrderInternal(Order memory order) internal { // Fetch current order status OrderInfo memory orderInfo = getOrderInfo(order); // Validate context assertValidCancel(order, orderInfo); // Perform cancel updateCancelledState(order, orderInfo.orderHash); } /// @dev Updates state with results of a fill order. /// @param order that was filled. /// @param takerAddress Address of taker who filled the order. /// @param orderTakerAssetFilledAmount Amount of order already filled. function updateFilledState( Order memory order, address takerAddress, bytes32 orderHash, uint256 orderTakerAssetFilledAmount, FillResults memory fillResults ) internal { // Update state filled[orderHash] = safeAdd(orderTakerAssetFilledAmount, fillResults.takerAssetFilledAmount); // Log order emit Fill( order.makerAddress, order.feeRecipientAddress, takerAddress, msg.sender, fillResults.makerAssetFilledAmount, fillResults.takerAssetFilledAmount, fillResults.makerFeePaid, fillResults.takerFeePaid, orderHash, order.makerAssetData, order.takerAssetData ); } /// @dev Updates state with results of cancelling an order. /// State is only updated if the order is currently fillable. /// Otherwise, updating state would have no effect. /// @param order that was cancelled. /// @param orderHash Hash of order that was cancelled. function updateCancelledState( Order memory order, bytes32 orderHash ) internal { // Perform cancel cancelled[orderHash] = true; // Log cancel emit Cancel( order.makerAddress, order.feeRecipientAddress, msg.sender, orderHash, order.makerAssetData, order.takerAssetData ); } /// @dev Validates context for fillOrder. Succeeds or throws. /// @param order to be filled. /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. /// @param takerAddress Address of order taker. /// @param signature Proof that the orders was created by its maker. function assertFillableOrder( Order memory order, OrderInfo memory orderInfo, address takerAddress, bytes memory signature ) internal view { // An order can only be filled if its status is FILLABLE. require( orderInfo.orderStatus == uint8(OrderStatus.FILLABLE), "ORDER_UNFILLABLE" ); // Validate sender is allowed to fill this order if (order.senderAddress != address(0)) { require( order.senderAddress == msg.sender, "INVALID_SENDER" ); } // Validate taker is allowed to fill this order if (order.takerAddress != address(0)) { require( order.takerAddress == takerAddress, "INVALID_TAKER" ); } // Validate Maker signature (check only if first time seen) if (orderInfo.orderTakerAssetFilledAmount == 0) { require( isValidSignature( orderInfo.orderHash, order.makerAddress, signature ), "INVALID_ORDER_SIGNATURE" ); } } /// @dev Validates context for fillOrder. Succeeds or throws. /// @param order to be filled. /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. /// @param takerAssetFillAmount Desired amount of order to fill by taker. /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered. function assertValidFill( Order memory order, OrderInfo memory orderInfo, uint256 takerAssetFillAmount, // TODO: use FillResults uint256 takerAssetFilledAmount, uint256 makerAssetFilledAmount ) internal view { // Revert if fill amount is invalid // TODO: reconsider necessity for v2.1 require( takerAssetFillAmount != 0, "INVALID_TAKER_AMOUNT" ); // Make sure taker does not pay more than desired amount // NOTE: This assertion should never fail, it is here // as an extra defence against potential bugs. require( takerAssetFilledAmount <= takerAssetFillAmount, "TAKER_OVERPAY" ); // Make sure order is not overfilled // NOTE: This assertion should never fail, it is here // as an extra defence against potential bugs. require( safeAdd(orderInfo.orderTakerAssetFilledAmount, takerAssetFilledAmount) <= order.takerAssetAmount, "ORDER_OVERFILL" ); // Make sure order is filled at acceptable price. // The order has an implied price from the makers perspective: // order price = order.makerAssetAmount / order.takerAssetAmount // i.e. the number of makerAsset maker is paying per takerAsset. The // maker is guaranteed to get this price or a better (lower) one. The // actual price maker is getting in this fill is: // fill price = makerAssetFilledAmount / takerAssetFilledAmount // We need `fill price <= order price` for the fill to be fair to maker. // This amounts to: // makerAssetFilledAmount order.makerAssetAmount // ------------------------ <= ----------------------- // takerAssetFilledAmount order.takerAssetAmount // or, equivalently: // makerAssetFilledAmount * order.takerAssetAmount <= // order.makerAssetAmount * takerAssetFilledAmount // NOTE: This assertion should never fail, it is here // as an extra defence against potential bugs. require( safeMul(makerAssetFilledAmount, order.takerAssetAmount) <= safeMul(order.makerAssetAmount, takerAssetFilledAmount), "INVALID_FILL_PRICE" ); } /// @dev Validates context for cancelOrder. Succeeds or throws. /// @param order to be cancelled. /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. function assertValidCancel( Order memory order, OrderInfo memory orderInfo ) internal view { // Ensure order is valid // An order can only be cancelled if its status is FILLABLE. require( orderInfo.orderStatus == uint8(OrderStatus.FILLABLE), "ORDER_UNFILLABLE" ); // Validate sender is allowed to cancel this order if (order.senderAddress != address(0)) { require( order.senderAddress == msg.sender, "INVALID_SENDER" ); } // Validate transaction signed by maker address makerAddress = getCurrentContextAddress(); require( order.makerAddress == makerAddress, "INVALID_MAKER" ); } /// @dev Calculates amounts filled and fees paid by maker and taker. /// @param order to be filled. /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. /// @return fillResults Amounts filled and fees paid by maker and taker. function calculateFillResults( Order memory order, uint256 takerAssetFilledAmount ) internal pure returns (FillResults memory fillResults) { // Compute proportional transfer amounts fillResults.takerAssetFilledAmount = takerAssetFilledAmount; fillResults.makerAssetFilledAmount = safeGetPartialAmountFloor( takerAssetFilledAmount, order.takerAssetAmount, order.makerAssetAmount ); fillResults.makerFeePaid = safeGetPartialAmountFloor( fillResults.makerAssetFilledAmount, order.makerAssetAmount, order.makerFee ); fillResults.takerFeePaid = safeGetPartialAmountFloor( takerAssetFilledAmount, order.takerAssetAmount, order.takerFee ); return fillResults; } /// @dev Settles an order by transferring assets between counterparties. /// @param order Order struct containing order specifications. /// @param takerAddress Address selling takerAsset and buying makerAsset. /// @param fillResults Amounts to be filled and fees paid by maker and taker. function settleOrder( LibOrder.Order memory order, address takerAddress, LibFillResults.FillResults memory fillResults ) private { bytes memory zrxAssetData = ZRX_ASSET_DATA; dispatchTransferFrom( order.makerAssetData, order.makerAddress, takerAddress, fillResults.makerAssetFilledAmount ); dispatchTransferFrom( order.takerAssetData, takerAddress, order.makerAddress, fillResults.takerAssetFilledAmount ); dispatchTransferFrom( zrxAssetData, order.makerAddress, order.feeRecipientAddress, fillResults.makerFeePaid ); dispatchTransferFrom( zrxAssetData, takerAddress, order.feeRecipientAddress, fillResults.takerFeePaid ); } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; library LibBytes { using LibBytes for bytes; /// @dev Gets the memory address for a byte array. /// @param input Byte array to lookup. /// @return memoryAddress Memory address of byte array. This /// points to the header of the byte array which contains /// the length. function rawAddress(bytes memory input) internal pure returns (uint256 memoryAddress) { assembly { memoryAddress := input } return memoryAddress; } /// @dev Gets the memory address for the contents of a byte array. /// @param input Byte array to lookup. /// @return memoryAddress Memory address of the contents of the byte array. function contentAddress(bytes memory input) internal pure returns (uint256 memoryAddress) { assembly { memoryAddress := add(input, 32) } return memoryAddress; } /// @dev Copies `length` bytes from memory location `source` to `dest`. /// @param dest memory address to copy bytes to. /// @param source memory address to copy bytes from. /// @param length number of bytes to copy. function memCopy( uint256 dest, uint256 source, uint256 length ) internal pure { if (length < 32) { // Handle a partial word by reading destination and masking // off the bits we are interested in. // This correctly handles overlap, zero lengths and source == dest assembly { let mask := sub(exp(256, sub(32, length)), 1) let s := and(mload(source), not(mask)) let d := and(mload(dest), mask) mstore(dest, or(s, d)) } } else { // Skip the O(length) loop when source == dest. if (source == dest) { return; } // For large copies we copy whole words at a time. The final // word is aligned to the end of the range (instead of after the // previous) to handle partial words. So a copy will look like this: // // #### // #### // #### // #### // // We handle overlap in the source and destination range by // changing the copying direction. This prevents us from // overwriting parts of source that we still need to copy. // // This correctly handles source == dest // if (source > dest) { assembly { // We subtract 32 from `sEnd` and `dEnd` because it // is easier to compare with in the loop, and these // are also the addresses we need for copying the // last bytes. length := sub(length, 32) let sEnd := add(source, length) let dEnd := add(dest, length) // Remember the last 32 bytes of source // This needs to be done here and not after the loop // because we may have overwritten the last bytes in // source already due to overlap. let last := mload(sEnd) // Copy whole words front to back // Note: the first check is always true, // this could have been a do-while loop. // solhint-disable-next-line no-empty-blocks for {} lt(source, sEnd) {} { mstore(dest, mload(source)) source := add(source, 32) dest := add(dest, 32) } // Write the last 32 bytes mstore(dEnd, last) } } else { assembly { // We subtract 32 from `sEnd` and `dEnd` because those // are the starting points when copying a word at the end. length := sub(length, 32) let sEnd := add(source, length) let dEnd := add(dest, length) // Remember the first 32 bytes of source // This needs to be done here and not after the loop // because we may have overwritten the first bytes in // source already due to overlap. let first := mload(source) // Copy whole words back to front // We use a signed comparisson here to allow dEnd to become // negative (happens when source and dest < 32). Valid // addresses in local memory will never be larger than // 2**255, so they can be safely re-interpreted as signed. // Note: the first check is always true, // this could have been a do-while loop. // solhint-disable-next-line no-empty-blocks for {} slt(dest, dEnd) {} { mstore(dEnd, mload(sEnd)) sEnd := sub(sEnd, 32) dEnd := sub(dEnd, 32) } // Write the first 32 bytes mstore(dest, first) } } } } /// @dev Returns a slices from a byte array. /// @param b The byte array to take a slice from. /// @param from The starting index for the slice (inclusive). /// @param to The final index for the slice (exclusive). /// @return result The slice containing bytes at indices [from, to) function slice( bytes memory b, uint256 from, uint256 to ) internal pure returns (bytes memory result) { require( from <= to, "FROM_LESS_THAN_TO_REQUIRED" ); require( to < b.length, "TO_LESS_THAN_LENGTH_REQUIRED" ); // Create a new bytes structure and copy contents result = new bytes(to - from); memCopy( result.contentAddress(), b.contentAddress() + from, result.length ); return result; } /// @dev Returns a slice from a byte array without preserving the input. /// @param b The byte array to take a slice from. Will be destroyed in the process. /// @param from The starting index for the slice (inclusive). /// @param to The final index for the slice (exclusive). /// @return result The slice containing bytes at indices [from, to) /// @dev When `from == 0`, the original array will match the slice. In other cases its state will be corrupted. function sliceDestructive( bytes memory b, uint256 from, uint256 to ) internal pure returns (bytes memory result) { require( from <= to, "FROM_LESS_THAN_TO_REQUIRED" ); require( to < b.length, "TO_LESS_THAN_LENGTH_REQUIRED" ); // Create a new bytes structure around [from, to) in-place. assembly { result := add(b, from) mstore(result, sub(to, from)) } return result; } /// @dev Pops the last byte off of a byte array by modifying its length. /// @param b Byte array that will be modified. /// @return The byte that was popped off. function popLastByte(bytes memory b) internal pure returns (bytes1 result) { require( b.length > 0, "GREATER_THAN_ZERO_LENGTH_REQUIRED" ); // Store last byte. result = b[b.length - 1]; assembly { // Decrement length of byte array. let newLen := sub(mload(b), 1) mstore(b, newLen) } return result; } /// @dev Pops the last 20 bytes off of a byte array by modifying its length. /// @param b Byte array that will be modified. /// @return The 20 byte address that was popped off. function popLast20Bytes(bytes memory b) internal pure returns (address result) { require( b.length >= 20, "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED" ); // Store last 20 bytes. result = readAddress(b, b.length - 20); assembly { // Subtract 20 from byte array length. let newLen := sub(mload(b), 20) mstore(b, newLen) } return result; } /// @dev Tests equality of two byte arrays. /// @param lhs First byte array to compare. /// @param rhs Second byte array to compare. /// @return True if arrays are the same. False otherwise. function equals( bytes memory lhs, bytes memory rhs ) internal pure returns (bool equal) { // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare. // We early exit on unequal lengths, but keccak would also correctly // handle this. return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs); } /// @dev Reads an address from a position in a byte array. /// @param b Byte array containing an address. /// @param index Index in byte array of address. /// @return address from byte array. function readAddress( bytes memory b, uint256 index ) internal pure returns (address result) { require( b.length >= index + 20, // 20 is length of address "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED" ); // Add offset to index: // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index) // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index) index += 20; // Read address from array memory assembly { // 1. Add index to address of bytes array // 2. Load 32-byte word from memory // 3. Apply 20-byte mask to obtain address result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff) } return result; } /// @dev Writes an address into a specific position in a byte array. /// @param b Byte array to insert address into. /// @param index Index in byte array of address. /// @param input Address to put into byte array. function writeAddress( bytes memory b, uint256 index, address input ) internal pure { require( b.length >= index + 20, // 20 is length of address "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED" ); // Add offset to index: // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index) // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index) index += 20; // Store address into array memory assembly { // The address occupies 20 bytes and mstore stores 32 bytes. // First fetch the 32-byte word where we'll be storing the address, then // apply a mask so we have only the bytes in the word that the address will not occupy. // Then combine these bytes with the address and store the 32 bytes back to memory with mstore. // 1. Add index to address of bytes array // 2. Load 32-byte word from memory // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address let neighbors := and( mload(add(b, index)), 0xffffffffffffffffffffffff0000000000000000000000000000000000000000 ) // Make sure input address is clean. // (Solidity does not guarantee this) input := and(input, 0xffffffffffffffffffffffffffffffffffffffff) // Store the neighbors and address into memory mstore(add(b, index), xor(input, neighbors)) } } /// @dev Reads a bytes32 value from a position in a byte array. /// @param b Byte array containing a bytes32 value. /// @param index Index in byte array of bytes32 value. /// @return bytes32 value from byte array. function readBytes32( bytes memory b, uint256 index ) internal pure returns (bytes32 result) { require( b.length >= index + 32, "GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED" ); // Arrays are prefixed by a 256 bit length parameter index += 32; // Read the bytes32 from array memory assembly { result := mload(add(b, index)) } return result; } /// @dev Writes a bytes32 into a specific position in a byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. /// @param input bytes32 to put into byte array. function writeBytes32( bytes memory b, uint256 index, bytes32 input ) internal pure { require( b.length >= index + 32, "GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED" ); // Arrays are prefixed by a 256 bit length parameter index += 32; // Read the bytes32 from array memory assembly { mstore(add(b, index), input) } } /// @dev Reads a uint256 value from a position in a byte array. /// @param b Byte array containing a uint256 value. /// @param index Index in byte array of uint256 value. /// @return uint256 value from byte array. function readUint256( bytes memory b, uint256 index ) internal pure returns (uint256 result) { result = uint256(readBytes32(b, index)); return result; } /// @dev Writes a uint256 into a specific position in a byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. /// @param input uint256 to put into byte array. function writeUint256( bytes memory b, uint256 index, uint256 input ) internal pure { writeBytes32(b, index, bytes32(input)); } /// @dev Reads an unpadded bytes4 value from a position in a byte array. /// @param b Byte array containing a bytes4 value. /// @param index Index in byte array of bytes4 value. /// @return bytes4 value from byte array. function readBytes4( bytes memory b, uint256 index ) internal pure returns (bytes4 result) { require( b.length >= index + 4, "GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED" ); // Arrays are prefixed by a 32 byte length field index += 32; // Read the bytes4 from array memory assembly { result := mload(add(b, index)) // Solidity does not require us to clean the trailing bytes. // We do it anyway result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000) } return result; } /// @dev Reads nested bytes from a specific position. /// @dev NOTE: the returned value overlaps with the input value. /// Both should be treated as immutable. /// @param b Byte array containing nested bytes. /// @param index Index of nested bytes. /// @return result Nested bytes. function readBytesWithLength( bytes memory b, uint256 index ) internal pure returns (bytes memory result) { // Read length of nested bytes uint256 nestedBytesLength = readUint256(b, index); index += 32; // Assert length of <b> is valid, given // length of nested bytes require( b.length >= index + nestedBytesLength, "GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED" ); // Return a pointer to the byte array as it exists inside `b` assembly { result := add(b, index) } return result; } /// @dev Inserts bytes at a specific position in a byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. /// @param input bytes to insert. function writeBytesWithLength( bytes memory b, uint256 index, bytes memory input ) internal pure { // Assert length of <b> is valid, given // length of input require( b.length >= index + 32 + input.length, // 32 bytes to store length "GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED" ); // Copy <input> into <b> memCopy( b.contentAddress() + index, input.rawAddress(), // includes length of <input> input.length + 32 // +32 bytes to store <input> length ); } /// @dev Performs a deep copy of a byte array onto another byte array of greater than or equal length. /// @param dest Byte array that will be overwritten with source bytes. /// @param source Byte array to copy onto dest bytes. function deepCopyBytes( bytes memory dest, bytes memory source ) internal pure { uint256 sourceLen = source.length; // Dest length must be >= source length, or some bytes would not be copied. require( dest.length >= sourceLen, "GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED" ); memCopy( dest.contentAddress(), source.contentAddress(), sourceLen ); } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IWallet { /// @dev Verifies that a signature is valid. /// @param hash Message hash that is signed. /// @param signature Proof of signing. /// @return Validity of order signature. function isValidSignature( bytes32 hash, bytes signature ) external view returns (bool isValid); } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IValidator { /// @dev Verifies that a signature is valid. /// @param hash Message hash that is signed. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof of signing. /// @return Validity of order signature. function isValidSignature( bytes32 hash, address signerAddress, bytes signature ) external view returns (bool isValid); } contract MixinSignatureValidator is ReentrancyGuard, MSignatureValidator, MTransactions { using LibBytes for bytes; // Mapping of hash => signer => signed mapping (bytes32 => mapping (address => bool)) public preSigned; // Mapping of signer => validator => approved mapping (address => mapping (address => bool)) public allowedValidators; /// @dev Approves a hash on-chain using any valid signature type. /// After presigning a hash, the preSign signature type will become valid for that hash and signer. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof that the hash has been signed by signer. function preSign( bytes32 hash, address signerAddress, bytes signature ) external { if (signerAddress != msg.sender) { require( isValidSignature( hash, signerAddress, signature ), "INVALID_SIGNATURE" ); } preSigned[hash][signerAddress] = true; } /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf. /// @param validatorAddress Address of Validator contract. /// @param approval Approval or disapproval of Validator contract. function setSignatureValidatorApproval( address validatorAddress, bool approval ) external nonReentrant { address signerAddress = getCurrentContextAddress(); allowedValidators[signerAddress][validatorAddress] = approval; emit SignatureValidatorApproval( signerAddress, validatorAddress, approval ); } /// @dev Verifies that a hash has been signed by the given signer. /// @param hash Any 32 byte hash. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof that the hash has been signed by signer. /// @return True if the address recovered from the provided signature matches the input signer address. function isValidSignature( bytes32 hash, address signerAddress, bytes memory signature ) public view returns (bool isValid) { require( signature.length > 0, "LENGTH_GREATER_THAN_0_REQUIRED" ); // Pop last byte off of signature byte array. uint8 signatureTypeRaw = uint8(signature.popLastByte()); // Ensure signature is supported require( signatureTypeRaw < uint8(SignatureType.NSignatureTypes), "SIGNATURE_UNSUPPORTED" ); SignatureType signatureType = SignatureType(signatureTypeRaw); // Variables are not scoped in Solidity. uint8 v; bytes32 r; bytes32 s; address recovered; // Always illegal signature. // This is always an implicit option since a signer can create a // signature array with invalid type or length. We may as well make // it an explicit option. This aids testing and analysis. It is // also the initialization value for the enum type. if (signatureType == SignatureType.Illegal) { revert("SIGNATURE_ILLEGAL"); // Always invalid signature. // Like Illegal, this is always implicitly available and therefore // offered explicitly. It can be implicitly created by providing // a correctly formatted but incorrect signature. } else if (signatureType == SignatureType.Invalid) { require( signature.length == 0, "LENGTH_0_REQUIRED" ); isValid = false; return isValid; // Signature using EIP712 } else if (signatureType == SignatureType.EIP712) { require( signature.length == 65, "LENGTH_65_REQUIRED" ); v = uint8(signature[0]); r = signature.readBytes32(1); s = signature.readBytes32(33); recovered = ecrecover( hash, v, r, s ); isValid = signerAddress == recovered; return isValid; // Signed using web3.eth_sign } else if (signatureType == SignatureType.EthSign) { require( signature.length == 65, "LENGTH_65_REQUIRED" ); v = uint8(signature[0]); r = signature.readBytes32(1); s = signature.readBytes32(33); recovered = ecrecover( keccak256(abi.encodePacked( "\x19Ethereum Signed Message:\n32", hash )), v, r, s ); isValid = signerAddress == recovered; return isValid; // Signature verified by wallet contract. // If used with an order, the maker of the order is the wallet contract. } else if (signatureType == SignatureType.Wallet) { isValid = isValidWalletSignature( hash, signerAddress, signature ); return isValid; // Signature verified by validator contract. // If used with an order, the maker of the order can still be an EOA. // A signature using this type should be encoded as: // | Offset | Length | Contents | // | 0x00 | x | Signature to validate | // | 0x00 + x | 20 | Address of validator contract | // | 0x14 + x | 1 | Signature type is always "\x06" | } else if (signatureType == SignatureType.Validator) { // Pop last 20 bytes off of signature byte array. address validatorAddress = signature.popLast20Bytes(); // Ensure signer has approved validator. if (!allowedValidators[signerAddress][validatorAddress]) { return false; } isValid = isValidValidatorSignature( validatorAddress, hash, signerAddress, signature ); return isValid; // Signer signed hash previously using the preSign function. } else if (signatureType == SignatureType.PreSigned) { isValid = preSigned[hash][signerAddress]; return isValid; } // Anything else is illegal (We do not return false because // the signature may actually be valid, just not in a format // that we currently support. In this case returning false // may lead the caller to incorrectly believe that the // signature was invalid.) revert("SIGNATURE_UNSUPPORTED"); } /// @dev Verifies signature using logic defined by Wallet contract. /// @param hash Any 32 byte hash. /// @param walletAddress Address that should have signed the given hash /// and defines its own signature verification method. /// @param signature Proof that the hash has been signed by signer. /// @return True if signature is valid for given wallet.. function isValidWalletSignature( bytes32 hash, address walletAddress, bytes signature ) internal view returns (bool isValid) { bytes memory calldata = abi.encodeWithSelector( IWallet(walletAddress).isValidSignature.selector, hash, signature ); bytes32 magic_salt = bytes32(bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)"))); assembly { if iszero(extcodesize(walletAddress)) { // Revert with `Error("WALLET_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000) mstore(96, 0) revert(0, 100) } let cdStart := add(calldata, 32) let success := staticcall( gas, // forward all gas walletAddress, // address of Wallet contract cdStart, // pointer to start of input mload(calldata), // length of input cdStart, // write output over input 32 // output size is 32 bytes ) if iszero(eq(returndatasize(), 32)) { // Revert with `Error("WALLET_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000) mstore(96, 0) revert(0, 100) } switch success case 0 { // Revert with `Error("WALLET_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000) mstore(96, 0) revert(0, 100) } case 1 { // Signature is valid if call did not revert and returned true isValid := eq( and(mload(cdStart), 0xffffffff00000000000000000000000000000000000000000000000000000000), and(magic_salt, 0xffffffff00000000000000000000000000000000000000000000000000000000) ) } } return isValid; } /// @dev Verifies signature using logic defined by Validator contract. /// @param validatorAddress Address of validator contract. /// @param hash Any 32 byte hash. /// @param signerAddress Address that should have signed the given hash. /// @param signature Proof that the hash has been signed by signer. /// @return True if the address recovered from the provided signature matches the input signer address. function isValidValidatorSignature( address validatorAddress, bytes32 hash, address signerAddress, bytes signature ) internal view returns (bool isValid) { bytes memory calldata = abi.encodeWithSelector( IValidator(signerAddress).isValidSignature.selector, hash, signerAddress, signature ); bytes32 magic_salt = bytes32(bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"))); assembly { if iszero(extcodesize(validatorAddress)) { // Revert with `Error("VALIDATOR_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000) mstore(96, 0) revert(0, 100) } let cdStart := add(calldata, 32) let success := staticcall( gas, // forward all gas validatorAddress, // address of Validator contract cdStart, // pointer to start of input mload(calldata), // length of input cdStart, // write output over input 32 // output size is 32 bytes ) if iszero(eq(returndatasize(), 32)) { // Revert with `Error("VALIDATOR_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000) mstore(96, 0) revert(0, 100) } switch success case 0 { // Revert with `Error("VALIDATOR_ERROR")` mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000) mstore(96, 0) revert(0, 100) } case 1 { // Signature is valid if call did not revert and returned true isValid := eq( and(mload(cdStart), 0xffffffff00000000000000000000000000000000000000000000000000000000), and(magic_salt, 0xffffffff00000000000000000000000000000000000000000000000000000000) ) } } return isValid; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract LibAbiEncoder { /// @dev ABI encodes calldata for `fillOrder`. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return ABI encoded calldata for `fillOrder`. function abiEncodeFillOrder( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) internal pure returns (bytes memory fillOrderCalldata) { // We need to call MExchangeCore.fillOrder using a delegatecall in // assembly so that we can intercept a call that throws. For this, we // need the input encoded in memory in the Ethereum ABIv2 format [1]. // | Area | Offset | Length | Contents | // | -------- |--------|---------|-------------------------------------------- | // | Header | 0x00 | 4 | function selector | // | Params | | 3 * 32 | function parameters: | // | | 0x00 | | 1. offset to order (*) | // | | 0x20 | | 2. takerAssetFillAmount | // | | 0x40 | | 3. offset to signature (*) | // | Data | | 12 * 32 | order: | // | | 0x000 | | 1. senderAddress | // | | 0x020 | | 2. makerAddress | // | | 0x040 | | 3. takerAddress | // | | 0x060 | | 4. feeRecipientAddress | // | | 0x080 | | 5. makerAssetAmount | // | | 0x0A0 | | 6. takerAssetAmount | // | | 0x0C0 | | 7. makerFeeAmount | // | | 0x0E0 | | 8. takerFeeAmount | // | | 0x100 | | 9. expirationTimeSeconds | // | | 0x120 | | 10. salt | // | | 0x140 | | 11. Offset to makerAssetData (*) | // | | 0x160 | | 12. Offset to takerAssetData (*) | // | | 0x180 | 32 | makerAssetData Length | // | | 0x1A0 | ** | makerAssetData Contents | // | | 0x1C0 | 32 | takerAssetData Length | // | | 0x1E0 | ** | takerAssetData Contents | // | | 0x200 | 32 | signature Length | // | | 0x220 | ** | signature Contents | // * Offsets are calculated from the beginning of the current area: Header, Params, Data: // An offset stored in the Params area is calculated from the beginning of the Params section. // An offset stored in the Data area is calculated from the beginning of the Data section. // ** The length of dynamic array contents are stored in the field immediately preceeding the contents. // [1]: https://solidity.readthedocs.io/en/develop/abi-spec.html assembly { // Areas below may use the following variables: // 1. <area>Start -- Start of this area in memory // 2. <area>End -- End of this area in memory. This value may // be precomputed (before writing contents), // or it may be computed as contents are written. // 3. <area>Offset -- Current offset into area. If an area's End // is precomputed, this variable tracks the // offsets of contents as they are written. /////// Setup Header Area /////// // Load free memory pointer fillOrderCalldata := mload(0x40) // bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)")) // = 0xb4be83d5 // Leave 0x20 bytes to store the length mstore(add(fillOrderCalldata, 0x20), 0xb4be83d500000000000000000000000000000000000000000000000000000000) let headerAreaEnd := add(fillOrderCalldata, 0x24) /////// Setup Params Area /////// // This area is preallocated and written to later. // This is because we need to fill in offsets that have not yet been calculated. let paramsAreaStart := headerAreaEnd let paramsAreaEnd := add(paramsAreaStart, 0x60) let paramsAreaOffset := paramsAreaStart /////// Setup Data Area /////// let dataAreaStart := paramsAreaEnd let dataAreaEnd := dataAreaStart // Offset from the source data we're reading from let sourceOffset := order // arrayLenBytes and arrayLenWords track the length of a dynamically-allocated bytes array. let arrayLenBytes := 0 let arrayLenWords := 0 /////// Write order Struct /////// // Write memory location of Order, relative to the start of the // parameter list, then increment the paramsAreaOffset respectively. mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart)) paramsAreaOffset := add(paramsAreaOffset, 0x20) // Write values for each field in the order // It would be nice to use a loop, but we save on gas by writing // the stores sequentially. mstore(dataAreaEnd, mload(sourceOffset)) // makerAddress mstore(add(dataAreaEnd, 0x20), mload(add(sourceOffset, 0x20))) // takerAddress mstore(add(dataAreaEnd, 0x40), mload(add(sourceOffset, 0x40))) // feeRecipientAddress mstore(add(dataAreaEnd, 0x60), mload(add(sourceOffset, 0x60))) // senderAddress mstore(add(dataAreaEnd, 0x80), mload(add(sourceOffset, 0x80))) // makerAssetAmount mstore(add(dataAreaEnd, 0xA0), mload(add(sourceOffset, 0xA0))) // takerAssetAmount mstore(add(dataAreaEnd, 0xC0), mload(add(sourceOffset, 0xC0))) // makerFeeAmount mstore(add(dataAreaEnd, 0xE0), mload(add(sourceOffset, 0xE0))) // takerFeeAmount mstore(add(dataAreaEnd, 0x100), mload(add(sourceOffset, 0x100))) // expirationTimeSeconds mstore(add(dataAreaEnd, 0x120), mload(add(sourceOffset, 0x120))) // salt mstore(add(dataAreaEnd, 0x140), mload(add(sourceOffset, 0x140))) // Offset to makerAssetData mstore(add(dataAreaEnd, 0x160), mload(add(sourceOffset, 0x160))) // Offset to takerAssetData dataAreaEnd := add(dataAreaEnd, 0x180) sourceOffset := add(sourceOffset, 0x180) // Write offset to <order.makerAssetData> mstore(add(dataAreaStart, mul(10, 0x20)), sub(dataAreaEnd, dataAreaStart)) // Calculate length of <order.makerAssetData> sourceOffset := mload(add(order, 0x140)) // makerAssetData arrayLenBytes := mload(sourceOffset) sourceOffset := add(sourceOffset, 0x20) arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20) // Write length of <order.makerAssetData> mstore(dataAreaEnd, arrayLenBytes) dataAreaEnd := add(dataAreaEnd, 0x20) // Write contents of <order.makerAssetData> for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} { mstore(dataAreaEnd, mload(sourceOffset)) dataAreaEnd := add(dataAreaEnd, 0x20) sourceOffset := add(sourceOffset, 0x20) } // Write offset to <order.takerAssetData> mstore(add(dataAreaStart, mul(11, 0x20)), sub(dataAreaEnd, dataAreaStart)) // Calculate length of <order.takerAssetData> sourceOffset := mload(add(order, 0x160)) // takerAssetData arrayLenBytes := mload(sourceOffset) sourceOffset := add(sourceOffset, 0x20) arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20) // Write length of <order.takerAssetData> mstore(dataAreaEnd, arrayLenBytes) dataAreaEnd := add(dataAreaEnd, 0x20) // Write contents of <order.takerAssetData> for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} { mstore(dataAreaEnd, mload(sourceOffset)) dataAreaEnd := add(dataAreaEnd, 0x20) sourceOffset := add(sourceOffset, 0x20) } /////// Write takerAssetFillAmount /////// mstore(paramsAreaOffset, takerAssetFillAmount) paramsAreaOffset := add(paramsAreaOffset, 0x20) /////// Write signature /////// // Write offset to paramsArea mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart)) // Calculate length of signature sourceOffset := signature arrayLenBytes := mload(sourceOffset) sourceOffset := add(sourceOffset, 0x20) arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20) // Write length of signature mstore(dataAreaEnd, arrayLenBytes) dataAreaEnd := add(dataAreaEnd, 0x20) // Write contents of signature for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} { mstore(dataAreaEnd, mload(sourceOffset)) dataAreaEnd := add(dataAreaEnd, 0x20) sourceOffset := add(sourceOffset, 0x20) } // Set length of calldata mstore(fillOrderCalldata, sub(dataAreaEnd, add(fillOrderCalldata, 0x20))) // Increment free memory pointer mstore(0x40, dataAreaEnd) } return fillOrderCalldata; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IWrapperFunctions { /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled. /// @param order LibOrder.Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. function fillOrKillOrder( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public returns (LibFillResults.FillResults memory fillResults); /// @dev Fills an order with specified parameters and ECDSA signature. /// Returns false if the transaction would otherwise revert. /// @param order LibOrder.Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrderNoThrow( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public returns (LibFillResults.FillResults memory fillResults); /// @dev Synchronously executes multiple calls of fillOrder. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. function batchFillOrders( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously executes multiple calls of fillOrKill. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. function batchFillOrKillOrders( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Fills an order with specified parameters and ECDSA signature. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. function batchFillOrdersNoThrow( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. /// @param orders Array of order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. function marketSellOrders( LibOrder.Order[] memory orders, uint256 takerAssetFillAmount, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketSellOrdersNoThrow( LibOrder.Order[] memory orders, uint256 takerAssetFillAmount, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker. /// @param orders Array of order specifications. /// @param makerAssetFillAmount Desired amount of makerAsset to buy. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketBuyOrders( LibOrder.Order[] memory orders, uint256 makerAssetFillAmount, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param makerAssetFillAmount Desired amount of makerAsset to buy. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketBuyOrdersNoThrow( LibOrder.Order[] memory orders, uint256 makerAssetFillAmount, bytes[] memory signatures ) public returns (LibFillResults.FillResults memory totalFillResults); /// @dev Synchronously cancels multiple orders in a single transaction. /// @param orders Array of order specifications. function batchCancelOrders(LibOrder.Order[] memory orders) public; /// @dev Fetches information for all passed in orders /// @param orders Array of order specifications. /// @return Array of OrderInfo instances that correspond to each order. function getOrdersInfo(LibOrder.Order[] memory orders) public view returns (LibOrder.OrderInfo[] memory); } contract MWrapperFunctions is IWrapperFunctions { /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled. /// @param order LibOrder.Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. function fillOrKillOrderInternal( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) internal returns (LibFillResults.FillResults memory fillResults); } contract MixinWrapperFunctions is ReentrancyGuard, LibMath, LibFillResults, LibAbiEncoder, MExchangeCore, MWrapperFunctions { /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. function fillOrKillOrder( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public nonReentrant returns (FillResults memory fillResults) { fillResults = fillOrKillOrderInternal( order, takerAssetFillAmount, signature ); return fillResults; } /// @dev Fills the input order. /// Returns false if the transaction would otherwise revert. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. /// @return Amounts filled and fees paid by maker and taker. function fillOrderNoThrow( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) public returns (FillResults memory fillResults) { // ABI encode calldata for `fillOrder` bytes memory fillOrderCalldata = abiEncodeFillOrder( order, takerAssetFillAmount, signature ); // Delegate to `fillOrder` and handle any exceptions gracefully assembly { let success := delegatecall( gas, // forward all gas address, // call address of this contract add(fillOrderCalldata, 32), // pointer to start of input (skip array length in first 32 bytes) mload(fillOrderCalldata), // length of input fillOrderCalldata, // write output over input 128 // output size is 128 bytes ) if success { mstore(fillResults, mload(fillOrderCalldata)) mstore(add(fillResults, 32), mload(add(fillOrderCalldata, 32))) mstore(add(fillResults, 64), mload(add(fillOrderCalldata, 64))) mstore(add(fillResults, 96), mload(add(fillOrderCalldata, 96))) } } // fillResults values will be 0 by default if call was unsuccessful return fillResults; } /// @dev Synchronously executes multiple calls of fillOrder. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets. function batchFillOrders( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public nonReentrant returns (FillResults memory totalFillResults) { uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { FillResults memory singleFillResults = fillOrderInternal( orders[i], takerAssetFillAmounts[i], signatures[i] ); addFillResults(totalFillResults, singleFillResults); } return totalFillResults; } /// @dev Synchronously executes multiple calls of fillOrKill. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets. function batchFillOrKillOrders( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public nonReentrant returns (FillResults memory totalFillResults) { uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { FillResults memory singleFillResults = fillOrKillOrderInternal( orders[i], takerAssetFillAmounts[i], signatures[i] ); addFillResults(totalFillResults, singleFillResults); } return totalFillResults; } /// @dev Fills an order with specified parameters and ECDSA signature. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets. function batchFillOrdersNoThrow( LibOrder.Order[] memory orders, uint256[] memory takerAssetFillAmounts, bytes[] memory signatures ) public returns (FillResults memory totalFillResults) { uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { FillResults memory singleFillResults = fillOrderNoThrow( orders[i], takerAssetFillAmounts[i], signatures[i] ); addFillResults(totalFillResults, singleFillResults); } return totalFillResults; } /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. /// @param orders Array of order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signatures Proofs that orders have been created by makers. /// @return Amounts filled and fees paid by makers and taker. function marketSellOrders( LibOrder.Order[] memory orders, uint256 takerAssetFillAmount, bytes[] memory signatures ) public nonReentrant returns (FillResults memory totalFillResults) { bytes memory takerAssetData = orders[0].takerAssetData; uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { // We assume that asset being sold by taker is the same for each order. // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders. orders[i].takerAssetData = takerAssetData; // Calculate the remaining amount of takerAsset to sell uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount); // Attempt to sell the remaining amount of takerAsset FillResults memory singleFillResults = fillOrderInternal( orders[i], remainingTakerAssetFillAmount, signatures[i] ); // Update amounts filled and fees paid by maker and taker addFillResults(totalFillResults, singleFillResults); // Stop execution if the entire amount of takerAsset has been sold if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) { break; } } return totalFillResults; } /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketSellOrdersNoThrow( LibOrder.Order[] memory orders, uint256 takerAssetFillAmount, bytes[] memory signatures ) public returns (FillResults memory totalFillResults) { bytes memory takerAssetData = orders[0].takerAssetData; uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { // We assume that asset being sold by taker is the same for each order. // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders. orders[i].takerAssetData = takerAssetData; // Calculate the remaining amount of takerAsset to sell uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount); // Attempt to sell the remaining amount of takerAsset FillResults memory singleFillResults = fillOrderNoThrow( orders[i], remainingTakerAssetFillAmount, signatures[i] ); // Update amounts filled and fees paid by maker and taker addFillResults(totalFillResults, singleFillResults); // Stop execution if the entire amount of takerAsset has been sold if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) { break; } } return totalFillResults; } /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker. /// @param orders Array of order specifications. /// @param makerAssetFillAmount Desired amount of makerAsset to buy. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketBuyOrders( LibOrder.Order[] memory orders, uint256 makerAssetFillAmount, bytes[] memory signatures ) public nonReentrant returns (FillResults memory totalFillResults) { bytes memory makerAssetData = orders[0].makerAssetData; uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { // We assume that asset being bought by taker is the same for each order. // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders. orders[i].makerAssetData = makerAssetData; // Calculate the remaining amount of makerAsset to buy uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount); // Convert the remaining amount of makerAsset to buy into remaining amount // of takerAsset to sell, assuming entire amount can be sold in the current order uint256 remainingTakerAssetFillAmount = getPartialAmountFloor( orders[i].takerAssetAmount, orders[i].makerAssetAmount, remainingMakerAssetFillAmount ); // Attempt to sell the remaining amount of takerAsset FillResults memory singleFillResults = fillOrderInternal( orders[i], remainingTakerAssetFillAmount, signatures[i] ); // Update amounts filled and fees paid by maker and taker addFillResults(totalFillResults, singleFillResults); // Stop execution if the entire amount of makerAsset has been bought if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) { break; } } return totalFillResults; } /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker. /// Returns false if the transaction would otherwise revert. /// @param orders Array of order specifications. /// @param makerAssetFillAmount Desired amount of makerAsset to buy. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. function marketBuyOrdersNoThrow( LibOrder.Order[] memory orders, uint256 makerAssetFillAmount, bytes[] memory signatures ) public returns (FillResults memory totalFillResults) { bytes memory makerAssetData = orders[0].makerAssetData; uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { // We assume that asset being bought by taker is the same for each order. // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders. orders[i].makerAssetData = makerAssetData; // Calculate the remaining amount of makerAsset to buy uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount); // Convert the remaining amount of makerAsset to buy into remaining amount // of takerAsset to sell, assuming entire amount can be sold in the current order uint256 remainingTakerAssetFillAmount = getPartialAmountFloor( orders[i].takerAssetAmount, orders[i].makerAssetAmount, remainingMakerAssetFillAmount ); // Attempt to sell the remaining amount of takerAsset FillResults memory singleFillResults = fillOrderNoThrow( orders[i], remainingTakerAssetFillAmount, signatures[i] ); // Update amounts filled and fees paid by maker and taker addFillResults(totalFillResults, singleFillResults); // Stop execution if the entire amount of makerAsset has been bought if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) { break; } } return totalFillResults; } /// @dev Synchronously cancels multiple orders in a single transaction. /// @param orders Array of order specifications. function batchCancelOrders(LibOrder.Order[] memory orders) public nonReentrant { uint256 ordersLength = orders.length; for (uint256 i = 0; i != ordersLength; i++) { cancelOrderInternal(orders[i]); } } /// @dev Fetches information for all passed in orders. /// @param orders Array of order specifications. /// @return Array of OrderInfo instances that correspond to each order. function getOrdersInfo(LibOrder.Order[] memory orders) public view returns (LibOrder.OrderInfo[] memory) { uint256 ordersLength = orders.length; LibOrder.OrderInfo[] memory ordersInfo = new LibOrder.OrderInfo[](ordersLength); for (uint256 i = 0; i != ordersLength; i++) { ordersInfo[i] = getOrderInfo(orders[i]); } return ordersInfo; } /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. /// @param signature Proof that order has been created by maker. function fillOrKillOrderInternal( LibOrder.Order memory order, uint256 takerAssetFillAmount, bytes memory signature ) internal returns (FillResults memory fillResults) { fillResults = fillOrderInternal( order, takerAssetFillAmount, signature ); require( fillResults.takerAssetFilledAmount == takerAssetFillAmount, "COMPLETE_FILL_FAILED" ); return fillResults; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; pragma solidity 0.4.24; pragma solidity 0.4.24; contract IOwnable { function transferOwnership(address newOwner) public; } contract Ownable is IOwnable { address public owner; constructor () public { owner = msg.sender; } modifier onlyOwner() { require( msg.sender == owner, "ONLY_CONTRACT_OWNER" ); _; } function transferOwnership(address newOwner) public onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IAuthorizable is IOwnable { /// @dev Authorizes an address. /// @param target Address to authorize. function addAuthorizedAddress(address target) external; /// @dev Removes authorizion of an address. /// @param target Address to remove authorization from. function removeAuthorizedAddress(address target) external; /// @dev Removes authorizion of an address. /// @param target Address to remove authorization from. /// @param index Index of target in authorities array. function removeAuthorizedAddressAtIndex( address target, uint256 index ) external; /// @dev Gets all authorized addresses. /// @return Array of authorized addresses. function getAuthorizedAddresses() external view returns (address[] memory); } contract IAssetProxy is IAuthorizable { /// @dev Transfers assets. Either succeeds or throws. /// @param assetData Byte array encoded for the respective asset proxy. /// @param from Address to transfer asset from. /// @param to Address to transfer asset to. /// @param amount Amount of asset to transfer. function transferFrom( bytes assetData, address from, address to, uint256 amount ) external; /// @dev Gets the proxy id associated with the proxy address. /// @return Proxy id. function getProxyId() external pure returns (bytes4); } contract MixinAssetProxyDispatcher is Ownable, MAssetProxyDispatcher { // Mapping from Asset Proxy Id's to their respective Asset Proxy mapping (bytes4 => IAssetProxy) public assetProxies; /// @dev Registers an asset proxy to its asset proxy id. /// Once an asset proxy is registered, it cannot be unregistered. /// @param assetProxy Address of new asset proxy to register. function registerAssetProxy(address assetProxy) external onlyOwner { IAssetProxy assetProxyContract = IAssetProxy(assetProxy); // Ensure that no asset proxy exists with current id. bytes4 assetProxyId = assetProxyContract.getProxyId(); address currentAssetProxy = assetProxies[assetProxyId]; require( currentAssetProxy == address(0), "ASSET_PROXY_ALREADY_EXISTS" ); // Add asset proxy and log registration. assetProxies[assetProxyId] = assetProxyContract; emit AssetProxyRegistered( assetProxyId, assetProxy ); } /// @dev Gets an asset proxy. /// @param assetProxyId Id of the asset proxy. /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered. function getAssetProxy(bytes4 assetProxyId) external view returns (address) { return assetProxies[assetProxyId]; } /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws. /// @param assetData Byte array encoded for the asset. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param amount Amount of token to transfer. function dispatchTransferFrom( bytes memory assetData, address from, address to, uint256 amount ) internal { // Do nothing if no amount should be transferred. if (amount > 0 && from != to) { // Ensure assetData length is valid require( assetData.length > 3, "LENGTH_GREATER_THAN_3_REQUIRED" ); // Lookup assetProxy. We do not use `LibBytes.readBytes4` for gas efficiency reasons. bytes4 assetProxyId; assembly { assetProxyId := and(mload( add(assetData, 32)), 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 ) } address assetProxy = assetProxies[assetProxyId]; // Ensure that assetProxy exists require( assetProxy != address(0), "ASSET_PROXY_DOES_NOT_EXIST" ); // We construct calldata for the `assetProxy.transferFrom` ABI. // The layout of this calldata is in the table below. // // | Area | Offset | Length | Contents | // | -------- |--------|---------|-------------------------------------------- | // | Header | 0 | 4 | function selector | // | Params | | 4 * 32 | function parameters: | // | | 4 | | 1. offset to assetData (*) | // | | 36 | | 2. from | // | | 68 | | 3. to | // | | 100 | | 4. amount | // | Data | | | assetData: | // | | 132 | 32 | assetData Length | // | | 164 | ** | assetData Contents | assembly { /////// Setup State /////// // `cdStart` is the start of the calldata for `assetProxy.transferFrom` (equal to free memory ptr). let cdStart := mload(64) // `dataAreaLength` is the total number of words needed to store `assetData` // As-per the ABI spec, this value is padded up to the nearest multiple of 32, // and includes 32-bytes for length. let dataAreaLength := and(add(mload(assetData), 63), 0xFFFFFFFFFFFE0) // `cdEnd` is the end of the calldata for `assetProxy.transferFrom`. let cdEnd := add(cdStart, add(132, dataAreaLength)) /////// Setup Header Area /////// // This area holds the 4-byte `transferFromSelector`. // bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4 mstore(cdStart, 0xa85e59e400000000000000000000000000000000000000000000000000000000) /////// Setup Params Area /////// // Each parameter is padded to 32-bytes. The entire Params Area is 128 bytes. // Notes: // 1. The offset to `assetData` is the length of the Params Area (128 bytes). // 2. A 20-byte mask is applied to addresses to zero-out the unused bytes. mstore(add(cdStart, 4), 128) mstore(add(cdStart, 36), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) mstore(add(cdStart, 68), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) mstore(add(cdStart, 100), amount) /////// Setup Data Area /////// // This area holds `assetData`. let dataArea := add(cdStart, 132) // solhint-disable-next-line no-empty-blocks for {} lt(dataArea, cdEnd) {} { mstore(dataArea, mload(assetData)) dataArea := add(dataArea, 32) assetData := add(assetData, 32) } /////// Call `assetProxy.transferFrom` using the constructed calldata /////// let success := call( gas, // forward all gas assetProxy, // call address of asset proxy 0, // don't send any ETH cdStart, // pointer to start of input sub(cdEnd, cdStart), // length of input cdStart, // write output over input 512 // reserve 512 bytes for output ) if iszero(success) { revert(cdStart, returndatasize()) } } } } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // solhint-disable pragma solidity 0.4.24; /// @dev This contract documents the revert reasons used in the Exchange contract. /// This contract is intended to serve as a reference, but is not actually used for efficiency reasons. contract LibExchangeErrors { /// Order validation errors /// string constant ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled. string constant INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress. string constant INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress. string constant INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`. string constant INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed. /// fillOrder validation errors /// string constant INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0. string constant ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount. /// Signature validation errors /// string constant INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed. string constant SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal. string constant SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported. /// cancelOrdersUptTo errors /// string constant INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch. /// fillOrKillOrder errors /// string constant COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled. /// matchOrders errors /// string constant NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread. /// Transaction errors /// string constant REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed. string constant INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed. string constant INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed. string constant FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed. /// registerAssetProxy errors /// string constant ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists. /// dispatchTransferFrom errors /// string constant ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id. string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful. /// Length validation errors /// string constant LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0. string constant LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3. string constant LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0. string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65. } contract MixinTransactions is LibEIP712, MSignatureValidator, MTransactions { // Mapping of transaction hash => executed // This prevents transactions from being executed more than once. mapping (bytes32 => bool) public transactions; // Address of current transaction signer address public currentContextAddress; /// @dev Executes an exchange method call in the context of signer. /// @param salt Arbitrary number to ensure uniqueness of transaction hash. /// @param signerAddress Address of transaction signer. /// @param data AbiV2 encoded calldata. /// @param signature Proof of signer transaction by signer. function executeTransaction( uint256 salt, address signerAddress, bytes data, bytes signature ) external { // Prevent reentrancy require( currentContextAddress == address(0), "REENTRANCY_ILLEGAL" ); bytes32 transactionHash = hashEIP712Message(hashZeroExTransaction( salt, signerAddress, data )); // Validate transaction has not been executed require( !transactions[transactionHash], "INVALID_TX_HASH" ); // Transaction always valid if signer is sender of transaction if (signerAddress != msg.sender) { // Validate signature require( isValidSignature( transactionHash, signerAddress, signature ), "INVALID_TX_SIGNATURE" ); // Set the current transaction signer currentContextAddress = signerAddress; } // Execute transaction transactions[transactionHash] = true; require( address(this).delegatecall(data), "FAILED_EXECUTION" ); // Reset current transaction signer if it was previously updated if (signerAddress != msg.sender) { currentContextAddress = address(0); } } /// @dev Calculates EIP712 hash of the Transaction. /// @param salt Arbitrary number to ensure uniqueness of transaction hash. /// @param signerAddress Address of transaction signer. /// @param data AbiV2 encoded calldata. /// @return EIP712 hash of the Transaction. function hashZeroExTransaction( uint256 salt, address signerAddress, bytes memory data ) internal pure returns (bytes32 result) { bytes32 schemaHash = EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH; bytes32 dataHash = keccak256(data); // Assembly for more efficiently computing: // keccak256(abi.encodePacked( // EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH, // salt, // bytes32(signerAddress), // keccak256(data) // )); assembly { // Load free memory pointer let memPtr := mload(64) mstore(memPtr, schemaHash) // hash of schema mstore(add(memPtr, 32), salt) // salt mstore(add(memPtr, 64), and(signerAddress, 0xffffffffffffffffffffffffffffffffffffffff)) // signerAddress mstore(add(memPtr, 96), dataHash) // hash of data // Compute hash result := keccak256(memPtr, 128) } return result; } /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`). /// If calling a fill function, this address will represent the taker. /// If calling a cancel function, this address will represent the maker. /// @return Signer of 0x transaction if entry point is `executeTransaction`. /// `msg.sender` if entry point is any other function. function getCurrentContextAddress() internal view returns (address) { address currentContextAddress_ = currentContextAddress; address contextAddress = currentContextAddress_ == address(0) ? msg.sender : currentContextAddress_; return contextAddress; } } /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; /* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; contract IMatchOrders { /// @dev Match two complementary orders that have a profitable spread. /// Each order is filled at their respective price point. However, the calculations are /// carried out as though the orders are both being filled at the right order's price point. /// The profit made by the left order goes to the taker (who matched the two orders). /// @param leftOrder First order to match. /// @param rightOrder Second order to match. /// @param leftSignature Proof that order was created by the left maker. /// @param rightSignature Proof that order was created by the right maker. /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders. function matchOrders( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, bytes memory leftSignature, bytes memory rightSignature ) public returns (LibFillResults.MatchedFillResults memory matchedFillResults); } contract MMatchOrders is IMatchOrders { /// @dev Validates context for matchOrders. Succeeds or throws. /// @param leftOrder First order to match. /// @param rightOrder Second order to match. function assertValidMatch( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder ) internal pure; /// @dev Calculates fill amounts for the matched orders. /// Each order is filled at their respective price point. However, the calculations are /// carried out as though the orders are both being filled at the right order's price point. /// The profit made by the leftOrder order goes to the taker (who matched the two orders). /// @param leftOrder First order to match. /// @param rightOrder Second order to match. /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled. /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled. /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders. function calculateMatchedFillResults( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, uint256 leftOrderTakerAssetFilledAmount, uint256 rightOrderTakerAssetFilledAmount ) internal pure returns (LibFillResults.MatchedFillResults memory matchedFillResults); } contract MixinMatchOrders is ReentrancyGuard, LibConstants, LibMath, MAssetProxyDispatcher, MExchangeCore, MMatchOrders, MTransactions { /// @dev Match two complementary orders that have a profitable spread. /// Each order is filled at their respective price point. However, the calculations are /// carried out as though the orders are both being filled at the right order's price point. /// The profit made by the left order goes to the taker (who matched the two orders). /// @param leftOrder First order to match. /// @param rightOrder Second order to match. /// @param leftSignature Proof that order was created by the left maker. /// @param rightSignature Proof that order was created by the right maker. /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders. function matchOrders( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, bytes memory leftSignature, bytes memory rightSignature ) public nonReentrant returns (LibFillResults.MatchedFillResults memory matchedFillResults) { // We assume that rightOrder.takerAssetData == leftOrder.makerAssetData and rightOrder.makerAssetData == leftOrder.takerAssetData. // If this assumption isn't true, the match will fail at signature validation. rightOrder.makerAssetData = leftOrder.takerAssetData; rightOrder.takerAssetData = leftOrder.makerAssetData; // Get left & right order info LibOrder.OrderInfo memory leftOrderInfo = getOrderInfo(leftOrder); LibOrder.OrderInfo memory rightOrderInfo = getOrderInfo(rightOrder); // Fetch taker address address takerAddress = getCurrentContextAddress(); // Either our context is valid or we revert assertFillableOrder( leftOrder, leftOrderInfo, takerAddress, leftSignature ); assertFillableOrder( rightOrder, rightOrderInfo, takerAddress, rightSignature ); assertValidMatch(leftOrder, rightOrder); // Compute proportional fill amounts matchedFillResults = calculateMatchedFillResults( leftOrder, rightOrder, leftOrderInfo.orderTakerAssetFilledAmount, rightOrderInfo.orderTakerAssetFilledAmount ); // Validate fill contexts assertValidFill( leftOrder, leftOrderInfo, matchedFillResults.left.takerAssetFilledAmount, matchedFillResults.left.takerAssetFilledAmount, matchedFillResults.left.makerAssetFilledAmount ); assertValidFill( rightOrder, rightOrderInfo, matchedFillResults.right.takerAssetFilledAmount, matchedFillResults.right.takerAssetFilledAmount, matchedFillResults.right.makerAssetFilledAmount ); // Update exchange state updateFilledState( leftOrder, takerAddress, leftOrderInfo.orderHash, leftOrderInfo.orderTakerAssetFilledAmount, matchedFillResults.left ); updateFilledState( rightOrder, takerAddress, rightOrderInfo.orderHash, rightOrderInfo.orderTakerAssetFilledAmount, matchedFillResults.right ); // Settle matched orders. Succeeds or throws. settleMatchedOrders( leftOrder, rightOrder, takerAddress, matchedFillResults ); return matchedFillResults; } /// @dev Validates context for matchOrders. Succeeds or throws. /// @param leftOrder First order to match. /// @param rightOrder Second order to match. function assertValidMatch( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder ) internal pure { // Make sure there is a profitable spread. // There is a profitable spread iff the cost per unit bought (OrderA.MakerAmount/OrderA.TakerAmount) for each order is greater // than the profit per unit sold of the matched order (OrderB.TakerAmount/OrderB.MakerAmount). // This is satisfied by the equations below: // <leftOrder.makerAssetAmount> / <leftOrder.takerAssetAmount> >= <rightOrder.takerAssetAmount> / <rightOrder.makerAssetAmount> // AND // <rightOrder.makerAssetAmount> / <rightOrder.takerAssetAmount> >= <leftOrder.takerAssetAmount> / <leftOrder.makerAssetAmount> // These equations can be combined to get the following: require( safeMul(leftOrder.makerAssetAmount, rightOrder.makerAssetAmount) >= safeMul(leftOrder.takerAssetAmount, rightOrder.takerAssetAmount), "NEGATIVE_SPREAD_REQUIRED" ); } /// @dev Calculates fill amounts for the matched orders. /// Each order is filled at their respective price point. However, the calculations are /// carried out as though the orders are both being filled at the right order's price point. /// The profit made by the leftOrder order goes to the taker (who matched the two orders). /// @param leftOrder First order to match. /// @param rightOrder Second order to match. /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled. /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled. /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders. function calculateMatchedFillResults( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, uint256 leftOrderTakerAssetFilledAmount, uint256 rightOrderTakerAssetFilledAmount ) internal pure returns (LibFillResults.MatchedFillResults memory matchedFillResults) { // Derive maker asset amounts for left & right orders, given store taker assert amounts uint256 leftTakerAssetAmountRemaining = safeSub(leftOrder.takerAssetAmount, leftOrderTakerAssetFilledAmount); uint256 leftMakerAssetAmountRemaining = safeGetPartialAmountFloor( leftOrder.makerAssetAmount, leftOrder.takerAssetAmount, leftTakerAssetAmountRemaining ); uint256 rightTakerAssetAmountRemaining = safeSub(rightOrder.takerAssetAmount, rightOrderTakerAssetFilledAmount); uint256 rightMakerAssetAmountRemaining = safeGetPartialAmountFloor( rightOrder.makerAssetAmount, rightOrder.takerAssetAmount, rightTakerAssetAmountRemaining ); // Calculate fill results for maker and taker assets: at least one order will be fully filled. // The maximum amount the left maker can buy is `leftTakerAssetAmountRemaining` // The maximum amount the right maker can sell is `rightMakerAssetAmountRemaining` // We have two distinct cases for calculating the fill results: // Case 1. // If the left maker can buy more than the right maker can sell, then only the right order is fully filled. // If the left maker can buy exactly what the right maker can sell, then both orders are fully filled. // Case 2. // If the left maker cannot buy more than the right maker can sell, then only the left order is fully filled. if (leftTakerAssetAmountRemaining >= rightMakerAssetAmountRemaining) { // Case 1: Right order is fully filled matchedFillResults.right.makerAssetFilledAmount = rightMakerAssetAmountRemaining; matchedFillResults.right.takerAssetFilledAmount = rightTakerAssetAmountRemaining; matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount; // Round down to ensure the maker's exchange rate does not exceed the price specified by the order. // We favor the maker when the exchange rate must be rounded. matchedFillResults.left.makerAssetFilledAmount = safeGetPartialAmountFloor( leftOrder.makerAssetAmount, leftOrder.takerAssetAmount, matchedFillResults.left.takerAssetFilledAmount ); } else { // Case 2: Left order is fully filled matchedFillResults.left.makerAssetFilledAmount = leftMakerAssetAmountRemaining; matchedFillResults.left.takerAssetFilledAmount = leftTakerAssetAmountRemaining; matchedFillResults.right.makerAssetFilledAmount = matchedFillResults.left.takerAssetFilledAmount; // Round up to ensure the maker's exchange rate does not exceed the price specified by the order. // We favor the maker when the exchange rate must be rounded. matchedFillResults.right.takerAssetFilledAmount = safeGetPartialAmountCeil( rightOrder.takerAssetAmount, rightOrder.makerAssetAmount, matchedFillResults.right.makerAssetFilledAmount ); } // Calculate amount given to taker matchedFillResults.leftMakerAssetSpreadAmount = safeSub( matchedFillResults.left.makerAssetFilledAmount, matchedFillResults.right.takerAssetFilledAmount ); // Compute fees for left order matchedFillResults.left.makerFeePaid = safeGetPartialAmountFloor( matchedFillResults.left.makerAssetFilledAmount, leftOrder.makerAssetAmount, leftOrder.makerFee ); matchedFillResults.left.takerFeePaid = safeGetPartialAmountFloor( matchedFillResults.left.takerAssetFilledAmount, leftOrder.takerAssetAmount, leftOrder.takerFee ); // Compute fees for right order matchedFillResults.right.makerFeePaid = safeGetPartialAmountFloor( matchedFillResults.right.makerAssetFilledAmount, rightOrder.makerAssetAmount, rightOrder.makerFee ); matchedFillResults.right.takerFeePaid = safeGetPartialAmountFloor( matchedFillResults.right.takerAssetFilledAmount, rightOrder.takerAssetAmount, rightOrder.takerFee ); // Return fill results return matchedFillResults; } /// @dev Settles matched order by transferring appropriate funds between order makers, taker, and fee recipient. /// @param leftOrder First matched order. /// @param rightOrder Second matched order. /// @param takerAddress Address that matched the orders. The taker receives the spread between orders as profit. /// @param matchedFillResults Struct holding amounts to transfer between makers, taker, and fee recipients. function settleMatchedOrders( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, address takerAddress, LibFillResults.MatchedFillResults memory matchedFillResults ) private { bytes memory zrxAssetData = ZRX_ASSET_DATA; // Order makers and taker dispatchTransferFrom( leftOrder.makerAssetData, leftOrder.makerAddress, rightOrder.makerAddress, matchedFillResults.right.takerAssetFilledAmount ); dispatchTransferFrom( rightOrder.makerAssetData, rightOrder.makerAddress, leftOrder.makerAddress, matchedFillResults.left.takerAssetFilledAmount ); dispatchTransferFrom( leftOrder.makerAssetData, leftOrder.makerAddress, takerAddress, matchedFillResults.leftMakerAssetSpreadAmount ); // Maker fees dispatchTransferFrom( zrxAssetData, leftOrder.makerAddress, leftOrder.feeRecipientAddress, matchedFillResults.left.makerFeePaid ); dispatchTransferFrom( zrxAssetData, rightOrder.makerAddress, rightOrder.feeRecipientAddress, matchedFillResults.right.makerFeePaid ); // Taker fees if (leftOrder.feeRecipientAddress == rightOrder.feeRecipientAddress) { dispatchTransferFrom( zrxAssetData, takerAddress, leftOrder.feeRecipientAddress, safeAdd( matchedFillResults.left.takerFeePaid, matchedFillResults.right.takerFeePaid ) ); } else { dispatchTransferFrom( zrxAssetData, takerAddress, leftOrder.feeRecipientAddress, matchedFillResults.left.takerFeePaid ); dispatchTransferFrom( zrxAssetData, takerAddress, rightOrder.feeRecipientAddress, matchedFillResults.right.takerFeePaid ); } } } // solhint-disable no-empty-blocks contract Exchange is MixinExchangeCore, MixinMatchOrders, MixinSignatureValidator, MixinTransactions, MixinAssetProxyDispatcher, MixinWrapperFunctions { string constant public VERSION = "2.0.1-alpha"; // Mixins are instantiated in the order they are inherited constructor (bytes memory _zrxAssetData) public LibConstants(_zrxAssetData) // @TODO: Remove when we deploy. MixinExchangeCore() MixinMatchOrders() MixinSignatureValidator() MixinTransactions() MixinAssetProxyDispatcher() MixinWrapperFunctions() {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"filled","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"takerAssetFillAmounts","type":"uint256[]"},{"name":"signatures","type":"bytes[]"}],"name":"batchFillOrders","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"cancelled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"hash","type":"bytes32"},{"name":"signerAddress","type":"address"},{"name":"signature","type":"bytes"}],"name":"preSign","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"leftOrder","type":"tuple"},{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"rightOrder","type":"tuple"},{"name":"leftSignature","type":"bytes"},{"name":"rightSignature","type":"bytes"}],"name":"matchOrders","outputs":[{"components":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"left","type":"tuple"},{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"right","type":"tuple"},{"name":"leftMakerAssetSpreadAmount","type":"uint256"}],"name":"matchedFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"order","type":"tuple"},{"name":"takerAssetFillAmount","type":"uint256"},{"name":"signature","type":"bytes"}],"name":"fillOrderNoThrow","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"fillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes4"}],"name":"assetProxies","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"}],"name":"batchCancelOrders","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"takerAssetFillAmounts","type":"uint256[]"},{"name":"signatures","type":"bytes[]"}],"name":"batchFillOrKillOrders","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"targetOrderEpoch","type":"uint256"}],"name":"cancelOrdersUpTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"takerAssetFillAmounts","type":"uint256[]"},{"name":"signatures","type":"bytes[]"}],"name":"batchFillOrdersNoThrow","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"assetProxyId","type":"bytes4"}],"name":"getAssetProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"transactions","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"order","type":"tuple"},{"name":"takerAssetFillAmount","type":"uint256"},{"name":"signature","type":"bytes"}],"name":"fillOrKillOrder","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"fillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"validatorAddress","type":"address"},{"name":"approval","type":"bool"}],"name":"setSignatureValidatorApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowedValidators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"takerAssetFillAmount","type":"uint256"},{"name":"signatures","type":"bytes[]"}],"name":"marketSellOrders","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"}],"name":"getOrdersInfo","outputs":[{"components":[{"name":"orderStatus","type":"uint8"},{"name":"orderHash","type":"bytes32"},{"name":"orderTakerAssetFilledAmount","type":"uint256"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"address"}],"name":"preSigned","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"hash","type":"bytes32"},{"name":"signerAddress","type":"address"},{"name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"name":"isValid","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"makerAssetFillAmount","type":"uint256"},{"name":"signatures","type":"bytes[]"}],"name":"marketBuyOrdersNoThrow","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"order","type":"tuple"},{"name":"takerAssetFillAmount","type":"uint256"},{"name":"signature","type":"bytes"}],"name":"fillOrder","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"fillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"salt","type":"uint256"},{"name":"signerAddress","type":"address"},{"name":"data","type":"bytes"},{"name":"signature","type":"bytes"}],"name":"executeTransaction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"assetProxy","type":"address"}],"name":"registerAssetProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"order","type":"tuple"}],"name":"getOrderInfo","outputs":[{"components":[{"name":"orderStatus","type":"uint8"},{"name":"orderHash","type":"bytes32"},{"name":"orderTakerAssetFilledAmount","type":"uint256"}],"name":"orderInfo","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"order","type":"tuple"}],"name":"cancelOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"orderEpoch","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ZRX_ASSET_DATA","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"takerAssetFillAmount","type":"uint256"},{"name":"signatures","type":"bytes[]"}],"name":"marketSellOrdersNoThrow","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"EIP712_DOMAIN_HASH","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"makerAddress","type":"address"},{"name":"takerAddress","type":"address"},{"name":"feeRecipientAddress","type":"address"},{"name":"senderAddress","type":"address"},{"name":"makerAssetAmount","type":"uint256"},{"name":"takerAssetAmount","type":"uint256"},{"name":"makerFee","type":"uint256"},{"name":"takerFee","type":"uint256"},{"name":"expirationTimeSeconds","type":"uint256"},{"name":"salt","type":"uint256"},{"name":"makerAssetData","type":"bytes"},{"name":"takerAssetData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"makerAssetFillAmount","type":"uint256"},{"name":"signatures","type":"bytes[]"}],"name":"marketBuyOrders","outputs":[{"components":[{"name":"makerAssetFilledAmount","type":"uint256"},{"name":"takerAssetFilledAmount","type":"uint256"},{"name":"makerFeePaid","type":"uint256"},{"name":"takerFeePaid","type":"uint256"}],"name":"totalFillResults","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentContextAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_zrxAssetData","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"signerAddress","type":"address"},{"indexed":true,"name":"validatorAddress","type":"address"},{"indexed":false,"name":"approved","type":"bool"}],"name":"SignatureValidatorApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"makerAddress","type":"address"},{"indexed":true,"name":"feeRecipientAddress","type":"address"},{"indexed":false,"name":"takerAddress","type":"address"},{"indexed":false,"name":"senderAddress","type":"address"},{"indexed":false,"name":"makerAssetFilledAmount","type":"uint256"},{"indexed":false,"name":"takerAssetFilledAmount","type":"uint256"},{"indexed":false,"name":"makerFeePaid","type":"uint256"},{"indexed":false,"name":"takerFeePaid","type":"uint256"},{"indexed":true,"name":"orderHash","type":"bytes32"},{"indexed":false,"name":"makerAssetData","type":"bytes"},{"indexed":false,"name":"takerAssetData","type":"bytes"}],"name":"Fill","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"makerAddress","type":"address"},{"indexed":true,"name":"feeRecipientAddress","type":"address"},{"indexed":false,"name":"senderAddress","type":"address"},{"indexed":true,"name":"orderHash","type":"bytes32"},{"indexed":false,"name":"makerAssetData","type":"bytes"},{"indexed":false,"name":"takerAssetData","type":"bytes"}],"name":"Cancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"makerAddress","type":"address"},{"indexed":true,"name":"senderAddress","type":"address"},{"indexed":false,"name":"orderEpoch","type":"uint256"}],"name":"CancelUpTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes4"},{"indexed":false,"name":"assetProxy","type":"address"}],"name":"AssetProxyRegistered","type":"event"}]
Contract Creation Code
60806040526000805460ff191690553480156200001b57600080fd5b50604051620061ce380380620061ce83398101806040526200004191908101906200044d565b80518190620000589060019060208401906200034c565b5050604080517f454950373132446f6d61696e28000000000000000000000000000000000000006020808301919091527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8301527f737472696e672076657273696f6e2c000000000000000000000000000000000060398301527f6164647265737320766572696679696e67436f6e74726163740000000000000060488301527f2900000000000000000000000000000000000000000000000000000000000000606183015282516042818403018152606290920192839052815191929182918401908083835b60208310620001625780518252601f19909201916020918201910162000141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208285018552600b8084527f30782050726f746f636f6c000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620001ec5780518252601f199092019160209182019101620001cb565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3200000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620002765780518252601f19909201916020918201910162000255565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250306080808701919091528151808703909101815260a09095019081905284519093849350850191508083835b60208310620003015780518252601f199092019160209182019101620002e0565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600255505060038054600160a060020a03191633179055506200050f9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200038f57805160ff1916838001178555620003bf565b82800160010185558215620003bf579182015b82811115620003bf578251825591602001919060010190620003a2565b50620003cd929150620003d1565b5090565b620003ee91905b80821115620003cd5760008155600101620003d8565b90565b6000601f820183136200040357600080fd5b81516200041a6200041482620004b4565b6200048d565b915080825260208301602083018583830111156200043757600080fd5b62000444838284620004dc565b50505092915050565b6000602082840312156200046057600080fd5b81516001604060020a038111156200047757600080fd5b6200048584828501620003f1565b949350505050565b6040518181016001604060020a0381118282101715620004ac57600080fd5b604052919050565b60006001604060020a03821115620004cb57600080fd5b506020601f91909101601f19160190565b60005b83811015620004f9578181015183820152602001620004df565b8381111562000509576000848401525b50505050565b615caf806200051f6000396000f3006080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d6366004614bfc565b610664565b6040516101e89190615821565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614b1f565b610676565b6040516101e89190615afb565b34801561022a57600080fd5b5061023e610239366004614bfc565b6107a1565b6040516101e89190615813565b34801561025757600080fd5b5061026b610266366004614c39565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614d6d565b6108a3565b6040516101e89190615b09565b3480156102a657600080fd5b506102116102b5366004614e2d565b610a3a565b3480156102c657600080fd5b506102da6102d5366004614cfc565b610a90565b6040516101e891906158dd565b3480156102f357600080fd5b5061026b610302366004614aea565b610ab8565b34801561031357600080fd5b50610211610322366004614b1f565b610b85565b34801561033357600080fd5b5061026b610342366004614bfc565b610c75565b34801561035357600080fd5b50610211610362366004614b1f565b610e2a565b34801561037357600080fd5b50610387610382366004614cfc565b610ebe565b6040516101e89190615733565b3480156103a057600080fd5b5061023e6103af366004614bfc565b610f0c565b3480156103c057600080fd5b506102116103cf366004614e2d565b610f21565b3480156103e057600080fd5b5061026b6103ef366004614aba565b610fcc565b34801561040057600080fd5b5061023e61040f366004614a80565b611106565b34801561042057600080fd5b5061021161042f366004614bb3565b611126565b34801561044057600080fd5b5061045461044f366004614aea565b61128a565b6040516101e89190615802565b34801561046d57600080fd5b5061023e61047c366004614c1a565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b1366004614ca1565b61135b565b3480156104c257600080fd5b506102116104d1366004614bb3565b6118de565b3480156104e257600080fd5b506102116104f1366004614e2d565b6119f1565b34801561050257600080fd5b5061026b610511366004614e76565b611a6c565b34801561052257600080fd5b5061026b610531366004614a62565b611d05565b34801561054257600080fd5b50610556610551366004614d38565b611f30565b6040516101e89190615b18565b34801561056f57600080fd5b5061026b61057e366004614d38565b61202a565b34801561058f57600080fd5b506101db61059e366004614a80565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906158cc565b3480156105d157600080fd5b506102116105e0366004614bb3565b61218e565b3480156105f157600080fd5b506101db612263565b34801561060657600080fd5b50610211610615366004614bb3565b612269565b34801561062657600080fd5b506103876123db565b34801561063b57600080fd5b5061026b61064a366004614a62565b6123f7565b34801561065b57600080fd5b506105b86124a8565b60046020526000908152604090205481565b61067e614694565b600080610689614694565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b906020019060200201516124df565b9050610764848261257d565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60056020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159ab565b5050600091825260076020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6146bd565b6108b36146ec565b6108bb6146ec565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a6125df565b905061096888848389612611565b61097487838388612611565b61097e88886127a9565b610992888885604001518560400151612809565b8051602081015190519195506109ad918a9186918190612990565b6020808501519081015190516109c99189918591908190612990565b6109e28882856020015186604001518860000151612aa9565b6109fb8782846020015185604001518860200151612aa9565b610a0788888387612b55565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614694565b6060610a4f858585612d2d565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612eff565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614694565b600080610b98614694565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612f2a565b9050610c6a848261257d565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec6125df565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600660209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a3b565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526006602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615821565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614694565b600080610e3d614694565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea9848261257d565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60096020526000908152604090205460ff1681565b610f29614694565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612f2a565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d6125df565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615813565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600860209081526000928352604080842090915290825290205460ff1681565b61112e614694565b6060600080600061113d614694565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612f7d565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a868261257d565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6146ec565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600760209081526000928352604080842090915290825290205460ff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a2b565b6113ad89612fc4565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061594b565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a1b565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aeb565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158eb565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff61308816565b935061156d89602163ffffffff61308816565b925060018b86868660405160008152602001604052604051611592949392919061587c565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158eb565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff61308816565b93506116b689602163ffffffff61308816565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611592945092508991899150889061587c565b60048660078111156117c757fe5b14156117df576117d88b8b8b6130d3565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc8961339f565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526008602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c613418565b600686600781111561185e57fe5b141561189e5760008b815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061594b565b505050505050509392505050565b6118e6614694565b60606000806000806118f6614694565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612f7d565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b90602001906020020151608001518561370b565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc878261257d565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614694565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c8484846124df565b600a5460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b611b02611afd888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843750613761945050505050565b6139a2565b60008181526009602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061599b565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615adb565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600960205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159cb565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6003546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a8b565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc9190810190614d1a565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061592b565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600b60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906158b1565b60405180910390a150505050565b611f386146ec565b611f41826139df565b6020808301829052600091825260049052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526005909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612eff565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600660209081526000928352604080842090915290825290205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156121865780601f1061215b57610100808354040283529160200191612186565b820191906000526020600020905b81548152906001019060200180831161216957829003601f168201915b505050505081565b612196614694565b606060008060006121a5614694565b8860008151811015156121b457fe5b906020019060200201516101600151945088519350600092505b828414612257578489848151811015156121e457fe5b906020019060200201516101600181905250612204888760200151612f7d565b9150612230898481518110151561221757fe5b90602001906020020151838986815181101515610e8e57fe5b905061223c868261257d565b6020860151881161224c57612257565b6001909201916121ce565b50505050509392505050565b60025481565b612271614694565b6060600080600080612281614694565b60005460ff16156122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122f657fe5b906020019060200201516101400151955089519450600093505b8385146123a557858a8581518110151561232657fe5b6020908102909101015161014001528651612342908a90612f7d565b92506123558a8581518110151561196457fe5b91506123818a8581518110151561236857fe5b90602001906020020151838a8781518110151561074957fe5b905061238d878261257d565b8651891161239a576123a5565b600190930192612310565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314612448576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a8b565b73ffffffffffffffffffffffffffffffffffffffff8116156124a557600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600b81527f322e302e312d616c706861000000000000000000000000000000000000000000602082015281565b6124e7614694565b6124ef6146ec565b60008060006124fd88611f30565b93506125076125df565b925061251588858589612611565b6125278860a001518560400151612f7d565b915061253387836139ed565b9050612546888589848960000151612990565b6125508882613a03565b945061256788848660200151876040015189612aa9565b612572888487613a64565b505050509392505050565b8151815161258b9190613b72565b8252602080830151908201516125a19190613b72565b6020830152604080830151908201516125ba9190613b72565b6040830152606080830151908201516125d39190613b72565b60609092019190915250565b600a5460009073ffffffffffffffffffffffffffffffffffffffff16818115612608578161260a565b335b9392505050565b825160ff1660031461264f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aab565b606084015173ffffffffffffffffffffffffffffffffffffffff16156126c257606084015173ffffffffffffffffffffffffffffffffffffffff1633146126c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615abb565b602084015173ffffffffffffffffffffffffffffffffffffffff161561274d578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff1614151561274d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158fb565b604083015115156127a35761276b836020015185600001518361135b565b15156127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061596b565b50505050565b6127bb8260a001518260a00151613bbc565b6127cd83608001518360800151613bbc565b1015612805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615acb565b5050565b6128116146bd565b6000806000806128258960a0015188612f7d565b935061283a89608001518a60a0015186613c17565b925061284a8860a0015187612f7d565b915061285f88608001518960a0015184613c17565b90508084106128a25760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161289a9290613c17565b8551526128df565b845183905284516020908101859052855181015190860180519190915260a089015160808a01519151516128d69290613c94565b60208087015101525b84515160208087015101516128f49190612f7d565b604086015284515160808a015160c08b0151612911929190613c17565b85516040015284516020015160a08a015160e08b0151612932929190613c17565b855160600152602085015151608089015160c08a0151612953929190613c17565b8560200151604001818152505061297b8560200151602001518960a001518a60e00151613c17565b60208601516060015250505050949350505050565b8215156129c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159eb565b82821115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159db565b8460a00151612a16856040015184613b72565b1115612a4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061590b565b612a5c856080015183613bbc565b612a6a828760a00151613bbc565b1115612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a6b565b5050505050565b612ab7828260200151613b72565b600084815260046020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612b46968f96339692959194909390615741565b60405180910390a45050505050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015612bfe5780601f10612bd357610100808354040283529160200191612bfe565b820191906000526020600020905b815481529060010190602001808311612be157829003601f168201915b50505050509050612c2685610140015186600001518660000151856020015160200151613d31565b61014084015184518651845160200151612c4293929190613d31565b612c5b8561014001518660000151858560400151613d31565b612c778186600001518760400151856000015160400151613d31565b612c938185600001518660400151856020015160400151613d31565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612cfd57612cf881848760400151612cf3866000015160600151876020015160600151613b72565b613d31565b612aa2565b612d1581848760400151856000015160600151613d31565b612aa281848660400151856020015160600151613d31565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612e34578351855260209485019490930192600101612e16565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612e7d578351855260209485019490930192600101612e5f565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612ec5578351855260209485019490930192600101612ea7565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612f076146ec565b612f1082611f30565b9050612f1c8282613efb565b612805828260200151614012565b612f32614694565b612f3d8484846124df565b6020810151909150831461260a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a5b565b600082821115612fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061591b565b508082035b92915050565b6000808251111515613002576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a0b565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061303257fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b6000816020018351101515156130ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061593b565b50016020015190565b60405160009060609082907f1626ba7e0000000000000000000000000000000000000000000000000000000090613110908890879060240161585c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000095861617905281517f697356616c696457616c6c65745369676e617475726528627974657333322c6181527f6464726573732c6279746573290000000000000000000000000000000000000091810191909152905190819003602d019020909350169050843b1515613261577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b60208201602081845183895afa3d6020146132e7577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b8080156132fb576001811461336c57612257565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b5050517fffffffff0000000000000000000000000000000000000000000000000000000090811691161495945050505050565b600060148251101515156133df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a9b565b6133ed8260148451036140b9565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b60405160009060609082907f9363470200000000000000000000000000000000000000000000000000000000906134579088908890889060240161582f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000095861617905281517f697356616c696456616c696461746f725369676e61747572652861646472657381527f732c627974657333322c616464726573732c6279746573290000000000000000918101919091529051908190036038019020909350169050863b15156135a8577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b602082016020818451838b5afa3d60201461362e577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b80801561364257600181146136b3576136fe565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000084167fffffffff000000000000000000000000000000000000000000000000000000008451161495505b5050505050949350505050565b6000808311613746576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b6137596137538584613bbc565b8461411a565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b6020831061388a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161384d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061392057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016138e3565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b600280546040517f190100000000000000000000000000000000000000000000000000000000000081529182015260228101919091526042902090565b6000612fbe611afd83614131565b60008183106139fc578161260a565b5090919050565b613a0b614694565b6020810182905260a08301516080840151613a27918491613c17565b808252608084015160c0850151613a3f929190613c17565b604082015260a083015160e0840151613a59918491613c17565b606082015292915050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015613b0d5780601f10613ae257610100808354040283529160200191613b0d565b820191906000526020600020905b815481529060010190602001808311613af057829003601f168201915b50505050509050613b2d8461014001518560000151858560000151613d31565b613b468461016001518486600001518560200151613d31565b613b5e81856000015186604001518560400151613d31565b6127a3818486604001518560600151613d31565b600082820183811015613bb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061598b565b8091505b5092915050565b600080831515613bcf5760009150613bb5565b50828202828482811515613bdf57fe5b0414613bb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061598b565b6000808311613c52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b613c5d84848461458a565b15613746576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159bb565b6000808311613ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b613cda84848461460f565b15613d11576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159bb565b613759613753613d218685613bbc565b613d2c866001612f7d565b613b72565b600080600083118015613d7057508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613ef3578551600310613db0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a4b565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600b90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613e39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159fb565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613ed557895181526020998a019901613ebd565b61020084858403866000895af1801515613eed573d85fd5b50505050505b505050505050565b805160009060ff16600314613f3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aab565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613faf57606083015173ffffffffffffffffffffffffffffffffffffffff163314613faf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615abb565b613fb76125df565b835190915073ffffffffffffffffffffffffffffffffffffffff80831691161461400d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061597b565b505050565b6000818152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf7926140ad923392906157c5565b60405180910390a45050565b6000816014018351101515156140fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a9b565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b600080828481151561412857fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b602083106143b957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161437c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061445457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614417565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106144ef57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016144b2565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116145c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b8215806145d1575084155b156145df5760009150610a88565b838015156145e957fe5b85840990506145f88584613bbc565b6146046103e883613bbc565b101595945050505050565b60008080841161464b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b821580614656575084155b156146645760009150610a88565b8380151561466e57fe5b85840990508361467e8583612f7d565b81151561468757fe5b0690506145f88584613bbc565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806146d2614694565b81526020016146df614694565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b600061260a8235615bbe565b6000601f8201831361472957600080fd5b813561473c61473782615b4d565b615b26565b81815260209384019390925082018360005b8381101561477a578135860161476488826148ca565b845250602092830192919091019060010161474e565b5050505092915050565b6000601f8201831361479557600080fd5b81356147a361473782615b4d565b81815260209384019390925082018360005b8381101561477a57813586016147cb8882614919565b84525060209283019291909101906001016147b5565b6000601f820183136147f257600080fd5b813561480061473782615b4d565b9150818183526020840193506020810190508385602084028201111561482557600080fd5b60005b8381101561477a578161483b888261485d565b8452506020928301929190910190600101614828565b600061260a8235615bd7565b600061260a8235615bdc565b600061260a8235615bdf565b600061260a8251615bdf565b600080601f8301841361489357600080fd5b50813567ffffffffffffffff8111156148ab57600080fd5b6020830191508360018202830111156148c357600080fd5b9250929050565b6000601f820183136148db57600080fd5b81356148e961473782615b6e565b9150808252602083016020830185838301111561490557600080fd5b614910838284615c15565b50505092915050565b6000610180828403121561492c57600080fd5b614937610180615b26565b90506000614945848461470c565b82525060206149568484830161470c565b602083015250604061496a8482850161470c565b604083015250606061497e8482850161470c565b60608301525060806149928482850161485d565b60808301525060a06149a68482850161485d565b60a08301525060c06149ba8482850161485d565b60c08301525060e06149ce8482850161485d565b60e0830152506101006149e38482850161485d565b610100830152506101206149f98482850161485d565b6101208301525061014082013567ffffffffffffffff811115614a1b57600080fd5b614a27848285016148ca565b6101408301525061016082013567ffffffffffffffff811115614a4957600080fd5b614a55848285016148ca565b6101608301525092915050565b600060208284031215614a7457600080fd5b6000613759848461470c565b60008060408385031215614a9357600080fd5b6000614a9f858561470c565b9250506020614ab08582860161470c565b9150509250929050565b60008060408385031215614acd57600080fd5b6000614ad9858561470c565b9250506020614ab085828601614851565b600060208284031215614afc57600080fd5b813567ffffffffffffffff811115614b1357600080fd5b61375984828501614784565b600080600060608486031215614b3457600080fd5b833567ffffffffffffffff811115614b4b57600080fd5b614b5786828701614784565b935050602084013567ffffffffffffffff811115614b7457600080fd5b614b80868287016147e1565b925050604084013567ffffffffffffffff811115614b9d57600080fd5b614ba986828701614718565b9150509250925092565b600080600060608486031215614bc857600080fd5b833567ffffffffffffffff811115614bdf57600080fd5b614beb86828701614784565b9350506020614b808682870161485d565b600060208284031215614c0e57600080fd5b6000613759848461485d565b60008060408385031215614c2d57600080fd5b6000614a9f858561485d565b60008060008060608587031215614c4f57600080fd5b6000614c5b878761485d565b9450506020614c6c8782880161470c565b935050604085013567ffffffffffffffff811115614c8957600080fd5b614c9587828801614881565b95989497509550505050565b600080600060608486031215614cb657600080fd5b6000614cc2868661485d565b9350506020614cd38682870161470c565b925050604084013567ffffffffffffffff811115614cf057600080fd5b614ba9868287016148ca565b600060208284031215614d0e57600080fd5b60006137598484614869565b600060208284031215614d2c57600080fd5b60006137598484614875565b600060208284031215614d4a57600080fd5b813567ffffffffffffffff811115614d6157600080fd5b61375984828501614919565b60008060008060808587031215614d8357600080fd5b843567ffffffffffffffff811115614d9a57600080fd5b614da687828801614919565b945050602085013567ffffffffffffffff811115614dc357600080fd5b614dcf87828801614919565b935050604085013567ffffffffffffffff811115614dec57600080fd5b614df8878288016148ca565b925050606085013567ffffffffffffffff811115614e1557600080fd5b614e21878288016148ca565b91505092959194509250565b600080600060608486031215614e4257600080fd5b833567ffffffffffffffff811115614e5957600080fd5b614e6586828701614919565b9350506020614cd38682870161485d565b60008060008060008060808789031215614e8f57600080fd5b6000614e9b898961485d565b9650506020614eac89828a0161470c565b955050604087013567ffffffffffffffff811115614ec957600080fd5b614ed589828a01614881565b9450945050606087013567ffffffffffffffff811115614ef457600080fd5b614f0089828a01614881565b92509250509295509295509295565b614f1881615bbe565b82525050565b6000614f2982615bba565b808452602084019350614f3b83615bb4565b60005b82811015614f6b57614f518683516156f3565b614f5a82615bb4565b606096909601959150600101614f3e565b5093949350505050565b614f1881615bd7565b614f1881615bdc565b614f1881615bdf565b6000614f9b82615bba565b808452614faf816020860160208601615c21565b614fb881615c4d565b9093016020019392505050565b614f1881615c0a565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906156818482614f7e565b5060208201516156946020850182614f7e565b5060408201516156a76040850182614f7e565b5060608201516127a36060850182614f7e565b80516101208301906156cc8482615670565b5060208201516156df6080850182615670565b5060408201516127a3610100850182614f7e565b80516060830190615704848261572a565b5060208201516157176020850182614f7e565b5060408201516127a36040850182614f7e565b614f1881615c04565b60208101612fbe8284614f0f565b6101008101615750828b614f0f565b61575d602083018a614f0f565b61576a6040830189614f7e565b6157776060830188614f7e565b6157846080830187614f7e565b61579160a0830186614f7e565b81810360c08301526157a38185614f90565b905081810360e08301526157b78184614f90565b9a9950505050505050505050565b606081016157d38286614f0f565b81810360208301526157e58185614f90565b905081810360408301526157f98184614f90565b95945050505050565b6020808252810161260a8184614f1e565b60208101612fbe8284614f75565b60208101612fbe8284614f7e565b6060810161583d8286614f7e565b61584a6020830185614f0f565b81810360408301526157f98184614f90565b6040810161586a8285614f7e565b81810360208301526137598184614f90565b6080810161588a8287614f7e565b615897602083018661572a565b6158a46040830185614f7e565b6157f96060830184614f7e565b604081016158bf8285614f87565b61260a6020830184614f0f565b6020808252810161260a8184614f90565b60208101612fbe8284614fc5565b60208082528101612fbe81614fce565b60208082528101612fbe81614ffe565b60208082528101612fbe8161502e565b60208082528101612fbe8161505e565b60208082528101612fbe8161508e565b60208082528101612fbe816150be565b60208082528101612fbe81615114565b60208082528101612fbe81615144565b60208082528101612fbe81615174565b60208082528101612fbe816151a4565b60208082528101612fbe816151d4565b60208082528101612fbe81615204565b60208082528101612fbe81615234565b60208082528101612fbe81615264565b60208082528101612fbe81615294565b60208082528101612fbe816152c4565b60208082528101612fbe816152f4565b60208082528101612fbe81615324565b60208082528101612fbe81615354565b60208082528101612fbe816153aa565b60208082528101612fbe816153da565b60208082528101612fbe8161540a565b60208082528101612fbe8161543a565b60208082528101612fbe8161546a565b60208082528101612fbe8161549a565b60208082528101612fbe816154ca565b60208082528101612fbe816154fa565b60208082528101612fbe8161552a565b60208082528101612fbe81615580565b60208082528101612fbe816155b0565b60208082528101612fbe816155e0565b60208082528101612fbe81615610565b60208082528101612fbe81615640565b60808101612fbe8284615670565b6101208101612fbe82846156ba565b60608101612fbe82846156f3565b60405181810167ffffffffffffffff81118282101715615b4557600080fd5b604052919050565b600067ffffffffffffffff821115615b6457600080fd5b5060209081020190565b600067ffffffffffffffff821115615b8557600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612fbe82615bbe565b82818337506000910152565b60005b83811015615c3c578181015183820152602001615c24565b838111156127a35750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820acfdb3081c6cc3292377a04194d31eb9eec8cb1e0b878d154d2221540dbb49b36c6578706572696d656e74616cf5003700000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d6366004614bfc565b610664565b6040516101e89190615821565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614b1f565b610676565b6040516101e89190615afb565b34801561022a57600080fd5b5061023e610239366004614bfc565b6107a1565b6040516101e89190615813565b34801561025757600080fd5b5061026b610266366004614c39565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614d6d565b6108a3565b6040516101e89190615b09565b3480156102a657600080fd5b506102116102b5366004614e2d565b610a3a565b3480156102c657600080fd5b506102da6102d5366004614cfc565b610a90565b6040516101e891906158dd565b3480156102f357600080fd5b5061026b610302366004614aea565b610ab8565b34801561031357600080fd5b50610211610322366004614b1f565b610b85565b34801561033357600080fd5b5061026b610342366004614bfc565b610c75565b34801561035357600080fd5b50610211610362366004614b1f565b610e2a565b34801561037357600080fd5b50610387610382366004614cfc565b610ebe565b6040516101e89190615733565b3480156103a057600080fd5b5061023e6103af366004614bfc565b610f0c565b3480156103c057600080fd5b506102116103cf366004614e2d565b610f21565b3480156103e057600080fd5b5061026b6103ef366004614aba565b610fcc565b34801561040057600080fd5b5061023e61040f366004614a80565b611106565b34801561042057600080fd5b5061021161042f366004614bb3565b611126565b34801561044057600080fd5b5061045461044f366004614aea565b61128a565b6040516101e89190615802565b34801561046d57600080fd5b5061023e61047c366004614c1a565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b1366004614ca1565b61135b565b3480156104c257600080fd5b506102116104d1366004614bb3565b6118de565b3480156104e257600080fd5b506102116104f1366004614e2d565b6119f1565b34801561050257600080fd5b5061026b610511366004614e76565b611a6c565b34801561052257600080fd5b5061026b610531366004614a62565b611d05565b34801561054257600080fd5b50610556610551366004614d38565b611f30565b6040516101e89190615b18565b34801561056f57600080fd5b5061026b61057e366004614d38565b61202a565b34801561058f57600080fd5b506101db61059e366004614a80565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906158cc565b3480156105d157600080fd5b506102116105e0366004614bb3565b61218e565b3480156105f157600080fd5b506101db612263565b34801561060657600080fd5b50610211610615366004614bb3565b612269565b34801561062657600080fd5b506103876123db565b34801561063b57600080fd5b5061026b61064a366004614a62565b6123f7565b34801561065b57600080fd5b506105b86124a8565b60046020526000908152604090205481565b61067e614694565b600080610689614694565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b906020019060200201516124df565b9050610764848261257d565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60056020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159ab565b5050600091825260076020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6146bd565b6108b36146ec565b6108bb6146ec565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a6125df565b905061096888848389612611565b61097487838388612611565b61097e88886127a9565b610992888885604001518560400151612809565b8051602081015190519195506109ad918a9186918190612990565b6020808501519081015190516109c99189918591908190612990565b6109e28882856020015186604001518860000151612aa9565b6109fb8782846020015185604001518860200151612aa9565b610a0788888387612b55565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614694565b6060610a4f858585612d2d565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612eff565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614694565b600080610b98614694565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612f2a565b9050610c6a848261257d565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec6125df565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600660209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a3b565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526006602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615821565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614694565b600080610e3d614694565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea9848261257d565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60096020526000908152604090205460ff1681565b610f29614694565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612f2a565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d6125df565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615813565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600860209081526000928352604080842090915290825290205460ff1681565b61112e614694565b6060600080600061113d614694565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612f7d565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a868261257d565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6146ec565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600760209081526000928352604080842090915290825290205460ff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a2b565b6113ad89612fc4565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061594b565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a1b565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aeb565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158eb565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff61308816565b935061156d89602163ffffffff61308816565b925060018b86868660405160008152602001604052604051611592949392919061587c565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158eb565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff61308816565b93506116b689602163ffffffff61308816565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611592945092508991899150889061587c565b60048660078111156117c757fe5b14156117df576117d88b8b8b6130d3565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc8961339f565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526008602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c613418565b600686600781111561185e57fe5b141561189e5760008b815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061594b565b505050505050509392505050565b6118e6614694565b60606000806000806118f6614694565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612f7d565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b90602001906020020151608001518561370b565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc878261257d565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614694565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c8484846124df565b600a5460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b611b02611afd888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843750613761945050505050565b6139a2565b60008181526009602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061599b565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615adb565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600960205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159cb565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6003546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a8b565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc9190810190614d1a565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061592b565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600b60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906158b1565b60405180910390a150505050565b611f386146ec565b611f41826139df565b6020808301829052600091825260049052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526005909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612eff565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600660209081526000928352604080842090915290825290205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156121865780601f1061215b57610100808354040283529160200191612186565b820191906000526020600020905b81548152906001019060200180831161216957829003601f168201915b505050505081565b612196614694565b606060008060006121a5614694565b8860008151811015156121b457fe5b906020019060200201516101600151945088519350600092505b828414612257578489848151811015156121e457fe5b906020019060200201516101600181905250612204888760200151612f7d565b9150612230898481518110151561221757fe5b90602001906020020151838986815181101515610e8e57fe5b905061223c868261257d565b6020860151881161224c57612257565b6001909201916121ce565b50505050509392505050565b60025481565b612271614694565b6060600080600080612281614694565b60005460ff16156122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a7b565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122f657fe5b906020019060200201516101400151955089519450600093505b8385146123a557858a8581518110151561232657fe5b6020908102909101015161014001528651612342908a90612f7d565b92506123558a8581518110151561196457fe5b91506123818a8581518110151561236857fe5b90602001906020020151838a8781518110151561074957fe5b905061238d878261257d565b8651891161239a576123a5565b600190930192612310565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314612448576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a8b565b73ffffffffffffffffffffffffffffffffffffffff8116156124a557600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600b81527f322e302e312d616c706861000000000000000000000000000000000000000000602082015281565b6124e7614694565b6124ef6146ec565b60008060006124fd88611f30565b93506125076125df565b925061251588858589612611565b6125278860a001518560400151612f7d565b915061253387836139ed565b9050612546888589848960000151612990565b6125508882613a03565b945061256788848660200151876040015189612aa9565b612572888487613a64565b505050509392505050565b8151815161258b9190613b72565b8252602080830151908201516125a19190613b72565b6020830152604080830151908201516125ba9190613b72565b6040830152606080830151908201516125d39190613b72565b60609092019190915250565b600a5460009073ffffffffffffffffffffffffffffffffffffffff16818115612608578161260a565b335b9392505050565b825160ff1660031461264f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aab565b606084015173ffffffffffffffffffffffffffffffffffffffff16156126c257606084015173ffffffffffffffffffffffffffffffffffffffff1633146126c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615abb565b602084015173ffffffffffffffffffffffffffffffffffffffff161561274d578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff1614151561274d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906158fb565b604083015115156127a35761276b836020015185600001518361135b565b15156127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061596b565b50505050565b6127bb8260a001518260a00151613bbc565b6127cd83608001518360800151613bbc565b1015612805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615acb565b5050565b6128116146bd565b6000806000806128258960a0015188612f7d565b935061283a89608001518a60a0015186613c17565b925061284a8860a0015187612f7d565b915061285f88608001518960a0015184613c17565b90508084106128a25760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161289a9290613c17565b8551526128df565b845183905284516020908101859052855181015190860180519190915260a089015160808a01519151516128d69290613c94565b60208087015101525b84515160208087015101516128f49190612f7d565b604086015284515160808a015160c08b0151612911929190613c17565b85516040015284516020015160a08a015160e08b0151612932929190613c17565b855160600152602085015151608089015160c08a0151612953929190613c17565b8560200151604001818152505061297b8560200151602001518960a001518a60e00151613c17565b60208601516060015250505050949350505050565b8215156129c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159eb565b82821115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159db565b8460a00151612a16856040015184613b72565b1115612a4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061590b565b612a5c856080015183613bbc565b612a6a828760a00151613bbc565b1115612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a6b565b5050505050565b612ab7828260200151613b72565b600084815260046020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612b46968f96339692959194909390615741565b60405180910390a45050505050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015612bfe5780601f10612bd357610100808354040283529160200191612bfe565b820191906000526020600020905b815481529060010190602001808311612be157829003601f168201915b50505050509050612c2685610140015186600001518660000151856020015160200151613d31565b61014084015184518651845160200151612c4293929190613d31565b612c5b8561014001518660000151858560400151613d31565b612c778186600001518760400151856000015160400151613d31565b612c938185600001518660400151856020015160400151613d31565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612cfd57612cf881848760400151612cf3866000015160600151876020015160600151613b72565b613d31565b612aa2565b612d1581848760400151856000015160600151613d31565b612aa281848660400151856020015160600151613d31565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612e34578351855260209485019490930192600101612e16565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612e7d578351855260209485019490930192600101612e5f565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612ec5578351855260209485019490930192600101612ea7565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612f076146ec565b612f1082611f30565b9050612f1c8282613efb565b612805828260200151614012565b612f32614694565b612f3d8484846124df565b6020810151909150831461260a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a5b565b600082821115612fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061591b565b508082035b92915050565b6000808251111515613002576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a0b565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061303257fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b6000816020018351101515156130ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061593b565b50016020015190565b60405160009060609082907f1626ba7e0000000000000000000000000000000000000000000000000000000090613110908890879060240161585c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000095861617905281517f697356616c696457616c6c65745369676e617475726528627974657333322c6181527f6464726573732c6279746573290000000000000000000000000000000000000091810191909152905190819003602d019020909350169050843b1515613261577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b60208201602081845183895afa3d6020146132e7577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b8080156132fb576001811461336c57612257565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b5050517fffffffff0000000000000000000000000000000000000000000000000000000090811691161495945050505050565b600060148251101515156133df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a9b565b6133ed8260148451036140b9565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b60405160009060609082907f9363470200000000000000000000000000000000000000000000000000000000906134579088908890889060240161582f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000095861617905281517f697356616c696456616c696461746f725369676e61747572652861646472657381527f732c627974657333322c616464726573732c6279746573290000000000000000918101919091529051908190036038019020909350169050863b15156135a8577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b602082016020818451838b5afa3d60201461362e577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b80801561364257600181146136b3576136fe565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000084167fffffffff000000000000000000000000000000000000000000000000000000008451161495505b5050505050949350505050565b6000808311613746576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b6137596137538584613bbc565b8461411a565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b6020831061388a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161384d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061392057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016138e3565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b600280546040517f190100000000000000000000000000000000000000000000000000000000000081529182015260228101919091526042902090565b6000612fbe611afd83614131565b60008183106139fc578161260a565b5090919050565b613a0b614694565b6020810182905260a08301516080840151613a27918491613c17565b808252608084015160c0850151613a3f929190613c17565b604082015260a083015160e0840151613a59918491613c17565b606082015292915050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015613b0d5780601f10613ae257610100808354040283529160200191613b0d565b820191906000526020600020905b815481529060010190602001808311613af057829003601f168201915b50505050509050613b2d8461014001518560000151858560000151613d31565b613b468461016001518486600001518560200151613d31565b613b5e81856000015186604001518560400151613d31565b6127a3818486604001518560600151613d31565b600082820183811015613bb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061598b565b8091505b5092915050565b600080831515613bcf5760009150613bb5565b50828202828482811515613bdf57fe5b0414613bb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061598b565b6000808311613c52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b613c5d84848461458a565b15613746576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159bb565b6000808311613ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b613cda84848461460f565b15613d11576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159bb565b613759613753613d218685613bbc565b613d2c866001612f7d565b613b72565b600080600083118015613d7057508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613ef3578551600310613db0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a4b565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600b90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613e39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906159fb565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613ed557895181526020998a019901613ebd565b61020084858403866000895af1801515613eed573d85fd5b50505050505b505050505050565b805160009060ff16600314613f3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615aab565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613faf57606083015173ffffffffffffffffffffffffffffffffffffffff163314613faf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615abb565b613fb76125df565b835190915073ffffffffffffffffffffffffffffffffffffffff80831691161461400d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061597b565b505050565b6000818152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf7926140ad923392906157c5565b60405180910390a45050565b6000816014018351101515156140fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690615a9b565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b600080828481151561412857fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b602083106143b957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161437c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061445457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614417565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106144ef57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016144b2565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116145c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b8215806145d1575084155b156145df5760009150610a88565b838015156145e957fe5b85840990506145f88584613bbc565b6146046103e883613bbc565b101595945050505050565b60008080841161464b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061595b565b821580614656575084155b156146645760009150610a88565b8380151561466e57fe5b85840990508361467e8583612f7d565b81151561468757fe5b0690506145f88584613bbc565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806146d2614694565b81526020016146df614694565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b600061260a8235615bbe565b6000601f8201831361472957600080fd5b813561473c61473782615b4d565b615b26565b81815260209384019390925082018360005b8381101561477a578135860161476488826148ca565b845250602092830192919091019060010161474e565b5050505092915050565b6000601f8201831361479557600080fd5b81356147a361473782615b4d565b81815260209384019390925082018360005b8381101561477a57813586016147cb8882614919565b84525060209283019291909101906001016147b5565b6000601f820183136147f257600080fd5b813561480061473782615b4d565b9150818183526020840193506020810190508385602084028201111561482557600080fd5b60005b8381101561477a578161483b888261485d565b8452506020928301929190910190600101614828565b600061260a8235615bd7565b600061260a8235615bdc565b600061260a8235615bdf565b600061260a8251615bdf565b600080601f8301841361489357600080fd5b50813567ffffffffffffffff8111156148ab57600080fd5b6020830191508360018202830111156148c357600080fd5b9250929050565b6000601f820183136148db57600080fd5b81356148e961473782615b6e565b9150808252602083016020830185838301111561490557600080fd5b614910838284615c15565b50505092915050565b6000610180828403121561492c57600080fd5b614937610180615b26565b90506000614945848461470c565b82525060206149568484830161470c565b602083015250604061496a8482850161470c565b604083015250606061497e8482850161470c565b60608301525060806149928482850161485d565b60808301525060a06149a68482850161485d565b60a08301525060c06149ba8482850161485d565b60c08301525060e06149ce8482850161485d565b60e0830152506101006149e38482850161485d565b610100830152506101206149f98482850161485d565b6101208301525061014082013567ffffffffffffffff811115614a1b57600080fd5b614a27848285016148ca565b6101408301525061016082013567ffffffffffffffff811115614a4957600080fd5b614a55848285016148ca565b6101608301525092915050565b600060208284031215614a7457600080fd5b6000613759848461470c565b60008060408385031215614a9357600080fd5b6000614a9f858561470c565b9250506020614ab08582860161470c565b9150509250929050565b60008060408385031215614acd57600080fd5b6000614ad9858561470c565b9250506020614ab085828601614851565b600060208284031215614afc57600080fd5b813567ffffffffffffffff811115614b1357600080fd5b61375984828501614784565b600080600060608486031215614b3457600080fd5b833567ffffffffffffffff811115614b4b57600080fd5b614b5786828701614784565b935050602084013567ffffffffffffffff811115614b7457600080fd5b614b80868287016147e1565b925050604084013567ffffffffffffffff811115614b9d57600080fd5b614ba986828701614718565b9150509250925092565b600080600060608486031215614bc857600080fd5b833567ffffffffffffffff811115614bdf57600080fd5b614beb86828701614784565b9350506020614b808682870161485d565b600060208284031215614c0e57600080fd5b6000613759848461485d565b60008060408385031215614c2d57600080fd5b6000614a9f858561485d565b60008060008060608587031215614c4f57600080fd5b6000614c5b878761485d565b9450506020614c6c8782880161470c565b935050604085013567ffffffffffffffff811115614c8957600080fd5b614c9587828801614881565b95989497509550505050565b600080600060608486031215614cb657600080fd5b6000614cc2868661485d565b9350506020614cd38682870161470c565b925050604084013567ffffffffffffffff811115614cf057600080fd5b614ba9868287016148ca565b600060208284031215614d0e57600080fd5b60006137598484614869565b600060208284031215614d2c57600080fd5b60006137598484614875565b600060208284031215614d4a57600080fd5b813567ffffffffffffffff811115614d6157600080fd5b61375984828501614919565b60008060008060808587031215614d8357600080fd5b843567ffffffffffffffff811115614d9a57600080fd5b614da687828801614919565b945050602085013567ffffffffffffffff811115614dc357600080fd5b614dcf87828801614919565b935050604085013567ffffffffffffffff811115614dec57600080fd5b614df8878288016148ca565b925050606085013567ffffffffffffffff811115614e1557600080fd5b614e21878288016148ca565b91505092959194509250565b600080600060608486031215614e4257600080fd5b833567ffffffffffffffff811115614e5957600080fd5b614e6586828701614919565b9350506020614cd38682870161485d565b60008060008060008060808789031215614e8f57600080fd5b6000614e9b898961485d565b9650506020614eac89828a0161470c565b955050604087013567ffffffffffffffff811115614ec957600080fd5b614ed589828a01614881565b9450945050606087013567ffffffffffffffff811115614ef457600080fd5b614f0089828a01614881565b92509250509295509295509295565b614f1881615bbe565b82525050565b6000614f2982615bba565b808452602084019350614f3b83615bb4565b60005b82811015614f6b57614f518683516156f3565b614f5a82615bb4565b606096909601959150600101614f3e565b5093949350505050565b614f1881615bd7565b614f1881615bdc565b614f1881615bdf565b6000614f9b82615bba565b808452614faf816020860160208601615c21565b614fb881615c4d565b9093016020019392505050565b614f1881615c0a565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906156818482614f7e565b5060208201516156946020850182614f7e565b5060408201516156a76040850182614f7e565b5060608201516127a36060850182614f7e565b80516101208301906156cc8482615670565b5060208201516156df6080850182615670565b5060408201516127a3610100850182614f7e565b80516060830190615704848261572a565b5060208201516157176020850182614f7e565b5060408201516127a36040850182614f7e565b614f1881615c04565b60208101612fbe8284614f0f565b6101008101615750828b614f0f565b61575d602083018a614f0f565b61576a6040830189614f7e565b6157776060830188614f7e565b6157846080830187614f7e565b61579160a0830186614f7e565b81810360c08301526157a38185614f90565b905081810360e08301526157b78184614f90565b9a9950505050505050505050565b606081016157d38286614f0f565b81810360208301526157e58185614f90565b905081810360408301526157f98184614f90565b95945050505050565b6020808252810161260a8184614f1e565b60208101612fbe8284614f75565b60208101612fbe8284614f7e565b6060810161583d8286614f7e565b61584a6020830185614f0f565b81810360408301526157f98184614f90565b6040810161586a8285614f7e565b81810360208301526137598184614f90565b6080810161588a8287614f7e565b615897602083018661572a565b6158a46040830185614f7e565b6157f96060830184614f7e565b604081016158bf8285614f87565b61260a6020830184614f0f565b6020808252810161260a8184614f90565b60208101612fbe8284614fc5565b60208082528101612fbe81614fce565b60208082528101612fbe81614ffe565b60208082528101612fbe8161502e565b60208082528101612fbe8161505e565b60208082528101612fbe8161508e565b60208082528101612fbe816150be565b60208082528101612fbe81615114565b60208082528101612fbe81615144565b60208082528101612fbe81615174565b60208082528101612fbe816151a4565b60208082528101612fbe816151d4565b60208082528101612fbe81615204565b60208082528101612fbe81615234565b60208082528101612fbe81615264565b60208082528101612fbe81615294565b60208082528101612fbe816152c4565b60208082528101612fbe816152f4565b60208082528101612fbe81615324565b60208082528101612fbe81615354565b60208082528101612fbe816153aa565b60208082528101612fbe816153da565b60208082528101612fbe8161540a565b60208082528101612fbe8161543a565b60208082528101612fbe8161546a565b60208082528101612fbe8161549a565b60208082528101612fbe816154ca565b60208082528101612fbe816154fa565b60208082528101612fbe8161552a565b60208082528101612fbe81615580565b60208082528101612fbe816155b0565b60208082528101612fbe816155e0565b60208082528101612fbe81615610565b60208082528101612fbe81615640565b60808101612fbe8284615670565b6101208101612fbe82846156ba565b60608101612fbe82846156f3565b60405181810167ffffffffffffffff81118282101715615b4557600080fd5b604052919050565b600067ffffffffffffffff821115615b6457600080fd5b5060209081020190565b600067ffffffffffffffff821115615b8557600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612fbe82615bbe565b82818337506000910152565b60005b83811015615c3c578181015183820152602001615c24565b838111156127a35750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820acfdb3081c6cc3292377a04194d31eb9eec8cb1e0b878d154d2221540dbb49b36c6578706572696d656e74616cf50037
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _zrxAssetData (bytes): 0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [2] : f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f
Arg [3] : 4699f49800000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
175350:636:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45719:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;45719:42:0;;;;;;;;;;;;;;;;;;;;;;;;;123070:666;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;123070:666:0;;;;;;;;;;;;;;;;;45812:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;45812:42:0;;;;;;;;;;;;;;;;;86539:463;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;86539:463:0;;;;;;;;;;;162680:2977;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;162680:2977:0;;;;;;;;;;;;;;;;;121034:1549;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;121034:1549:0;;;;;;;;;140941:51;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;140941:51:0;;;;;;;;;;;;;;;;;134953:268;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;134953:268:0;;;;;;;;;124224:678;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;124224:678:0;;;;;;;;;46472:1102;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;46472:1102:0;;;;;;;;;125470:650;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;125470:650:0;;;;;;;;;142087:160;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;142087:160:0;;;;;;;;;;;;;;;;;153049:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;153049:45:0;;;;;;;;;120229:410;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;120229:410:0;;;;;;;;;87244:426;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;87244:426:0;;;;;;;;;86127:71;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;86127:71:0;;;;;;;;;126515:1544;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;126515:1544:0;;;;;;;;;135420:430;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;135420:430:0;;;;;;;;;;;;;;;;;86004:63;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;86004:63:0;;;;;;;;;137518:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;137518:20:0;;;;88049:4971;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;88049:4971:0;;;;;;;;;132871:1943;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;132871:1943:0;;;;;;;;;47898:389;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;47898:389:0;;;;;;;;;153518:1509;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;153518:1509:0;;;;;;;;;141206:686;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;141206:686:0;;;;;;;;;48932:2316;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;48932:2316:0;;;;;;;;;;;;;;;;;48523:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;48523:129:0;;;;;;;;;46076:67;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;46076:67:0;;;;;;;;;2478:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2478:27:0;;;;;;;;;;;;128524:1524;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;128524:1524:0;;;;;;;;;10553:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10553:33:0;;;;130443:1959;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;130443:1959:0;;;;;;;;;153149:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;153149:36:0;;;;137776:174;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;137776:174:0;;;;;;;;;175539:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;175539:46:0;;;;45719:42;;;;;;;;;;;;;:::o;123070:666::-;123284:35;;:::i;:::-;123337:20;123389:9;123443:36;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;123360;;;-1:-1:-1;4407:6:0;-1:-1:-1;123384:311:0;123404:17;;;123384:311;;123482:135;123518:6;123525:1;123518:9;;;;;;;;;;;;;;;;;;123546:21;123568:1;123546:24;;;;;;;;;;;;;;;;;;123589:10;123600:1;123589:13;;;;;;;;;;;;;;;;;;123482:17;:135::i;:::-;123443:174;;123632:51;123647:16;123665:17;123632:14;:51::i;:::-;123423:3;;;;;123384:311;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;123070:666:0;;-1:-1:-1;;;123070:666:0:o;45812:42::-;;;;;;;;;;;;;;;:::o;86539:463::-;86682:27;;;86699:10;86682:27;86678:269;;86752:130;86791:4;86818:13;86854:9;;86752:130;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;86752:16:0;;-1:-1:-1;;;;;86752:130:0:i;:::-;86726:209;;;;;;;;;;;;;;;;-1:-1:-1;;86957:15:0;;;;:9;:15;;;;;;;;:30;;;;;;;;;;;:37;;;;86990:4;86957:37;;;86539:463::o;162680:2977::-;162924:59;;:::i;:::-;163397:39;;:::i;:::-;163473:40;;:::i;:::-;163585:20;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;163257:24;;;;;163229:25;;;;:52;;;;163320:24;;;163292:25;;;:52;163439:23;163257:9;163439:12;:23::i;:::-;163397:65;;163516:24;163529:10;163516:12;:24::i;:::-;163473:67;;163608:26;:24;:26::i;:::-;163585:49;;163708:137;163742:9;163766:13;163794:12;163821:13;163708:19;:137::i;:::-;163856:140;163890:10;163915:14;163944:12;163971:14;163856:19;:140::i;:::-;164007:39;164024:9;164035:10;164007:16;:39::i;:::-;164126:200;164168:9;164192:10;164217:13;:41;;;164273:14;:42;;;164126:27;:200::i;:::-;164456:23;;:46;;;;164578;;164105:221;;-1:-1:-1;164374:261:0;;164404:9;;164428:13;;164456:46;;164374:15;:261::i;:::-;164730:24;;;;;:47;;;;164854;;164646:266;;164676:10;;164701:14;;164730:47;;;164646:15;:266::i;:::-;164967:211;164999:9;165023:12;165050:13;:23;;;165088:13;:41;;;165144:18;:23;;;164967:17;:211::i;:::-;165189:215;165221:10;165246:12;165273:14;:24;;;165312:14;:42;;;165369:18;:24;;;165189:17;:215::i;:::-;165472:139;165506:9;165530:10;165555:12;165582:18;165472:19;:139::i;:::-;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;162680:2977:0;;-1:-1:-1;;;;162680:2977:0:o;121034:1549::-;121211:30;;:::i;:::-;121307;121340:108;121373:5;121393:20;121428:9;121340:18;:108::i;:::-;121307:141;;122034:3;121954:17;121888;121882:24;121785:2;121766:17;121762:26;121676:7;121604:3;121573:539;122129:7;122126:2;;;122182:17;122176:24;122163:11;122156:45;122277:2;122258:17;122254:26;122248:33;122243:2;122230:11;122226:20;122219:63;122358:2;122339:17;122335:26;122329:33;122324:2;122311:11;122307:20;122300:63;122439:2;122420:17;122416:26;122410:33;122405:2;122392:11;122388:20;122381:63;122126:2;-1:-1:-1;121034:1549:0;;;;;;;:::o;140941:51::-;;;;;;;;;;;;;;;:::o;134953:268::-;135066:20;4298:6;;135066:20;;4298:6;;4297:7;4275:75;;;;;;;;;;;;;;-1:-1:-1;;4407:6:0;:13;;;;4416:4;4407:13;;;135089;;;135113:101;135133:17;;;135113:101;;135172:30;135192:6;135199:1;135192:9;;;;;;;;;;;;;;;;;;135172:19;:30::i;:::-;135152:3;;135113:101;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;134953:268:0:o;124224:678::-;124444:35;;:::i;:::-;124497:20;124549:9;124603:36;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;124520;;;-1:-1:-1;4407:6:0;-1:-1:-1;124544:317:0;124564:17;;;124544:317;;124642:141;124684:6;124691:1;124684:9;;;;;;;;;;;;;;;;;;124712:21;124734:1;124712:24;;;;;;;;;;;;;;;;;;124755:10;124766:1;124755:13;;;;;;;;;;;;;;;;;;124642:23;:141::i;:::-;124603:180;;124798:51;124813:16;124831:17;124798:14;:51::i;:::-;124583:3;;;;;124544:317;;46472:1102;46580:20;4298:6;;46580:20;;;;;;4298:6;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;46603:26;:24;:26::i;:::-;46580:49;-1:-1:-1;46914:26:0;;;46930:10;46914:26;:52;;46956:10;46914:52;;;46951:1;46914:52;47136:24;;;;;;;;:10;:24;;;;;;;;:39;;;;;;;;;;46890:76;;-1:-1:-1;47100:1:0;47081:20;;;-1:-1:-1;47136:39:0;-1:-1:-1;47268:29:0;;;47246:102;;;;;;;;;;;;;;47391:24;;;;;;;;:10;:24;;;;;;;;:39;;;;;;;;;;;;;;:55;;;47462:104;;;;;47433:13;;47462:104;;;;;;;;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;;;46472:1102:0:o;125470:650::-;125669:35;;:::i;:::-;125722:20;125774:9;125828:36;;:::i;:::-;125745:6;:13;125722:36;;125786:1;125774:13;;125769:310;125789:17;;;125769:310;;125867:134;125902:6;125909:1;125902:9;;;;;;;;;;;;;;;;;;125930:21;125952:1;125930:24;;;;;;;;;;;;;;;;;;125973:10;125984:1;125973:13;;;;;;;;;;;;;;;;;;125867:16;:134::i;:::-;125828:173;;126016:51;126031:16;126049:17;126016:14;:51::i;:::-;125808:3;;;;;125769:310;;;125470:650;;;;;;;;:::o;142087:160::-;142213:26;;;142181:7;142213:26;;;:12;:26;;;;;;;;142087:160;;;;:::o;153049:45::-;;;;;;;;;;;;;;;:::o;120229:410::-;120427:30;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;120489:113;120527:5;120547:20;120582:9;120489:23;:113::i;:::-;4535:5;4526:14;;;;;;120475:127;120229:410;-1:-1:-1;;;;120229:410:0:o;87244:426::-;87405:21;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;87429:26;:24;:26::i;:::-;87466:32;;;;;;;;:17;:32;;;;;;;;:50;;;;;;;;;;;;;;:61;;;;;;;;;;87543:119;87466:32;;-1:-1:-1;87466:50:0;;87543:119;;;;87466:61;;87543:119;;;;;;;;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;87244:426:0:o;86127:71::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;126515:1544::-;126720:35;;:::i;:::-;126773:27;126844:20;126896:9;127289:37;127483:36;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;126803:9;;:6;;4407;126803:9;;;;;;;;;;;;;;:24;;;126773:54;;126867:6;:13;126844:36;;126908:1;126896:13;;126891:1127;126911:17;;;126891:1127;;127189:14;127162:6;127169:1;127162:9;;;;;;;;;;;;;;;;;;:24;;:41;;;;127329:70;127337:20;127359:16;:39;;;127329:7;:70::i;:::-;127289:110;;127522:140;127558:6;127565:1;127558:9;;;;;;;;;;;;;;;;;;127586:29;127634:10;127645:1;127634:13;;;;;;;;;127522:140;127483:179;;127750:51;127765:16;127783:17;127750:14;:51::i;:::-;127902:39;;;;:63;-1:-1:-1;127898:109:0;;127986:5;;127898:109;126930:3;;;;;126891:1127;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;126515:1544:0;;;-1:-1:-1;;;;;126515:1544:0:o;135420:430::-;135523:20;135568;135615:38;135710:9;135591:6;:13;135568:36;;135681:12;135656:38;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;135615:79;;135722:1;135710:13;;135705:110;135725:17;;;135705:110;;135780:23;135793:6;135800:1;135793:9;;;;;;;;;;;;;;;;;;135780:12;:23::i;:::-;135764:10;135775:1;135764:13;;;;;;;;;;;;;;;;;;:39;135744:3;;135705:110;;86004:63;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;137518:20::-;;;;;;:::o;88049:4971::-;88218:12;88416:22;88665:27;88789:7;88807:9;88827;88847:17;91991:24;88289:1;88270:9;:16;:20;88248:100;;;;;;;;;;;;;;;;88447:23;:9;:21;:23::i;:::-;88441:30;;;;-1:-1:-1;88573:29:0;88548:55;;;;88526:126;;;;;;;;;;;;;;88709:16;88695:31;;;;;;;;;;88665:61;-1:-1:-1;89221:21:0;89204:13;:38;;;;;;;;;89200:3462;;;89259:27;;;;;;;;;;;89200:3462;89574:21;89557:13;:38;;;;;;;;;89553:3109;;;89638:16;;:21;89612:100;;;;;;;;;;;;;;89737:5;;-1:-1:-1;89757:14:0;;89553:3109;89847:20;89830:13;:37;;;;;;;;;89826:2836;;;89910:16;;89930:2;89910:22;89884:102;;;;;;;;;;;;;;90011:9;90021:1;90011:12;;;;;;;;;;;;;;;;;;;;;90005:19;;-1:-1:-1;90043:24:0;:9;90065:1;90043:24;:21;:24;:::i;:::-;90039:28;-1:-1:-1;90086:25:0;:9;90108:2;90086:25;:21;:25;:::i;:::-;90082:29;;90138:107;90166:4;90189:1;90209;90229;90138:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;90138:107:0;;;;;90270:26;;;;;;;;;-1:-1:-1;90138:107:0;-1:-1:-1;90311:14:0;;-1:-1:-1;90311:14:0;89826:2836;90405:21;90388:13;:38;;;;;;;;;90384:2278;;;90469:16;;90489:2;90469:22;90443:102;;;;;;;;;;;;;;90570:9;90580:1;90570:12;;;;;;;;;;;;;;;;;;;;;90564:19;;-1:-1:-1;90602:24:0;:9;90624:1;90602:24;:21;:24;:::i;:::-;90598:28;-1:-1:-1;90645:25:0;:9;90667:2;90645:25;:21;:25;:::i;:::-;90641:29;;90697:233;90831:4;90735:119;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;90735:119:0;;;90725:130;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;90725:130:0;;;;;;;;;;;;-1:-1:-1;90697:233:0;;;;;;;;;;-1:-1:-1;90725:130:0;-1:-1:-1;90874:1:0;;90894;;-1:-1:-1;90914:1:0;;90697:233;;90384:2278;91184:20;91167:13;:37;;;;;;;;;91163:1499;;;91231:120;91272:4;91295:13;91327:9;91231:22;:120::i;:::-;91221:130;-1:-1:-1;91366:14:0;;91163:1499;91888:23;91871:13;:40;;;;;;;;;91867:795;;;92018:26;:9;:24;:26::i;:::-;92120:32;;;;;;;;:17;:32;;;;;;;;:50;;;;;;;;;;91991:53;;-1:-1:-1;92120:50:0;;92119:51;92115:104;;;92198:5;92191:12;;;;92115:104;92243:158;92287:16;92322:4;92345:13;92377:9;92243:25;:158::i;91867:795::-;92541:23;92524:13;:40;;;;;;;;;92520:142;;;92591:15;;;;:9;:15;;;;;;;;:30;;;;;;;;;;;;;;-1:-1:-1;92636:14:0;;92520:142;92981:31;;;;;;;;;;;88049:4971;;;;;;;;;;;;;:::o;132871:1943::-;133060:35;;:::i;:::-;133113:27;133180:20;133232:9;133629:37;133939;134237:36;;:::i;:::-;133143:6;133150:1;133143:9;;;;;;;;;;;;;;;;;;:24;;;133113:54;;133203:6;:13;133180:36;;133244:1;133232:13;;133227:1546;133247:17;;;133227:1546;;133530:14;133503:6;133510:1;133503:9;;;;;;;;;;;;;;;;;;;:24;;:41;133699:39;;133669:70;;133677:20;;133669:7;:70::i;:::-;133629:110;;133979:174;134019:6;134026:1;134019:9;;;;;;;;;;;;;;;;;;:26;;;134064:6;134071:1;134064:9;;;;;;;;;;;;;;;;;;:26;;;134109:29;133979:21;:174::i;:::-;133939:214;;134276:139;134311:6;134318:1;134311:9;;;;;;;;;;;;;;;;;;134339:29;134387:10;134398:1;134387:13;;;;;;;;;134276:139;134237:178;;134503:51;134518:16;134536:17;134503:14;:51::i;:::-;134657:39;;:63;-1:-1:-1;134653:109:0;;134741:5;;134653:109;133266:3;;;;;133227:1546;;;132871:1943;;;;;;;;;;;:::o;47898:389::-;48081:30;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;48143:107;48175:5;48195:20;48230:9;48143:17;:107::i;153518:1509::-;153742:21;;153836:23;;153742:35;:21;:35;153720:103;;;;;;;;;;;;;;153862:117;153880:98;153916:4;153935:13;153963:4;;153880:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;153880:21:0;;-1:-1:-1;;;;;153880:98:0:i;:::-;153862:17;:117::i;:::-;154070:29;;;;:12;:29;;;;;;153836:143;;-1:-1:-1;154070:29:0;;154069:30;154047:95;;;;;;;;;;;;;;154231:27;;;154248:10;154231:27;154227:423;;154336:141;154375:15;154413:13;154449:9;;154336:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;154336:16:0;;-1:-1:-1;;;;;154336:141:0:i;:::-;154310:223;;;;;;;;;;;;;;;;154601:21;:37;;;;;;;;;;154227:423;154694:29;;;;:12;:29;;;;;;;:36;;;;154726:4;154694:36;;;154763:32;154771:4;;154790;;;;154763:32;154790:4;;;;154763:32;;;;;;;;;;;;;;;;;;;;;;;;154741:98;;;;;;;;;;;;;;;;154930:27;;;154947:10;154930:27;154926:94;;154974:21;:34;;;;;;154926:94;153518:1509;;;;;;;:::o;141206:686::-;137696:5;;141307:30;;;;;;137696:5;;137682:10;:19;137660:88;;;;;;;;;;;;;;141352:10;141307:56;;141461:18;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;141461:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;141461:31:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141461:31:0;;;;;;;;;141531:26;;;;;;;:12;:26;;;;;;141439:53;;-1:-1:-1;141531:26:0;;;-1:-1:-1;141590:31:0;;141568:107;;;;;;;;;;;;;;141738:26;;;;;;;:12;:26;;;;;;;:47;;;;;;;;;;141801:83;;;;;141738:26;;141863:10;;141801:83;;;;;;;;;;141206:686;;;;:::o;48932:2316::-;49022:26;;:::i;:::-;49123:19;49136:5;49123:12;:19::i;:::-;49101;;;;:41;;;;49227:27;;;:6;:27;;;;;;;;49187:37;;;:67;49562:22;;;;:27;49558:160;;;49636:38;49630:45;49606:69;;;;49690:16;;49558:160;50037:22;;;;:27;50033:160;;;50111:38;50105:45;;50033:160;50290:22;;;;50249:37;;;;:63;50245:182;;50359:24;50353:31;;50245:182;50555:27;;;;50536:15;:46;50532:160;;50629:19;50623:26;;50532:160;50764:19;;;;;50754:30;;;;:9;:30;;;;;;;;;50750:146;;;50831:21;50825:28;;50750:146;50964:10;;;;50921:18;;50910:30;;;;;;;;:10;:30;;;;;;;;50941:19;;;;50910:51;;;;;;;;;;:64;50906:180;;;51021:21;51015:28;;50906:180;51192:20;51162:51;;;48932:2316;-1:-1:-1;48932:2316:0:o;48523:129::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;48618:26;48638:5;48618:19;:26::i;:::-;-1:-1:-1;4535:5:0;4526:14;;;;;;48523:129::o;46076:67::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;2478:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;128524:1524::-;128714:35;;:::i;:::-;128767:27;128834:20;128886:9;129279:37;129473:36;;:::i;:::-;128797:6;128804:1;128797:9;;;;;;;;;;;;;;;;;;:24;;;128767:54;;128857:6;:13;128834:36;;128898:1;128886:13;;128881:1126;128901:17;;;128881:1126;;129179:14;129152:6;129159:1;129152:9;;;;;;;;;;;;;;;;;;:24;;:41;;;;129319:70;129327:20;129349:16;:39;;;129319:7;:70::i;:::-;129279:110;;129512:139;129547:6;129554:1;129547:9;;;;;;;;;;;;;;;;;;129575:29;129623:10;129634:1;129623:13;;;;;;;;;129512:139;129473:178;;129739:51;129754:16;129772:17;129739:14;:51::i;:::-;129891:39;;;;:63;-1:-1:-1;129887:109:0;;129975:5;;129887:109;128920:3;;;;;128881:1126;;;128524:1524;;;;;;;;;;:::o;10553:33::-;;;;:::o;130443:1959::-;130647:35;;:::i;:::-;130700:27;130767:20;130819:9;131216:37;131526;131824:36;;:::i;:::-;4298:6;;;;4297:7;4275:75;;;;;;;;;;;;;;4407:6;:13;;;;4416:4;4407:13;;;130730:9;;:6;;4407;130730:9;;;;;;;;;;;;;;:24;;;130700:54;;130790:6;:13;130767:36;;130831:1;130819:13;;130814:1547;130834:17;;;130814:1547;;131117:14;131090:6;131097:1;131090:9;;;;;;;;;;;;;;;;;;;:24;;:41;131286:39;;131256:70;;131264:20;;131256:7;:70::i;:::-;131216:110;;131566:174;131606:6;131613:1;131606:9;;;;;;;;;131566:174;131526:214;;131863:140;131899:6;131906:1;131899:9;;;;;;;;;;;;;;;;;;131927:29;131975:10;131986:1;131975:13;;;;;;;;;131863:140;131824:179;;132091:51;132106:16;132124:17;132091:14;:51::i;:::-;132245:39;;:63;-1:-1:-1;132241:109:0;;132329:5;;132241:109;130853:3;;;;;130814:1547;;;-1:-1:-1;;4535:5:0;4526:14;;;;;;-1:-1:-1;130443:1959:0;;;-1:-1:-1;;;;;;130443:1959:0:o;153149:36::-;;;;;;:::o;137776:174::-;137696:5;;;;137682:10;:19;137660:88;;;;;;;;;;;;;;137876:22;;;;137872:71;;137915:5;:16;;;;;;;;;;137872:71;137776:174;:::o;175539:46::-;;;;;;;;;;;;;;;;;;;:::o;51572:1618::-;51743:30;;:::i;:::-;51820:26;;:::i;:::-;51913:20;52213:33;52330:30;51849:19;51862:5;51849:12;:19::i;:::-;51820:48;;51936:26;:24;:26::i;:::-;51913:49;;52030:125;52064:5;52084:9;52108:12;52135:9;52030:19;:125::i;:::-;52249:70;52257:5;:22;;;52281:9;:37;;;52249:7;:70::i;:::-;52213:106;;52363:55;52370:20;52392:25;52363:6;:55::i;:::-;52330:88;;52460:191;52490:5;52510:9;52534:20;52569:22;52606:11;:34;;;52460:15;:191::i;:::-;52724:51;52745:5;52752:22;52724:20;:51::i;:::-;52710:65;;52831:187;52863:5;52883:12;52910:9;:19;;;52944:9;:37;;;52996:11;52831:17;:187::i;:::-;53056:95;53082:5;53102:12;53129:11;53056;:95::i;:::-;51572:1618;;;;;;;;;:::o;7921:656::-;8118:39;;8159:40;;8110:90;;8118:39;8110:7;:90::i;:::-;8068:132;;8261:39;;;;;8302:40;;;;8253:90;;8261:39;8253:7;:90::i;:::-;8211:39;;;:132;8394:29;;;;;8425:30;;;;8386:70;;8394:29;8386:7;:70::i;:::-;8354:29;;;:102;8507:29;;;;;8538:30;;;;8499:70;;8507:29;8499:7;:70::i;:::-;8467:29;;;;:102;;;;-1:-1:-1;7921:656:0:o;157033:315::-;157177:21;;157119:7;;157177:21;;157119:7;157234:36;;:74;;157286:22;157234:74;;;157273:10;157234:74;157209:99;157033:315;-1:-1:-1;;;157033:315:0:o;55909:1286::-;56212:21;;:52;;56243:20;56212:52;56190:118;;;;;;;;;;;;;;56383:19;;;;:33;;;56379:175;;56459:19;;;;:33;;56482:10;56459:33;56433:109;;;;;;;;;;;;;;56627:18;;;;:32;;;56623:174;;56724:12;56702:34;;:5;:18;;;:34;;;56676:109;;;;;;;;;;;;;;;;56882:37;;;;:42;56878:310;;;56967:150;57006:9;:19;;;57048:5;:18;;;57089:9;56967:16;:150::i;:::-;56941:235;;;;;;;;;;;;;;;;55909:1286;;;;:::o;165832:1095::-;166803:64;166811:9;:26;;;166839:10;:27;;;166803:7;:64::i;:::-;166722;166730:9;:26;;;166758:10;:27;;;166722:7;:64::i;:::-;:145;;166700:219;;;;;;;;;;;;;;165832:1095;;:::o;167674:4875::-;167954:59;;:::i;:::-;168128:37;168247;168460:38;168582;168168:68;168176:9;:26;;;168204:31;168168:7;:68::i;:::-;168128:108;;168287:162;168327:9;:26;;;168368:9;:26;;;168409:29;168287:25;:162::i;:::-;168247:202;;168501:70;168509:10;:27;;;168538:32;168501:7;:70::i;:::-;168460:111;;168623:165;168663:10;:27;;;168705:10;:27;;;168747:30;168623:25;:165::i;:::-;168582:206;-1:-1:-1;169557:63:0;;;169553:1696;;169689:24;;;;;;:80;;;169784:24;;:47;;:80;;;169928:24;:47;169879:23;;:46;;:96;170272:26;;;;170317;;;;170362:23;;:46;;;;170228:195;;170317:26;170228:25;:195::i;:::-;170179:23;;:244;169553:1696;;;170507:23;;:78;;;170600:23;;:46;;;;:78;;;170743:23;;:46;;;170693:24;;;;;:96;;;;171083:27;;;;171129;;;;171175:24;;:47;171040:197;;171129:27;171040:24;:197::i;:::-;170990:24;;;;;:47;:247;169553:1696;171375:23;;:46;171436:24;;;;;:47;;171353:141;;171375:46;171353:7;:141::i;:::-;171305:45;;;:189;171626:23;;:46;171687:26;;;;171728:18;;;;171586:171;;171626:46;171687:26;171586:25;:171::i;:::-;171547:23;;:36;;:210;171847:23;;:46;;;171908:26;;;;171949:18;;;;171807:171;;171847:46;171908:26;171807:25;:171::i;:::-;171768:23;;:36;;:210;172112:24;;;;:47;172174:27;;;;172216:19;;;;172072:174;;172112:47;172174:27;172072:25;:174::i;:::-;172032:18;:24;;;:37;;:214;;;;;172297:174;172337:18;:24;;;:47;;;172399:10;:27;;;172441:10;:19;;;172297:25;:174::i;:::-;172257:24;;;;:37;;:214;167674:4875;;;;;;;;;;:::o;57637:2471::-;58045:25;;;58023:95;;;;;;;;;;;;;;58344:46;;;;58322:109;;;;;;;;;;;;;;58711:5;:22;;;58637:70;58645:9;:37;;;58684:22;58637:7;:70::i;:::-;:96;;58615:160;;;;;;;;;;;;;;59999:55;60007:5;:22;;;60031;59999:7;:55::i;:::-;59914;59922:22;59946:5;:22;;;59914:7;:55::i;:::-;:140;;59892:208;;;;;;;;;;;;;;57637:2471;;;;;:::o;54018:818::-;54306:72;54314:27;54343:11;:34;;;54306:7;:72::i;:::-;54286:17;;;;:6;:17;;;;;;;;;:92;;;;54470:25;;;;54437:18;;54562:34;;54611;;;;54660:24;;;;54699;;;;54762:20;;;;54797;;;;54418:410;;54286:17;;54418:410;;;;;;;;;;;;;;54510:12;;54537:10;;54562:34;;54611;;54660:24;;54797:20;54418:410;;;;;;;;;;54018:818;;;;;:::o;173002:2301::-;173285:14;173257:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:25;;:42;;173285:14;;173257:42;;173285:14;173257:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;173345:207;173380:9;:24;;;173419:9;:22;;;173456:10;:23;;;173494:18;:24;;;:47;;;173345:20;:207::i;:::-;173598:25;;;;173638:23;;173676:22;;173713:23;;:46;;;173563:207;;173598:25;173638:23;173676:22;173563:20;:207::i;:::-;173781:194;173816:9;:24;;;173855:9;:22;;;173892:12;173919:18;:45;;;173781:20;:194::i;:::-;174011:190;174046:12;174073:9;:22;;;174110:9;:29;;;174154:18;:23;;;:36;;;174011:20;:190::i;:::-;174212:193;174247:12;174274:10;:23;;;174312:10;:30;;;174357:18;:24;;;:37;;;174212:20;:193::i;:::-;174478:10;:30;;;174445:63;;:9;:29;;;:63;;;174441:855;;;174525:309;174564:12;174595;174626:9;:29;;;174674:145;174704:18;:23;;;:36;;;174763:18;:24;;;:37;;;174674:7;:145::i;:::-;174525:20;:309::i;:::-;174441:855;;;174867:200;174906:12;174937;174968:9;:29;;;175016:18;:23;;;:36;;;174867:20;:200::i;:::-;175082:202;175121:12;175152;175183:10;:30;;;175232:18;:24;;;:37;;;175082:20;:202::i;101209:10281::-;105290:4;105284:11;;105584:66;105577:4;105554:28;;;105547:104;;;;101404:30;105709:4;105686:28;;106730:59;;;107062:19;;106006:26;;;107042:40;;;107176:23;;;107170:30;107146:22;;;107139:62;107273:23;;;107267:30;107243:22;;;107236:62;107377:23;;;107371:30;107347:22;;;107340:62;107493:4;107475:23;;107469:30;107445:22;;;107438:62;107594:4;107576:23;;107570:30;107546:22;;;107539:62;107695:4;107677:23;;107671:30;107647:22;;;107640:62;107794:4;107776:23;;107770:30;107746:22;;;107739:62;107894:5;107876:24;;107870:31;107845:23;;;107838:64;108000:5;107982:24;;107976:31;107951:23;;;107944:64;108089:5;108071:24;;108065:31;;108040:23;;;108033:64;;;108198:5;108180:24;;108174:31;108149:23;;;108142:64;108283:5;108414:74;;108579:24;108652:19;;108266:23;;;108861:34;;;105284:11;;105686:28;;;;106823:27;;;;106006:26;;108924:22;;;;108701:23;;;;108778:4;108759:24;;108755:35;106470:1;109019:241;109042:13;109039:1;109036:20;109019:241;;;109113:19;;109093:40;;109183:4;109166:22;;;;109222:23;;;;109070:1;109063:9;109019:241;;;-1:-1:-1;;;;109373:31:0;;;109357:13;109338:33;;;109331:74;;;;109502:17;;109496:24;109569:19;;109778:34;;;109365:4;109841:22;;;;109618:23;;;;109695:4;109676:24;;109672:35;109951:1;109937:241;109960:13;109957:1;109954:20;109937:241;;;110031:19;;110011:40;;110101:4;110084:22;;;;110140:23;;;;109988:1;109981:9;109937:241;;;-1:-1:-1;;;110250:46:0;;;-1:-1:-1;110486:33:0;;;110352:4;110330:27;;;110461:59;;;110638:19;;110834:34;;;110330:27;;110897:22;;;;110687:23;;;;110638:19;110764:4;110745:24;;110741:35;-1:-1:-1;110979:241:0;111002:13;110999:1;110996:20;110979:241;;;111073:19;;111053:40;;111143:4;111126:22;;;;111182:23;;;;111030:1;111023:9;110979:241;;;-1:-1:-1;;;111301:46:0;;;;;111275:73;;-1:-1:-1;111417:4:0;111410:25;-1:-1:-1;;;;;101209:10281:0;;;;;:::o;53426:343::-;53548:26;;:::i;:::-;53577:19;53590:5;53577:12;:19::i;:::-;53548:48;;53638:35;53656:5;53663:9;53638:17;:35::i;:::-;53713:48;53734:5;53741:9;:19;;;53713:20;:48::i;136158:531::-;136344:30;;:::i;:::-;136406:107;136438:5;136458:20;136493:9;136406:17;:107::i;:::-;136546:34;;;;136392:121;;-1:-1:-1;136546:58:0;;136524:128;;;;;;;;;;;;;5714:218;5803:7;5850:6;;;;5828:73;;;;;;;;;;;;;;-1:-1:-1;5919:5:0;;;5714:218;;;;;:::o;72800:467::-;72887:13;72951:1;72940;:8;:12;72918:95;;;;;;;;;;;;;;;;73066:8;;73064:1;;73066:12;;;;73064:15;;;;;;;;;;73182:8;;73178:16;;73208:17;;;-1:-1:-1;73064:15:0;;;;;;;72800:467::o;77922:511::-;78049:14;78115:5;78123:2;78115:10;78103:1;:8;:22;;78081:110;;;;;;;;;;;;;;;;-1:-1:-1;78377:13:0;78275:2;78377:13;78371:20;;77922:511::o;93434:2802::-;93658:139;;93604:12;;93634:21;;93604:12;;93695:48;;93658:139;;93758:4;;93777:9;;93658:139;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;93658:139:0;;;49:4:-1;25:18;;;61:17;;93658:139:0;182:15:-1;93658:139:0;;;;179:29:-1;160:49;;93844:58:0;;;;;;;;;;;;;;;;;;;;;;;93658:139;;-1:-1:-1;93829:75:0;;-1:-1:-1;93949:26:0;;93942:34;93939:2;;;94062:66;94059:1;94052:77;94158:66;94154:2;94147:78;94254:66;94250:2;94243:78;94350:1;94346:2;94339:13;94380:3;94377:1;94370:14;93939:2;94444;94434:8;94430:17;94804:2;94742:7;94694:8;94688:15;94624:7;94559:13;94505:3;94476:387;94892:16;94910:2;94889:24;94879:2;;95000:66;94997:1;94990:77;95096:66;95092:2;95085:78;95192:66;95188:2;95181:78;95288:1;95284:2;95277:13;95318:3;95315:1;95308:14;94879:2;95360:7;95381:429;;;;95829:1;95824:369;;;;95353:840;;95381:429;95473:66;95470:1;95463:77;95569:66;95565:2;95558:78;95665:66;95661:2;95654:78;95761:1;95757:2;95750:13;95791:3;95788:1;95781:14;95824:369;-1:-1:-1;;95970:14:0;96092:66;95966:87;;;96076:83;;95941:237;;93434:2802;-1:-1:-1;;;;;93434:2802:0:o;73467:501::-;73557:14;73623:2;73611:1;:8;:14;;73589:102;;;;;;;;;;;;;;;;73746:29;73758:1;73772:2;73761:1;:8;:13;73746:11;:29::i;:::-;73882:8;;73878:17;;73909;;;-1:-1:-1;73737:38:0;73467:501::o;96683:2903::-;96945:170;;96891:12;;96921:21;;96891:12;;96982:51;;96945:170;;97048:4;;96993:13;;97095:9;;96945:170;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;96945:170:0;;;49:4:-1;25:18;;;61:17;;96945:170:0;182:15:-1;96945:170:0;;;;179:29:-1;160:49;;97162:69:0;;;;;;;;;;;;;;;;;;;;;;;96945:170;;-1:-1:-1;97147:86:0;;-1:-1:-1;97278:29:0;;97271:37;97268:2;;;97397:66;97394:1;97387:77;97493:66;97489:2;97482:78;97589:66;97585:2;97578:78;97685:1;97681:2;97674:13;97715:3;97712:1;97705:14;97268:2;97779;97769:8;97765:17;98147:2;98084:7;98035:8;98029:15;97964:7;97895:16;97840:3;97811:396;98236:16;98254:2;98233:24;98223:2;;98347:66;98344:1;98337:77;98443:66;98439:2;98432:78;98539:66;98535:2;98528:78;98635:1;98631:2;98624:13;98665:3;98662:1;98655:14;98223:2;98707:7;98728:432;;;;99179:1;99174:369;;;;98700:843;;98728:432;98823:66;98820:1;98813:77;98919:66;98915:2;98908:78;99015:66;99011:2;99004:78;99111:1;99107:2;99100:13;99141:3;99138:1;99131:14;99174:369;99442:66;99430:10;99426:83;99336:66;99326:7;99320:14;99316:87;99291:237;99280:248;;98700:843;-1:-1:-1;;;96683:2903:0;;;;;;;;:::o;20974:444::-;21145:21;21206:15;;;21184:81;;;;;;;;;;;;;;21294:85;21316:26;21324:9;21335:6;21316:7;:26::i;:::-;21357:11;21294:7;:85::i;:::-;21278:101;20974:444;-1:-1:-1;;;;20974:444:0:o;155327:1255::-;41572:152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;41572:152:0;;;;;;;;41562:163;;155498:14;;;;;;41572:152;;;;41562:163;;;;41572:152;41562:163;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;41562:163:0;;;;;;;;;;;155618:15;;41562:163;;-1:-1:-1;155618:15:0;;-1:-1:-1;41562:163:0;;-1:-1:-1;41562:163:0;;155618:15;;;-1:-1:-1;155618:15:0;41562:163;155618:15;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;155618:15:0;;;;;;;;;;;;156010:26;;;156137:15;;156130:29;;;;-1:-1:-1;156283:42:0;156264:62;;;;156247:15;;;156240:87;;;;-1:-1:-1;;156378:2:0;156366:15;;156359:33;-1:-1:-1;;156536:3:0;156518:22;;;;155327:1255;-1:-1:-1;155327:1255:0:o;11102:950::-;11258:18;;;11581:2;11575:9;11615:66;11600:82;;11721:14;;;11714:40;11852:2;11840:15;;11833:35;;;;12007:2;11989:21;;;11102:950::o;15700:209::-;15792:17;15839:35;15857:16;15867:5;15857:9;:16::i;6632:141::-;6720:7;6756:1;6752;:5;:13;;6764:1;6752:13;;;-1:-1:-1;6760:1:0;;6745:20;-1:-1:-1;6632:141:0:o;61431:914::-;61588:30;;:::i;:::-;61686:34;;;:59;;;61870:22;;;;61907;;;;61793:147;;61723:22;;61793:25;:147::i;:::-;61756:184;;;62067:22;;;;62104:14;;;;61978:151;;61756:184;62067:22;61978:25;:151::i;:::-;61951:24;;;:178;62244:22;;;;62281:14;;;;62167:139;;62207:22;;62167:25;:139::i;:::-;62140:24;;;:166;61431:914;;;;:::o;62661:964::-;62875:14;62847:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:25;;:42;;62875:14;;62847:42;;62875:14;62847:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62900:175;62935:5;:20;;;62970:5;:18;;;63003:12;63030:11;:34;;;62900:20;:175::i;:::-;63086;63121:5;:20;;;63156:12;63183:5;:18;;;63216:11;:34;;;63086:20;:175::i;:::-;63272:170;63307:12;63334:5;:18;;;63367:5;:25;;;63407:11;:24;;;63272:20;:170::i;:::-;63453:164;63488:12;63515;63542:5;:25;;;63582:11;:24;;;63453:20;:164::i;5940:241::-;6029:7;6066:5;;;6104:6;;;;6082:72;;;;;;;;;;;;;;6172:1;6165:8;;5940:241;;;;;;:::o;5238:302::-;5327:7;;5356:6;;5352:47;;;5386:1;5379:8;;;;5352:47;-1:-1:-1;5421:5:0;;;5425:1;5421;:5;5459;;;;;;;;:10;5437:76;;;;;;;;;;;;;18786:652;18961:21;19022:15;;;19000:81;;;;;;;;;;;;;;19117:118;19156:9;19184:11;19214:6;19117:20;:118::i;:::-;19116:119;19094:183;;;;;;;;;;;;;19769:923;19943:21;20004:15;;;19982:81;;;;;;;;;;;;;;20099:117;20137:9;20165:11;20195:6;20099:19;:117::i;:::-;20098:118;20076:182;;;;;;;;;;;;;;20485:168;20507:109;20533:26;20541:9;20552:6;20533:7;:26::i;:::-;20578:23;20586:11;20599:1;20578:7;:23::i;:::-;20507:7;:109::i;142569:5246::-;143135:19;143401:18;142814:1;142805:6;:10;:24;;;;;142827:2;142819:10;;:4;:10;;;;142805:24;142801:5007;;;142921:16;;142940:1;-1:-1:-1;142895:112:0;;;;;;;;;;;;;;-1:-1:-1;;143260:2:0;143245:18;;;143217:47;143287:66;143213:159;143422:26;;;;:12;:26;;;;;;;;;;143537:24;;;143511:112;;;;;;;;;;;;;;145060:2;145054:9;145380:15;145375:2;145363:9;145357:16;145353:25;145349:47;145535:14;145530:3;145526:24;145517:7;145513:38;145825:66;145816:7;145809:83;146316:3;146312:1;146303:7;146299:15;146292:28;146373:42;146367:4;146363:53;146358:2;146349:7;146345:16;146338:79;146468:42;146464:2;146460:51;146455:2;146446:7;146442:16;146435:77;146556:6;146550:3;146541:7;146537:17;146530:33;146726:3;146717:7;146713:17;146810:210;146830:5;146820:8;146817:19;146810:210;;;146880:16;;146863:34;;146945:2;146983:18;;;;146931:17;146810:210;;;147596:3;147524:7;147469;147462:5;147458:19;147384:7;147317:1;147241:10;147177:3;147150:520;147698:7;147691:15;147688:2;;;147746:16;147737:7;147730:33;147688:2;144858:2939;;;;;;142569:5246;;;;;;:::o;60310:844::-;60584:21;;60989:20;;60584:52;;60615:20;60584:52;60562:118;;;;;;;;;;;;;;60757:19;;;;:33;;;60753:175;;60833:19;;;;:33;;60856:10;60833:33;60807:109;;;;;;;;;;;;;;61012:26;:24;:26::i;:::-;61071:18;;60989:49;;-1:-1:-1;61071:34:0;;;;;;;61049:97;;;;;;;;;;;;;;60310:844;;;:::o;55145:440::-;55300:20;;;;:9;:20;;;;;;;:27;;;;55323:4;55300:27;;;55422:25;;;;55389:18;;55511:20;;;;55546;;;;55368:209;;55310:9;;55368:209;;;;;;;;;;;;;;55462:10;;55546:20;55368:209;;;;;;;;;;55145:440;;:::o;74822:912::-;74949:14;75015:5;75023:2;75015:10;75003:1;:8;:22;;74981:138;;;;;;;;;;;;;;;;-1:-1:-1;75633:13:0;75371:2;75633:13;75627:20;75649:42;75623:69;;74822:912::o;5548:158::-;5637:7;5662:9;5678:1;5674;:5;;;;;;;;;5548:158;-1:-1:-1;;;;5548:158:0:o;16054:1727::-;12211:472;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;12211:472:0;;;;;;;;12201:483;;16143:14;;;;;;;;12211:472;;;;;12201:483;;;;12211:472;12201:483;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;12201:483:0;;;;;;;;;;;16270:20;;;;16260:31;;12201:483;;-1:-1:-1;16270:20:0;-1:-1:-1;12201:483:0;;-1:-1:-1;12201:483:0;;16260:31;;;-1:-1:-1;16260:31:0;12201:483;16260:31;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;16260:31:0;;;;;;;;;;;16341:20;;;;16331:31;;16260;;-1:-1:-1;16341:20:0;-1:-1:-1;16260:31:0;;-1:-1:-1;16260:31:0;;16331;;;-1:-1:-1;16331:31:0;16260;16331;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;;;;365:33;;16331:31:0;;;;;;;;;;17149:14;;;17297:11;;17200:3;17189:15;;17335:11;;17241:3;17230:15;;;17373:11;;17442:24;;;17480:32;;;17526;;;17598:3;17582:20;;17654:19;;17687;;;-1:-1:-1;;;17720:19:0;;;-1:-1:-1;17582:20:0;;16054:1727;-1:-1:-1;16054:1727:0:o;22688:1916::-;22858:12;;22910:15;;;22888:81;;;;;;;;;;;;;;23804:11;;;:29;;-1:-1:-1;23819:14:0;;23804:29;23800:74;;;23857:5;23850:12;;;;23800:74;24474:11;24408:88;;;;;;;24450:9;24429:6;24408:88;24388:108;;24545:26;24553:9;24564:6;24545:7;:26::i;:::-;24517:24;24525:4;24531:9;24517:7;:24::i;:::-;:54;;;22688:1916;-1:-1:-1;;;;;22688:1916:0:o;24872:948::-;25041:12;;25093:15;;;25071:81;;;;;;;;;;;;;;25228:11;;;:29;;-1:-1:-1;25243:14:0;;25228:29;25224:262;;;25469:5;25462:12;;;;25224:262;25622:11;25556:88;;;;;;;25598:9;25577:6;25556:88;25536:108;;25701:11;25667:31;25675:11;25688:9;25667:7;:31::i;:::-;:45;;;;;;;;25655:57;;25761:26;25769:9;25780:6;25761:7;:26::i;175350:636::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;-1:-1:-1;175350:636:0;;;;;;;;;;;;;;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;146:693;;261:4;249:17;;245:27;-1:-1;235:2;;286:1;283;276:12;235:2;323:6;310:20;345:85;360:69;422:6;360:69;;;345:85;;;458:21;;;502:4;490:17;;;;336:94;;-1:-1;515:14;;490:17;610:1;595:238;620:6;617:1;614:13;595:238;;;703:3;690:17;682:6;678:30;727:42;765:3;753:10;727:42;;;715:55;;-1:-1;793:4;784:14;;;;812;;;;;642:1;635:9;595:238;;;599:14;228:611;;;;;;;;879:732;;1007:4;995:17;;991:27;-1:-1;981:2;;1032:1;1029;1022:12;981:2;1069:6;1056:20;1091:98;1106:82;1181:6;1106:82;;1091:98;1217:21;;;1261:4;1249:17;;;;1082:107;;-1:-1;1274:14;;1249:17;1369:1;1354:251;1379:6;1376:1;1373:13;1354:251;;;1462:3;1449:17;1441:6;1437:30;1486:55;1537:3;1525:10;1486:55;;;1474:68;;-1:-1;1565:4;1556:14;;;;1584;;;;;1401:1;1394:9;1354:251;;1637:707;;1747:4;1735:17;;1731:27;-1:-1;1721:2;;1772:1;1769;1762:12;1721:2;1809:6;1796:20;1831:80;1846:64;1903:6;1846:64;;1831:80;1822:89;;1928:5;1953:6;1946:5;1939:21;1983:4;1975:6;1971:17;1961:27;;2005:4;2000:3;1996:14;1989:21;;2058:6;2105:3;2097:4;2089:6;2085:17;2080:3;2076:27;2073:36;2070:2;;;2122:1;2119;2112:12;2070:2;2147:1;2132:206;2157:6;2154:1;2151:13;2132:206;;;2215:3;2237:37;2270:3;2258:10;2237:37;;;2225:50;;-1:-1;2298:4;2289:14;;;;2317;;;;;2179:1;2172:9;2132:206;;2352:112;;2416:43;2451:6;2438:20;2416:43;;2471:118;;2538:46;2576:6;2563:20;2538:46;;2596:116;;2662:45;2699:6;2686:20;2662:45;;2719:120;;2796:38;2826:6;2820:13;2796:38;;2860:335;;;2967:4;2955:17;;2951:27;-1:-1;2941:2;;2992:1;2989;2982:12;2941:2;-1:-1;3012:20;;3052:18;3041:30;;3038:2;;;3084:1;3081;3074:12;3038:2;3118:4;3110:6;3106:17;3094:29;;3168:3;3161;3153:6;3149:16;3139:8;3135:31;3132:40;3129:2;;;3185:1;3182;3175:12;3129:2;2934:261;;;;;;3204:432;;3294:4;3282:17;;3278:27;-1:-1;3268:2;;3319:1;3316;3309:12;3268:2;3356:6;3343:20;3378:60;3393:44;3430:6;3393:44;;3378:60;3369:69;;3458:6;3451:5;3444:21;3494:4;3486:6;3482:17;3527:4;3520:5;3516:16;3562:3;3553:6;3548:3;3544:16;3541:25;3538:2;;;3579:1;3576;3569:12;3538:2;3589:41;3623:6;3618:3;3613;3589:41;;;3261:375;;;;;;;;4121:2204;;4228:5;4216:9;4211:3;4207:19;4203:31;4200:2;;;4247:1;4244;4237:12;4200:2;4265:21;4280:5;4265:21;;;4256:30;-1:-1;4344:1;4375:49;4420:3;4400:9;4375:49;;;4351:74;;-1:-1;4494:2;4527:49;4572:3;4548:22;;;4527:49;;;4520:4;4513:5;4509:16;4502:75;4446:142;4653:2;4686:49;4731:3;4722:6;4711:9;4707:22;4686:49;;;4679:4;4672:5;4668:16;4661:75;4598:149;4806:2;4839:49;4884:3;4875:6;4864:9;4860:22;4839:49;;;4832:4;4825:5;4821:16;4814:75;4757:143;4962:3;4996:49;5041:3;5032:6;5021:9;5017:22;4996:49;;;4989:4;4982:5;4978:16;4971:75;4910:147;5119:3;5153:49;5198:3;5189:6;5178:9;5174:22;5153:49;;;5146:4;5139:5;5135:16;5128:75;5067:147;5268:3;5302:49;5347:3;5338:6;5327:9;5323:22;5302:49;;;5295:4;5288:5;5284:16;5277:75;5224:139;5417:3;5451:49;5496:3;5487:6;5476:9;5472:22;5451:49;;;5444:4;5437:5;5433:16;5426:75;5373:139;5579:3;5614:49;5659:3;5650:6;5639:9;5635:22;5614:49;;;5606:5;5599;5595:17;5588:76;5522:153;5725:3;5760:49;5805:3;5796:6;5785:9;5781:22;5760:49;;;5752:5;5745;5741:17;5734:76;5685:136;5909:3;5898:9;5894:19;5881:33;5934:18;5926:6;5923:30;5920:2;;;5966:1;5963;5956:12;5920:2;6002:54;6052:3;6043:6;6032:9;6028:22;6002:54;;;5994:5;5987;5983:17;5976:81;5831:237;6156:3;6145:9;6141:19;6128:33;6181:18;6173:6;6170:30;6167:2;;;6213:1;6210;6203:12;6167:2;6249:54;6299:3;6290:6;6279:9;6275:22;6249:54;;;6241:5;6234;6230:17;6223:81;6078:237;4194:2131;;;;;8700:241;;8804:2;8792:9;8783:7;8779:23;8775:32;8772:2;;;8820:1;8817;8810:12;8772:2;8855:1;8872:53;8917:7;8897:9;8872:53;;8948:366;;;9069:2;9057:9;9048:7;9044:23;9040:32;9037:2;;;9085:1;9082;9075:12;9037:2;9120:1;9137:53;9182:7;9162:9;9137:53;;;9127:63;;9099:97;9227:2;9245:53;9290:7;9281:6;9270:9;9266:22;9245:53;;;9235:63;;9206:98;9031:283;;;;;;9321:360;;;9439:2;9427:9;9418:7;9414:23;9410:32;9407:2;;;9455:1;9452;9445:12;9407:2;9490:1;9507:53;9552:7;9532:9;9507:53;;;9497:63;;9469:97;9597:2;9615:50;9657:7;9648:6;9637:9;9633:22;9615:50;;9688:413;;9835:2;9823:9;9814:7;9810:23;9806:32;9803:2;;;9851:1;9848;9841:12;9803:2;9886:31;;9937:18;9926:30;;9923:2;;;9969:1;9966;9959:12;9923:2;9989:96;10077:7;10068:6;10057:9;10053:22;9989:96;;10108:945;;;;10344:2;10332:9;10323:7;10319:23;10315:32;10312:2;;;10360:1;10357;10350:12;10312:2;10395:31;;10446:18;10435:30;;10432:2;;;10478:1;10475;10468:12;10432:2;10498:96;10586:7;10577:6;10566:9;10562:22;10498:96;;;10488:106;;10374:226;10659:2;10648:9;10644:18;10631:32;10683:18;10675:6;10672:30;10669:2;;;10715:1;10712;10705:12;10669:2;10735:78;10805:7;10796:6;10785:9;10781:22;10735:78;;;10725:88;;10610:209;10878:2;10867:9;10863:18;10850:32;10902:18;10894:6;10891:30;10888:2;;;10934:1;10931;10924:12;10888:2;10954:83;11029:7;11020:6;11009:9;11005:22;10954:83;;;10944:93;;10829:214;10306:747;;;;;;11060:809;;;;11271:2;11259:9;11250:7;11246:23;11242:32;11239:2;;;11287:1;11284;11277:12;11239:2;11322:31;;11373:18;11362:30;;11359:2;;;11405:1;11402;11395:12;11359:2;11425:96;11513:7;11504:6;11493:9;11489:22;11425:96;;;11415:106;;11301:226;11558:2;11576:53;11621:7;11612:6;11601:9;11597:22;11576:53;;11876:241;;11980:2;11968:9;11959:7;11955:23;11951:32;11948:2;;;11996:1;11993;11986:12;11948:2;12031:1;12048:53;12093:7;12073:9;12048:53;;12124:366;;;12245:2;12233:9;12224:7;12220:23;12216:32;12213:2;;;12261:1;12258;12251:12;12213:2;12296:1;12313:53;12358:7;12338:9;12313:53;;12497:615;;;;;12654:2;12642:9;12633:7;12629:23;12625:32;12622:2;;;12670:1;12667;12660:12;12622:2;12705:1;12722:53;12767:7;12747:9;12722:53;;;12712:63;;12684:97;12812:2;12830:53;12875:7;12866:6;12855:9;12851:22;12830:53;;;12820:63;;12791:98;12948:2;12937:9;12933:18;12920:32;12972:18;12964:6;12961:30;12958:2;;;13004:1;13001;12994:12;12958:2;13032:64;13088:7;13079:6;13068:9;13064:22;13032:64;;;12616:496;;;;-1:-1;13014:82;-1:-1;;;;12616:496;13119:595;;;;13266:2;13254:9;13245:7;13241:23;13237:32;13234:2;;;13282:1;13279;13272:12;13234:2;13317:1;13334:53;13379:7;13359:9;13334:53;;;13324:63;;13296:97;13424:2;13442:53;13487:7;13478:6;13467:9;13463:22;13442:53;;;13432:63;;13403:98;13560:2;13549:9;13545:18;13532:32;13584:18;13576:6;13573:30;13570:2;;;13616:1;13613;13606:12;13570:2;13636:62;13690:7;13681:6;13670:9;13666:22;13636:62;;13721:239;;13824:2;13812:9;13803:7;13799:23;13795:32;13792:2;;;13840:1;13837;13830:12;13792:2;13875:1;13892:52;13936:7;13916:9;13892:52;;13967:261;;14081:2;14069:9;14060:7;14056:23;14052:32;14049:2;;;14097:1;14094;14087:12;14049:2;14132:1;14149:63;14204:7;14184:9;14149:63;;14235:371;;14361:2;14349:9;14340:7;14336:23;14332:32;14329:2;;;14377:1;14374;14367:12;14329:2;14412:31;;14463:18;14452:30;;14449:2;;;14495:1;14492;14485:12;14449:2;14515:75;14582:7;14573:6;14562:9;14558:22;14515:75;;14613:1085;;;;;14830:3;14818:9;14809:7;14805:23;14801:33;14798:2;;;14847:1;14844;14837:12;14798:2;14882:31;;14933:18;14922:30;;14919:2;;;14965:1;14962;14955:12;14919:2;14985:75;15052:7;15043:6;15032:9;15028:22;14985:75;;;14975:85;;14861:205;15125:2;15114:9;15110:18;15097:32;15149:18;15141:6;15138:30;15135:2;;;15181:1;15178;15171:12;15135:2;15201:75;15268:7;15259:6;15248:9;15244:22;15201:75;;;15191:85;;15076:206;15341:2;15330:9;15326:18;15313:32;15365:18;15357:6;15354:30;15351:2;;;15397:1;15394;15387:12;15351:2;15417:62;15471:7;15462:6;15451:9;15447:22;15417:62;;;15407:72;;15292:193;15544:2;15533:9;15529:18;15516:32;15568:18;15560:6;15557:30;15554:2;;;15600:1;15597;15590:12;15554:2;15620:62;15674:7;15665:6;15654:9;15650:22;15620:62;;;15610:72;;15495:193;14792:906;;;;;;;;15705:725;;;;15874:2;15862:9;15853:7;15849:23;15845:32;15842:2;;;15890:1;15887;15880:12;15842:2;15925:31;;15976:18;15965:30;;15962:2;;;16008:1;16005;15998:12;15962:2;16028:75;16095:7;16086:6;16075:9;16071:22;16028:75;;;16018:85;;15904:205;16140:2;16158:53;16203:7;16194:6;16183:9;16179:22;16158:53;;16685:865;;;;;;;16878:3;16866:9;16857:7;16853:23;16849:33;16846:2;;;16895:1;16892;16885:12;16846:2;16930:1;16947:53;16992:7;16972:9;16947:53;;;16937:63;;16909:97;17037:2;17055:53;17100:7;17091:6;17080:9;17076:22;17055:53;;;17045:63;;17016:98;17173:2;17162:9;17158:18;17145:32;17197:18;17189:6;17186:30;17183:2;;;17229:1;17226;17219:12;17183:2;17257:64;17313:7;17304:6;17293:9;17289:22;17257:64;;;17239:82;;;;17124:203;17386:2;17375:9;17371:18;17358:32;17410:18;17402:6;17399:30;17396:2;;;17442:1;17439;17432:12;17396:2;17470:64;17526:7;17517:6;17506:9;17502:22;17470:64;;;17452:82;;;;17337:203;16840:710;;;;;;;;;17557:110;17630:31;17655:5;17630:31;;;17625:3;17618:44;17612:55;;;17741:748;;17920:76;17990:5;17920:76;;;18014:6;18009:3;18002:19;18038:4;18033:3;18029:14;18022:21;;18083:78;18155:5;18083:78;;;18182:1;18167:300;18192:6;18189:1;18186:13;18167:300;;;18232:101;18329:3;18320:6;18314:13;18232:101;;;18350:82;18425:6;18350:82;;;18455:4;18446:14;;;;;18340:92;-1:-1;18214:1;18207:9;18167:300;;;-1:-1;18480:3;;17899:590;-1:-1;;;;17899:590;18497:101;18564:28;18586:5;18564:28;;18605:110;18678:31;18703:5;18678:31;;18722:107;18793:30;18817:5;18793:30;;18836:297;;18936:38;18968:5;18936:38;;;18991:6;18986:3;18979:19;19003:63;19059:6;19052:4;19047:3;19043:14;19036:4;19029:5;19025:16;19003:63;;;19098:29;19120:6;19098:29;;;19078:50;;;19091:4;19078:50;;18916:217;-1:-1;;;18916:217;19436:156;19529:57;19580:5;19529:57;;19899:296;20054:2;20042:15;;20091:66;20086:2;20077:12;;20070:88;20186:2;20177:12;;20035:160;20204:296;20359:2;20347:15;;20396:66;20391:2;20382:12;;20375:88;20491:2;20482:12;;20340:160;20509:296;20664:2;20652:15;;20701:66;20696:2;20687:12;;20680:88;20796:2;20787:12;;20645:160;20814:296;20969:2;20957:15;;21006:66;21001:2;20992:12;;20985:88;21101:2;21092:12;;20950:160;21119:296;21274:2;21262:15;;21311:66;21306:2;21297:12;;21290:88;21406:2;21397:12;;21255:160;21424:397;21579:2;21567:15;;21616:66;21611:2;21602:12;;21595:88;21717:66;21712:2;21703:12;;21696:88;21812:2;21803:12;;21560:261;21830:296;21985:2;21973:15;;22022:66;22017:2;22008:12;;22001:88;22117:2;22108:12;;21966:160;22135:296;22290:2;22278:15;;22327:66;22322:2;22313:12;;22306:88;22422:2;22413:12;;22271:160;22440:296;22595:2;22583:15;;22632:66;22627:2;22618:12;;22611:88;22727:2;22718:12;;22576:160;22745:296;22900:2;22888:15;;22937:66;22932:2;22923:12;;22916:88;23032:2;23023:12;;22881:160;23050:296;23205:2;23193:15;;23242:66;23237:2;23228:12;;23221:88;23337:2;23328:12;;23186:160;23355:296;23510:2;23498:15;;23547:66;23542:2;23533:12;;23526:88;23642:2;23633:12;;23491:160;23660:296;23815:2;23803:15;;23852:66;23847:2;23838:12;;23831:88;23947:2;23938:12;;23796:160;23965:296;24120:2;24108:15;;24157:66;24152:2;24143:12;;24136:88;24252:2;24243:12;;24101:160;24270:296;24425:2;24413:15;;24462:66;24457:2;24448:12;;24441:88;24557:2;24548:12;;24406:160;24575:296;24730:2;24718:15;;24767:66;24762:2;24753:12;;24746:88;24862:2;24853:12;;24711:160;24880:296;25035:2;25023:15;;25072:66;25067:2;25058:12;;25051:88;25167:2;25158:12;;25016:160;25185:296;25340:2;25328:15;;25377:66;25372:2;25363:12;;25356:88;25472:2;25463:12;;25321:160;25490:397;25645:2;25633:15;;25682:66;25677:2;25668:12;;25661:88;25783:66;25778:2;25769:12;;25762:88;25878:2;25869:12;;25626:261;25896:296;26051:2;26039:15;;26088:66;26083:2;26074:12;;26067:88;26183:2;26174:12;;26032:160;26201:296;26356:2;26344:15;;26393:66;26388:2;26379:12;;26372:88;26488:2;26479:12;;26337:160;26506:296;26661:2;26649:15;;26698:66;26693:2;26684:12;;26677:88;26793:2;26784:12;;26642:160;26811:296;26966:2;26954:15;;27003:66;26998:2;26989:12;;26982:88;27098:2;27089:12;;26947:160;27116:296;27271:2;27259:15;;27308:66;27303:2;27294:12;;27287:88;27403:2;27394:12;;27252:160;27421:296;27576:2;27564:15;;27613:66;27608:2;27599:12;;27592:88;27708:2;27699:12;;27557:160;27726:296;27881:2;27869:15;;27918:66;27913:2;27904:12;;27897:88;28013:2;28004:12;;27862:160;28031:296;28186:2;28174:15;;28223:66;28218:2;28209:12;;28202:88;28318:2;28309:12;;28167:160;28336:397;28491:2;28479:15;;28528:66;28523:2;28514:12;;28507:88;28629:66;28624:2;28615:12;;28608:88;28724:2;28715:12;;28472:261;28742:296;28897:2;28885:15;;28934:66;28929:2;28920:12;;28913:88;29029:2;29020:12;;28878:160;29047:296;29202:2;29190:15;;29239:66;29234:2;29225:12;;29218:88;29334:2;29325:12;;29183:160;29352:296;29507:2;29495:15;;29544:66;29539:2;29530:12;;29523:88;29639:2;29630:12;;29488:160;29657:296;29812:2;29800:15;;29849:66;29844:2;29835:12;;29828:88;29944:2;29935:12;;29793:160;29962:296;30117:2;30105:15;;30154:66;30149:2;30140:12;;30133:88;30249:2;30240:12;;30098:160;30343:886;30569:22;;30482:4;30473:14;;;30603:61;30477:3;30569:22;30603:61;;;30502:174;30770:4;30763:5;30759:16;30753:23;30788:62;30844:4;30839:3;30835:14;30822:11;30788:62;;;30686:176;30946:4;30939:5;30935:16;30929:23;30964:62;31020:4;31015:3;31011:14;30998:11;30964:62;;;30872:166;31122:4;31115:5;31111:16;31105:23;31140:62;31196:4;31191:3;31187:14;31174:11;31140:62;;32293:809;32516:22;;32446:5;32437:15;;;32550:113;32441:3;32516:22;32550:113;;;32467:208;32752:4;32745:5;32741:16;32735:23;32770:114;32878:4;32873:3;32869:14;32856:11;32770:114;;;32685:211;32994:4;32987:5;32983:16;32977:23;33012:63;33068:5;33063:3;33059:15;33046:11;33012:63;;33170:693;33381:22;;33305:4;33296:14;;;33415:57;33300:3;33381:22;33415:57;;;33325:159;33565:4;33558:5;33554:16;33548:23;33583:62;33639:4;33634:3;33630:14;33617:11;33583:62;;;33494:163;33756:4;33749:5;33745:16;33739:23;33774:62;33830:4;33825:3;33821:14;33808:11;33774:62;;34744:104;34813:29;34836:5;34813:29;;34855:193;34963:2;34948:18;;34977:61;34952:9;35011:6;34977:61;;35055:1057;35387:3;35372:19;;35402:61;35376:9;35436:6;35402:61;;;35474:62;35532:2;35521:9;35517:18;35508:6;35474:62;;;35547;35605:2;35594:9;35590:18;35581:6;35547:62;;;35620;35678:2;35667:9;35663:18;35654:6;35620:62;;;35693:63;35751:3;35740:9;35736:19;35727:6;35693:63;;;35767;35825:3;35814:9;35810:19;35801:6;35767:63;;;35879:9;35873:4;35869:20;35863:3;35852:9;35848:19;35841:49;35904:62;35961:4;35952:6;35904:62;;;35896:70;;36015:9;36009:4;36005:20;35999:3;35988:9;35984:19;35977:49;36040:62;36097:4;36088:6;36040:62;;;36032:70;35358:754;-1:-1;;;;;;;;;;35358:754;36119:547;36311:2;36296:18;;36325:61;36300:9;36359:6;36325:61;;;36434:9;36428:4;36424:20;36419:2;36408:9;36404:18;36397:48;36459:62;36516:4;36507:6;36459:62;;;36451:70;;36569:9;36563:4;36559:20;36554:2;36543:9;36539:18;36532:48;36594:62;36651:4;36642:6;36594:62;;;36586:70;36282:384;-1:-1;;;;;36282:384;36673:429;36875:2;36889:47;;;36860:18;;36950:142;36860:18;37078:6;36950:142;;37109:181;37211:2;37196:18;;37225:55;37200:9;37253:6;37225:55;;37297:193;37405:2;37390:18;;37419:61;37394:9;37453:6;37419:61;;37497:479;37679:2;37664:18;;37693:61;37668:9;37727:6;37693:61;;;37765:62;37823:2;37812:9;37808:18;37799:6;37765:62;;;37875:9;37869:4;37865:20;37860:2;37849:9;37845:18;37838:48;37900:66;37961:4;37952:6;37900:66;;37983:378;38137:2;38122:18;;38151:61;38126:9;38185:6;38151:61;;;38260:9;38254:4;38250:20;38245:2;38234:9;38230:18;38223:48;38285:66;38346:4;38337:6;38285:66;;38368:489;38556:3;38541:19;;38571:61;38545:9;38605:6;38571:61;;;38643:58;38697:2;38686:9;38682:18;38673:6;38643:58;;;38712:62;38770:2;38759:9;38755:18;38746:6;38712:62;;;38785;38843:2;38832:9;38828:18;38819:6;38785:62;;38864:290;38998:2;38983:18;;39012:59;38987:9;39044:6;39012:59;;;39082:62;39140:2;39129:9;39125:18;39116:6;39082:62;;39161:269;39283:2;39297:47;;;39268:18;;39358:62;39268:18;39406:6;39358:62;;39437:233;39565:2;39550:18;;39579:81;39554:9;39633:6;39579:81;;39957:387;40138:2;40152:47;;;40123:18;;40213:121;40123:18;40213:121;;40351:387;40532:2;40546:47;;;40517:18;;40607:121;40517:18;40607:121;;40745:387;40926:2;40940:47;;;40911:18;;41001:121;40911:18;41001:121;;41139:387;41320:2;41334:47;;;41305:18;;41395:121;41305:18;41395:121;;41533:387;41714:2;41728:47;;;41699:18;;41789:121;41699:18;41789:121;;41927:387;42108:2;42122:47;;;42093:18;;42183:121;42093:18;42183:121;;42321:387;42502:2;42516:47;;;42487:18;;42577:121;42487:18;42577:121;;42715:387;42896:2;42910:47;;;42881:18;;42971:121;42881:18;42971:121;;43109:387;43290:2;43304:47;;;43275:18;;43365:121;43275:18;43365:121;;43503:387;43684:2;43698:47;;;43669:18;;43759:121;43669:18;43759:121;;43897:387;44078:2;44092:47;;;44063:18;;44153:121;44063:18;44153:121;;44291:387;44472:2;44486:47;;;44457:18;;44547:121;44457:18;44547:121;;44685:387;44866:2;44880:47;;;44851:18;;44941:121;44851:18;44941:121;;45079:387;45260:2;45274:47;;;45245:18;;45335:121;45245:18;45335:121;;45473:387;45654:2;45668:47;;;45639:18;;45729:121;45639:18;45729:121;;45867:387;46048:2;46062:47;;;46033:18;;46123:121;46033:18;46123:121;;46261:387;46442:2;46456:47;;;46427:18;;46517:121;46427:18;46517:121;;46655:387;46836:2;46850:47;;;46821:18;;46911:121;46821:18;46911:121;;47049:387;47230:2;47244:47;;;47215:18;;47305:121;47215:18;47305:121;;47443:387;47624:2;47638:47;;;47609:18;;47699:121;47609:18;47699:121;;47837:387;48018:2;48032:47;;;48003:18;;48093:121;48003:18;48093:121;;48231:387;48412:2;48426:47;;;48397:18;;48487:121;48397:18;48487:121;;48625:387;48806:2;48820:47;;;48791:18;;48881:121;48791:18;48881:121;;49019:387;49200:2;49214:47;;;49185:18;;49275:121;49185:18;49275:121;;49413:387;49594:2;49608:47;;;49579:18;;49669:121;49579:18;49669:121;;49807:387;49988:2;50002:47;;;49973:18;;50063:121;49973:18;50063:121;;50201:387;50382:2;50396:47;;;50367:18;;50457:121;50367:18;50457:121;;50595:387;50776:2;50790:47;;;50761:18;;50851:121;50761:18;50851:121;;50989:387;51170:2;51184:47;;;51155:18;;51245:121;51155:18;51245:121;;51383:387;51564:2;51578:47;;;51549:18;;51639:121;51549:18;51639:121;;51777:387;51958:2;51972:47;;;51943:18;;52033:121;51943:18;52033:121;;52171:387;52352:2;52366:47;;;52337:18;;52427:121;52337:18;52427:121;;52565:387;52746:2;52760:47;;;52731:18;;52821:121;52731:18;52821:121;;52959:306;53123:3;53108:19;;53138:117;53112:9;53228:6;53138:117;;53272:334;53450:3;53435:19;;53465:131;53439:9;53569:6;53465:131;;53613:297;53773:2;53758:18;;53787:113;53762:9;53873:6;53787:113;;54117:256;54179:2;54173:9;54205:17;;;54280:18;54265:34;;54301:22;;;54262:62;54259:2;;;54337:1;54334;54327:12;54259:2;54353;54346:22;54157:216;;-1:-1;54157:216;54380:263;;54544:18;54536:6;54533:30;54530:2;;;54576:1;54573;54566:12;54530:2;-1:-1;54605:4;54593:17;;;54623:15;;54467:176;55198:254;;55337:18;55329:6;55326:30;55323:2;;;55369:1;55366;55359:12;55323:2;-1:-1;55442:4;55413;55390:17;;;;55409:9;55386:33;55432:15;;55260:192;55726:143;55857:4;55845:17;;55826:43;55878:129;55990:12;;55974:33;56454:128;56534:42;56523:54;;56506:76;56589:92;56662:13;56655:21;;56638:43;56688:79;56757:5;56740:27;56774:151;56853:66;56842:78;;56825:100;57018:88;57096:4;57085:16;;57068:38;57677:135;;57776:31;57801:5;57776:31;;57820:145;57901:6;57896:3;57891;57878:30;-1:-1;57957:1;57939:16;;57932:27;57871:94;57974:268;58039:1;58046:101;58060:6;58057:1;58054:13;58046:101;;;58127:11;;;58121:18;58108:11;;;58101:39;58082:2;58075:10;58046:101;;;58162:6;58159:1;58156:13;58153:2;;;-1:-1;;58227:1;58209:16;;58202:27;58023:219;58250:97;58338:2;58318:14;58334:7;58314:28;;58298:49
Swarm Source
bzzr://acfdb3081c6cc3292377a04194d31eb9eec8cb1e0b878d154d2221540dbb49b3
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.000315 | 874.3447 | $0.2752 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.