Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
VeSixUpgradeable
Compiler Version
v0.8.27+commit.40a35a09
Contract Source Code (Solidity)
/** *Submitted for verification at SonicScan.org on 2025-03-01 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity ^0.8.20; /** * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); } pragma solidity ^0.8.20; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } pragma solidity ^0.8.20; /** * @title ERC-721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC-721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); } pragma solidity ^0.8.20; /** * @dev Library that provide common ERC-721 utility functions. * * See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. * * _Available since v5.1._ */ library ERC721Utils { /** * @dev Performs an acceptance check for the provided `operator` by calling {IERC721-onERC721Received} * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`). * * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA). * Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept * the transfer. */ function checkOnERC721Received( address operator, address from, address to, uint256 tokenId, bytes memory data ) internal { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(operator, from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { // Token rejected revert IERC721Errors.ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-IERC721Receiver implementer revert IERC721Errors.ERC721InvalidReceiver(to); } else { assembly ("memory-safe") { revert(add(32, reason), mload(reason)) } } } } } } pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } } pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } pragma solidity ^0.8.20; /** * @dev Helper library for emitting standardized panic codes. * * ```solidity * contract Example { * using Panic for uint256; * * // Use any of the declared internal constants * function foo() { Panic.GENERIC.panic(); } * * // Alternatively * function foo() { Panic.panic(Panic.GENERIC); } * } * ``` * * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * * _Available since v5.1._ */ // slither-disable-next-line unused-state library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } } // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } } pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2²⁵⁶ + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @dev Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Variant of {modExp} that supports inputs of arbitrary length. */ function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { (bool success, bytes memory result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Variant of {tryModExp} that supports inputs of arbitrary length. */ function tryModExp( bytes memory b, bytes memory e, bytes memory m ) internal view returns (bool success, bytes memory result) { if (_zeroBytes(m)) return (false, new bytes(0)); uint256 mLen = m.length; // Encode call args in result and move the free memory pointer result = abi.encodePacked(b.length, e.length, mLen, b, e, m); assembly ("memory-safe") { let dataPtr := add(result, 0x20) // Write result on top of args to avoid allocating extra memory. success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) // Overwrite the length. // result.length > returndatasize() is guaranteed because returndatasize() == m.length mstore(result, mLen) // Set the memory pointer after the returned data. mstore(0x40, add(dataPtr, mLen)) } } /** * @dev Returns whether the provided byte array is zero. */ function _zeroBytes(bytes memory byteArray) private pure returns (bool) { for (uint256 i = 0; i < byteArray.length; ++i) { if (byteArray[i] != 0) { return false; } } return true; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 1); } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 1); } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } } pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } } pragma solidity ^0.8.20; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; assembly ("memory-safe") { ptr := add(buffer, add(32, length)) } while (true) { ptr--; assembly ("memory-safe") { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal * representation, according to EIP-55. */ function toChecksumHexString(address addr) internal pure returns (string memory) { bytes memory buffer = bytes(toHexString(addr)); // hash the hex part of buffer (skip length + 2 bytes, length 40) uint256 hashValue; assembly ("memory-safe") { hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) } for (uint256 i = 41; i > 1; --i) { // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { // case shift by xoring with 0x20 buffer[i] ^= 0x20; } hashValue >>= 4; } return string(buffer); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } } pragma solidity ^0.8.20; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } } pragma solidity ^0.8.20; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ abstract contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; /// @custom:storage-location erc7201:openzeppelin.storage.ERC721 struct ERC721Storage { // Token name string _name; // Token symbol string _symbol; mapping(uint256 tokenId => address) _owners; mapping(address owner => uint256) _balances; mapping(uint256 tokenId => address) _tokenApprovals; mapping(address owner => mapping(address operator => bool)) _operatorApprovals; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC721StorageLocation = 0x80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300; function _getERC721Storage() private pure returns (ERC721Storage storage $) { assembly { $.slot := ERC721StorageLocation } } /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { ERC721Storage storage $ = _getERC721Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual returns (uint256) { ERC721Storage storage $ = _getERC721Storage(); if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return $._balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { ERC721Storage storage $ = _getERC721Storage(); return $._name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { ERC721Storage storage $ = _getERC721Storage(); return $._symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { ERC721Storage storage $ = _getERC721Storage(); return $._operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { ERC721Storage storage $ = _getERC721Storage(); return $._owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { ERC721Storage storage $ = _getERC721Storage(); return $._tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if: * - `spender` does not have approval from `owner` for `tokenId`. * - `spender` does not have approval to manage all of `owner`'s assets. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { ERC721Storage storage $ = _getERC721Storage(); unchecked { $._balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { ERC721Storage storage $ = _getERC721Storage(); address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { $._balances[from] -= 1; } } if (to != address(0)) { unchecked { $._balances[to] += 1; } } $._owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC-721 standard to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { ERC721Storage storage $ = _getERC721Storage(); // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } $._tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { ERC721Storage storage $ = _getERC721Storage(); if (operator == address(0)) { revert ERC721InvalidOperator(operator); } $._operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } } pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); } pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20PermitUpgradeable { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20PermitUpgradeable token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token)); } } pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } pragma solidity ^0.8.0; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } pragma solidity ^0.8.20; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } pragma solidity 0.8.27; interface IRewardsDistributor { function claim(uint256 tokenId) external returns (uint256); function claimable(uint256 tokenId) external view returns (uint256); function checkpoint_token() external; function checkpoint_total_supply() external; function getRewardForDuration() external view returns (uint256); function getProxyCaller() external view returns (address); } //@author 0xPhant0m based on Andre Cronje's voteEscrow contract for Solidly pragma solidity 0.8.27; contract VeSixUpgradeable is ERC721Upgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; // Custom errors error InvalidAmount(); error InvalidDuration(); error TransferFailed(); error NotTokenOwner(); error LockNotExpired(); error ZeroReward(); error InvalidToken(); error InvalidArtProxy(); error ZeroAddress(); error DeadlineExpired(); error LockExpired(); error ExceedsMaxLocks(); error InvalidRewardRate(); error SlippageExceeded(); error MaxRewardRateExceeded(); error TokenNotExists(); error LockNotExists(); error MultiplierTooHigh(); error InvalidMultiplier(); error ArithmeticError(); error BatchRecalculationFailed(); struct Point { int128 bias; // Current farming power int128 slope; // Farming power decrease rate uint32 ts; // Timestamp of point uint32 blk; // Block number } struct LockedBalance { int128 amount; uint32 end; } struct LockPosition { uint128 amount; uint128 slope; uint32 endTime; uint32 lastUpdate; } // Constants uint32 private constant MAXTIME = 180 days; uint32 private constant WEEK = 7 * 86400; uint128 private constant MAX_MULTIPLIER = 4e18; uint128 private constant BASE_MULTIPLIER = 1e18; uint128 private constant PRECISION = 1e18; uint8 private constant MAX_LOCKS_PER_USER = 100; uint128 private constant MAX_REWARD_RATE = 1000e18; int128 private constant iMAXTIME = int128(uint128(MAXTIME)); // State variables IERC20Upgradeable private _lockedToken; IRewardsDistributor private _distributor; uint32 private _nextTokenId; mapping(uint256 => LockPosition) public _locks; mapping(address => uint8) public _userLockCount; // Point history state mapping(uint32 => Point) public pointHistory; uint32 public epoch; mapping(uint256 => uint32) public userPointEpoch; mapping(uint256 => mapping(uint32 => Point)) public userPointHistory; mapping(uint32 => int128) public slopeChanges; address public artProxy; uint32 MAX_BLOCK_DRIFT = 15; uint128 private _totalWeightedSupply; // Emergency recovery address private _emergencyRecoveryAddress; bool private _emergencyMode; // Events event Deposit( address indexed user, uint256 indexed tokenId, uint128 amount, uint32 lockTime ); event Withdraw( address indexed user, uint256 indexed tokenId, uint128 amount ); event RewardClaimed( address indexed user, uint256 indexed tokenId, uint128 reward ); event EmergencyModeEnabled(address recoveryAddress); event EmergencyWithdraw( address indexed user, uint256 indexed tokenId, uint128 amount ); event LockExtended( address indexed user, uint256 indexed tokenId, uint32 newEndTime, uint128 newMultiplier ); event AmountIncreased( address indexed user, uint256 indexed tokenId, uint128 additionalAmount, uint128 newTotalAmount, uint128 newMultiplier ); mapping(uint256 => uint256) public tokenEpoch; // tokenId => creation epoch // Storage gap for future upgrades uint256[50] private __gap; /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( address lockedToken_, address emergencyRecovery, string memory name, string memory symbol ) public initializer { if (lockedToken_ == address(0) || emergencyRecovery == address(0)) revert ZeroAddress(); __ERC721_init(name, symbol); __ReentrancyGuard_init(); __Pausable_init(); __Ownable_init(msg.sender); _pause(); _lockedToken = IERC20Upgradeable(lockedToken_); _emergencyRecoveryAddress = emergencyRecovery; // Initialize point history pointHistory[0].blk = uint32(block.number); pointHistory[0].ts = uint32(block.timestamp); } function setDistributor(address distributor_) external onlyOwner { if (distributor_ == address(0)) revert ZeroAddress(); if (address(_distributor) != address(0)) revert("Distributor already set"); _distributor = IRewardsDistributor(distributor_); } // Modifiers modifier validDeadline(uint256 deadline) { if (block.timestamp > deadline) revert DeadlineExpired(); _; } modifier checkRewardRate() { if (_distributor.getRewardForDuration() > MAX_REWARD_RATE) revert MaxRewardRateExceeded(); _; } modifier poke(uint256 tokenId) { LockPosition memory lock = _locks[tokenId]; if (lock.amount > 0 && uint32(block.timestamp) < lock.endTime) { // Recalculate slope with proper scaling uint256 scaledAmount = uint256(lock.amount) / PRECISION; uint256 multiplierDiff = MAX_MULTIPLIER - BASE_MULTIPLIER; uint256 slopeCalc = (scaledAmount * multiplierDiff) / (MAXTIME * PRECISION); uint128 newSlope = uint128(slopeCalc); // Only update if slope is different if (lock.slope != newSlope) { // Checkpoint and update _checkpoint( tokenId, LockedBalance(int128(uint128(lock.amount)), lock.endTime), LockedBalance(int128(uint128(lock.amount)), lock.endTime) ); _locks[tokenId].slope = newSlope; _locks[tokenId].lastUpdate = uint32(block.timestamp); } } _; } function getCurrentMultiplier(uint256 tokenId) public view returns (uint128) { LockPosition memory lock = _locks[tokenId]; if (uint32(block.timestamp) >= lock.endTime) return BASE_MULTIPLIER; // Recalculate slope properly with PRECISION scaling uint256 slopeCalc = (uint256(lock.amount) * (MAX_MULTIPLIER - BASE_MULTIPLIER)) / (MAXTIME * PRECISION); if (slopeCalc > type(uint128).max) revert InvalidAmount(); uint128 slope = uint128(slopeCalc); uint32 timeLeft = lock.endTime - uint32(block.timestamp); uint128 multiplier = uint128(BASE_MULTIPLIER + (uint256(slope) * timeLeft)); if (multiplier > MAX_MULTIPLIER) return MAX_MULTIPLIER; if (multiplier < BASE_MULTIPLIER) return BASE_MULTIPLIER; return multiplier; } function _checkpoint( uint256 tokenId, LockedBalance memory oldLocked, LockedBalance memory newLocked ) internal { _checkpointGlobal(); if (tokenId != 0) { _checkpointToken( tokenId, oldLocked, newLocked ); } } function _checkpointGlobal() internal { uint32 _epoch = epoch; Point memory lastPoint; if (_epoch > 0) { lastPoint = pointHistory[_epoch - 1]; } else { lastPoint = Point({ bias: 0, slope: 0, ts: uint32(block.timestamp), blk: uint32(block.number) }); } uint32 lastCheckpoint = lastPoint.ts; uint128 blockSlope = 0; if (uint32(block.timestamp) > lastCheckpoint) { blockSlope = uint128((PRECISION * (block.number - lastPoint.blk)) / (block.timestamp - lastPoint.ts)); } // Process weekly checkpoints lastPoint = _processWeeklyCheckpoints( lastPoint, lastCheckpoint, blockSlope, _epoch ); epoch = _epoch + 1; } function _processWeeklyCheckpoints( Point memory lastPoint, uint32 lastCheckpoint, uint128 blockSlope, uint32 _epoch ) internal returns (Point memory) { Point memory initialLastPoint = lastPoint; uint32 ti = (lastCheckpoint / WEEK) * WEEK; for (uint256 i = 0; i < 255; ++i) { ti += WEEK; int128 dslope = 0; if (ti > uint32(block.timestamp)) { ti = uint32(block.timestamp); } else { dslope = slopeChanges[ti]; } lastPoint.bias -= lastPoint.slope * int128(uint128(ti - lastCheckpoint)); lastPoint.slope += dslope; lastPoint.ts = ti; lastPoint.blk = uint32(initialLastPoint.blk + (uint256(blockSlope) * (ti - initialLastPoint.ts)) / PRECISION); if (ti == uint32(block.timestamp)) { lastPoint.blk = uint32(block.number); break; } else { pointHistory[_epoch + 1 + uint32(i)] = lastPoint; } lastCheckpoint = ti; } return lastPoint; } function _checkpointToken( uint256 tokenId, LockedBalance memory oldLocked, LockedBalance memory newLocked ) internal { Point memory uOld; Point memory uNew; if (oldLocked.end > uint32(block.timestamp) && oldLocked.amount > 0) { uOld.slope = (oldLocked.amount * int128(PRECISION)) / iMAXTIME; uOld.bias = (uOld.slope * int128(uint128(oldLocked.end - uint32(block.timestamp)))) / int128(PRECISION); } if (newLocked.end > uint32(block.timestamp) && newLocked.amount > 0) { uNew.slope = (newLocked.amount * int128(PRECISION)) / iMAXTIME; uNew.bias = (uNew.slope * int128(uint128(newLocked.end - uint32(block.timestamp)))) / int128(PRECISION); } _processTokenSlopeChanges( oldLocked, newLocked, uOld.slope, uNew.slope ); uint32 userEpoch = userPointEpoch[tokenId] + 1; userPointEpoch[tokenId] = userEpoch; uNew.ts = uint32(block.timestamp); uNew.blk = uint32(block.number); userPointHistory[tokenId][userEpoch] = uNew; } function _processTokenSlopeChanges( LockedBalance memory oldLocked, LockedBalance memory newLocked, int128 oldSlope, int128 newSlope ) internal { if (oldLocked.end > uint32(block.timestamp)) { int128 oldDslope = slopeChanges[oldLocked.end]; oldDslope += oldSlope; if (newLocked.end == oldLocked.end) { oldDslope -= newSlope; } slopeChanges[oldLocked.end] = oldDslope; } if (newLocked.end > uint32(block.timestamp)) { if (newLocked.end > oldLocked.end) { int128 newDslope = slopeChanges[newLocked.end]; newDslope -= newSlope; slopeChanges[newLocked.end] = newDslope; } } } function _beforeTokenTransfer( address from, uint256 tokenId ) internal { if (from != address(0) && address(_distributor) != address(0)) { // Skip if minting _distributor.claim(tokenId); } } function transferFrom(address from, address to, uint256 tokenId) public virtual override { _beforeTokenTransfer(from, tokenId); super.transferFrom(from,to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { _beforeTokenTransfer(from, tokenId); super.safeTransferFrom(from, to, tokenId, data); } function withdraw(uint256 tokenId) external nonReentrant { address owner = _ownerOf(tokenId); if (owner == address(0)) revert TokenNotExists(); if (owner != msg.sender) revert NotTokenOwner(); LockPosition memory lock = _locks[tokenId]; if (lock.amount == 0) revert LockNotExists(); if (uint32(block.timestamp) < lock.endTime) revert LockNotExpired(); uint128 amount = lock.amount; LockedBalance memory oldLock = LockedBalance({ amount: int128(uint128(amount)), end: lock.endTime }); delete _locks[tokenId]; uint128 multiplier = getCurrentMultiplier(tokenId); uint256 weightedAmount = (uint256(amount) * uint256(multiplier)) / PRECISION; if (weightedAmount / uint256(amount) != uint256(multiplier)) revert ArithmeticError(); uint256 weightedSupplyIncrease = weightedAmount / PRECISION; if (weightedSupplyIncrease > type(uint128).max) revert InvalidAmount(); _totalWeightedSupply -= uint128(weightedSupplyIncrease); _checkpoint(tokenId, oldLock, LockedBalance(0, 0)); delete userPointEpoch[tokenId]; _burn(tokenId); unchecked { _userLockCount[msg.sender]--; } _lockedToken.safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, tokenId, amount); } function _calculateLockParameters( uint128 amount, uint32 lockDuration, uint128 minMultiplier ) internal pure returns (uint128 slope, uint128 multiplier) { // Use veRAM's simple approach: slope = amount / MAXTIME slope = uint128((uint256(amount) * PRECISION) / MAXTIME); // Calculate multiplier multiplier = _calculateMultiplier(slope, lockDuration); if (multiplier > MAX_MULTIPLIER) revert MultiplierTooHigh(); if (multiplier < minMultiplier) revert SlippageExceeded(); } function _updateWeightedSupply(uint128 amount, uint128 multiplier) internal { uint256 weightedAmount = uint256(amount) * uint256(multiplier) / PRECISION; _totalWeightedSupply += uint128(weightedAmount); } function createLock( uint128 amount, uint32 lockDuration, uint256 deadline, uint128 minMultiplier ) external nonReentrant whenNotPaused validDeadline(deadline) returns (uint256 tokenId) { if (amount == 0) revert InvalidAmount(); if (lockDuration == 0 || lockDuration > MAXTIME) revert InvalidDuration(); if (_userLockCount[msg.sender] >= MAX_LOCKS_PER_USER) revert ExceedsMaxLocks(); uint32 unlockTime = uint32(block.timestamp) + lockDuration; (uint128 slope, uint128 multiplier) = _calculateLockParameters(amount, lockDuration, minMultiplier); // Create new lock balance LockedBalance memory newLock = LockedBalance({ amount: int128(uint128(amount)), end: unlockTime }); // Checkpoint before modifying state _checkpoint(0, LockedBalance(0, 0), newLock); // Transfer tokens using SafeERC20 uint256 balanceBefore = _lockedToken.balanceOf(address(this)); _lockedToken.safeTransferFrom(msg.sender, address(this), amount); if (_lockedToken.balanceOf(address(this)) != balanceBefore + amount) revert TransferFailed(); unchecked { tokenId = _nextTokenId++; _userLockCount[msg.sender]++; } _safeMint(msg.sender, tokenId); _locks[tokenId] = LockPosition({ amount: amount, endTime: unlockTime, lastUpdate: uint32(block.timestamp), slope: slope }); _updateWeightedSupply(amount, multiplier); emit Deposit(msg.sender, tokenId, amount, unlockTime); } function createLockFor( address recipient, uint128 amount, uint32 lockDuration, uint256 deadline, uint128 minMultiplier ) external nonReentrant whenNotPaused validDeadline(deadline) returns (uint256 tokenId) { if (amount == 0) revert InvalidAmount(); if (lockDuration == 0 || lockDuration > MAXTIME) revert InvalidDuration(); if (recipient == address(0)) revert ZeroAddress(); if (_userLockCount[recipient] >= MAX_LOCKS_PER_USER) revert ExceedsMaxLocks(); uint32 unlockTime = uint32(block.timestamp) + lockDuration; (uint128 slope, uint128 multiplier) = _calculateLockParameters(amount, lockDuration, minMultiplier); // Create new lock balance LockedBalance memory newLock = LockedBalance({ amount: int128(uint128(amount)), end: unlockTime }); // Checkpoint before modifying state _checkpoint(0, LockedBalance(0, 0), newLock); // Transfer tokens using SafeERC20 uint256 balanceBefore = _lockedToken.balanceOf(address(this)); _lockedToken.safeTransferFrom(msg.sender, address(this), amount); if (_lockedToken.balanceOf(address(this)) != balanceBefore + amount) revert TransferFailed(); unchecked { tokenId = _nextTokenId++; _userLockCount[recipient]++; } _safeMint(recipient, tokenId); _locks[tokenId] = LockPosition({ amount: amount, endTime: unlockTime, lastUpdate: uint32(block.timestamp), slope: slope }); _updateWeightedSupply(amount, multiplier); emit Deposit(recipient, tokenId, amount, unlockTime); } function extendLock( uint256 tokenId, uint32 additionalDuration, uint256 deadline, uint128 minMultiplier ) external nonReentrant whenNotPaused validDeadline(deadline) poke(tokenId) { if (ownerOf(tokenId) != msg.sender) revert NotTokenOwner(); LockPosition memory lock = _locks[tokenId]; if (lock.amount == 0) revert LockNotExists(); // Calculate new end time uint32 newEndTime = lock.endTime + additionalDuration; uint32 totalRemainingDuration = newEndTime - uint32(block.timestamp); if (totalRemainingDuration > MAXTIME) revert InvalidDuration(); // Calculate new slope and multiplier with proper scaling uint128 newSlope = _calculateNewSlope(lock.amount); uint128 multiplier = _calculateMultiplier(newSlope, totalRemainingDuration); if (multiplier < minMultiplier) revert SlippageExceeded(); // Update weighted supply _updateWeightedSupply( lock.amount, multiplier ); // Checkpoint _checkpoint( tokenId, LockedBalance(int128(uint128(lock.amount)), lock.endTime), LockedBalance(int128(uint128(lock.amount)), newEndTime) ); // Update lock state _locks[tokenId] = LockPosition({ amount: lock.amount, endTime: newEndTime, lastUpdate: uint32(block.timestamp), slope: newSlope }); emit LockExtended(msg.sender, tokenId, newEndTime, multiplier); } function _calculateNewSlope(uint128 amount) private pure returns (uint128) { // Use veRAM's approach consistently return uint128((uint256(amount) * PRECISION) / MAXTIME); } function _calculateMultiplier(uint128 slope, uint32 duration) internal pure returns (uint128) { // Special case: If slope is 0, return base multiplier to avoid division by zero if (slope == 0) return BASE_MULTIPLIER; uint256 bias = uint256(slope) * duration; // Convert to multiplier (1x-4x range) uint256 multiplier = BASE_MULTIPLIER + ((bias * (MAX_MULTIPLIER - BASE_MULTIPLIER)) / (uint256(slope) * MAXTIME)); if (multiplier > MAX_MULTIPLIER) return MAX_MULTIPLIER; if (multiplier < BASE_MULTIPLIER) return BASE_MULTIPLIER; return uint128(multiplier); } // Helper function for increasing lock amount logic function _processIncreaseLock( uint256 tokenId, uint128 additionalAmount, uint128 minMultiplier ) private { LockPosition storage lock = _locks[tokenId]; // Get old values and calculate new values uint128 oldAmount = lock.amount; uint128 newAmount = oldAmount + additionalAmount; uint32 endTime = lock.endTime; uint32 remainingDuration = endTime - uint32(block.timestamp); // Calculate new slope and multiplier uint128 newSlope = _calculateNewSlope(newAmount); uint128 multiplier = _calculateMultiplier(newSlope, remainingDuration); // Get current multiplier and use higher value uint128 currentMultiplier = getCurrentMultiplier(tokenId); multiplier = multiplier > currentMultiplier ? multiplier : currentMultiplier; // Slippage check for non-dust amounts if (additionalAmount > PRECISION / 1000 && multiplier < minMultiplier) { revert SlippageExceeded(); } // Checkpoint _checkpoint( tokenId, LockedBalance(int128(uint128(oldAmount)), endTime), LockedBalance(int128(uint128(newAmount)), endTime) ); // Update lock state lock.amount = newAmount; lock.slope = newSlope; lock.lastUpdate = uint32(block.timestamp); // Update weighted supply _updateWeightedSupply(additionalAmount, multiplier); emit AmountIncreased(msg.sender, tokenId, additionalAmount, newAmount, multiplier); } function increaseLockAmount( uint256 tokenId, uint128 additionalAmount, uint256 deadline, uint128 minMultiplier ) external nonReentrant whenNotPaused validDeadline(deadline) poke(tokenId) { // Basic validations if (ownerOf(tokenId) != tx.origin) revert NotTokenOwner(); if (additionalAmount == 0) revert InvalidAmount(); // Check if lock exists and not expired LockPosition storage lock = _locks[tokenId]; if (lock.amount == 0) revert LockNotExists(); if (uint32(block.timestamp) >= lock.endTime) revert LockExpired(); // Transfer tokens uint256 balanceBefore = _lockedToken.balanceOf(address(this)); _lockedToken.safeTransferFrom(msg.sender, address(this), additionalAmount); if (_lockedToken.balanceOf(address(this)) != balanceBefore + additionalAmount) revert TransferFailed(); // Process the lock increase in a separate function _processIncreaseLock(tokenId, additionalAmount, minMultiplier); } function getTotalFarmingPower(uint32 timestamp) public view returns (uint128) { Point memory lastPoint = pointHistory[epoch]; return uint128(_supplyAt(lastPoint, timestamp)); } function _supplyAt(Point memory point, uint32 t) internal view returns (uint128) { Point memory lastPoint = point; uint32 ti = (lastPoint.ts / WEEK) * WEEK; for (uint256 i = 0; i < 255; ++i) { ti += WEEK; int128 dslope = 0; if (ti > t) { ti = t; } else { dslope = slopeChanges[ti]; } lastPoint.bias -= lastPoint.slope * int128(uint128(ti - lastPoint.ts)); if (ti == t) { break; } lastPoint.slope += dslope; lastPoint.ts = ti; } if (lastPoint.bias < 0) { lastPoint.bias = 0; } return uint128(uint256(uint128(lastPoint.bias))); } function merge( uint256[] calldata tokenIds, uint256 deadline ) external nonReentrant whenNotPaused validDeadline(deadline) { if (tokenIds.length < 2) revert InvalidAmount(); uint128 totalAmount; uint32 latestEndTime; // First pass: validate ownership and calculate totals for (uint256 i = 0; i < tokenIds.length; i++) { if (ownerOf(tokenIds[i]) != msg.sender) revert NotTokenOwner(); LockPosition memory lock = _locks[tokenIds[i]]; totalAmount += lock.amount; if (lock.endTime > latestEndTime) { latestEndTime = lock.endTime; } } // Create new merged position uint32 remainingDuration = latestEndTime - uint32(block.timestamp); if (remainingDuration > MAXTIME) revert InvalidDuration(); // Use veRAM's approach for slope calculation uint128 newSlope = uint128((uint256(totalAmount) * PRECISION) / MAXTIME); uint256 newTokenId = ++_nextTokenId; _safeMint(msg.sender, newTokenId); // Checkpoint and cleanup old positions for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; LockPosition memory oldLock = _locks[tokenId]; LockedBalance memory oldLockedBalance = LockedBalance({ amount: int128(uint128(oldLock.amount)), end: oldLock.endTime }); _checkpoint(tokenId, oldLockedBalance, LockedBalance(0, 0)); delete _locks[tokenId]; _burn(tokenId); } // Create new lock LockedBalance memory newLock = LockedBalance({ amount: int128(uint128(totalAmount)), end: latestEndTime }); _checkpoint(newTokenId, LockedBalance(0, 0), newLock); _locks[newTokenId] = LockPosition({ amount: totalAmount, endTime: latestEndTime, lastUpdate: uint32(block.timestamp), slope: newSlope }); unchecked { _userLockCount[msg.sender] = uint8(_userLockCount[msg.sender] - uint8(tokenIds.length) + 1); } emit Deposit(msg.sender, newTokenId, totalAmount, latestEndTime); } function getFarmingPower(uint256 tokenId, uint32 timestamp) public view returns (uint128) { uint32 userEpoch = userPointEpoch[tokenId]; if (userEpoch == 0) return 0; // Find the right historical point Point memory lastPoint; for (uint32 i = userEpoch; i >= 1; i--) { lastPoint = userPointHistory[tokenId][i]; if (lastPoint.ts <= timestamp) { int128 timeDelta = int128(uint128(timestamp - lastPoint.ts)); lastPoint.bias = lastPoint.bias - ((lastPoint.slope * timeDelta) / int128(PRECISION)); if (lastPoint.bias < 0) { lastPoint.bias = 0; } return uint128(uint256(uint128(lastPoint.bias))); } } return 0; } function getMinMultiplier(uint128 amount, uint32 lockDuration) public view returns (uint128) { // Reduce duration by max block drift uint32 minDuration = lockDuration > MAX_BLOCK_DRIFT ? lockDuration - MAX_BLOCK_DRIFT : lockDuration; // Calculate multiplier with reduced duration uint256 slopeCalc = (uint256(amount) * (MAX_MULTIPLIER - BASE_MULTIPLIER)) / MAXTIME; uint128 slope = uint128(slopeCalc); return uint128(BASE_MULTIPLIER + (uint256(slope) * minDuration)); } // Emergency functions function enableEmergencyMode() external onlyOwner { _emergencyMode = true; _pause(); emit EmergencyModeEnabled(_emergencyRecoveryAddress); } function emergencyWithdraw(uint256 tokenId) external nonReentrant { require(_emergencyMode, "Not in emergency mode"); if (ownerOf(tokenId) != msg.sender) revert NotTokenOwner(); LockPosition memory lock = _locks[tokenId]; uint128 amount = lock.amount; delete _locks[tokenId]; _burn(tokenId); unchecked { _userLockCount[msg.sender]--; } _lockedToken.safeTransfer(msg.sender, amount); emit EmergencyWithdraw(msg.sender, tokenId, amount); } function unPause () external onlyOwner { _unpause(); } // View functions function getUserLockCount(address user) external view returns (uint8) { return _userLockCount[user]; } function lockedToken() external view returns (IERC20Upgradeable) { return _lockedToken; } function isEmergencyMode() external view returns (bool) { return _emergencyMode; } function totalWeightedSupply() external view returns (uint128) { return _totalWeightedSupply; } function setArtProxy(address _artProxy) external onlyOwner { if (_artProxy == address(0)) revert ZeroAddress(); artProxy = _artProxy; } function tokensForOwner(address owner) external view returns(uint256[] memory tokenIds) { uint8 count = _userLockCount[owner]; tokenIds = new uint256[](count); if (count == 0) return tokenIds; uint256 currentIndex = 0; for (uint256 id = 0; id < _nextTokenId; id++) { if (_ownerOf(id) == owner) { tokenIds[currentIndex] = id; currentIndex++; if (currentIndex >= count) break; } } return tokenIds; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (_ownerOf(tokenId) == address(0)) revert TokenNotExists(); if (artProxy == address(0)) revert InvalidArtProxy(); // Delegate tokenURI call to art proxy (bool success, bytes memory data) = artProxy.staticcall( abi.encodeWithSignature("tokenURI(uint256)", tokenId) ); require(success, "Art proxy call failed"); return abi.decode(data, (string)); } function getExpectedMultiplier(uint128 amount, uint32 duration) public pure returns (uint128) { if (duration == 0 || duration > MAXTIME) revert InvalidDuration(); if (amount == 0) revert InvalidAmount(); uint128 slope = _calculateNewSlope(amount); return _calculateMultiplier(slope, duration); } function getExpectedExtendedMultiplier(uint256 tokenId, uint32 additionalDuration) public view returns (uint128) { if (additionalDuration == 0) revert InvalidDuration(); LockPosition memory lock = _locks[tokenId]; if (lock.amount == 0) revert LockNotExists(); uint32 newEndTime = lock.endTime + additionalDuration; uint32 remainingDuration = newEndTime - uint32(block.timestamp); if (remainingDuration > MAXTIME) revert InvalidDuration(); uint128 slope = _calculateNewSlope(lock.amount); return _calculateMultiplier(slope, remainingDuration); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArithmeticError","type":"error"},{"inputs":[],"name":"BatchRecalculationFailed","type":"error"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"ExceedsMaxLocks","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidArtProxy","type":"error"},{"inputs":[],"name":"InvalidDuration","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMultiplier","type":"error"},{"inputs":[],"name":"InvalidRewardRate","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"LockExpired","type":"error"},{"inputs":[],"name":"LockNotExists","type":"error"},{"inputs":[],"name":"LockNotExpired","type":"error"},{"inputs":[],"name":"MaxRewardRateExceeded","type":"error"},{"inputs":[],"name":"MultiplierTooHigh","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"SlippageExceeded","type":"error"},{"inputs":[],"name":"TokenNotExists","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroReward","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"additionalAmount","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newTotalAmount","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newMultiplier","type":"uint128"}],"name":"AmountIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint32","name":"lockTime","type":"uint32"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recoveryAddress","type":"address"}],"name":"EmergencyModeEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"newEndTime","type":"uint32"},{"indexed":false,"internalType":"uint128","name":"newMultiplier","type":"uint128"}],"name":"LockExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"reward","type":"uint128"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_locks","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"slope","type":"uint128"},{"internalType":"uint32","name":"endTime","type":"uint32"},{"internalType":"uint32","name":"lastUpdate","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_userLockCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint32","name":"lockDuration","type":"uint32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint128","name":"minMultiplier","type":"uint128"}],"name":"createLock","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint32","name":"lockDuration","type":"uint32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint128","name":"minMultiplier","type":"uint128"}],"name":"createLockFor","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableEmergencyMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"additionalDuration","type":"uint32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint128","name":"minMultiplier","type":"uint128"}],"name":"extendLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCurrentMultiplier","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"additionalDuration","type":"uint32"}],"name":"getExpectedExtendedMultiplier","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint32","name":"duration","type":"uint32"}],"name":"getExpectedMultiplier","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"timestamp","type":"uint32"}],"name":"getFarmingPower","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint32","name":"lockDuration","type":"uint32"}],"name":"getMinMultiplier","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"timestamp","type":"uint32"}],"name":"getTotalFarmingPower","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserLockCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"additionalAmount","type":"uint128"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint128","name":"minMultiplier","type":"uint128"}],"name":"increaseLockAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lockedToken_","type":"address"},{"internalType":"address","name":"emergencyRecovery","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEmergencyMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"merge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"pointHistory","outputs":[{"internalType":"int128","name":"bias","type":"int128"},{"internalType":"int128","name":"slope","type":"int128"},{"internalType":"uint32","name":"ts","type":"uint32"},{"internalType":"uint32","name":"blk","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_artProxy","type":"address"}],"name":"setArtProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"distributor_","type":"address"}],"name":"setDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"slopeChanges","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensForOwner","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWeightedSupply","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"userPointEpoch","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"userPointHistory","outputs":[{"internalType":"int128","name":"bias","type":"int128"},{"internalType":"int128","name":"slope","type":"int128"},{"internalType":"uint32","name":"ts","type":"uint32"},{"internalType":"uint32","name":"blk","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052606d805463ffffffff60a01b1916600f60a01b1790553480156024575f5ffd5b50602b602f565b60df565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615607e5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460dc5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615402806100ec5f395ff3fe608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c806375619ab51161017b578063bbe33ea5116100e4578063ddacc94a1161009e578063e58f594711610079578063e58f5947146107ee578063e985e9c514610813578063f2fde38b14610826578063f7b188a514610839575f5ffd5b8063ddacc94a146107b5578063df0c78ef146107c8578063df215157146107db575f5ffd5b8063bbe33ea51461073f578063bcc0022514610752578063beb8310914610774578063c5b1c7d014610787578063c87b56dd1461078f578063d89dd269146107a2575f5ffd5b806395d89b411161013557806395d89b41146106a257806397612d4b146106aa57806398a3f422146106bd5780639b7d02ad146106dc578063a22cb46514610719578063b88d4fde1461072c575f5ffd5b806375619ab51461055d57806389f839c6146105705780638b25e8c1146105f35780638da5cb5b146106065780638ff4249014610636578063900cf0cf1461067d575f5ffd5b8063268dc1991161021d5780635594a045116101d75780635594a045146104dc578063586c2600146104ef5780635c975abb146105245780636352211e1461052f57806370a0823114610542578063715018a614610555575f5ffd5b8063268dc1991461045e5780632a90752d1461046f5780632e1a7d4d146104905780632e720f7d146104a357806342842e0e146104b65780635312ea8e146104c9575f5ffd5b80631d237a491161026e5780631d237a49146103635780631f5ab022146103e85780632016a0d2146103fb57806320a194b81461040e57806323b872dd1461042057806324c44c5b14610433575f5ffd5b806301ffc9a7146102b557806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d5780630f45cc811461033257806313de148b14610343575b5f5ffd5b6102c86102c3366004614962565b610841565b60405190151581526020015b60405180910390f35b6102e5610892565b6040516102d491906149ab565b6103056103003660046149bd565b610933565b6040516001600160a01b0390911681526020016102d4565b61033061032b3660046149ef565b610947565b005b6064546001600160a01b0316610305565b610356610351366004614a17565b610956565b6040516102d49190614a30565b6103b5610371366004614a85565b606b60209081525f928352604080842090915290825290208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60408051600f95860b81529390940b602084015263ffffffff9182169383019390935290911660608201526080016102d4565b6103306103f6366004614ac5565b610a4b565b610330610409366004614bcd565b610f4b565b606f54600160a01b900460ff166102c8565b61033061042e366004614c52565b611146565b610446610441366004614a85565b611160565b6040516001600160801b0390911681526020016102d4565b606e546001600160801b0316610446565b61048261047d366004614c8c565b611270565b6040519081526020016102d4565b61033061049e3660046149bd565b611665565b6103306104b1366004614a17565b61198e565b6103306104c4366004614c52565b6119df565b6103306104d73660046149bd565b6119f9565b606d54610305906001600160a01b031681565b6105116104fd366004614ce6565b606c6020525f9081526040902054600f0b81565b604051600f9190910b81526020016102d4565b60325460ff166102c8565b61030561053d3660046149bd565b611b92565b610482610550366004614a17565b611b9c565b610330611bf4565b61033061056b366004614a17565b611c07565b6105bc61057e3660046149bd565b60666020525f9081526040902080546001909101546001600160801b0380831692600160801b9004169063ffffffff80821691600160201b90041684565b604080516001600160801b03958616815294909316602085015263ffffffff918216928401929092521660608201526080016102d4565b6104466106013660046149bd565b611cb1565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610305565b6103b5610644366004614ce6565b60686020525f908152604090208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60695461068d9063ffffffff1681565b60405163ffffffff90911681526020016102d4565b6102e5611e4d565b6104466106b8366004614ce6565b611e8b565b6104826106cb3660046149bd565b60706020525f908152604090205481565b6107076106ea366004614a17565b6001600160a01b03165f9081526067602052604090205460ff1690565b60405160ff90911681526020016102d4565b610330610727366004614d0c565b611ef7565b61033061073a366004614d41565b611f02565b61033061074d366004614dac565b611f18565b610707610760366004614a17565b60676020525f908152604090205460ff1681565b610330610782366004614e21565b612366565b61033061275e565b6102e561079d3660046149bd565b6127c4565b6104466107b0366004614e44565b612917565b6104466107c3366004614a85565b612990565b6104466107d6366004614e44565b612adb565b6104826107e9366004614e6c565b612b8f565b61068d6107fc3660046149bd565b606a6020525f908152604090205463ffffffff1681565b6102c8610821366004614e96565b612f39565b610330610834366004614a17565b612f85565b610330612fbf565b5f6001600160e01b031982166380ac58cd60e01b148061087157506001600160e01b03198216635b5e139f60e01b145b8061088c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f5160206153ad5f395f51905f5280546060919081906108b190614ebe565b80601f01602080910402602001604051908101604052809291908181526020018280546108dd90614ebe565b80156109285780601f106108ff57610100808354040283529160200191610928565b820191905f5260205f20905b81548152906001019060200180831161090b57829003601f168201915b505050505091505090565b5f61093d82612fcf565b5061088c82613006565b61095282823361303f565b5050565b6001600160a01b0381165f9081526067602052604090205460609060ff168067ffffffffffffffff81111561098d5761098d614b08565b6040519080825280602002602001820160405280156109b6578160200160208202803683370190505b5091508060ff165f036109c95750919050565b5f805b606554600160a01b900463ffffffff16811015610a4357846001600160a01b03166109f68261304c565b6001600160a01b031603610a3b5780848381518110610a1757610a17614ef6565b602090810291909101015281610a2c81614f1e565b9250508260ff16821015610a43575b6001016109cc565b505050919050565b610a53613085565b610a5b6130dc565b8180421115610a7d57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b9004909216606083015286919015801590610afa5750806040015163ffffffff164263ffffffff16105b15610c3d5780515f90610b1f90670de0b6b3a7640000906001600160801b0316614f4a565b90505f610b3c670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b031690505f610b5d670de0b6b3a764000062ed4e00614f7c565b6001600160801b0316610b708385614fa5565b610b7a9190614f4a565b90505f819050806001600160801b031685602001516001600160801b031614610c3857610bf0866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613122565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b33610c4788611b92565b6001600160a01b031614610c6e576040516359dc379f60e01b815260040160405180910390fd5b5f878152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b900490911660608201529103610ce957604051632254ea3d60e11b815260040160405180910390fd5b5f878260400151610cfa9190614fbc565b90505f610d074283614fd8565b905062ed4e0063ffffffff82161115610d3357604051637616640160e01b815260040160405180910390fd5b5f610d40845f015161313b565b90505f610d4d8284613165565b9050886001600160801b0316816001600160801b03161015610d8257604051638199f5f360e01b815260040160405180910390fd5b8451610d8e9082613247565b610ddd8c6040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b81526020018863ffffffff16815250613122565b6040518060800160405280865f01516001600160801b03168152602001836001600160801b031681526020018563ffffffff1681526020014263ffffffff1681525060665f8e81526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055509050508b336001600160a01b03167f3032be442129e161b4ae1cdee94871a69de2c16ee2007f31fc209a715673455c8684604051610f2c92919063ffffffff9290921682526001600160801b0316602082015260400190565b60405180910390a35050505050505050610f4560015f55565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610f905750825b90505f8267ffffffffffffffff166001148015610fac5750303b155b905081158015610fba575080155b15610fd85760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561100257845460ff60401b1916600160401b1785555b6001600160a01b038916158061101f57506001600160a01b038816155b1561103d5760405163d92e233d60e01b815260040160405180910390fd5b61104787876132bf565b61104f6132d1565b6110576132e1565b611060336132f1565b611068613302565b606480546001600160a01b03808c166001600160a01b031992831617909255606f8054928b16929091169190911790555f805260686020527fad6f8124f6081c2622ab3a16acd47af73d52fe87b755c3f897263c58ba3fdbd880544263ffffffff90811663ffffffff194392909216600160201b029190911667ffffffffffffffff1990921691909117179055831561113b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6111508382613357565b61115b8383836133ea565b505050565b5f8163ffffffff165f0361118757604051637616640160e01b815260040160405180910390fd5b5f838152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361120257604051632254ea3d60e11b815260040160405180910390fd5b5f8382604001516112139190614fbc565b90505f6112204283614fd8565b905062ed4e0063ffffffff8216111561124c57604051637616640160e01b815260040160405180910390fd5b5f611259845f015161313b565b90506112658183613165565b979650505050505050565b5f611279613085565b6112816130dc565b82804211156112a357604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f036112cc5760405163162908e360e11b815260040160405180910390fd5b63ffffffff851615806112e7575062ed4e0063ffffffff8616115b1561130557604051637616640160e01b815260040160405180910390fd5b6001600160a01b03871661132c5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0387165f90815260676020526040902054606460ff909116106113695760405163133cbc4f60e01b815260040160405180910390fd5b5f6113748642614fbc565b90505f5f61138389898861346d565b915091505f60405180604001604052808b600f0b81526020018563ffffffff1681525090506113d05f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613122565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061143a9190614ff4565b60645490915061145e906001600160a01b031633306001600160801b038f16613513565b6114716001600160801b038c168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114db9190614ff4565b146114f9576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b19909316929092179092556001600160a01b038e165f908152606760205260409020805460ff80821690940190931660ff199093169290921790915596506115658c8861357e565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff1990941692909116919091179190911790556115f98b84613247565b604080516001600160801b038d16815263ffffffff8716602082015288916001600160a01b038f16917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061165c60015f55565b95945050505050565b61166d613085565b5f6116778261304c565b90506001600160a01b03811661169f57604051626f708760e21b815260040160405180910390fd5b6001600160a01b03811633146116c8576040516359dc379f60e01b815260040160405180910390fd5b5f828152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361174357604051632254ea3d60e11b815260040160405180910390fd5b806040015163ffffffff164263ffffffff1610156117745760405163342ad40160e11b815260040160405180910390fd5b8051604080518082018252600f83900b81528184015163ffffffff166020808301919091525f8781526066909152918220828155600101805467ffffffffffffffff19169055906117c486611cb1565b90505f670de0b6b3a76400006117e66001600160801b03808516908716614fa5565b6117f09190614f4a565b9050816001600160801b0316846001600160801b0316826118119190614f4a565b1461182f57604051630fc12e3560e11b815260040160405180910390fd5b5f611842670de0b6b3a764000083614f4a565b90506001600160801b0381111561186c5760405163162908e360e11b815260040160405180910390fd5b606e80548291905f906118899084906001600160801b0316614f5d565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506118d5888560405180604001604052805f600f0b81526020015f63ffffffff16815250613122565b5f888152606a60205260409020805463ffffffff191690556118f688613597565b335f818152606760205260409020805460ff19811660ff9182165f190190911617905560645461193b916001600160a01b03909116906001600160801b0388166135cf565b6040516001600160801b0386168152889033907f8903a5b5d08a841e7f68438387f1da20c84dea756379ed37e633ff3854b99b849060200160405180910390a35050505050505061198b60015f55565b50565b6119966135ff565b6001600160a01b0381166119bd5760405163d92e233d60e01b815260040160405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b61115b83838360405180602001604052805f815250611f02565b611a01613085565b606f54600160a01b900460ff16611a575760405162461bcd60e51b81526020600482015260156024820152744e6f7420696e20656d657267656e6379206d6f646560581b60448201526064015b60405180910390fd5b33611a6182611b92565b6001600160a01b031614611a88576040516359dc379f60e01b815260040160405180910390fd5b5f818152606660208181526040808420815160808101835281546001600160801b03808216808452600160801b909204168286015260018301805463ffffffff80821696850196909652600160201b810490951660608401528888529590945294905567ffffffffffffffff1916909155611b0283613597565b335f818152606760205260409020805460ff19811660ff9182165f1901909116179055606454611b47916001600160a01b03909116906001600160801b0384166135cf565b6040516001600160801b0382168152839033907f4f27eb511b2a4633cfb633ac1c4a99b4c298ca6488b29ec26f3504a5927f67289060200160405180910390a3505061198b60015f55565b5f61088c82612fcf565b5f5f5160206153ad5f395f51905f526001600160a01b038316611bd4576040516322718ad960e21b81525f6004820152602401611a4e565b6001600160a01b039092165f908152600390920160205250604090205490565b611bfc6135ff565b611c055f61365a565b565b611c0f6135ff565b6001600160a01b038116611c365760405163d92e233d60e01b815260040160405180910390fd5b6065546001600160a01b031615611c8f5760405162461bcd60e51b815260206004820152601760248201527f4469737472696275746f7220616c7265616479207365740000000000000000006044820152606401611a4e565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152606660209081526040808320815160808101835281546001600160801b038082168352600160801b90910416938101939093526001015463ffffffff808216928401839052600160201b90910481166060840152421610611d205750670de0b6b3a764000092915050565b5f611d36670de0b6b3a764000062ed4e00614f7c565b6001600160801b0316611d59670de0b6b3a7640000673782dace9d900000614f5d565b8351611d71916001600160801b039081169116614fa5565b611d7b9190614f4a565b90506001600160801b03811115611da55760405163162908e360e11b815260040160405180910390fd5b604082015181905f90611db9904290614fd8565b90505f611dd563ffffffff83166001600160801b038516614fa5565b611de790670de0b6b3a764000061500b565b9050673782dace9d9000006001600160801b0382161115611e165750673782dace9d9000009695505050505050565b670de0b6b3a76400006001600160801b0382161015611e435750670de0b6b3a76400009695505050505050565b9695505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060915f5160206153ad5f395f51905f52916108b190614ebe565b60695463ffffffff9081165f90815260686020908152604080832081516080810183528154600f81810b8352600160801b909104900b938101939093526001015480851691830191909152600160201b9004909216606083015290611ef081846136ca565b9392505050565b6109523383836137df565b611f0c8483613357565b610f458484848461388e565b611f20613085565b611f286130dc565b8080421115611f4a57604051631ab7da6b60e01b815260040160405180910390fd5b6002831015611f6c5760405163162908e360e11b815260040160405180910390fd5b5f80805b858110156120755733611f9a888884818110611f8e57611f8e614ef6565b90506020020135611b92565b6001600160a01b031614611fc1576040516359dc379f60e01b815260040160405180910390fd5b5f60665f898985818110611fd757611fd7614ef6565b602090810292909201358352508181019290925260409081015f20815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152915061204a908561501e565b93508263ffffffff16816040015163ffffffff16111561206c57806040015192505b50600101611f70565b505f6120814283614fd8565b905062ed4e0063ffffffff821611156120ad57604051637616640160e01b815260040160405180910390fd5b5f62ed4e006120cd670de0b6b3a76400006001600160801b038716614fa5565b6120d79190614f4a565b90505f6065601481819054906101000a900463ffffffff166120f89061503d565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff169050612127338261357e565b5f5b88811015612212575f8a8a8381811061214457612144614ef6565b602090810292909201355f818152606684526040808220815160808101835281546001600160801b038082168352600160801b909104168188015260019091015463ffffffff808216838501908152600160201b90920481166060840152835180850185528351600f0b8152915116818801528251808401909352838352958201929092529194509291506121dc9084908390613122565b5f838152606660205260408120908155600101805467ffffffffffffffff1916905561220783613597565b505050600101612129565b50604080518082018252600f87900b815263ffffffff861660208083019190915282518084019093525f808452908301529061225090839083613122565b604080516080810182526001600160801b038089168252858116602080840191825263ffffffff808b16858701908152428216606087019081525f8a815260668552888120975195518716600160801b0295909616949094178655516001958601805494518316600160201b0267ffffffffffffffff1990951691909216179290921790915533808352606790915290839020805460ff8082168f900390940190931660ff199093169290921790915590518391907fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f85978289349549061234e908a908a906001600160801b0392909216825263ffffffff16602082015260400190565b60405180910390a35050505050505061115b60015f55565b61236e613085565b6123766130dc565b818042111561239857604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b90049092166060830152869190158015906124155750806040015163ffffffff164263ffffffff16105b156125585780515f9061243a90670de0b6b3a7640000906001600160801b0316614f4a565b90505f612457670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b031690505f612478670de0b6b3a764000062ed4e00614f7c565b6001600160801b031661248b8385614fa5565b6124959190614f4a565b90505f819050806001600160801b031685602001516001600160801b0316146125535761250b866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613122565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b3261256288611b92565b6001600160a01b031614612589576040516359dc379f60e01b815260040160405180910390fd5b856001600160801b03165f036125b25760405163162908e360e11b815260040160405180910390fd5b5f878152606660205260408120805490916001600160801b0390911690036125ed57604051632254ea3d60e11b815260040160405180910390fd5b600181015463ffffffff908116429091161061261c576040516307b7d7dd60e51b815260040160405180910390fd5b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612662573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126869190614ff4565b6064549091506126aa906001600160a01b031633306001600160801b038c16613513565b6126bd6001600160801b0389168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612703573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127279190614ff4565b14612745576040516312171d8360e31b815260040160405180910390fd5b6127508989886138a6565b5050505050610f4560015f55565b6127666135ff565b606f805460ff60a01b1916600160a01b179055612781613302565b606f546040516001600160a01b0390911681527fc0a1c7e9f05b4d536e1ff8606bae9b847cdb43ef4a9b2d7a503a88cee08dccdb906020015b60405180910390a1565b60605f6127d08361304c565b6001600160a01b0316036127f657604051626f708760e21b815260040160405180910390fd5b606d546001600160a01b031661281f576040516338a69c8d60e21b815260040160405180910390fd5b606d54604051602481018490525f9182916001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b031663c87b56dd60e01b179052516128749190615061565b5f60405180830381855afa9150503d805f81146128ac576040519150601f19603f3d011682016040523d82523d5f602084013e6128b1565b606091505b5091509150816128fb5760405162461bcd60e51b8152602060048201526015602482015274105c9d081c1c9bde1e4818d85b1b0819985a5b1959605a1b6044820152606401611a4e565b8080602001905181019061290f9190615077565b949350505050565b5f63ffffffff82161580612933575062ed4e0063ffffffff8316115b1561295157604051637616640160e01b815260040160405180910390fd5b826001600160801b03165f0361297a5760405163162908e360e11b815260040160405180910390fd5b5f6129848461313b565b905061290f8184613165565b5f828152606a602052604081205463ffffffff168082036129b4575f91505061088c565b604080516080810182525f808252602082018190529181018290526060810191909152815b60018163ffffffff1610612ad0575f868152606b6020908152604080832063ffffffff80861685529083529281902081516080810183528154600f81810b8352600160801b909104900b9381019390935260010154808416918301829052600160201b90048316606083015290935090861610612abe575f826040015186612a619190614fd8565b63ffffffff169050670de0b6b3a7640000818460200151612a8291906150ec565b612a8c919061510b565b8351612a989190615147565b600f0b8084525f1315612aa9575f83525b5050516001600160801b0316915061088c9050565b80612ac881615174565b9150506129d9565b505f95945050505050565b606d545f90819063ffffffff600160a01b909104811690841611612aff5782612b19565b606d54612b1990600160a01b900463ffffffff1684614fd8565b90505f62ed4e00612b3a670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b0316866001600160801b0316612b579190614fa5565b612b619190614f4a565b905080612b7d63ffffffff84166001600160801b038316614fa5565b611e4390670de0b6b3a764000061500b565b5f612b98613085565b612ba06130dc565b8280421115612bc257604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f03612beb5760405163162908e360e11b815260040160405180910390fd5b63ffffffff85161580612c06575062ed4e0063ffffffff8616115b15612c2457604051637616640160e01b815260040160405180910390fd5b335f90815260676020526040902054606460ff90911610612c585760405163133cbc4f60e01b815260040160405180910390fd5b5f612c638642614fbc565b90505f5f612c7289898861346d565b915091505f60405180604001604052808b600f0b81526020018563ffffffff168152509050612cbf5f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613122565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612d05573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d299190614ff4565b606454909150612d4d906001600160a01b031633306001600160801b038f16613513565b612d606001600160801b038c168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612da6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dca9190614ff4565b14612de8576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b1990931692909217909255335f818152606760205260409020805460ff80821690950190941660ff19909416939093179092559750612e4b908861357e565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff199094169290911691909117919091179055612edf8b84613247565b604080516001600160801b038d16815263ffffffff87166020820152889133917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061290f60015f55565b6001600160a01b039182165f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b612f8d6135ff565b6001600160a01b038116612fb657604051631e4fbdf760e01b81525f6004820152602401611a4e565b61198b8161365a565b612fc76135ff565b611c05613a78565b5f5f612fda8361304c565b90506001600160a01b03811661088c57604051637e27328960e01b815260048101849052602401611a4e565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b61115b8383836001613ab1565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60025f54036130d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611a4e565b60025f55565b60325460ff1615611c055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611a4e565b61312a613bc4565b821561115b5761115b838383613d36565b5f62ed4e0061315b670de0b6b3a76400006001600160801b038516614fa5565b61088c9190614f4a565b5f826001600160801b03165f036131855750670de0b6b3a764000061088c565b5f61319f63ffffffff84166001600160801b038616614fa5565b90505f6131b862ed4e006001600160801b038716614fa5565b6131d2670de0b6b3a7640000673782dace9d900000614f5d565b6131e5906001600160801b031684614fa5565b6131ef9190614f4a565b61320190670de0b6b3a764000061500b565b9050673782dace9d90000081111561322557673782dace9d9000009250505061088c565b670de0b6b3a764000081101561290f57670de0b6b3a76400009250505061088c565b5f670de0b6b3a76400006132676001600160801b03848116908616614fa5565b6132719190614f4a565b606e805491925082915f906132909084906001600160801b031661501e565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b60015f55565b6132c7613f7c565b6109528282613fc5565b6132d9613f7c565b611c05613ff5565b6132e9613f7c565b611c05613ffd565b6132f9613f7c565b61198b81614011565b61330a6130dc565b6032805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861333f3390565b6040516001600160a01b0390911681526020016127ba565b6001600160a01b0382161580159061337957506065546001600160a01b031615155b156109525760655460405163379607f560e01b8152600481018390526001600160a01b039091169063379607f5906024016020604051808303815f875af11580156133c6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115b9190614ff4565b6001600160a01b03821661341357604051633250574960e11b81525f6004820152602401611a4e565b5f61341f838333614019565b9050836001600160a01b0316816001600160a01b031614610f45576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401611a4e565b5f8062ed4e0061348e670de0b6b3a76400006001600160801b038816614fa5565b6134989190614f4a565b91506134a48285613165565b9050673782dace9d9000006001600160801b03821611156134d857604051638f651fb760e01b815260040160405180910390fd5b826001600160801b0316816001600160801b0316101561350b57604051638199f5f360e01b815260040160405180910390fd5b935093915050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f459085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261411b565b610952828260405180602001604052805f8152506141ee565b5f6135a35f835f614019565b90506001600160a01b03811661095257604051637e27328960e01b815260048101839052602401611a4e565b6040516001600160a01b03831660248201526044810182905261115b90849063a9059cbb60e01b90606401613547565b336136317f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611c055760405163118cdaa760e01b8152336004820152602401611a4e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f5f8390505f62093a808083604001516136e49190615192565b6136ee91906151b9565b90505f5b60ff8110156137ba5761370862093a8083614fbc565b91505f63ffffffff80871690841611156137245785925061373e565b5063ffffffff82165f908152606c6020526040902054600f0b5b604084015161374d9084614fd8565b63ffffffff16846020015161376291906150ec565b84518590613771908390615147565b600f0b90525063ffffffff8087169084160361378d57506137ba565b808460200181815161379f91906151d8565b600f0b9052505063ffffffff821660408401526001016136f2565b505f825f0151600f0b12156137cd575f82525b50516001600160801b03169392505050565b5f5160206153ad5f395f51905f526001600160a01b03831661381f57604051630b61174360e31b81526001600160a01b0384166004820152602401611a4e565b6001600160a01b038481165f818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b613899848484611146565b610f453385858585614201565b5f838152606660205260408120805490916001600160801b03909116906138cd858361501e565b600184015490915063ffffffff165f6138e64283614fd8565b90505f6138f28461313b565b90505f6138ff8284613165565b90505f61390b8b611cb1565b9050806001600160801b0316826001600160801b03161161392c578061392e565b815b91506139446103e8670de0b6b3a7640000615205565b6001600160801b03168a6001600160801b03161180156139755750886001600160801b0316826001600160801b0316105b1561399357604051638199f5f360e01b815260040160405180910390fd5b6139d88b60405180604001604052808a600f0b81526020018863ffffffff1681525060405180604001604052808a600f0b81526020018963ffffffff16815250613122565b6001600160801b03838116600160801b0290871617885560018801805463ffffffff4216600160201b0267ffffffff0000000019909116179055613a1c8a83613247565b604080516001600160801b038c81168252888116602083015284168183015290518c9133917f1381e2f7d0d4b71a58d34dc3db2051dd52769766e65eabf380c9b4ea93f0890b9181900360600190a35050505050505050505050565b613a80614329565b6032805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361333f565b5f5160206153ad5f395f51905f528180613ad357506001600160a01b03831615155b15613b94575f613ae285612fcf565b90506001600160a01b03841615801590613b0e5750836001600160a01b0316816001600160a01b031614155b8015613b215750613b1f8185612f39565b155b15613b4a5760405163a9fbf51f60e01b81526001600160a01b0385166004820152602401611a4e565b8215613b925784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5f93845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b60695463ffffffff16613bf6604080516080810182525f80825260208201819052918101829052606081019190915290565b63ffffffff821615613c6f5760685f613c10600185614fd8565b63ffffffff908116825260208083019390935260409182015f2082516080810184528154600f81810b8352600160801b909104900b948101949094526001015480821692840192909252600160201b9091041660608201529050613c9c565b50604080516080810182525f808252602082015263ffffffff428116928201929092524390911660608201525b60408101515f63ffffffff808316429091161115613cfd576040830151613cc99063ffffffff1642615232565b6060840151613cde9063ffffffff1643615232565b613cf090670de0b6b3a7640000614fa5565b613cfa9190614f4a565b90505b613d0983838387614372565b9250613d16846001614fbc565b6069805463ffffffff191663ffffffff9290921691909117905550505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091524263ffffffff16846020015163ffffffff16118015613da057505f845f0151600f0b135b15613e1257835162ed4e0090613dbf90670de0b6b3a7640000906150ec565b613dc9919061510b565b600f0b602080840191909152840151670de0b6b3a764000090613ded904290614fd8565b63ffffffff168360200151613e0291906150ec565b613e0c919061510b565b600f0b82525b4263ffffffff16836020015163ffffffff16118015613e3657505f835f0151600f0b135b15613ea857825162ed4e0090613e5590670de0b6b3a7640000906150ec565b613e5f919061510b565b600f0b602080830191909152830151670de0b6b3a764000090613e83904290614fd8565b63ffffffff168260200151613e9891906150ec565b613ea2919061510b565b600f0b81525b613ebc848484602001518460200151614577565b5f858152606a6020526040812054613edb9063ffffffff166001614fbc565b5f878152606a60209081526040808320805463ffffffff95861663ffffffff199091168117909155428516878301908152438616606089019081529b8552606b84528285209185529083529220855195909101516001600160801b03908116600160801b02951694909417845551600193909301805497518216600160201b0267ffffffffffffffff19909816939091169290921795909517905550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611c0557604051631afcd79f60e31b815260040160405180910390fd5b613fcd613f7c565b5f5160206153ad5f395f51905f5280613fe68482615289565b5060018101610f458382615289565b6132b9613f7c565b614005613f7c565b6032805460ff19169055565b612f8d613f7c565b5f5f5160206153ad5f395f51905f52816140328561304c565b90506001600160a01b0384161561404e5761404e8185876146b2565b6001600160a01b0381161561408a576140695f865f5f613ab1565b6001600160a01b0381165f908152600383016020526040902080545f190190555b6001600160a01b038616156140ba576001600160a01b0386165f9081526003830160205260409020805460010190555b5f85815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b5f61416f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147169092919063ffffffff16565b905080515f148061418f57508080602001905181019061418f9190615344565b61115b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a4e565b6141f88383614724565b61115b335f8585855b6001600160a01b0383163b1561432257604051630a85bd0160e11b81526001600160a01b0384169063150b7a029061424390889088908790879060040161535f565b6020604051808303815f875af192505050801561427d575060408051601f3d908101601f1916820190925261427a91810190615391565b60015b6142e4573d8080156142aa576040519150601f19603f3d011682016040523d82523d5f602084013e6142af565b606091505b5080515f036142dc57604051633250574960e11b81526001600160a01b0385166004820152602401611a4e565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1461432057604051633250574960e11b81526001600160a01b0385166004820152602401611a4e565b505b5050505050565b60325460ff16611c055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611a4e565b604080516080810182525f808252602082018190529181018290526060810191909152845f62093a806143a58188615192565b6143af91906151b9565b90505f5b60ff81101561456b576143c962093a8083614fbc565b91505f63ffffffff42811690841611156143e5574292506143ff565b5063ffffffff82165f908152606c6020526040902054600f0b5b6144098884614fd8565b63ffffffff16896020015161441e91906150ec565b89518a9061442d908390615147565b600f0b9052506020890180518291906144479083906151d8565b600f0b90525063ffffffff83166040808b0191909152840151670de0b6b3a7640000906144749085614fd8565b61448d9063ffffffff166001600160801b038a16614fa5565b6144979190614f4a565b846060015163ffffffff166144ac919061500b565b63ffffffff90811660608b0152428116908416036144d6575063ffffffff4316606089015261456b565b8860685f846144e68a6001614fbc565b6144f09190614fbc565b63ffffffff908116825260208083019390935260409182015f208451938501516001600160801b03908116600160801b02941693909317835590830151600190920180546060909401518216600160201b0267ffffffffffffffff1990941692909116919091179190911790555090955085906001016143b3565b50959695505050505050565b4263ffffffff16846020015163ffffffff1611156146185760208085015163ffffffff165f908152606c9091526040902054600f0b6145b683826151d8565b9050846020015163ffffffff16846020015163ffffffff16036145e0576145dd8282615147565b90505b60208581015163ffffffff165f908152606c9091526040902080546001600160801b0319166001600160801b03929092169190911790555b4263ffffffff16836020015163ffffffff161115610f4557836020015163ffffffff16836020015163ffffffff161115610f455760208084015163ffffffff165f908152606c9091526040902054600f0b6146738282615147565b60208086015163ffffffff165f908152606c9091526040902080546001600160801b039092166001600160801b03199092169190911790555050505050565b6146bd838383614785565b61115b576001600160a01b0383166146eb57604051637e27328960e01b815260048101829052602401611a4e565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401611a4e565b606061290f84845f856147e9565b6001600160a01b03821661474d57604051633250574960e11b81525f6004820152602401611a4e565b5f61475983835f614019565b90506001600160a01b0381161561115b576040516339e3563760e11b81525f6004820152602401611a4e565b5f6001600160a01b0383161580159061290f5750826001600160a01b0316846001600160a01b031614806147be57506147be8484612f39565b8061290f5750826001600160a01b03166147d783613006565b6001600160a01b031614949350505050565b60608247101561484a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a4e565b5f5f866001600160a01b031685876040516148659190615061565b5f6040518083038185875af1925050503d805f811461489f576040519150601f19603f3d011682016040523d82523d5f602084013e6148a4565b606091505b5091509150611265878383876060831561491e5782515f03614917576001600160a01b0385163b6149175760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a4e565b508161290f565b61290f83838151156149335781518083602001fd5b8060405162461bcd60e51b8152600401611a4e91906149ab565b6001600160e01b03198116811461198b575f5ffd5b5f60208284031215614972575f5ffd5b8135611ef08161494d565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f611ef0602083018461497d565b5f602082840312156149cd575f5ffd5b5035919050565b80356001600160a01b03811681146149ea575f5ffd5b919050565b5f5f60408385031215614a00575f5ffd5b614a09836149d4565b946020939093013593505050565b5f60208284031215614a27575f5ffd5b611ef0826149d4565b602080825282518282018190525f918401906040840190835b81811015614a67578351835260209384019390920191600101614a49565b509095945050505050565b803563ffffffff811681146149ea575f5ffd5b5f5f60408385031215614a96575f5ffd5b82359150614aa660208401614a72565b90509250929050565b80356001600160801b03811681146149ea575f5ffd5b5f5f5f5f60808587031215614ad8575f5ffd5b84359350614ae860208601614a72565b925060408501359150614afd60608601614aaf565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614b4557614b45614b08565b604052919050565b5f67ffffffffffffffff821115614b6657614b66614b08565b50601f01601f191660200190565b5f614b86614b8184614b4d565b614b1c565b9050828152838383011115614b99575f5ffd5b828260208301375f602084830101529392505050565b5f82601f830112614bbe575f5ffd5b611ef083833560208501614b74565b5f5f5f5f60808587031215614be0575f5ffd5b614be9856149d4565b9350614bf7602086016149d4565b9250604085013567ffffffffffffffff811115614c12575f5ffd5b614c1e87828801614baf565b925050606085013567ffffffffffffffff811115614c3a575f5ffd5b614c4687828801614baf565b91505092959194509250565b5f5f5f60608486031215614c64575f5ffd5b614c6d846149d4565b9250614c7b602085016149d4565b929592945050506040919091013590565b5f5f5f5f5f60a08688031215614ca0575f5ffd5b614ca9866149d4565b9450614cb760208701614aaf565b9350614cc560408701614a72565b925060608601359150614cda60808701614aaf565b90509295509295909350565b5f60208284031215614cf6575f5ffd5b611ef082614a72565b801515811461198b575f5ffd5b5f5f60408385031215614d1d575f5ffd5b614d26836149d4565b91506020830135614d3681614cff565b809150509250929050565b5f5f5f5f60808587031215614d54575f5ffd5b614d5d856149d4565b9350614d6b602086016149d4565b925060408501359150606085013567ffffffffffffffff811115614d8d575f5ffd5b8501601f81018713614d9d575f5ffd5b614c4687823560208401614b74565b5f5f5f60408486031215614dbe575f5ffd5b833567ffffffffffffffff811115614dd4575f5ffd5b8401601f81018613614de4575f5ffd5b803567ffffffffffffffff811115614dfa575f5ffd5b8660208260051b8401011115614e0e575f5ffd5b6020918201979096509401359392505050565b5f5f5f5f60808587031215614e34575f5ffd5b84359350614ae860208601614aaf565b5f5f60408385031215614e55575f5ffd5b614e5e83614aaf565b9150614aa660208401614a72565b5f5f5f5f60808587031215614e7f575f5ffd5b614e8885614aaf565b9350614ae860208601614a72565b5f5f60408385031215614ea7575f5ffd5b614eb0836149d4565b9150614aa6602084016149d4565b600181811c90821680614ed257607f821691505b602082108103614ef057634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201614f2f57614f2f614f0a565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f82614f5857614f58614f36565b500490565b6001600160801b03828116828216039081111561088c5761088c614f0a565b6001600160801b038181168382160290811690818114614f9e57614f9e614f0a565b5092915050565b808202811582820484141761088c5761088c614f0a565b63ffffffff818116838216019081111561088c5761088c614f0a565b63ffffffff828116828216039081111561088c5761088c614f0a565b5f60208284031215615004575f5ffd5b5051919050565b8082018082111561088c5761088c614f0a565b6001600160801b03818116838216019081111561088c5761088c614f0a565b5f63ffffffff821663ffffffff810361505857615058614f0a565b60010192915050565b5f82518060208501845e5f920191825250919050565b5f60208284031215615087575f5ffd5b815167ffffffffffffffff81111561509d575f5ffd5b8201601f810184136150ad575f5ffd5b80516150bb614b8182614b4d565b8181528560208385010111156150cf575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f82600f0b82600f0b0280600f0b9150808214614f9e57614f9e614f0a565b5f81600f0b83600f0b8061512157615121614f36565b60016001607f1b031982145f198214161561513e5761513e614f0a565b90059392505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b038213171561088c5761088c614f0a565b5f63ffffffff82168061518957615189614f0a565b5f190192915050565b5f63ffffffff8316806151a7576151a7614f36565b8063ffffffff84160491505092915050565b63ffffffff8181168382160290811690818114614f9e57614f9e614f0a565b600f81810b9083900b0160016001607f1b03811360016001607f1b03198212171561088c5761088c614f0a565b5f6001600160801b0383168061521d5761521d614f36565b806001600160801b0384160491505092915050565b8181038181111561088c5761088c614f0a565b601f82111561115b57805f5260205f20601f840160051c8101602085101561526a5750805b601f840160051c820191505b81811015614322575f8155600101615276565b815167ffffffffffffffff8111156152a3576152a3614b08565b6152b7816152b18454614ebe565b84615245565b6020601f8211600181146152e9575f83156152d25750848201515b5f19600385901b1c1916600184901b178455614322565b5f84815260208120601f198516915b8281101561531857878501518255602094850194600190920191016152f8565b508482101561533557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215615354575f5ffd5b8151611ef081614cff565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90611e439083018461497d565b5f602082840312156153a1575f5ffd5b8151611ef08161494d56fe80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300a26469706673582212200e1289de6d63347d6b2d8403f46866f5755bcf23805297a4c9297cf07412023164736f6c634300081b0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c806375619ab51161017b578063bbe33ea5116100e4578063ddacc94a1161009e578063e58f594711610079578063e58f5947146107ee578063e985e9c514610813578063f2fde38b14610826578063f7b188a514610839575f5ffd5b8063ddacc94a146107b5578063df0c78ef146107c8578063df215157146107db575f5ffd5b8063bbe33ea51461073f578063bcc0022514610752578063beb8310914610774578063c5b1c7d014610787578063c87b56dd1461078f578063d89dd269146107a2575f5ffd5b806395d89b411161013557806395d89b41146106a257806397612d4b146106aa57806398a3f422146106bd5780639b7d02ad146106dc578063a22cb46514610719578063b88d4fde1461072c575f5ffd5b806375619ab51461055d57806389f839c6146105705780638b25e8c1146105f35780638da5cb5b146106065780638ff4249014610636578063900cf0cf1461067d575f5ffd5b8063268dc1991161021d5780635594a045116101d75780635594a045146104dc578063586c2600146104ef5780635c975abb146105245780636352211e1461052f57806370a0823114610542578063715018a614610555575f5ffd5b8063268dc1991461045e5780632a90752d1461046f5780632e1a7d4d146104905780632e720f7d146104a357806342842e0e146104b65780635312ea8e146104c9575f5ffd5b80631d237a491161026e5780631d237a49146103635780631f5ab022146103e85780632016a0d2146103fb57806320a194b81461040e57806323b872dd1461042057806324c44c5b14610433575f5ffd5b806301ffc9a7146102b557806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d5780630f45cc811461033257806313de148b14610343575b5f5ffd5b6102c86102c3366004614962565b610841565b60405190151581526020015b60405180910390f35b6102e5610892565b6040516102d491906149ab565b6103056103003660046149bd565b610933565b6040516001600160a01b0390911681526020016102d4565b61033061032b3660046149ef565b610947565b005b6064546001600160a01b0316610305565b610356610351366004614a17565b610956565b6040516102d49190614a30565b6103b5610371366004614a85565b606b60209081525f928352604080842090915290825290208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60408051600f95860b81529390940b602084015263ffffffff9182169383019390935290911660608201526080016102d4565b6103306103f6366004614ac5565b610a4b565b610330610409366004614bcd565b610f4b565b606f54600160a01b900460ff166102c8565b61033061042e366004614c52565b611146565b610446610441366004614a85565b611160565b6040516001600160801b0390911681526020016102d4565b606e546001600160801b0316610446565b61048261047d366004614c8c565b611270565b6040519081526020016102d4565b61033061049e3660046149bd565b611665565b6103306104b1366004614a17565b61198e565b6103306104c4366004614c52565b6119df565b6103306104d73660046149bd565b6119f9565b606d54610305906001600160a01b031681565b6105116104fd366004614ce6565b606c6020525f9081526040902054600f0b81565b604051600f9190910b81526020016102d4565b60325460ff166102c8565b61030561053d3660046149bd565b611b92565b610482610550366004614a17565b611b9c565b610330611bf4565b61033061056b366004614a17565b611c07565b6105bc61057e3660046149bd565b60666020525f9081526040902080546001909101546001600160801b0380831692600160801b9004169063ffffffff80821691600160201b90041684565b604080516001600160801b03958616815294909316602085015263ffffffff918216928401929092521660608201526080016102d4565b6104466106013660046149bd565b611cb1565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610305565b6103b5610644366004614ce6565b60686020525f908152604090208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60695461068d9063ffffffff1681565b60405163ffffffff90911681526020016102d4565b6102e5611e4d565b6104466106b8366004614ce6565b611e8b565b6104826106cb3660046149bd565b60706020525f908152604090205481565b6107076106ea366004614a17565b6001600160a01b03165f9081526067602052604090205460ff1690565b60405160ff90911681526020016102d4565b610330610727366004614d0c565b611ef7565b61033061073a366004614d41565b611f02565b61033061074d366004614dac565b611f18565b610707610760366004614a17565b60676020525f908152604090205460ff1681565b610330610782366004614e21565b612366565b61033061275e565b6102e561079d3660046149bd565b6127c4565b6104466107b0366004614e44565b612917565b6104466107c3366004614a85565b612990565b6104466107d6366004614e44565b612adb565b6104826107e9366004614e6c565b612b8f565b61068d6107fc3660046149bd565b606a6020525f908152604090205463ffffffff1681565b6102c8610821366004614e96565b612f39565b610330610834366004614a17565b612f85565b610330612fbf565b5f6001600160e01b031982166380ac58cd60e01b148061087157506001600160e01b03198216635b5e139f60e01b145b8061088c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f5160206153ad5f395f51905f5280546060919081906108b190614ebe565b80601f01602080910402602001604051908101604052809291908181526020018280546108dd90614ebe565b80156109285780601f106108ff57610100808354040283529160200191610928565b820191905f5260205f20905b81548152906001019060200180831161090b57829003601f168201915b505050505091505090565b5f61093d82612fcf565b5061088c82613006565b61095282823361303f565b5050565b6001600160a01b0381165f9081526067602052604090205460609060ff168067ffffffffffffffff81111561098d5761098d614b08565b6040519080825280602002602001820160405280156109b6578160200160208202803683370190505b5091508060ff165f036109c95750919050565b5f805b606554600160a01b900463ffffffff16811015610a4357846001600160a01b03166109f68261304c565b6001600160a01b031603610a3b5780848381518110610a1757610a17614ef6565b602090810291909101015281610a2c81614f1e565b9250508260ff16821015610a43575b6001016109cc565b505050919050565b610a53613085565b610a5b6130dc565b8180421115610a7d57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b9004909216606083015286919015801590610afa5750806040015163ffffffff164263ffffffff16105b15610c3d5780515f90610b1f90670de0b6b3a7640000906001600160801b0316614f4a565b90505f610b3c670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b031690505f610b5d670de0b6b3a764000062ed4e00614f7c565b6001600160801b0316610b708385614fa5565b610b7a9190614f4a565b90505f819050806001600160801b031685602001516001600160801b031614610c3857610bf0866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613122565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b33610c4788611b92565b6001600160a01b031614610c6e576040516359dc379f60e01b815260040160405180910390fd5b5f878152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b900490911660608201529103610ce957604051632254ea3d60e11b815260040160405180910390fd5b5f878260400151610cfa9190614fbc565b90505f610d074283614fd8565b905062ed4e0063ffffffff82161115610d3357604051637616640160e01b815260040160405180910390fd5b5f610d40845f015161313b565b90505f610d4d8284613165565b9050886001600160801b0316816001600160801b03161015610d8257604051638199f5f360e01b815260040160405180910390fd5b8451610d8e9082613247565b610ddd8c6040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b81526020018863ffffffff16815250613122565b6040518060800160405280865f01516001600160801b03168152602001836001600160801b031681526020018563ffffffff1681526020014263ffffffff1681525060665f8e81526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055509050508b336001600160a01b03167f3032be442129e161b4ae1cdee94871a69de2c16ee2007f31fc209a715673455c8684604051610f2c92919063ffffffff9290921682526001600160801b0316602082015260400190565b60405180910390a35050505050505050610f4560015f55565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610f905750825b90505f8267ffffffffffffffff166001148015610fac5750303b155b905081158015610fba575080155b15610fd85760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561100257845460ff60401b1916600160401b1785555b6001600160a01b038916158061101f57506001600160a01b038816155b1561103d5760405163d92e233d60e01b815260040160405180910390fd5b61104787876132bf565b61104f6132d1565b6110576132e1565b611060336132f1565b611068613302565b606480546001600160a01b03808c166001600160a01b031992831617909255606f8054928b16929091169190911790555f805260686020527fad6f8124f6081c2622ab3a16acd47af73d52fe87b755c3f897263c58ba3fdbd880544263ffffffff90811663ffffffff194392909216600160201b029190911667ffffffffffffffff1990921691909117179055831561113b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6111508382613357565b61115b8383836133ea565b505050565b5f8163ffffffff165f0361118757604051637616640160e01b815260040160405180910390fd5b5f838152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361120257604051632254ea3d60e11b815260040160405180910390fd5b5f8382604001516112139190614fbc565b90505f6112204283614fd8565b905062ed4e0063ffffffff8216111561124c57604051637616640160e01b815260040160405180910390fd5b5f611259845f015161313b565b90506112658183613165565b979650505050505050565b5f611279613085565b6112816130dc565b82804211156112a357604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f036112cc5760405163162908e360e11b815260040160405180910390fd5b63ffffffff851615806112e7575062ed4e0063ffffffff8616115b1561130557604051637616640160e01b815260040160405180910390fd5b6001600160a01b03871661132c5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0387165f90815260676020526040902054606460ff909116106113695760405163133cbc4f60e01b815260040160405180910390fd5b5f6113748642614fbc565b90505f5f61138389898861346d565b915091505f60405180604001604052808b600f0b81526020018563ffffffff1681525090506113d05f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613122565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061143a9190614ff4565b60645490915061145e906001600160a01b031633306001600160801b038f16613513565b6114716001600160801b038c168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114db9190614ff4565b146114f9576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b19909316929092179092556001600160a01b038e165f908152606760205260409020805460ff80821690940190931660ff199093169290921790915596506115658c8861357e565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff1990941692909116919091179190911790556115f98b84613247565b604080516001600160801b038d16815263ffffffff8716602082015288916001600160a01b038f16917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061165c60015f55565b95945050505050565b61166d613085565b5f6116778261304c565b90506001600160a01b03811661169f57604051626f708760e21b815260040160405180910390fd5b6001600160a01b03811633146116c8576040516359dc379f60e01b815260040160405180910390fd5b5f828152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361174357604051632254ea3d60e11b815260040160405180910390fd5b806040015163ffffffff164263ffffffff1610156117745760405163342ad40160e11b815260040160405180910390fd5b8051604080518082018252600f83900b81528184015163ffffffff166020808301919091525f8781526066909152918220828155600101805467ffffffffffffffff19169055906117c486611cb1565b90505f670de0b6b3a76400006117e66001600160801b03808516908716614fa5565b6117f09190614f4a565b9050816001600160801b0316846001600160801b0316826118119190614f4a565b1461182f57604051630fc12e3560e11b815260040160405180910390fd5b5f611842670de0b6b3a764000083614f4a565b90506001600160801b0381111561186c5760405163162908e360e11b815260040160405180910390fd5b606e80548291905f906118899084906001600160801b0316614f5d565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506118d5888560405180604001604052805f600f0b81526020015f63ffffffff16815250613122565b5f888152606a60205260409020805463ffffffff191690556118f688613597565b335f818152606760205260409020805460ff19811660ff9182165f190190911617905560645461193b916001600160a01b03909116906001600160801b0388166135cf565b6040516001600160801b0386168152889033907f8903a5b5d08a841e7f68438387f1da20c84dea756379ed37e633ff3854b99b849060200160405180910390a35050505050505061198b60015f55565b50565b6119966135ff565b6001600160a01b0381166119bd5760405163d92e233d60e01b815260040160405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b61115b83838360405180602001604052805f815250611f02565b611a01613085565b606f54600160a01b900460ff16611a575760405162461bcd60e51b81526020600482015260156024820152744e6f7420696e20656d657267656e6379206d6f646560581b60448201526064015b60405180910390fd5b33611a6182611b92565b6001600160a01b031614611a88576040516359dc379f60e01b815260040160405180910390fd5b5f818152606660208181526040808420815160808101835281546001600160801b03808216808452600160801b909204168286015260018301805463ffffffff80821696850196909652600160201b810490951660608401528888529590945294905567ffffffffffffffff1916909155611b0283613597565b335f818152606760205260409020805460ff19811660ff9182165f1901909116179055606454611b47916001600160a01b03909116906001600160801b0384166135cf565b6040516001600160801b0382168152839033907f4f27eb511b2a4633cfb633ac1c4a99b4c298ca6488b29ec26f3504a5927f67289060200160405180910390a3505061198b60015f55565b5f61088c82612fcf565b5f5f5160206153ad5f395f51905f526001600160a01b038316611bd4576040516322718ad960e21b81525f6004820152602401611a4e565b6001600160a01b039092165f908152600390920160205250604090205490565b611bfc6135ff565b611c055f61365a565b565b611c0f6135ff565b6001600160a01b038116611c365760405163d92e233d60e01b815260040160405180910390fd5b6065546001600160a01b031615611c8f5760405162461bcd60e51b815260206004820152601760248201527f4469737472696275746f7220616c7265616479207365740000000000000000006044820152606401611a4e565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152606660209081526040808320815160808101835281546001600160801b038082168352600160801b90910416938101939093526001015463ffffffff808216928401839052600160201b90910481166060840152421610611d205750670de0b6b3a764000092915050565b5f611d36670de0b6b3a764000062ed4e00614f7c565b6001600160801b0316611d59670de0b6b3a7640000673782dace9d900000614f5d565b8351611d71916001600160801b039081169116614fa5565b611d7b9190614f4a565b90506001600160801b03811115611da55760405163162908e360e11b815260040160405180910390fd5b604082015181905f90611db9904290614fd8565b90505f611dd563ffffffff83166001600160801b038516614fa5565b611de790670de0b6b3a764000061500b565b9050673782dace9d9000006001600160801b0382161115611e165750673782dace9d9000009695505050505050565b670de0b6b3a76400006001600160801b0382161015611e435750670de0b6b3a76400009695505050505050565b9695505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060915f5160206153ad5f395f51905f52916108b190614ebe565b60695463ffffffff9081165f90815260686020908152604080832081516080810183528154600f81810b8352600160801b909104900b938101939093526001015480851691830191909152600160201b9004909216606083015290611ef081846136ca565b9392505050565b6109523383836137df565b611f0c8483613357565b610f458484848461388e565b611f20613085565b611f286130dc565b8080421115611f4a57604051631ab7da6b60e01b815260040160405180910390fd5b6002831015611f6c5760405163162908e360e11b815260040160405180910390fd5b5f80805b858110156120755733611f9a888884818110611f8e57611f8e614ef6565b90506020020135611b92565b6001600160a01b031614611fc1576040516359dc379f60e01b815260040160405180910390fd5b5f60665f898985818110611fd757611fd7614ef6565b602090810292909201358352508181019290925260409081015f20815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152915061204a908561501e565b93508263ffffffff16816040015163ffffffff16111561206c57806040015192505b50600101611f70565b505f6120814283614fd8565b905062ed4e0063ffffffff821611156120ad57604051637616640160e01b815260040160405180910390fd5b5f62ed4e006120cd670de0b6b3a76400006001600160801b038716614fa5565b6120d79190614f4a565b90505f6065601481819054906101000a900463ffffffff166120f89061503d565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff169050612127338261357e565b5f5b88811015612212575f8a8a8381811061214457612144614ef6565b602090810292909201355f818152606684526040808220815160808101835281546001600160801b038082168352600160801b909104168188015260019091015463ffffffff808216838501908152600160201b90920481166060840152835180850185528351600f0b8152915116818801528251808401909352838352958201929092529194509291506121dc9084908390613122565b5f838152606660205260408120908155600101805467ffffffffffffffff1916905561220783613597565b505050600101612129565b50604080518082018252600f87900b815263ffffffff861660208083019190915282518084019093525f808452908301529061225090839083613122565b604080516080810182526001600160801b038089168252858116602080840191825263ffffffff808b16858701908152428216606087019081525f8a815260668552888120975195518716600160801b0295909616949094178655516001958601805494518316600160201b0267ffffffffffffffff1990951691909216179290921790915533808352606790915290839020805460ff8082168f900390940190931660ff199093169290921790915590518391907fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f85978289349549061234e908a908a906001600160801b0392909216825263ffffffff16602082015260400190565b60405180910390a35050505050505061115b60015f55565b61236e613085565b6123766130dc565b818042111561239857604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b90049092166060830152869190158015906124155750806040015163ffffffff164263ffffffff16105b156125585780515f9061243a90670de0b6b3a7640000906001600160801b0316614f4a565b90505f612457670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b031690505f612478670de0b6b3a764000062ed4e00614f7c565b6001600160801b031661248b8385614fa5565b6124959190614f4a565b90505f819050806001600160801b031685602001516001600160801b0316146125535761250b866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613122565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b3261256288611b92565b6001600160a01b031614612589576040516359dc379f60e01b815260040160405180910390fd5b856001600160801b03165f036125b25760405163162908e360e11b815260040160405180910390fd5b5f878152606660205260408120805490916001600160801b0390911690036125ed57604051632254ea3d60e11b815260040160405180910390fd5b600181015463ffffffff908116429091161061261c576040516307b7d7dd60e51b815260040160405180910390fd5b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612662573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126869190614ff4565b6064549091506126aa906001600160a01b031633306001600160801b038c16613513565b6126bd6001600160801b0389168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612703573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127279190614ff4565b14612745576040516312171d8360e31b815260040160405180910390fd5b6127508989886138a6565b5050505050610f4560015f55565b6127666135ff565b606f805460ff60a01b1916600160a01b179055612781613302565b606f546040516001600160a01b0390911681527fc0a1c7e9f05b4d536e1ff8606bae9b847cdb43ef4a9b2d7a503a88cee08dccdb906020015b60405180910390a1565b60605f6127d08361304c565b6001600160a01b0316036127f657604051626f708760e21b815260040160405180910390fd5b606d546001600160a01b031661281f576040516338a69c8d60e21b815260040160405180910390fd5b606d54604051602481018490525f9182916001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b031663c87b56dd60e01b179052516128749190615061565b5f60405180830381855afa9150503d805f81146128ac576040519150601f19603f3d011682016040523d82523d5f602084013e6128b1565b606091505b5091509150816128fb5760405162461bcd60e51b8152602060048201526015602482015274105c9d081c1c9bde1e4818d85b1b0819985a5b1959605a1b6044820152606401611a4e565b8080602001905181019061290f9190615077565b949350505050565b5f63ffffffff82161580612933575062ed4e0063ffffffff8316115b1561295157604051637616640160e01b815260040160405180910390fd5b826001600160801b03165f0361297a5760405163162908e360e11b815260040160405180910390fd5b5f6129848461313b565b905061290f8184613165565b5f828152606a602052604081205463ffffffff168082036129b4575f91505061088c565b604080516080810182525f808252602082018190529181018290526060810191909152815b60018163ffffffff1610612ad0575f868152606b6020908152604080832063ffffffff80861685529083529281902081516080810183528154600f81810b8352600160801b909104900b9381019390935260010154808416918301829052600160201b90048316606083015290935090861610612abe575f826040015186612a619190614fd8565b63ffffffff169050670de0b6b3a7640000818460200151612a8291906150ec565b612a8c919061510b565b8351612a989190615147565b600f0b8084525f1315612aa9575f83525b5050516001600160801b0316915061088c9050565b80612ac881615174565b9150506129d9565b505f95945050505050565b606d545f90819063ffffffff600160a01b909104811690841611612aff5782612b19565b606d54612b1990600160a01b900463ffffffff1684614fd8565b90505f62ed4e00612b3a670de0b6b3a7640000673782dace9d900000614f5d565b6001600160801b0316866001600160801b0316612b579190614fa5565b612b619190614f4a565b905080612b7d63ffffffff84166001600160801b038316614fa5565b611e4390670de0b6b3a764000061500b565b5f612b98613085565b612ba06130dc565b8280421115612bc257604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f03612beb5760405163162908e360e11b815260040160405180910390fd5b63ffffffff85161580612c06575062ed4e0063ffffffff8616115b15612c2457604051637616640160e01b815260040160405180910390fd5b335f90815260676020526040902054606460ff90911610612c585760405163133cbc4f60e01b815260040160405180910390fd5b5f612c638642614fbc565b90505f5f612c7289898861346d565b915091505f60405180604001604052808b600f0b81526020018563ffffffff168152509050612cbf5f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613122565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612d05573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d299190614ff4565b606454909150612d4d906001600160a01b031633306001600160801b038f16613513565b612d606001600160801b038c168261500b565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612da6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dca9190614ff4565b14612de8576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b1990931692909217909255335f818152606760205260409020805460ff80821690950190941660ff19909416939093179092559750612e4b908861357e565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff199094169290911691909117919091179055612edf8b84613247565b604080516001600160801b038d16815263ffffffff87166020820152889133917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061290f60015f55565b6001600160a01b039182165f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b612f8d6135ff565b6001600160a01b038116612fb657604051631e4fbdf760e01b81525f6004820152602401611a4e565b61198b8161365a565b612fc76135ff565b611c05613a78565b5f5f612fda8361304c565b90506001600160a01b03811661088c57604051637e27328960e01b815260048101849052602401611a4e565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b61115b8383836001613ab1565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60025f54036130d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611a4e565b60025f55565b60325460ff1615611c055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611a4e565b61312a613bc4565b821561115b5761115b838383613d36565b5f62ed4e0061315b670de0b6b3a76400006001600160801b038516614fa5565b61088c9190614f4a565b5f826001600160801b03165f036131855750670de0b6b3a764000061088c565b5f61319f63ffffffff84166001600160801b038616614fa5565b90505f6131b862ed4e006001600160801b038716614fa5565b6131d2670de0b6b3a7640000673782dace9d900000614f5d565b6131e5906001600160801b031684614fa5565b6131ef9190614f4a565b61320190670de0b6b3a764000061500b565b9050673782dace9d90000081111561322557673782dace9d9000009250505061088c565b670de0b6b3a764000081101561290f57670de0b6b3a76400009250505061088c565b5f670de0b6b3a76400006132676001600160801b03848116908616614fa5565b6132719190614f4a565b606e805491925082915f906132909084906001600160801b031661501e565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b60015f55565b6132c7613f7c565b6109528282613fc5565b6132d9613f7c565b611c05613ff5565b6132e9613f7c565b611c05613ffd565b6132f9613f7c565b61198b81614011565b61330a6130dc565b6032805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861333f3390565b6040516001600160a01b0390911681526020016127ba565b6001600160a01b0382161580159061337957506065546001600160a01b031615155b156109525760655460405163379607f560e01b8152600481018390526001600160a01b039091169063379607f5906024016020604051808303815f875af11580156133c6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115b9190614ff4565b6001600160a01b03821661341357604051633250574960e11b81525f6004820152602401611a4e565b5f61341f838333614019565b9050836001600160a01b0316816001600160a01b031614610f45576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401611a4e565b5f8062ed4e0061348e670de0b6b3a76400006001600160801b038816614fa5565b6134989190614f4a565b91506134a48285613165565b9050673782dace9d9000006001600160801b03821611156134d857604051638f651fb760e01b815260040160405180910390fd5b826001600160801b0316816001600160801b0316101561350b57604051638199f5f360e01b815260040160405180910390fd5b935093915050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f459085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261411b565b610952828260405180602001604052805f8152506141ee565b5f6135a35f835f614019565b90506001600160a01b03811661095257604051637e27328960e01b815260048101839052602401611a4e565b6040516001600160a01b03831660248201526044810182905261115b90849063a9059cbb60e01b90606401613547565b336136317f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611c055760405163118cdaa760e01b8152336004820152602401611a4e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f5f8390505f62093a808083604001516136e49190615192565b6136ee91906151b9565b90505f5b60ff8110156137ba5761370862093a8083614fbc565b91505f63ffffffff80871690841611156137245785925061373e565b5063ffffffff82165f908152606c6020526040902054600f0b5b604084015161374d9084614fd8565b63ffffffff16846020015161376291906150ec565b84518590613771908390615147565b600f0b90525063ffffffff8087169084160361378d57506137ba565b808460200181815161379f91906151d8565b600f0b9052505063ffffffff821660408401526001016136f2565b505f825f0151600f0b12156137cd575f82525b50516001600160801b03169392505050565b5f5160206153ad5f395f51905f526001600160a01b03831661381f57604051630b61174360e31b81526001600160a01b0384166004820152602401611a4e565b6001600160a01b038481165f818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b613899848484611146565b610f453385858585614201565b5f838152606660205260408120805490916001600160801b03909116906138cd858361501e565b600184015490915063ffffffff165f6138e64283614fd8565b90505f6138f28461313b565b90505f6138ff8284613165565b90505f61390b8b611cb1565b9050806001600160801b0316826001600160801b03161161392c578061392e565b815b91506139446103e8670de0b6b3a7640000615205565b6001600160801b03168a6001600160801b03161180156139755750886001600160801b0316826001600160801b0316105b1561399357604051638199f5f360e01b815260040160405180910390fd5b6139d88b60405180604001604052808a600f0b81526020018863ffffffff1681525060405180604001604052808a600f0b81526020018963ffffffff16815250613122565b6001600160801b03838116600160801b0290871617885560018801805463ffffffff4216600160201b0267ffffffff0000000019909116179055613a1c8a83613247565b604080516001600160801b038c81168252888116602083015284168183015290518c9133917f1381e2f7d0d4b71a58d34dc3db2051dd52769766e65eabf380c9b4ea93f0890b9181900360600190a35050505050505050505050565b613a80614329565b6032805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361333f565b5f5160206153ad5f395f51905f528180613ad357506001600160a01b03831615155b15613b94575f613ae285612fcf565b90506001600160a01b03841615801590613b0e5750836001600160a01b0316816001600160a01b031614155b8015613b215750613b1f8185612f39565b155b15613b4a5760405163a9fbf51f60e01b81526001600160a01b0385166004820152602401611a4e565b8215613b925784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5f93845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b60695463ffffffff16613bf6604080516080810182525f80825260208201819052918101829052606081019190915290565b63ffffffff821615613c6f5760685f613c10600185614fd8565b63ffffffff908116825260208083019390935260409182015f2082516080810184528154600f81810b8352600160801b909104900b948101949094526001015480821692840192909252600160201b9091041660608201529050613c9c565b50604080516080810182525f808252602082015263ffffffff428116928201929092524390911660608201525b60408101515f63ffffffff808316429091161115613cfd576040830151613cc99063ffffffff1642615232565b6060840151613cde9063ffffffff1643615232565b613cf090670de0b6b3a7640000614fa5565b613cfa9190614f4a565b90505b613d0983838387614372565b9250613d16846001614fbc565b6069805463ffffffff191663ffffffff9290921691909117905550505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091524263ffffffff16846020015163ffffffff16118015613da057505f845f0151600f0b135b15613e1257835162ed4e0090613dbf90670de0b6b3a7640000906150ec565b613dc9919061510b565b600f0b602080840191909152840151670de0b6b3a764000090613ded904290614fd8565b63ffffffff168360200151613e0291906150ec565b613e0c919061510b565b600f0b82525b4263ffffffff16836020015163ffffffff16118015613e3657505f835f0151600f0b135b15613ea857825162ed4e0090613e5590670de0b6b3a7640000906150ec565b613e5f919061510b565b600f0b602080830191909152830151670de0b6b3a764000090613e83904290614fd8565b63ffffffff168260200151613e9891906150ec565b613ea2919061510b565b600f0b81525b613ebc848484602001518460200151614577565b5f858152606a6020526040812054613edb9063ffffffff166001614fbc565b5f878152606a60209081526040808320805463ffffffff95861663ffffffff199091168117909155428516878301908152438616606089019081529b8552606b84528285209185529083529220855195909101516001600160801b03908116600160801b02951694909417845551600193909301805497518216600160201b0267ffffffffffffffff19909816939091169290921795909517905550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611c0557604051631afcd79f60e31b815260040160405180910390fd5b613fcd613f7c565b5f5160206153ad5f395f51905f5280613fe68482615289565b5060018101610f458382615289565b6132b9613f7c565b614005613f7c565b6032805460ff19169055565b612f8d613f7c565b5f5f5160206153ad5f395f51905f52816140328561304c565b90506001600160a01b0384161561404e5761404e8185876146b2565b6001600160a01b0381161561408a576140695f865f5f613ab1565b6001600160a01b0381165f908152600383016020526040902080545f190190555b6001600160a01b038616156140ba576001600160a01b0386165f9081526003830160205260409020805460010190555b5f85815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b5f61416f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147169092919063ffffffff16565b905080515f148061418f57508080602001905181019061418f9190615344565b61115b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a4e565b6141f88383614724565b61115b335f8585855b6001600160a01b0383163b1561432257604051630a85bd0160e11b81526001600160a01b0384169063150b7a029061424390889088908790879060040161535f565b6020604051808303815f875af192505050801561427d575060408051601f3d908101601f1916820190925261427a91810190615391565b60015b6142e4573d8080156142aa576040519150601f19603f3d011682016040523d82523d5f602084013e6142af565b606091505b5080515f036142dc57604051633250574960e11b81526001600160a01b0385166004820152602401611a4e565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1461432057604051633250574960e11b81526001600160a01b0385166004820152602401611a4e565b505b5050505050565b60325460ff16611c055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611a4e565b604080516080810182525f808252602082018190529181018290526060810191909152845f62093a806143a58188615192565b6143af91906151b9565b90505f5b60ff81101561456b576143c962093a8083614fbc565b91505f63ffffffff42811690841611156143e5574292506143ff565b5063ffffffff82165f908152606c6020526040902054600f0b5b6144098884614fd8565b63ffffffff16896020015161441e91906150ec565b89518a9061442d908390615147565b600f0b9052506020890180518291906144479083906151d8565b600f0b90525063ffffffff83166040808b0191909152840151670de0b6b3a7640000906144749085614fd8565b61448d9063ffffffff166001600160801b038a16614fa5565b6144979190614f4a565b846060015163ffffffff166144ac919061500b565b63ffffffff90811660608b0152428116908416036144d6575063ffffffff4316606089015261456b565b8860685f846144e68a6001614fbc565b6144f09190614fbc565b63ffffffff908116825260208083019390935260409182015f208451938501516001600160801b03908116600160801b02941693909317835590830151600190920180546060909401518216600160201b0267ffffffffffffffff1990941692909116919091179190911790555090955085906001016143b3565b50959695505050505050565b4263ffffffff16846020015163ffffffff1611156146185760208085015163ffffffff165f908152606c9091526040902054600f0b6145b683826151d8565b9050846020015163ffffffff16846020015163ffffffff16036145e0576145dd8282615147565b90505b60208581015163ffffffff165f908152606c9091526040902080546001600160801b0319166001600160801b03929092169190911790555b4263ffffffff16836020015163ffffffff161115610f4557836020015163ffffffff16836020015163ffffffff161115610f455760208084015163ffffffff165f908152606c9091526040902054600f0b6146738282615147565b60208086015163ffffffff165f908152606c9091526040902080546001600160801b039092166001600160801b03199092169190911790555050505050565b6146bd838383614785565b61115b576001600160a01b0383166146eb57604051637e27328960e01b815260048101829052602401611a4e565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401611a4e565b606061290f84845f856147e9565b6001600160a01b03821661474d57604051633250574960e11b81525f6004820152602401611a4e565b5f61475983835f614019565b90506001600160a01b0381161561115b576040516339e3563760e11b81525f6004820152602401611a4e565b5f6001600160a01b0383161580159061290f5750826001600160a01b0316846001600160a01b031614806147be57506147be8484612f39565b8061290f5750826001600160a01b03166147d783613006565b6001600160a01b031614949350505050565b60608247101561484a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a4e565b5f5f866001600160a01b031685876040516148659190615061565b5f6040518083038185875af1925050503d805f811461489f576040519150601f19603f3d011682016040523d82523d5f602084013e6148a4565b606091505b5091509150611265878383876060831561491e5782515f03614917576001600160a01b0385163b6149175760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a4e565b508161290f565b61290f83838151156149335781518083602001fd5b8060405162461bcd60e51b8152600401611a4e91906149ab565b6001600160e01b03198116811461198b575f5ffd5b5f60208284031215614972575f5ffd5b8135611ef08161494d565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f611ef0602083018461497d565b5f602082840312156149cd575f5ffd5b5035919050565b80356001600160a01b03811681146149ea575f5ffd5b919050565b5f5f60408385031215614a00575f5ffd5b614a09836149d4565b946020939093013593505050565b5f60208284031215614a27575f5ffd5b611ef0826149d4565b602080825282518282018190525f918401906040840190835b81811015614a67578351835260209384019390920191600101614a49565b509095945050505050565b803563ffffffff811681146149ea575f5ffd5b5f5f60408385031215614a96575f5ffd5b82359150614aa660208401614a72565b90509250929050565b80356001600160801b03811681146149ea575f5ffd5b5f5f5f5f60808587031215614ad8575f5ffd5b84359350614ae860208601614a72565b925060408501359150614afd60608601614aaf565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614b4557614b45614b08565b604052919050565b5f67ffffffffffffffff821115614b6657614b66614b08565b50601f01601f191660200190565b5f614b86614b8184614b4d565b614b1c565b9050828152838383011115614b99575f5ffd5b828260208301375f602084830101529392505050565b5f82601f830112614bbe575f5ffd5b611ef083833560208501614b74565b5f5f5f5f60808587031215614be0575f5ffd5b614be9856149d4565b9350614bf7602086016149d4565b9250604085013567ffffffffffffffff811115614c12575f5ffd5b614c1e87828801614baf565b925050606085013567ffffffffffffffff811115614c3a575f5ffd5b614c4687828801614baf565b91505092959194509250565b5f5f5f60608486031215614c64575f5ffd5b614c6d846149d4565b9250614c7b602085016149d4565b929592945050506040919091013590565b5f5f5f5f5f60a08688031215614ca0575f5ffd5b614ca9866149d4565b9450614cb760208701614aaf565b9350614cc560408701614a72565b925060608601359150614cda60808701614aaf565b90509295509295909350565b5f60208284031215614cf6575f5ffd5b611ef082614a72565b801515811461198b575f5ffd5b5f5f60408385031215614d1d575f5ffd5b614d26836149d4565b91506020830135614d3681614cff565b809150509250929050565b5f5f5f5f60808587031215614d54575f5ffd5b614d5d856149d4565b9350614d6b602086016149d4565b925060408501359150606085013567ffffffffffffffff811115614d8d575f5ffd5b8501601f81018713614d9d575f5ffd5b614c4687823560208401614b74565b5f5f5f60408486031215614dbe575f5ffd5b833567ffffffffffffffff811115614dd4575f5ffd5b8401601f81018613614de4575f5ffd5b803567ffffffffffffffff811115614dfa575f5ffd5b8660208260051b8401011115614e0e575f5ffd5b6020918201979096509401359392505050565b5f5f5f5f60808587031215614e34575f5ffd5b84359350614ae860208601614aaf565b5f5f60408385031215614e55575f5ffd5b614e5e83614aaf565b9150614aa660208401614a72565b5f5f5f5f60808587031215614e7f575f5ffd5b614e8885614aaf565b9350614ae860208601614a72565b5f5f60408385031215614ea7575f5ffd5b614eb0836149d4565b9150614aa6602084016149d4565b600181811c90821680614ed257607f821691505b602082108103614ef057634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201614f2f57614f2f614f0a565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f82614f5857614f58614f36565b500490565b6001600160801b03828116828216039081111561088c5761088c614f0a565b6001600160801b038181168382160290811690818114614f9e57614f9e614f0a565b5092915050565b808202811582820484141761088c5761088c614f0a565b63ffffffff818116838216019081111561088c5761088c614f0a565b63ffffffff828116828216039081111561088c5761088c614f0a565b5f60208284031215615004575f5ffd5b5051919050565b8082018082111561088c5761088c614f0a565b6001600160801b03818116838216019081111561088c5761088c614f0a565b5f63ffffffff821663ffffffff810361505857615058614f0a565b60010192915050565b5f82518060208501845e5f920191825250919050565b5f60208284031215615087575f5ffd5b815167ffffffffffffffff81111561509d575f5ffd5b8201601f810184136150ad575f5ffd5b80516150bb614b8182614b4d565b8181528560208385010111156150cf575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f82600f0b82600f0b0280600f0b9150808214614f9e57614f9e614f0a565b5f81600f0b83600f0b8061512157615121614f36565b60016001607f1b031982145f198214161561513e5761513e614f0a565b90059392505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b038213171561088c5761088c614f0a565b5f63ffffffff82168061518957615189614f0a565b5f190192915050565b5f63ffffffff8316806151a7576151a7614f36565b8063ffffffff84160491505092915050565b63ffffffff8181168382160290811690818114614f9e57614f9e614f0a565b600f81810b9083900b0160016001607f1b03811360016001607f1b03198212171561088c5761088c614f0a565b5f6001600160801b0383168061521d5761521d614f36565b806001600160801b0384160491505092915050565b8181038181111561088c5761088c614f0a565b601f82111561115b57805f5260205f20601f840160051c8101602085101561526a5750805b601f840160051c820191505b81811015614322575f8155600101615276565b815167ffffffffffffffff8111156152a3576152a3614b08565b6152b7816152b18454614ebe565b84615245565b6020601f8211600181146152e9575f83156152d25750848201515b5f19600385901b1c1916600184901b178455614322565b5f84815260208120601f198516915b8281101561531857878501518255602094850194600190920191016152f8565b508482101561533557868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215615354575f5ffd5b8151611ef081614cff565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90611e439083018461497d565b5f602082840312156153a1575f5ffd5b8151611ef08161494d56fe80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300a26469706673582212200e1289de6d63347d6b2d8403f46866f5755bcf23805297a4c9297cf07412023164736f6c634300081b0033
Deployed Bytecode Sourcemap
151709:32003:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;101704:316;;;;;;:::i;:::-;;:::i;:::-;;;565:14:1;;558:22;540:41;;528:2;513:18;101704:316:0;;;;;;;;102604:149;;;:::i;:::-;;;;;;;:::i;103892:158::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1506:32:1;;;1488:51;;1476:2;1461:18;103892:158:0;1342:203:1;103711:115:0;;;;;;:::i;:::-;;:::i;:::-;;181224:104;181308:12;;-1:-1:-1;;;;;181308:12:0;181224:104;;181711:562;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;153907:68::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;153907:68:0;;;;;;;;;;-1:-1:-1;;;153907:68:0;;;;;;;;;3797:2:1;3786:22;;;3768:41;;3845:22;;;;3840:2;3825:18;;3818:50;3916:10;3904:23;;;3884:18;;;3877:51;;;;3964:23;;;3959:2;3944:18;;3937:51;3755:3;3740:19;153907:68:0;3545:449:1;169944:1664:0;;;;;;:::i;:::-;;:::i;155478:736::-;;;;;;:::i;:::-;;:::i;181336:96::-;181410:14;;-1:-1:-1;;;181410:14:0;;;;181336:96;;163686:191;;;;;;:::i;:::-;;:::i;183102:603::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;7099:47:1;;;7081:66;;7069:2;7054:18;183102:603:0;6935:218:1;181440:109:0;181521:20;;-1:-1:-1;;;;;181521:20:0;181440:109;;168250:1686;;;;;;:::i;:::-;;:::i;:::-;;;7831:25:1;;;7819:2;7804:18;168250:1686:0;7685:177:1;164123:1494:0;;;;;;:::i;:::-;;:::i;181557:146::-;;;;;;:::i;:::-;;:::i;105278:134::-;;;;;;:::i;:::-;;:::i;180408:585::-;;;;;;:::i;:::-;;:::i;154034:23::-;;;;;-1:-1:-1;;;;;154034:23:0;;;153982:45;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8229:2:1;8218:22;;;;8200:41;;8188:2;8173:18;153982:45:0;8056:191:1;145967:86:0;146038:7;;;;145967:86;;102417:120;;;;;;:::i;:::-;;:::i;102084:271::-;;;;;;:::i;:::-;;:::i;150262:103::-;;;:::i;156222:280::-;;;;;;:::i;:::-;;:::i;153633:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;153633:46:0;;;;-1:-1:-1;;;153633:46:0;;;;;;;;;-1:-1:-1;;;153633:46:0;;;;;;;;;-1:-1:-1;;;;;8497:47:1;;;8479:66;;8581:47;;;;8576:2;8561:18;;8554:75;8677:10;8665:23;;;8645:18;;;8638:51;;;;8725:23;8720:2;8705:18;;8698:51;8466:3;8451:19;153633:46:0;8252:503:1;157911:858:0;;;;;;:::i;:::-;;:::i;149527:147::-;148358:22;149658:8;-1:-1:-1;;;;;149658:8:0;149527:147;;153775:44;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;153775:44:0;;;;;;;;;;-1:-1:-1;;;153775:44:0;;;;;153826:19;;;;;;;;;;;;8934:10:1;8922:23;;;8904:42;;8892:2;8877:18;153826:19:0;8760:192:1;102822:153:0;;;:::i;175360:199::-;;;;;;:::i;:::-;;:::i;155203:45::-;;;;;;:::i;:::-;;;;;;;;;;;;;;181100:116;;;;;;:::i;:::-;-1:-1:-1;;;;;181188:20:0;181163:5;181188:20;;;:14;:20;;;;;;;;;181100:116;;;;9129:4:1;9117:17;;;9099:36;;9087:2;9072:18;181100:116:0;8957:184:1;104122:146:0;;;;;;:::i;:::-;;:::i;163885:226::-;;;;;;:::i;:::-;;:::i;176376:2466::-;;;;;;:::i;:::-;;:::i;153687:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;174248:1104;;;;;;:::i;:::-;;:::i;180228:172::-;;;:::i;182277:495::-;;;;;;:::i;:::-;;:::i;182776:322::-;;;;;;:::i;:::-;;:::i;178850:828::-;;;;;;:::i;:::-;;:::i;179686:506::-;;;;;;:::i;:::-;;:::i;166451:1791::-;;;;;;:::i;:::-;;:::i;153852:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;104339:213;;;;;;:::i;:::-;;:::i;150520:220::-;;;;;;:::i;:::-;;:::i;181001:68::-;;;:::i;101704:316::-;101817:4;-1:-1:-1;;;;;;101854:40:0;;-1:-1:-1;;;101854:40:0;;:105;;-1:-1:-1;;;;;;;101911:48:0;;-1:-1:-1;;;101911:48:0;101854:105;:158;;;-1:-1:-1;;;;;;;;;;99727:40:0;;;101976:36;101834:178;101704:316;-1:-1:-1;;101704:316:0:o;102604:149::-;-1:-1:-1;;;;;;;;;;;102731:14:0;;102649:13;;101087:21;;;102731:14;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;102604:149;:::o;103892:158::-;103959:7;103979:22;103993:7;103979:13;:22::i;:::-;;104021:21;104034:7;104021:12;:21::i;103711:115::-;103783:35;103792:2;103796:7;25437:10;103783:8;:35::i;:::-;103711:115;;:::o;181711:562::-;-1:-1:-1;;;;;181824:21:0;;181810:11;181824:21;;;:14;:21;;;;;;181772:25;;181824:21;;;181867:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;181867:20:0;;181856:31;;181902:5;:10;;181911:1;181902:10;181898:31;;181914:15;181711:562;;;:::o;181898:31::-;181950:20;;181985:245;182011:12;;-1:-1:-1;;;182011:12:0;;;;182006:17;;181985:245;;;182066:5;-1:-1:-1;;;;;182050:21:0;:12;182059:2;182050:8;:12::i;:::-;-1:-1:-1;;;;;182050:21:0;;182046:173;;182117:2;182092:8;182101:12;182092:22;;;;;;;;:::i;:::-;;;;;;;;;;:27;182138:14;;;;:::i;:::-;;;;182191:5;182175:21;;:12;:21;182171:32;182198:5;182171:32;;182025:4;;181985:245;;;;182250:15;;181711:562;;;:::o;169944:1664::-;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;170142:8:::2;156602;156584:15;:26;156580:56;;;156619:17;;-1:-1:-1::0;;;156619:17:0::2;;;;;;;;;;;156580:56;156875:24:::3;156902:15:::0;;;:6:::3;:15;::::0;;;;;;;;156875:42;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;156875:42:0;;::::3;::::0;;;-1:-1:-1;;;156875:42:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;156875:42:0;::::3;::::0;;::::3;::::0;;;;170157:7;;156875:42;156932:15;;;;:57:::3;;;156977:4;:12;;;156951:38;;156958:15;156951:38;;;156932:57;156928:956;;;157091:11:::0;;157060:20:::3;::::0;157083:32:::3;::::0;153281:4:::3;::::0;-1:-1:-1;;;;;157083:20:0::3;:32;:::i;:::-;157060:55:::0;-1:-1:-1;157130:22:0::3;157155:32;153233:4;153179;157155:32;:::i;:::-;-1:-1:-1::0;;;;;157130:57:0::3;::::0;-1:-1:-1;157202:17:0::3;157257:19;153281:4;153075:8;157257:19;:::i;:::-;-1:-1:-1::0;;;;;157222:55:0::3;157223:29;157238:14:::0;157223:12;:29:::3;:::i;:::-;157222:55;;;;:::i;:::-;157202:75;;157292:16;157319:9;157292:37;;157426:8;-1:-1:-1::0;;;;;157412:22:0::3;:4;:10;;;-1:-1:-1::0;;;;;157412:22:0::3;;157408:465;;157497:220;157531:7;157561:57;;;;;;;;157590:4;:11;;;157561:57;;;;;;157605:4;:12;;;157561:57;;;;::::0;157641::::3;;;;;;;;157670:4;:11;;;157641:57;;;;;;157685:4;:12;;;157641:57;;;;::::0;157497:11:::3;:220::i;:::-;157754:15;::::0;;;:6:::3;:15;::::0;;;;:32;;-1:-1:-1;;;;;157754:32:0;;::::3;-1:-1:-1::0;;;157754:32:0::3;::::0;::::3;;::::0;;-1:-1:-1;157805:26:0::3;:52:::0;;::::3;157841:15;157805:52;-1:-1:-1::0;;;157805:52:0::3;-1:-1:-1::0;;157805:52:0;;::::3;;::::0;;157408:465:::3;156991:893;;;;156928:956;170201:10:::4;170181:16;170189:7:::0;170181::::4;:16::i;:::-;-1:-1:-1::0;;;;;170181:30:0::4;;170177:58;;170220:15;;-1:-1:-1::0;;;170220:15:0::4;;;;;;;;;;;170177:58;170256:24;170283:15:::0;;;:6:::4;:15;::::0;;;;;;;170256:42;;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;;;170256:42:0;;::::4;::::0;;;-1:-1:-1;;;170256:42:0;;::::4;;::::0;;::::4;::::0;;;;;;;::::4;::::0;::::4;::::0;;::::4;::::0;;;;;;;-1:-1:-1;;;170256:42:0;::::4;::::0;;::::4;::::0;;;;;170313:16;170309:44:::4;;170338:15;;-1:-1:-1::0;;;170338:15:0::4;;;;;;;;;;;170309:44;170409:17;170444:18;170429:4;:12;;;:33;;;;:::i;:::-;170409:53:::0;-1:-1:-1;170473:29:0::4;170505:36;170525:15;170409:53:::0;170505:36:::4;:::i;:::-;170473:68:::0;-1:-1:-1;153075:8:0::4;170556:32;::::0;::::4;;170552:62;;;170597:17;;-1:-1:-1::0;;;170597:17:0::4;;;;;;;;;;;170552:62;170702:16;170721:31;170740:4;:11;;;170721:18;:31::i;:::-;170702:50;;170763:18;170784:54;170805:8;170815:22;170784:20;:54::i;:::-;170763:75;;170866:13;-1:-1:-1::0;;;;;170853:26:0::4;:10;-1:-1:-1::0;;;;;170853:26:0::4;;170849:57;;;170888:18;;-1:-1:-1::0;;;170888:18:0::4;;;;;;;;;;;170849:57;170998:11:::0;;170962:83:::4;::::0;171024:10;170962:21:::4;:83::i;:::-;171089:186;171115:7;171137:57;;;;;;;;171166:4;:11;;;171137:57;;;;;;171181:4;:12;;;171137:57;;;;::::0;171209:55:::4;;;;;;;;171238:4;:11;;;171209:55;;;;;;171253:10;171209:55;;;;::::0;171089:11:::4;:186::i;:::-;171344:173;;;;;;;;171380:4;:11;;;-1:-1:-1::0;;;;;171344:173:0::4;;;;;171497:8;-1:-1:-1::0;;;;;171344:173:0::4;;;;;171415:10;171344:173;;;;;;171459:15;171344:173;;;;::::0;171326:6:::4;:15;171333:7;171326:15;;;;;;;;;;;:191;;;;;;;;;;;;;-1:-1:-1::0;;;;;171326:191:0::4;;;;;-1:-1:-1::0;;;;;171326:191:0::4;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;171326:191:0::4;;;;;-1:-1:-1::0;;;;;171326:191:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;171568:7;171556:10;-1:-1:-1::0;;;;;171543:57:0::4;;171577:10;171589;171543:57;;;;;;14860:10:1::0;14848:23;;;;14830:42;;-1:-1:-1;;;;;14908:47:1;14903:2;14888:18;;14881:75;14818:2;14803:18;;14658:304;171543:57:0::4;;;;;;;;170166:1442;;;;;156864:1039:::3;156647:1;145602::::2;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;169944:1664;;;;:::o;155478:736::-;24565:21;19881:15;;-1:-1:-1;;;19881:15:0;;;;19880:16;;19928:14;;19734:30;20313:16;;:34;;;;;20333:14;20313:34;20293:54;;20358:17;20378:11;:16;;20393:1;20378:16;:50;;;;-1:-1:-1;20406:4:0;20398:25;:30;20378:50;20358:70;;20446:12;20445:13;:30;;;;;20463:12;20462:13;20445:30;20441:93;;;20499:23;;-1:-1:-1;;;20499:23:0;;;;;;;;;;;20441:93;20544:18;;-1:-1:-1;;20544:18:0;20561:1;20544:18;;;20573:69;;;;20608:22;;-1:-1:-1;;;;20608:22:0;-1:-1:-1;;;20608:22:0;;;20573:69;-1:-1:-1;;;;;155674:26:0;::::1;::::0;;:77:::1;;-1:-1:-1::0;;;;;;155720:31:0;::::1;::::0;155674:77:::1;155670:103;;;155760:13;;-1:-1:-1::0;;;155760:13:0::1;;;;;;;;;;;155670:103;155798:27;155812:4;155818:6;155798:13;:27::i;:::-;155836:24;:22;:24::i;:::-;155871:17;:15;:17::i;:::-;155899:26;155914:10;155899:14;:26::i;:::-;155938:8;:6;:8::i;:::-;155957:12;:46:::0;;-1:-1:-1;;;;;155957:46:0;;::::1;-1:-1:-1::0;;;;;;155957:46:0;;::::1;;::::0;;;156014:25:::1;:45:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;155957:12:::1;156109:15:::0;;:12:::1;:15;::::0;:19;:42;;156190:15:::1;156109;156162:44:::0;;::::1;-1:-1:-1::0;;156138:12:0::1;156109:42:::0;;;::::1;-1:-1:-1::0;;;156109:42:0::1;156162:44:::0;;;;-1:-1:-1;;156162:44:0;;;;;;;::::1;::::0;;20664:104;;;;20699:23;;-1:-1:-1;;;;20699:23:0;;;20742:14;;-1:-1:-1;15120:50:1;;20742:14:0;;15108:2:1;15093:18;20742:14:0;;;;;;;20664:104;19666:1109;;;;;155478:736;;;;:::o;163686:191::-;163786:35;163807:4;163813:7;163786:20;:35::i;:::-;163832:36;163851:4;163856:2;163860:7;163832:18;:36::i;:::-;163686:191;;;:::o;183102:603::-;183206:7;183226:18;:23;;183248:1;183226:23;183222:53;;183258:17;;-1:-1:-1;;;183258:17:0;;;;;;;;;;;183222:53;183288:24;183315:15;;;:6;:15;;;;;;;;183288:42;;;;;;;;;-1:-1:-1;;;;;183288:42:0;;;;;;-1:-1:-1;;;183288:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;183288:42:0;;;;;;;;;;183341:16;183337:44;;183366:15;;-1:-1:-1;;;183366:15:0;;;;;;;;;;;183337:44;183394:17;183429:18;183414:4;:12;;;:33;;;;:::i;:::-;183394:53;-1:-1:-1;183454:24:0;183481:36;183501:15;183394:53;183481:36;:::i;:::-;183454:63;-1:-1:-1;153075:8:0;183528:27;;;;183524:57;;;183564:17;;-1:-1:-1;;;183564:17:0;;;;;;;;;;;183524:57;183594:13;183610:31;183629:4;:11;;;183610:18;:31::i;:::-;183594:47;;183655:46;183676:5;183683:17;183655:20;:46::i;:::-;183648:53;183102:603;-1:-1:-1;;;;;;;183102:603:0:o;168250:1686::-;168467:15;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;168448:8:::2;156602;156584:15;:26;156580:56;;;156619:17;;-1:-1:-1::0;;;156619:17:0::2;;;;;;;;;;;156580:56;168495:6:::3;-1:-1:-1::0;;;;;168495:11:0::3;168505:1;168495:11:::0;168491:39:::3;;168515:15;;-1:-1:-1::0;;;168515:15:0::3;;;;;;;;;;;168491:39;168541:17;::::0;::::3;::::0;;:43:::3;;-1:-1:-1::0;153075:8:0::3;168562:22;::::0;::::3;;168541:43;168537:73;;;168593:17;;-1:-1:-1::0;;;168593:17:0::3;;;;;;;;;;;168537:73;-1:-1:-1::0;;;;;168621:23:0;::::3;168617:49;;168653:13;;-1:-1:-1::0;;;168653:13:0::3;;;;;;;;;;;168617:49;-1:-1:-1::0;;;;;168677:25:0;::::3;;::::0;;;:14:::3;:25;::::0;;;;;153336:3:::3;168677:47;:25:::0;;::::3;:47;168673:77;;168733:17;;-1:-1:-1::0;;;168733:17:0::3;;;;;;;;;;;168673:77;168763:17;168783:38;168809:12:::0;168790:15:::3;168783:38;:::i;:::-;168763:58;;168835:13;168850:18;168872:61;168897:6;168905:12;168919:13;168872:24;:61::i;:::-;168834:99;;;;168978:28;169009:90;;;;;;;;169057:6;169009:90;;;;;;169081:10;169009:90;;;;::::0;168978:121:::3;;169154:44;169166:1;169169:19;;;;;;;;169183:1;169169:19;;;;;;169186:1;169169:19;;;;::::0;169190:7:::3;169154:11;:44::i;:::-;169275:12;::::0;:37:::3;::::0;-1:-1:-1;;;169275:37:0;;169306:4:::3;169275:37;::::0;::::3;1488:51:1::0;169251:21:0::3;::::0;-1:-1:-1;;;;;169275:12:0::3;::::0;:22:::3;::::0;1461:18:1;;169275:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;169319:12;::::0;169251:61;;-1:-1:-1;169319:64:0::3;::::0;-1:-1:-1;;;;;169319:12:0::3;169349:10;169369:4;-1:-1:-1::0;;;;;169319:64:0;::::3;:29;:64::i;:::-;169435:22;-1:-1:-1::0;;;;;169435:22:0;::::3;:13:::0;:22:::3;:::i;:::-;169394:12;::::0;:37:::3;::::0;-1:-1:-1;;;169394:37:0;;169425:4:::3;169394:37;::::0;::::3;1488:51:1::0;-1:-1:-1;;;;;169394:12:0;;::::3;::::0;:22:::3;::::0;1461:18:1;;169394:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;169390:102;;169476:16;;-1:-1:-1::0;;;169476:16:0::3;;;;;;;;;;;169390:102;169536:12;:14:::0;;::::3;;-1:-1:-1::0;;;169536:14:0;;::::3;::::0;::::3;::::0;;::::3;::::0;;::::3;;-1:-1:-1::0;;;;169536:14:0;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;;;;;169561:25:0;::::3;-1:-1:-1::0;169561:25:0;;;:14:::3;:25;::::0;;;;:27;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;-1:-1:-1::0;;169561:27:0;;::::3;::::0;;;::::3;::::0;;;169536:14;-1:-1:-1;169608:29:0::3;169576:9:::0;169536:14;169608:9:::3;:29::i;:::-;169668:145;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;169668:145:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;169766:15:::3;169668:145:::0;::::3;::::0;;;;;;-1:-1:-1;169650:15:0;;;:6:::3;:15:::0;;;;;;;:163;;;;;::::3;-1:-1:-1::0;;;169650:163:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;169650:163:0::3;-1:-1:-1::0;;169650:163:0;;;;;;::::3;::::0;;;;;;;::::3;::::0;;169826:41:::3;169700:6:::0;169856:10;169826:21:::3;:41::i;:::-;169885:47;::::0;;-1:-1:-1;;;;;15690:47:1;;15672:66;;15786:10;15774:23;;15769:2;15754:18;;15747:51;169904:7:0;;-1:-1:-1;;;;;169885:47:0;::::3;::::0;::::3;::::0;15645:18:1;169885:47:0::3;;;;;;;168484:1452;;;;;145602:1:::2;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;168250:1686;;;;;;;:::o;164123:1494::-;143037:21;:19;:21::i;:::-;164191:13:::1;164207:17;164216:7;164207:8;:17::i;:::-;164191:33:::0;-1:-1:-1;;;;;;164239:19:0;::::1;164235:48;;164267:16;;-1:-1:-1::0;;;164267:16:0::1;;;;;;;;;;;164235:48;-1:-1:-1::0;;;;;164298:19:0;::::1;164307:10;164298:19;164294:47;;164326:15;;-1:-1:-1::0;;;164326:15:0::1;;;;;;;;;;;164294:47;164362:24;164389:15:::0;;;:6:::1;:15;::::0;;;;;;;164362:42;;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;164362:42:0;;::::1;::::0;;;-1:-1:-1;;;164362:42:0;;::::1;;::::0;;::::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;164362:42:0;::::1;::::0;;::::1;::::0;;;;;164419:16;164415:44:::1;;164444:15;;-1:-1:-1::0;;;164444:15:0::1;;;;;;;;;;;164415:44;164500:4;:12;;;164474:38;;164481:15;164474:38;;;164470:67;;;164521:16;;-1:-1:-1::0;;;164521:16:0::1;;;;;;;;;;;164470:67;164575:11:::0;;164638:104:::1;::::0;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;164718:12;;::::1;::::0;164638:104:::1;;;::::0;;::::1;::::0;;;;164558:14:::1;164762:15:::0;;;:6:::1;:15:::0;;;;;;164755:22;;;;::::1;::::0;;-1:-1:-1;;164755:22:0;;;164638:104;164819:29:::1;164769:7:::0;164819:20:::1;:29::i;:::-;164798:50:::0;-1:-1:-1;164859:22:0::1;153281:4;164885:37;-1:-1:-1::0;;;;;164903:19:0;;::::1;::::0;164885:15;::::1;:37;:::i;:::-;164884:51;;;;:::i;:::-;164859:76;;164994:10;-1:-1:-1::0;;;;;164986:19:0::1;164975:6;-1:-1:-1::0;;;;;164967:15:0::1;164950:14;:32;;;;:::i;:::-;:55;164946:85;;165014:17;;-1:-1:-1::0;;;165014:17:0::1;;;;;;;;;;;164946:85;165042:30;165075:26;153281:4;165075:14:::0;:26:::1;:::i;:::-;165042:59:::0;-1:-1:-1;;;;;;165116:42:0;::::1;165112:70;;;165167:15;;-1:-1:-1::0;;;165167:15:0::1;;;;;;;;;;;165112:70;165193:20;:55:::0;;165225:22;;165193:20;::::1;::::0;:55:::1;::::0;165225:22;;-1:-1:-1;;;;;165193:55:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;165193:55:0::1;;;;;-1:-1:-1::0;;;;;165193:55:0::1;;;;;;165269:50;165281:7;165290;165299:19;;;;;;;;165313:1;165299:19;;;;;;165316:1;165299:19;;;;::::0;165269:11:::1;:50::i;:::-;165347:23;::::0;;;:14:::1;:23;::::0;;;;165340:30;;-1:-1:-1;;165340:30:0::1;::::0;;165391:14:::1;165362:7:::0;165391:5:::1;:14::i;:::-;165456:10;165441:26;::::0;;;:14:::1;:26;::::0;;;;:28;;-1:-1:-1;;165441:28:0;::::1;;::::0;;::::1;-1:-1:-1::0;;165441:28:0;;;::::1;;::::0;;165501:12:::1;::::0;:45:::1;::::0;-1:-1:-1;;;;;165501:12:0;;::::1;::::0;-1:-1:-1;;;;;165501:45:0;::::1;:25;:45::i;:::-;165572:37;::::0;-1:-1:-1;;;;;7099:47:1;;7081:66;;165593:7:0;;165581:10:::1;::::0;165572:37:::1;::::0;7069:2:1;7054:18;165572:37:0::1;;;;;;;164180:1437;;;;;;;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;164123:1494;:::o;181557:146::-;149413:13;:11;:13::i;:::-;-1:-1:-1;;;;;181627:23:0;::::1;181623:49;;181659:13;;-1:-1:-1::0;;;181659:13:0::1;;;;;;;;;;;181623:49;181679:8;:20:::0;;-1:-1:-1;;;;;;181679:20:0::1;-1:-1:-1::0;;;;;181679:20:0;;;::::1;::::0;;;::::1;::::0;;181557:146::o;105278:134::-;105365:39;105382:4;105388:2;105392:7;105365:39;;;;;;;;;;;;:16;:39::i;180408:585::-;143037:21;:19;:21::i;:::-;180493:14:::1;::::0;-1:-1:-1;;;180493:14:0;::::1;;;180485:48;;;::::0;-1:-1:-1;;;180485:48:0;;16011:2:1;180485:48:0::1;::::0;::::1;15993:21:1::0;16050:2;16030:18;;;16023:30;-1:-1:-1;;;16069:18:1;;;16062:51;16130:18;;180485:48:0::1;;;;;;;;;180568:10;180548:16;180556:7:::0;180548::::1;:16::i;:::-;-1:-1:-1::0;;;;;180548:30:0::1;;180544:58;;180587:15;;-1:-1:-1::0;;;180587:15:0::1;;;;;;;;;;;180544:58;180623:24;180650:15:::0;;;:6:::1;:15;::::0;;;;;;;180623:42;;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;180623:42:0;;::::1;::::0;;;-1:-1:-1;;;180623:42:0;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;180623:42:0;::::1;::::0;;::::1;::::0;;;;180732:15;;;;;;;180725:22;;;-1:-1:-1;;180725:22:0;;;;180758:14:::1;180657:7:::0;180758:5:::1;:14::i;:::-;180823:10;180808:26;::::0;;;:14:::1;:26;::::0;;;;:28;;-1:-1:-1;;180808:28:0;::::1;;::::0;;::::1;-1:-1:-1::0;;180808:28:0;;;::::1;;::::0;;180868:12:::1;::::0;:45:::1;::::0;-1:-1:-1;;;;;180868:12:0;;::::1;::::0;-1:-1:-1;;;;;180868:45:0;::::1;:25;:45::i;:::-;180939:46;::::0;-1:-1:-1;;;;;7099:47:1;;7081:66;;180969:7:0;;180957:10:::1;::::0;180939:46:::1;::::0;7069:2:1;7054:18;180939:46:0::1;;;;;;;180474:519;;143081:20:::0;142298:1;143601:7;:22;143418:213;102417:120;102480:7;102507:22;102521:7;102507:13;:22::i;102084:271::-;102147:7;-1:-1:-1;;;;;;;;;;;;;;;;102227:19:0;;102223:89;;102270:30;;-1:-1:-1;;;102270:30:0;;102297:1;102270:30;;;1488:51:1;1461:18;;102270:30:0;1342:203:1;102223:89:0;-1:-1:-1;;;;;102329:18:0;;;;;;;:11;;;;:18;;-1:-1:-1;102329:18:0;;;;;102084:271::o;150262:103::-;149413:13;:11;:13::i;:::-;150327:30:::1;150354:1;150327:18;:30::i;:::-;150262:103::o:0;156222:280::-;149413:13;:11;:13::i;:::-;-1:-1:-1;;;;;156302:26:0;::::1;156298:52;;156337:13;;-1:-1:-1::0;;;156337:13:0::1;;;;;;;;;;;156298:52;156373:12;::::0;-1:-1:-1;;;;;156373:12:0::1;156365:35:::0;156361:74:::1;;156402:33;::::0;-1:-1:-1;;;156402:33:0;;16361:2:1;156402:33:0::1;::::0;::::1;16343:21:1::0;16400:2;16380:18;;;16373:30;16439:25;16419:18;;;16412:53;16482:18;;156402:33:0::1;16159:347:1::0;156361:74:0::1;156446:12;:48:::0;;-1:-1:-1;;;;;;156446:48:0::1;-1:-1:-1::0;;;;;156446:48:0;;;::::1;::::0;;;::::1;::::0;;156222:280::o;157911:858::-;157979:7;158026:15;;;:6;:15;;;;;;;;157999:42;;;;;;;;;-1:-1:-1;;;;;157999:42:0;;;;;-1:-1:-1;;;157999:42:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;157999:42:0;;;;;;;;;158063:15;158056:39;;158052:67;;-1:-1:-1;153233:4:0;;157911:858;-1:-1:-1;;157911:858:0:o;158052:67::-;158202:17;158285:19;153281:4;153075:8;158285:19;:::i;:::-;-1:-1:-1;;;;;158222:83:0;158247:32;153233:4;153179;158247:32;:::i;:::-;158231:11;;158223:57;;-1:-1:-1;;;;;158223:57:0;;;;:20;:57;:::i;:::-;158222:83;;;;:::i;:::-;158202:103;-1:-1:-1;;;;;;158320:29:0;;158316:57;;;158358:15;;-1:-1:-1;;;158358:15:0;;;;;;;;;;;158316:57;158457:12;;;;158408:9;;158384:13;;158457:38;;158479:15;;158457:38;:::i;:::-;158439:56;-1:-1:-1;158506:18:0;158554:25;;;;-1:-1:-1;;;;;158554:14:0;;:25;:::i;:::-;158535:45;;153233:4;158535:45;:::i;:::-;158506:75;-1:-1:-1;153179:4:0;-1:-1:-1;;;;;158606:27:0;;;158602:54;;;-1:-1:-1;153179:4:0;;157911:858;-1:-1:-1;;;;;;157911:858:0:o;158602:54::-;153233:4;-1:-1:-1;;;;;158671:28:0;;;158667:56;;;-1:-1:-1;153233:4:0;;157911:858;-1:-1:-1;;;;;;157911:858:0:o;158667:56::-;158751:10;157911:858;-1:-1:-1;;;;;;157911:858:0:o;102822:153::-;102958:9;102951:16;;102869:13;;-1:-1:-1;;;;;;;;;;;101087:21:0;102951:16;;;:::i;175360:199::-;175487:5;;;;;;175429:7;175474:19;;;:12;:19;;;;;;;;175449:44;;;;;;;;;;;;;;;-1:-1:-1;;;175449:44:0;;;;;;;;;;;;175487:5;175449:44;;;;;;;;;;;;-1:-1:-1;;;175449:44:0;;;;;;;;;175429:7;175519:31;175449:44;175540:9;175519;:31::i;:::-;175504:47;175360:199;-1:-1:-1;;;175360:199:0:o;104122:146::-;104208:52;25437:10;104241:8;104251;104208:18;:52::i;163885:226::-;164009:35;164030:4;164036:7;164009:20;:35::i;:::-;164056:47;164079:4;164085:2;164089:7;164098:4;164056:22;:47::i;176376:2466::-;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;176513:8:::2;156602;156584:15;:26;156580:56;;;156619:17;;-1:-1:-1::0;;;156619:17:0::2;;;;;;;;;;;156580:56;176556:1:::3;176538:19:::0;::::3;176534:47;;;176566:15;;-1:-1:-1::0;;;176566:15:0::3;;;;;;;;;;;176534:47;176602:19;::::0;;176737:376:::3;176757:19:::0;;::::3;176737:376;;;176826:10;176802:20;176810:8:::0;;176819:1;176810:11;;::::3;;;;;:::i;:::-;;;;;;;176802:7;:20::i;:::-;-1:-1:-1::0;;;;;176802:34:0::3;;176798:62;;176845:15;;-1:-1:-1::0;;;176845:15:0::3;;;;;;;;;;;176798:62;176889:24;176916:6;:19;176923:8;;176932:1;176923:11;;;;;;;:::i;:::-;;::::0;;::::3;::::0;;;::::3;;176916:19:::0;;-1:-1:-1;176916:19:0;;::::3;::::0;;;;;;;;-1:-1:-1;176916:19:0;176889:46;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;176889:46:0;;::::3;::::0;;;-1:-1:-1;;;176889:46:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;176889:46:0;::::3;::::0;;::::3;::::0;;;;;-1:-1:-1;176964:26:0::3;::::0;;::::3;:::i;:::-;;;177024:13;177009:28;;:4;:12;;;:28;;;177005:97;;;177074:4;:12;;;177058:28;;177005:97;-1:-1:-1::0;176778:3:0::3;;176737:376;;;-1:-1:-1::0;177172:24:0::3;177199:39;177222:15;177199:13:::0;:39:::3;:::i;:::-;177172:66:::0;-1:-1:-1;153075:8:0::3;177253:27;::::0;::::3;;177249:57;;;177289:17;;-1:-1:-1::0;;;177289:17:0::3;;;;;;;;;;;177249:57;177382:16;153075:8;177410:32;153281:4;-1:-1:-1::0;;;;;177410:20:0;::::3;:32;:::i;:::-;177409:44;;;;:::i;:::-;177382:72;;177475:18;177498:12;;177496:14;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;177475:35;;;;177521:33;177531:10;177543;177521:9;:33::i;:::-;177629:9;177624:512;177644:19:::0;;::::3;177624:512;;;177685:15;177703:8;;177712:1;177703:11;;;;;;;:::i;:::-;;::::0;;::::3;::::0;;;::::3;;177729:27;177759:15:::0;;;:6:::3;:15:::0;;;;;;177729:45;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;177729:45:0;;::::3;::::0;;-1:-1:-1;;;177729:45:0;;::::3;;::::0;;::::3;::::0;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;-1:-1:-1;;;177729:45:0;;::::3;::::0;::::3;::::0;;;;177843:127;;;;::::3;::::0;;177899:14;;177843:127:::3;;::::0;;177939:15;;177843:127:::3;::::0;;::::3;::::0;178038:19;;;;::::3;::::0;;;;;;;;::::3;::::0;;;;177703:11;;-1:-1:-1;177729:45:0;177843:127;-1:-1:-1;177999:59:0::3;::::0;177703:11;;177843:127;;177999:11:::3;:59::i;:::-;178080:15;::::0;;;:6:::3;:15;::::0;;;;178073:22;;;;::::3;::::0;;-1:-1:-1;;178073:22:0;;;178110:14:::3;178087:7:::0;178110:5:::3;:14::i;:::-;-1:-1:-1::0;;;177665:3:0::3;;177624:512;;;-1:-1:-1::0;178207:110:0::3;::::0;;;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;::::0;::::3;;::::0;;::::3;::::0;;;;178362:19;;;;::::3;::::0;;;178176:28:::3;178362:19:::0;;;;;::::3;::::0;178207:110;178338:53:::3;::::0;178350:10;;178207:110;178338:11:::3;:53::i;:::-;178433:176;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;178433:176:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;178551:15:::3;178433:176:::0;::::3;::::0;;;;;;-1:-1:-1;178412:18:0;;;:6:::3;:18:::0;;;;;:197;;;;;::::3;-1:-1:-1::0;;;178412:197:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;178412:197:0::3;-1:-1:-1::0;;178412:197:0;;;;;;::::3;::::0;;;;::::3;::::0;;;178697:10:::3;178682:26:::0;;;:14:::3;:26:::0;;;;;;;;;::::3;::::0;;::::3;:51:::0;;::::3;:55:::0;;::::3;178647:91:::0;;::::3;-1:-1:-1::0;;178647:91:0;;::::3;::::0;;;::::3;::::0;;;178775:59;;178419:10;;178697;178775:59:::3;::::0;::::3;::::0;178469:11;;178504:13;;-1:-1:-1;;;;;15690:47:1;;;;15672:66;;15786:10;15774:23;15769:2;15754:18;;15747:51;15660:2;15645:18;;15500:304;178775:59:0::3;;;;;;;;176523:2319;;;;;;145602:1:::2;143081:20:::0;142298:1;143601:7;:22;143418:213;174248:1104;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;174453:8:::2;156602;156584:15;:26;156580:56;;;156619:17;;-1:-1:-1::0;;;156619:17:0::2;;;;;;;;;;;156580:56;156875:24:::3;156902:15:::0;;;:6:::3;:15;::::0;;;;;;;;156875:42;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;156875:42:0;;::::3;::::0;;;-1:-1:-1;;;156875:42:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;156875:42:0;::::3;::::0;;::::3;::::0;;;;174468:7;;156875:42;156932:15;;;;:57:::3;;;156977:4;:12;;;156951:38;;156958:15;156951:38;;;156932:57;156928:956;;;157091:11:::0;;157060:20:::3;::::0;157083:32:::3;::::0;153281:4:::3;::::0;-1:-1:-1;;;;;157083:20:0::3;:32;:::i;:::-;157060:55:::0;-1:-1:-1;157130:22:0::3;157155:32;153233:4;153179;157155:32;:::i;:::-;-1:-1:-1::0;;;;;157130:57:0::3;::::0;-1:-1:-1;157202:17:0::3;157257:19;153281:4;153075:8;157257:19;:::i;:::-;-1:-1:-1::0;;;;;157222:55:0::3;157223:29;157238:14:::0;157223:12;:29:::3;:::i;:::-;157222:55;;;;:::i;:::-;157202:75;;157292:16;157319:9;157292:37;;157426:8;-1:-1:-1::0;;;;;157412:22:0::3;:4;:10;;;-1:-1:-1::0;;;;;157412:22:0::3;;157408:465;;157497:220;157531:7;157561:57;;;;;;;;157590:4;:11;;;157561:57;;;;;;157605:4;:12;;;157561:57;;;;::::0;157641::::3;;;;;;;;157670:4;:11;;;157641:57;;;;;;157685:4;:12;;;157641:57;;;;::::0;157497:11:::3;:220::i;:::-;157754:15;::::0;;;:6:::3;:15;::::0;;;;:32;;-1:-1:-1;;;;;157754:32:0;;::::3;-1:-1:-1::0;;;157754:32:0::3;::::0;::::3;;::::0;;-1:-1:-1;157805:26:0::3;:52:::0;;::::3;157841:15;157805:52;-1:-1:-1::0;;;157805:52:0::3;-1:-1:-1::0;;157805:52:0;;::::3;;::::0;;157408:465:::3;156991:893;;;;156928:956;174542:9:::4;174522:16;174530:7:::0;174522::::4;:16::i;:::-;-1:-1:-1::0;;;;;174522:29:0::4;;174518:57;;174560:15;;-1:-1:-1::0;;;174560:15:0::4;;;;;;;;;;;174518:57;174590:16;-1:-1:-1::0;;;;;174590:21:0::4;174610:1;174590:21:::0;174586:49:::4;;174620:15;;-1:-1:-1::0;;;174620:15:0::4;;;;;;;;;;;174586:49;174705:25;174733:15:::0;;;:6:::4;:15;::::0;;;;174763:11;;174733:15;;-1:-1:-1;;;;;174763:11:0;;::::4;:16:::0;;174759:44:::4;;174788:15;;-1:-1:-1::0;;;174788:15:0::4;;;;;;;;;;;174759:44;174845:12;::::0;::::4;::::0;::::4;::::0;;::::4;174825:15;174818:39:::0;;::::4;;174814:65;;174866:13;;-1:-1:-1::0;;;174866:13:0::4;;;;;;;;;;;174814:65;174952:12;::::0;:37:::4;::::0;-1:-1:-1;;;174952:37:0;;174983:4:::4;174952:37;::::0;::::4;1488:51:1::0;174928:21:0::4;::::0;-1:-1:-1;;;;;174952:12:0::4;::::0;:22:::4;::::0;1461:18:1;;174952:37:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;175000:12;::::0;174928:61;;-1:-1:-1;175000:74:0::4;::::0;-1:-1:-1;;;;;175000:12:0::4;175030:10;175050:4;-1:-1:-1::0;;;;;175000:74:0;::::4;:29;:74::i;:::-;175130:32;-1:-1:-1::0;;;;;175130:32:0;::::4;:13:::0;:32:::4;:::i;:::-;175089:12;::::0;:37:::4;::::0;-1:-1:-1;;;175089:37:0;;175120:4:::4;175089:37;::::0;::::4;1488:51:1::0;-1:-1:-1;;;;;175089:12:0;;::::4;::::0;:22:::4;::::0;1461:18:1;;175089:37:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:73;175085:115;;175184:16;;-1:-1:-1::0;;;175184:16:0::4;;;;;;;;;;;175085:115;175282:62;175303:7;175312:16;175330:13;175282:20;:62::i;:::-;174477:875;;156864:1039:::3;156647:1;145602::::2;143081:20:::0;142298:1;143601:7;:22;143418:213;180228:172;149413:13;:11;:13::i;:::-;180289:14:::1;:21:::0;;-1:-1:-1;;;;180289:21:0::1;-1:-1:-1::0;;;180289:21:0::1;::::0;;180321:8:::1;:6;:8::i;:::-;180366:25;::::0;180345:47:::1;::::0;-1:-1:-1;;;;;180366:25:0;;::::1;1488:51:1::0;;180345:47:0::1;::::0;1476:2:1;1461:18;180345:47:0::1;;;;;;;;180228:172::o:0;182277:495::-;182350:13;182405:1;182376:17;182385:7;182376:8;:17::i;:::-;-1:-1:-1;;;;;182376:31:0;;182372:60;;182416:16;;-1:-1:-1;;;182416:16:0;;;;;;;;;;;182372:60;182443:8;;-1:-1:-1;;;;;182443:8:0;182439:52;;182474:17;;-1:-1:-1;;;182474:17:0;;;;;;;;;;;182439:52;182584:8;;182614:53;;;;;7831:25:1;;;182549:12:0;;;;-1:-1:-1;;;;;182584:8:0;;;;7804:18:1;;182614:53:0;;;-1:-1:-1;;182614:53:0;;;;;;;;;;;;;;-1:-1:-1;;;;;182614:53:0;-1:-1:-1;;;182614:53:0;;;182584:90;;;182614:53;182584:90;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182548:126;;;;182689:7;182681:41;;;;-1:-1:-1;;;182681:41:0;;17457:2:1;182681:41:0;;;17439:21:1;17496:2;17476:18;;;17469:30;-1:-1:-1;;;17515:18:1;;;17508:51;17576:18;;182681:41:0;17255:345:1;182681:41:0;182753:4;182742:26;;;;;;;;;;;;:::i;:::-;182735:33;182277:495;-1:-1:-1;;;;182277:495:0:o;182776:322::-;182861:7;182881:13;;;;;:35;;-1:-1:-1;153075:8:0;182898:18;;;;182881:35;182877:65;;;182925:17;;-1:-1:-1;;;182925:17:0;;;;;;;;;;;182877:65;182953:6;-1:-1:-1;;;;;182953:11:0;182963:1;182953:11;182949:39;;182973:15;;-1:-1:-1;;;182973:15:0;;;;;;;;;;;182949:39;183001:13;183017:26;183036:6;183017:18;:26::i;:::-;183001:42;;183057:37;183078:5;183085:8;183057:20;:37::i;178850:828::-;178931:7;178970:23;;;:14;:23;;;;;;;;179008:14;;;179004:28;;179031:1;179024:8;;;;;179004:28;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;179138:9:0;179122:528;179154:1;179149;:6;;;179122:528;;179189:25;;;;:16;:25;;;;;;;;:28;;;;;;;;;;;;;179177:40;;;;;;;;;;;;;;;-1:-1:-1;;;179177:40:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;179177:40:0;;;;;;;;;;-1:-1:-1;179236:25:0;;;-1:-1:-1;179232:407:0;;179289:16;179335:9;:12;;;179323:9;:24;;;;:::i;:::-;179315:33;;179289:60;;153281:4;179422:9;179404;:15;;;:27;;;;:::i;:::-;179403:49;;;;:::i;:::-;179385:14;;:68;;;;:::i;:::-;179368:85;;;;;:14;-1:-1:-1;179472:85:0;;;179536:1;179519:18;;179472:85;-1:-1:-1;;179606:14:0;-1:-1:-1;;;;;179590:32:0;;-1:-1:-1;179575:48:0;;-1:-1:-1;179575:48:0;179232:407;179157:3;;;;:::i;:::-;;;;179122:528;;;-1:-1:-1;179669:1:0;;178850:828;-1:-1:-1;;;;;178850:828:0:o;179686:506::-;179865:15;;179770:7;;;;179865:15;-1:-1:-1;;;179865:15:0;;;;;179850:30;;;;:78;;179916:12;179850:78;;;179898:15;;179883:30;;-1:-1:-1;;;179898:15:0;;;;179883:12;:30;:::i;:::-;179829:99;-1:-1:-1;179992:17:0;153075:8;180032:32;153233:4;153179;180032:32;:::i;:::-;-1:-1:-1;;;;;180013:52:0;180021:6;-1:-1:-1;;;;;180013:15:0;:52;;;;:::i;:::-;180012:64;;;;:::i;:::-;179992:84;-1:-1:-1;179992:84:0;180158:28;;;;-1:-1:-1;;;;;180158:14:0;;:28;:::i;:::-;180139:48;;153233:4;180139:48;:::i;166451:1791::-;166661:15;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;166642:8:::2;156602;156584:15;:26;156580:56;;;156619:17;;-1:-1:-1::0;;;156619:17:0::2;;;;;;;;;;;156580:56;166693:6:::3;-1:-1:-1::0;;;;;166693:11:0::3;166703:1;166693:11:::0;166689:39:::3;;166713:15;;-1:-1:-1::0;;;166713:15:0::3;;;;;;;;;;;166689:39;166743:17;::::0;::::3;::::0;;:43:::3;;-1:-1:-1::0;153075:8:0::3;166764:22;::::0;::::3;;166743:43;166739:73;;;166795:17;;-1:-1:-1::0;;;166795:17:0::3;;;;;;;;;;;166739:73;166842:10;166827:26;::::0;;;:14:::3;:26;::::0;;;;;153336:3:::3;166827:48;:26:::0;;::::3;:48;166823:78;;166884:17;;-1:-1:-1::0;;;166884:17:0::3;;;;;;;;;;;166823:78;166922:17;166942:38;166968:12:::0;166949:15:::3;166942:38;:::i;:::-;166922:58;;167002:13;167017:18;167039:61;167064:6;167072:12;167086:13;167039:24;:61::i;:::-;167001:99;;;;167157:28;167188:102;;;;;;;;167240:6;167188:102;;;;;;167268:10;167188:102;;;;::::0;167157:133:::3;;167357:44;167369:1;167372:19;;;;;;;;167386:1;167372:19;;;;;;167389:1;167372:19;;;;::::0;167393:7:::3;167357:11;:44::i;:::-;167490:12;::::0;:37:::3;::::0;-1:-1:-1;;;167490:37:0;;167521:4:::3;167490:37;::::0;::::3;1488:51:1::0;167466:21:0::3;::::0;-1:-1:-1;;;;;167490:12:0::3;::::0;:22:::3;::::0;1461:18:1;;167490:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;167538:12;::::0;167466:61;;-1:-1:-1;167538:64:0::3;::::0;-1:-1:-1;;;;;167538:12:0::3;167568:10;167588:4;-1:-1:-1::0;;;;;167538:64:0;::::3;:29;:64::i;:::-;167658:22;-1:-1:-1::0;;;;;167658:22:0;::::3;:13:::0;:22:::3;:::i;:::-;167617:12;::::0;:37:::3;::::0;-1:-1:-1;;;167617:37:0;;167648:4:::3;167617:37;::::0;::::3;1488:51:1::0;-1:-1:-1;;;;;167617:12:0;;::::3;::::0;:22:::3;::::0;1461:18:1;;167617:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;167613:106;;167703:16;;-1:-1:-1::0;;;167703:16:0::3;;;;;;;;;;;167613:106;167775:12;:14:::0;;::::3;;-1:-1:-1::0;;;167775:14:0;;::::3;::::0;::::3;::::0;;::::3;::::0;;::::3;;-1:-1:-1::0;;;;167775:14:0;;::::3;::::0;;;::::3;::::0;;;167819:10:::3;-1:-1:-1::0;167804:26:0;;;:14:::3;:26;::::0;;;;:28;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;-1:-1:-1::0;;167804:28:0;;::::3;::::0;;;::::3;::::0;;;167775:14;-1:-1:-1;167864:30:0::3;::::0;167775:14;167864:9:::3;:30::i;:::-;167933:165;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;167933:165:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;168043:15:::3;167933:165:::0;::::3;::::0;;;;;;-1:-1:-1;167915:15:0;;;:6:::3;:15:::0;;;;;;;:183;;;;;::::3;-1:-1:-1::0;;;167915:183:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;167915:183:0::3;-1:-1:-1::0;;167915:183:0;;;;;;::::3;::::0;;;;;;;::::3;::::0;;168119:41:::3;167969:6:::0;168149:10;168119:21:::3;:41::i;:::-;168186:48;::::0;;-1:-1:-1;;;;;15690:47:1;;15672:66;;15786:10;15774:23;;15769:2;15754:18;;15747:51;168206:7:0;;168194:10:::3;::::0;168186:48:::3;::::0;15645:18:1;168186:48:0::3;;;;;;;166678:1564;;;;;145602:1:::2;143081:20:::0;142298:1;143601:7;:22;143418:213;104339;-1:-1:-1;;;;;104507:27:0;;;104427:4;104507:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;;;;104339:213::o;150520:220::-;149413:13;:11;:13::i;:::-;-1:-1:-1;;;;;150605:22:0;::::1;150601:93;;150651:31;::::0;-1:-1:-1;;;150651:31:0;;150679:1:::1;150651:31;::::0;::::1;1488:51:1::0;1461:18;;150651:31:0::1;1342:203:1::0;150601:93:0::1;150704:28;150723:8;150704:18;:28::i;181001:68::-:0;149413:13;:11;:13::i;:::-;181051:10:::1;:8;:10::i;117353:247::-:0;117416:7;117436:13;117452:17;117461:7;117452:8;:17::i;:::-;117436:33;-1:-1:-1;;;;;;117484:19:0;;117480:90;;117527:31;;-1:-1:-1;;;117527:31:0;;;;;7831:25:1;;;7804:18;;117527:31:0;7685:177:1;106540:187:0;106610:7;106693:26;;;:17;:26;;;;;;-1:-1:-1;;;;;106693:26:0;;106540:187::o;115469:122::-;115550:33;115559:2;115563:7;115572:4;115578;115550:8;:33::i;106244:175::-;106310:7;106393:18;;;:9;:18;;;;;;-1:-1:-1;;;;;106393:18:0;;106244:175::o;143117:293::-;142342:1;143251:7;;:19;143243:63;;;;-1:-1:-1;;;143243:63:0;;19499:2:1;143243:63:0;;;19481:21:1;19538:2;19518:18;;;19511:30;19577:33;19557:18;;;19550:61;19628:18;;143243:63:0;19297:355:1;143243:63:0;142342:1;143384:7;:18;143117:293::o;146126:108::-;146038:7;;;;146196:9;146188:38;;;;-1:-1:-1;;;146188:38:0;;19859:2:1;146188:38:0;;;19841:21:1;19898:2;19878:18;;;19871:30;-1:-1:-1;;;19917:18:1;;;19910:46;19973:18;;146188:38:0;19657:340:1;158777:363:0;158933:19;:17;:19::i;:::-;158977:12;;158973:160;;159006:115;159041:7;159068:9;159097;159006:16;:115::i;171616:195::-;171682:7;153075:8;171764:27;153281:4;-1:-1:-1;;;;;171764:15:0;;:27;:::i;:::-;171763:39;;;;:::i;171819:687::-;171904:7;172018:5;-1:-1:-1;;;;;172018:10:0;172027:1;172018:10;172014:38;;-1:-1:-1;153233:4:0;172030:22;;172014:38;172073:12;172088:25;;;;-1:-1:-1;;;;;172088:14:0;;:25;:::i;:::-;172073:40;-1:-1:-1;172182:18:0;172283:24;153075:8;-1:-1:-1;;;;;172283:14:0;;:24;:::i;:::-;172245:32;153233:4;153179;172245:32;:::i;:::-;172237:41;;-1:-1:-1;;;;;172237:41:0;:4;:41;:::i;:::-;172236:72;;;;:::i;:::-;172203:106;;153233:4;172203:106;:::i;:::-;172182:127;-1:-1:-1;153179:4:0;172334:27;;172330:54;;;153179:4;172363:21;;;;;;172330:54;153233:4;172399:28;;172395:56;;;153233:4;172429:22;;;;;;166216:227;166303:22;153281:4;166328:37;-1:-1:-1;;;;;166346:19:0;;;;166328:15;;:37;:::i;:::-;:49;;;;:::i;:::-;166388:20;:47;;166303:74;;-1:-1:-1;166303:74:0;;166388:20;;:47;;166303:74;;-1:-1:-1;;;;;166388:47:0;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;166388:47:0;;;;;-1:-1:-1;;;;;166388:47:0;;;;;;166292:151;166216:227;;:::o;143418:213::-;142298:1;143601:7;:22;143418:213::o;101250:151::-;22572:20;:18;:20::i;:::-;101354:39:::1;101378:5;101385:7;101354:23;:39::i;142384:113::-:0;22572:20;:18;:20::i;:::-;142455:34:::1;:32;:34::i;145137:99::-:0;22572:20;:18;:20::i;:::-;145201:27:::1;:25;:27::i;148911:129::-:0;22572:20;:18;:20::i;:::-;148994:38:::1;149019:12;148994:24;:38::i;146563:118::-:0;145572:19;:17;:19::i;:::-;146623:7:::1;:14:::0;;-1:-1:-1;;146623:14:0::1;146633:4;146623:14;::::0;;146653:20:::1;146660:12;25437:10:::0;;25357:98;146660:12:::1;146653:20;::::0;-1:-1:-1;;;;;1506:32:1;;;1488:51;;1476:2;1461:18;146653:20:0::1;1342:203:1::0;163418:259:0;-1:-1:-1;;;;;163528:18:0;;;;;;:57;;-1:-1:-1;163558:12:0;;-1:-1:-1;;;;;163558:12:0;163550:35;;163528:57;163524:136;;;163621:12;;:27;;-1:-1:-1;;;163621:27:0;;;;;7831:25:1;;;-1:-1:-1;;;;;163621:12:0;;;;:18;;7804::1;;163621:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;104619:588::-;-1:-1:-1;;;;;104714:16:0;;104710:89;;104754:33;;-1:-1:-1;;;104754:33:0;;104784:1;104754:33;;;1488:51:1;1461:18;;104754:33:0;1342:203:1;104710:89:0;105020:21;105044:34;105052:2;105056:7;25437:10;105044:7;:34::i;:::-;105020:58;;105110:4;-1:-1:-1;;;;;105093:21:0;:13;-1:-1:-1;;;;;105093:21:0;;105089:111;;105138:50;;-1:-1:-1;;;105138:50:0;;-1:-1:-1;;;;;20222:32:1;;;105138:50:0;;;20204:51:1;20271:18;;;20264:34;;;20334:32;;20314:18;;;20307:60;20177:18;;105138:50:0;20002:371:1;165625:583:0;165776:13;;153075:8;165905:27;153281:4;-1:-1:-1;;;;;165905:15:0;;:27;:::i;:::-;165904:39;;;;:::i;:::-;165888:56;;166011:41;166032:5;166039:12;166011:20;:41::i;:::-;165998:54;-1:-1:-1;153179:4:0;-1:-1:-1;;;;;166077:27:0;;;166073:59;;;166113:19;;-1:-1:-1;;;166113:19:0;;;;;;;;;;;166073:59;166160:13;-1:-1:-1;;;;;166147:26:0;:10;-1:-1:-1;;;;;166147:26:0;;166143:57;;;166182:18;;-1:-1:-1;;;166182:18:0;;;;;;;;;;;166143:57;165625:583;;;;;;:::o;134838:216::-;134977:68;;-1:-1:-1;;;;;20598:32:1;;;134977:68:0;;;20580:51:1;20667:32;;20647:18;;;20640:60;20716:18;;;20709:34;;;134950:96:0;;134970:5;;-1:-1:-1;;;135000:27:0;20553:18:1;;134977:68:0;;;;-1:-1:-1;;134977:68:0;;;;;;;;;;;;;;-1:-1:-1;;;;;134977:68:0;-1:-1:-1;;;;;;134977:68:0;;;;;;;;;;134950:19;:96::i;111537:102::-;111605:26;111615:2;111619:7;111605:26;;;;;;;;;;;;:9;:26::i;112415:232::-;112467:21;112491:40;112507:1;112511:7;112528:1;112491:7;:40::i;:::-;112467:64;-1:-1:-1;;;;;;112546:27:0;;112542:98;;112597:31;;-1:-1:-1;;;112597:31:0;;;;;7831:25:1;;;7804:18;;112597:31:0;7685:177:1;134405:188:0;134526:58;;-1:-1:-1;;;;;20946:32:1;;134526:58:0;;;20928:51:1;20995:18;;;20988:34;;;134499:86:0;;134519:5;;-1:-1:-1;;;134549:23:0;20901:18:1;;134526:58:0;20754:274:1;149752:166:0;25437:10;149812:7;148358:22;149658:8;-1:-1:-1;;;;;149658:8:0;;149527:147;149812:7;-1:-1:-1;;;;;149812:23:0;;149808:103;;149859:40;;-1:-1:-1;;;149859:40:0;;25437:10;149859:40;;;1488:51:1;1461:18;;149859:40:0;1342:203:1;150900:253:0;148358:22;151051:8;;-1:-1:-1;;;;;;151070:19:0;;-1:-1:-1;;;;;151070:19:0;;;;;;;;151105:40;;151051:8;;;;;151105:40;;150974:24;;151105:40;150963:190;;150900:253;:::o;175567:801::-;175639:7;175659:22;175684:5;175659:30;;175700:9;153121;;175713;:12;;;:19;;;;:::i;:::-;175712:28;;;;:::i;:::-;175700:40;-1:-1:-1;175766:9:0;175761:460;175785:3;175781:1;:7;175761:460;;;175810:10;153121:9;175810:10;;:::i;:::-;;-1:-1:-1;175835:13:0;175871:6;;;;;;;;175867:119;;;175903:1;175898:6;;175867:119;;;-1:-1:-1;175954:16:0;;;;;;;:12;:16;;;;;;;;175867:119;176056:12;;;;176051:17;;:2;:17;:::i;:::-;176043:26;;176018:9;:15;;;:52;;;;:::i;:::-;176000:70;;:9;;:70;;;;;:::i;:::-;;;;;-1:-1:-1;176089:7:0;;;;;;;;176085:53;;176117:5;;;176085:53;176171:6;176152:9;:15;;:25;;;;;;;:::i;:::-;;;;;-1:-1:-1;;176192:17:0;;;:12;;;:17;175790:3;;175761:460;;;;176254:1;176237:9;:14;;;:18;;;176233:69;;;176289:1;176272:18;;176233:69;-1:-1:-1;176343:14:0;-1:-1:-1;;;;;176327:32:0;;175567:801;-1:-1:-1;;;175567:801:0:o;116734:376::-;-1:-1:-1;;;;;;;;;;;;;;;;116898:22:0;;116894:93;;116944:31;;-1:-1:-1;;;116944:31:0;;-1:-1:-1;;;;;1506:32:1;;116944:31:0;;;1488:51:1;1461:18;;116944:31:0;1342:203:1;116894:93:0;-1:-1:-1;;;;;116997:27:0;;;;;;;:20;;;:27;;;;;;;;:37;;;;;;;;;;;;;:48;;-1:-1:-1;;116997:48:0;;;;;;;;;;117061:41;;540::1;;;117061::0;;513:18:1;117061:41:0;;;;;;;116827:283;116734:376;;;:::o;105483:236::-;105597:31;105610:4;105616:2;105620:7;105597:12;:31::i;:::-;105639:72;25437:10;105687:4;105693:2;105697:7;105706:4;105639:33;:72::i;172571:1669::-;172720:25;172748:15;;;:6;:15;;;;;172856:11;;172748:15;;-1:-1:-1;;;;;172856:11:0;;;;172898:28;172910:16;172856:11;172898:28;:::i;:::-;172954:12;;;;172878:48;;-1:-1:-1;172954:12:0;;172937:14;173004:33;173021:15;172954:12;173004:33;:::i;:::-;172977:60;;173105:16;173124:29;173143:9;173124:18;:29::i;:::-;173105:48;;173164:18;173185:49;173206:8;173216:17;173185:20;:49::i;:::-;173164:70;;173311:25;173339:29;173360:7;173339:20;:29::i;:::-;173311:57;;173405:17;-1:-1:-1;;;;;173392:30:0;:10;-1:-1:-1;;;;;173392:30:0;;:63;;173438:17;173392:63;;;173425:10;173392:63;173379:76;-1:-1:-1;173547:16:0;173559:4;153281;173547:16;:::i;:::-;-1:-1:-1;;;;;173528:35:0;:16;-1:-1:-1;;;;;173528:35:0;;:65;;;;;173580:13;-1:-1:-1;;;;;173567:26:0;:10;-1:-1:-1;;;;;173567:26:0;;173528:65;173524:123;;;173617:18;;-1:-1:-1;;;173617:18:0;;;;;;;;;;;173524:123;173690:174;173716:7;173738:50;;;;;;;;173767:9;173738:50;;;;;;173780:7;173738:50;;;;;173803;;;;;;;;173832:9;173803:50;;;;;;173845:7;173803:50;;;;;173690:11;:174::i;:::-;-1:-1:-1;;;;;173949:21:0;;;-1:-1:-1;;;173949:21:0;173915:23;;;173949:21;;;173915:23;173981:15;;:41;;;174006:15;173981:41;-1:-1:-1;;;173981:41:0;-1:-1:-1;;173981:41:0;;;;;;174078:51;174100:16;174118:10;174078:21;:51::i;:::-;174155:77;;;-1:-1:-1;;;;;22167:47:1;;;22149:66;;22251:47;;;22246:2;22231:18;;22224:75;22335:47;;22315:18;;;22308:75;174155:77:0;;174183:7;;174171:10;;174155:77;;;;;22137:2:1;174155:77:0;;;172709:1531;;;;;;;;172571:1669;;;:::o;146822:120::-;145831:16;:14;:16::i;:::-;146881:7:::1;:15:::0;;-1:-1:-1;;146881:15:0::1;::::0;;146912:22:::1;25437:10:::0;146921:12:::1;25357:98:::0;115779:736;-1:-1:-1;;;;;;;;;;;115997:9:0;;:31;;-1:-1:-1;;;;;;116010:18:0;;;;115997:31;115993:471;;;116045:13;116061:22;116075:7;116061:13;:22::i;:::-;116045:38;-1:-1:-1;;;;;;116214:18:0;;;;;;:35;;;116245:4;-1:-1:-1;;;;;116236:13:0;:5;-1:-1:-1;;;;;116236:13:0;;;116214:35;:69;;;;;116254:29;116271:5;116278:4;116254:16;:29::i;:::-;116253:30;116214:69;116210:144;;;116311:27;;-1:-1:-1;;;116311:27:0;;-1:-1:-1;;;;;1506:32:1;;116311:27:0;;;1488:51:1;1461:18;;116311:27:0;1342:203:1;116210:144:0;116374:9;116370:83;;;116429:7;116425:2;-1:-1:-1;;;;;116409:28:0;116418:5;-1:-1:-1;;;;;116409:28:0;;;;;;;;;;;116370:83;116030:434;115993:471;116476:26;;;;:17;;:26;;-1:-1:-1;;116476:26:0;;;:31;;-1:-1:-1;;;;;;116476:31:0;-1:-1:-1;;;;;116476:31:0;;;;;;;;;;115779:736::o;159148:950::-;159213:5;;;;159229:22;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;159229:22:0;159276:10;;;;159272:289;;159315:12;:24;159328:10;159337:1;159328:6;:10;:::i;:::-;159315:24;;;;;;;;;;;;;;;;;;-1:-1:-1;159315:24:0;159303:36;;;;;;;;;;;;;;;-1:-1:-1;;;159303:36:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;159303:36:0;;;;;;;;;-1:-1:-1;159272:289:0;;;-1:-1:-1;159384:165:0;;;;;;;;-1:-1:-1;159384:165:0;;;;;;;;159473:15;159384:165;;;;;;;;;159520:12;159384:165;;;;;;;159272:289;159597:12;;;;159573:21;159667:40;;;;159674:15;159667:40;;;;159663:198;;;159835:12;;;;159817:30;;;;:15;:30;:::i;:::-;159774:13;;;;159759:28;;;;:12;:28;:::i;:::-;159746:42;;153281:4;159746:42;:::i;:::-;159745:103;;;;:::i;:::-;159724:125;;159663:198;159924:135;159964:9;159988:14;160017:10;160042:6;159924:25;:135::i;:::-;159912:147;-1:-1:-1;160080:10:0;:6;160089:1;160080:10;:::i;:::-;160072:5;:18;;-1:-1:-1;;160072:18:0;;;;;;;;;;;;-1:-1:-1;;;;159148:950:0:o;161390:1198::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;161644:15:0;161621:39;;:9;:13;;;:39;;;:63;;;;;161683:1;161664:9;:16;;;:20;;;161621:63;161617:276;;;161715:16;;153075:8;;161715:36;;153281:4;;161715:36;:::i;:::-;161714:49;;;;:::i;:::-;161701:62;;:10;;;;:62;;;;161819:13;;;153281:4;;161819:39;;161842:15;;161819:39;:::i;:::-;161811:48;;161791:4;:10;;;:69;;;;:::i;:::-;161790:91;;;;:::i;:::-;161778:103;;;;161617:276;161940:15;161917:39;;:9;:13;;;:39;;;:63;;;;;161979:1;161960:9;:16;;;:20;;;161917:63;161913:276;;;162011:16;;153075:8;;162011:36;;153281:4;;162011:36;:::i;:::-;162010:49;;;;:::i;:::-;161997:62;;:10;;;;:62;;;;162115:13;;;153281:4;;162115:39;;162138:15;;162115:39;:::i;:::-;162107:48;;162087:4;:10;;;:69;;;;:::i;:::-;162086:91;;;;:::i;:::-;162074:103;;;;161913:276;162201:134;162241:9;162265;162289:4;:10;;;162314:4;:10;;;162201:25;:134::i;:::-;162348:16;162367:23;;;:14;:23;;;;;;:27;;:23;;;:27;:::i;:::-;162405:23;;;;:14;:23;;;;;;;;:35;;;;;;-1:-1:-1;;162405:35:0;;;;;;;;162468:15;162451:33;;:7;;;:33;;;162513:12;162495:31;;:8;;;:31;;;162537:25;;;:16;:25;;;;;:36;;;;;;;;:43;;;;;;;-1:-1:-1;;;;;162537:43:0;;;-1:-1:-1;;;162537:43:0;;;;;;;;;;162405:35;162537:43;;;;;;;;;;-1:-1:-1;;;162537:43:0;-1:-1:-1;;162537:43:0;;;;;;;;;;;;;;;;;-1:-1:-1;;;;161390:1198:0:o;22732:145::-;24565:21;24246:40;-1:-1:-1;;;24246:40:0;;;;22795:75;;22841:17;;-1:-1:-1;;;22841:17:0;;;;;;;;;;;101409:223;22572:20;:18;:20::i;:::-;-1:-1:-1;;;;;;;;;;;101087:21:0;101579:15:::1;101589:5:::0;101087:21;101579:15:::1;:::i;:::-;-1:-1:-1::0;101605:9:0::1;::::0;::::1;:19;101617:7:::0;101605:9;:19:::1;:::i;142505:111::-:0;22572:20;:18;:20::i;145244:97::-;22572:20;:18;:20::i;:::-;145318:7:::1;:15:::0;;-1:-1:-1;;145318:15:0::1;::::0;;145244:97::o;149048:240::-;22572:20;:18;:20::i;109617:886::-;109703:7;-1:-1:-1;;;;;;;;;;;109703:7:0;109794:17;109803:7;109794:8;:17::i;:::-;109779:32;-1:-1:-1;;;;;;109874:18:0;;;109870:88;;109909:37;109926:4;109932;109938:7;109909:16;:37::i;:::-;-1:-1:-1;;;;;110005:18:0;;;110001:265;;110123:48;110140:1;110144:7;110161:1;110165:5;110123:8;:48::i;:::-;-1:-1:-1;;;;;110217:17:0;;;;;;:11;;;:17;;;;;:22;;-1:-1:-1;;110217:22:0;;;110001:265;-1:-1:-1;;;;;110282:16:0;;;110278:113;;-1:-1:-1;;;;;110344:15:0;;;;;;:11;;;:15;;;;;:20;;110363:1;110344:20;;;110278:113;110403:18;;;;:9;;;:18;;;;;;:23;;-1:-1:-1;;;;;;110403:23:0;-1:-1:-1;;;;;110403:23:0;;;;;;;;;110444:27;;110403:18;;110444:27;;;;;;;110491:4;109617:886;-1:-1:-1;;;;;109617:886:0:o;138828:660::-;139263:23;139289:69;139317:4;139289:69;;;;;;;;;;;;;;;;;139297:5;-1:-1:-1;;;;;139289:27:0;;;:69;;;;;:::i;:::-;139263:95;;139377:10;:17;139398:1;139377:22;:56;;;;139414:10;139403:30;;;;;;;;;;;;:::i;:::-;139369:111;;;;-1:-1:-1;;;139369:111:0;;25103:2:1;139369:111:0;;;25085:21:1;25142:2;25122:18;;;25115:30;25181:34;25161:18;;;25154:62;-1:-1:-1;;;25232:18:1;;;25225:40;25282:19;;139369:111:0;24901:406:1;111866:210:0;111961:18;111967:2;111971:7;111961:5;:18::i;:::-;111990:78;25437:10;112046:1;112050:2;112054:7;112063:4;14630:948;-1:-1:-1;;;;;14817:14:0;;;:18;14813:758;;14856:67;;-1:-1:-1;;;14856:67:0;;-1:-1:-1;;;;;14856:36:0;;;;;:67;;14893:8;;14903:4;;14909:7;;14918:4;;14856:67;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14856:67:0;;;;;;;;-1:-1:-1;;14856:67:0;;;;;;;;;;;;:::i;:::-;;;14852:708;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15219:6;:13;15236:1;15219:18;15215:330;;15325:39;;-1:-1:-1;;;15325:39:0;;-1:-1:-1;;;;;1506:32:1;;15325:39:0;;;1488:51:1;1461:18;;15325:39:0;1342:203:1;15215:330:0;15495:6;15489:13;15480:6;15476:2;15472:15;15465:38;14852:708;-1:-1:-1;;;;;;14971:51:0;;-1:-1:-1;;;14971:51:0;14967:185;;15093:39;;-1:-1:-1;;;15093:39:0;;-1:-1:-1;;;;;1506:32:1;;15093:39:0;;;1488:51:1;1461:18;;15093:39:0;1342:203:1;14967:185:0;14924:243;14852:708;14630:948;;;;;:::o;146311:108::-;146038:7;;;;146370:41;;;;-1:-1:-1;;;146370:41:0;;26258:2:1;146370:41:0;;;26240:21:1;26297:2;26277:18;;;26270:30;-1:-1:-1;;;26316:18:1;;;26309:50;26376:18;;146370:41:0;26056:344:1;160106:1276:0;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;160341:9:0;160309:29;153121:9;160374:21;153121:9;160374:14;:21;:::i;:::-;160373:30;;;;:::i;:::-;160361:42;-1:-1:-1;160429:9:0;160424:914;160448:3;160444:1;:7;160424:914;;;160473:10;153121:9;160473:10;;:::i;:::-;;-1:-1:-1;160498:13:0;160548:28;160560:15;160548:28;;;;;;160544:163;;;160609:15;160597:28;;160544:163;;;-1:-1:-1;160675:16:0;;;;;;;:12;:16;;;;;;;;160544:163;160786:19;160791:14;160786:2;:19;:::i;:::-;160778:28;;160753:9;:15;;;:54;;;;:::i;:::-;160735:72;;:9;;:72;;;;;:::i;:::-;;;;;-1:-1:-1;160822:15:0;;;:25;;160841:6;;160822:15;:25;;160841:6;;160822:25;:::i;:::-;;;;;-1:-1:-1;160862:17:0;;;:12;;;;:17;;;;160997:19;;;153281:4;;160992:24;;160877:2;160992:24;:::i;:::-;160969:48;;;;-1:-1:-1;;;;;160969:19:0;;:48;:::i;:::-;160968:62;;;;:::i;:::-;160917:16;:20;;;:113;;;;;;:::i;:::-;160894:137;;;;:13;;;:137;161077:15;161064:29;;;;;;161060:219;;-1:-1:-1;161114:36:0;161137:12;161114:36;:13;;;:36;161169:5;;161060:219;161254:9;161215:12;:36;161248:1;161228:10;:6;161237:1;161228:10;:::i;:::-;:22;;;;:::i;:::-;161215:36;;;;;;;;;;;;;;;;;;-1:-1:-1;161215:36:0;:48;;;;;;-1:-1:-1;;;;;161215:48:0;;;-1:-1:-1;;;161215:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;161215:48:0;-1:-1:-1;;161215:48:0;;;;;;;;;;;;;;;;;-1:-1:-1;161324:2:0;;-1:-1:-1;161324:2:0;;160453:3;;160424:914;;;-1:-1:-1;161365:9:0;;160106:1276;-1:-1:-1;;;;;;160106:1276:0:o;162596:814::-;162819:15;162796:39;;:9;:13;;;:39;;;162792:314;;;162884:13;;;;;162871:27;;162852:16;162871:27;;;:12;:27;;;;;;;;;162913:21;162926:8;162871:27;162913:21;:::i;:::-;;;162970:9;:13;;;162953:30;;:9;:13;;;:30;;;162949:92;;163004:21;163017:8;163004:21;;:::i;:::-;;;162949:92;163068:13;;;;;163055:27;;;;;;:12;:27;;;;;;:39;;-1:-1:-1;;;;;;163055:39:0;-1:-1:-1;;;;;163055:39:0;;;;;;;;;;162792:314;163145:15;163122:39;;:9;:13;;;:39;;;163118:285;;;163198:9;:13;;;163182:29;;:9;:13;;;:29;;;163178:214;;;163264:13;;;;;163251:27;;163232:16;163251:27;;;:12;:27;;;;;;;;;163297:21;163310:8;163251:27;163297:21;:::i;:::-;163350:13;;;;;163337:27;;;;;;:12;:27;;;;;;:39;;-1:-1:-1;;;;;163337:39:0;;;-1:-1:-1;;;;;;163337:39:0;;;;;;;;;-1:-1:-1;162596:814:0;;;;:::o;107766:376::-;107879:38;107893:5;107900:7;107909;107879:13;:38::i;:::-;107874:261;;-1:-1:-1;;;;;107938:19:0;;107934:190;;107985:31;;-1:-1:-1;;;107985:31:0;;;;;7831:25:1;;;7804:18;;107985:31:0;7685:177:1;107934:190:0;108064:44;;-1:-1:-1;;;108064:44:0;;-1:-1:-1;;;;;20946:32:1;;108064:44:0;;;20928:51:1;20995:18;;;20988:34;;;20901:18;;108064:44:0;20754:274:1;128228:229:0;128365:12;128397:52;128419:6;128427:4;128433:1;128436:12;128397:21;:52::i;110839:335::-;-1:-1:-1;;;;;110907:16:0;;110903:89;;110947:33;;-1:-1:-1;;;110947:33:0;;110977:1;110947:33;;;1488:51:1;1461:18;;110947:33:0;1342:203:1;110903:89:0;111002:21;111026:32;111034:2;111038:7;111055:1;111026:7;:32::i;:::-;111002:56;-1:-1:-1;;;;;;111073:27:0;;;111069:98;;111124:31;;-1:-1:-1;;;111124:31:0;;111152:1;111124:31;;;1488:51:1;1461:18;;111124:31:0;1342:203:1;107047:276:0;107150:4;-1:-1:-1;;;;;107187:21:0;;;;;;:128;;;107235:7;-1:-1:-1;;;;;107226:16:0;:5;-1:-1:-1;;;;;107226:16:0;;:52;;;;107246:32;107263:5;107270:7;107246:16;:32::i;:::-;107226:88;;;;107307:7;-1:-1:-1;;;;;107282:32:0;:21;107295:7;107282:12;:21::i;:::-;-1:-1:-1;;;;;107282:32:0;;;107047:276;-1:-1:-1;;;;107047:276:0:o;129314:455::-;129484:12;129542:5;129517:21;:30;;129509:81;;;;-1:-1:-1;;;129509:81:0;;26607:2:1;129509:81:0;;;26589:21:1;26646:2;26626:18;;;26619:30;26685:34;26665:18;;;26658:62;-1:-1:-1;;;26736:18:1;;;26729:36;26782:19;;129509:81:0;26405:402:1;129509:81:0;129602:12;129616:23;129643:6;-1:-1:-1;;;;;129643:11:0;129662:5;129669:4;129643:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;129601:73;;;;129692:69;129719:6;129727:7;129736:10;129748:12;132072;132101:7;132097:427;;;132129:10;:17;132150:1;132129:22;132125:290;;-1:-1:-1;;;;;125768:19:0;;;132339:60;;;;-1:-1:-1;;;132339:60:0;;27014:2:1;132339:60:0;;;26996:21:1;27053:2;27033:18;;;27026:30;27092:31;27072:18;;;27065:59;27141:18;;132339:60:0;26812:353:1;132339:60:0;-1:-1:-1;132436:10:0;132429:17;;132097:427;132479:33;132487:10;132499:12;133234:17;;:21;133230:388;;133466:10;133460:17;133523:15;133510:10;133506:2;133502:19;133495:44;133230:388;133593:12;133586:20;;-1:-1:-1;;;133586:20:0;;;;;;;;:::i;14:131:1:-;-1:-1:-1;;;;;;88:32:1;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;592:289::-;634:3;672:5;666:12;699:6;694:3;687:19;755:6;748:4;741:5;737:16;730:4;725:3;721:14;715:47;807:1;800:4;791:6;786:3;782:16;778:27;771:38;870:4;863:2;859:7;854:2;846:6;842:15;838:29;833:3;829:39;825:50;818:57;;;592:289;;;;:::o;886:220::-;1035:2;1024:9;1017:21;998:4;1055:45;1096:2;1085:9;1081:18;1073:6;1055:45;:::i;1111:226::-;1170:6;1223:2;1211:9;1202:7;1198:23;1194:32;1191:52;;;1239:1;1236;1229:12;1191:52;-1:-1:-1;1284:23:1;;1111:226;-1:-1:-1;1111:226:1:o;1550:173::-;1618:20;;-1:-1:-1;;;;;1667:31:1;;1657:42;;1647:70;;1713:1;1710;1703:12;1647:70;1550:173;;;:::o;1728:300::-;1796:6;1804;1857:2;1845:9;1836:7;1832:23;1828:32;1825:52;;;1873:1;1870;1863:12;1825:52;1896:29;1915:9;1896:29;:::i;:::-;1886:39;1994:2;1979:18;;;;1966:32;;-1:-1:-1;;;1728:300:1:o;2267:186::-;2326:6;2379:2;2367:9;2358:7;2354:23;2350:32;2347:52;;;2395:1;2392;2385:12;2347:52;2418:29;2437:9;2418:29;:::i;2458:611::-;2648:2;2660:21;;;2730:13;;2633:18;;;2752:22;;;2600:4;;2831:15;;;2805:2;2790:18;;;2600:4;2874:169;2888:6;2885:1;2882:13;2874:169;;;2949:13;;2937:26;;2992:2;3018:15;;;;2983:12;;;;2910:1;2903:9;2874:169;;;-1:-1:-1;3060:3:1;;2458:611;-1:-1:-1;;;;;2458:611:1:o;3074:163::-;3141:20;;3201:10;3190:22;;3180:33;;3170:61;;3227:1;3224;3217:12;3242:298;3309:6;3317;3370:2;3358:9;3349:7;3345:23;3341:32;3338:52;;;3386:1;3383;3376:12;3338:52;3431:23;;;-1:-1:-1;3497:37:1;3530:2;3515:18;;3497:37;:::i;:::-;3487:47;;3242:298;;;;;:::o;3999:188::-;4067:20;;-1:-1:-1;;;;;4116:46:1;;4106:57;;4096:85;;4177:1;4174;4167:12;4192:493;4277:6;4285;4293;4301;4354:3;4342:9;4333:7;4329:23;4325:33;4322:53;;;4371:1;4368;4361:12;4322:53;4416:23;;;-1:-1:-1;4482:37:1;4515:2;4500:18;;4482:37;:::i;:::-;4472:47;-1:-1:-1;4592:2:1;4577:18;;4564:32;;-1:-1:-1;4641:38:1;4675:2;4660:18;;4641:38;:::i;:::-;4631:48;;4192:493;;;;;;;:::o;4690:127::-;4751:10;4746:3;4742:20;4739:1;4732:31;4782:4;4779:1;4772:15;4806:4;4803:1;4796:15;4822:275;4893:2;4887:9;4958:2;4939:13;;-1:-1:-1;;4935:27:1;4923:40;;4993:18;4978:34;;5014:22;;;4975:62;4972:88;;;5040:18;;:::i;:::-;5076:2;5069:22;4822:275;;-1:-1:-1;4822:275:1:o;5102:187::-;5151:4;5184:18;5176:6;5173:30;5170:56;;;5206:18;;:::i;:::-;-1:-1:-1;5272:2:1;5251:15;-1:-1:-1;;5247:29:1;5278:4;5243:40;;5102:187::o;5294:338::-;5359:5;5388:53;5404:36;5433:6;5404:36;:::i;:::-;5388:53;:::i;:::-;5379:62;;5464:6;5457:5;5450:21;5504:3;5495:6;5490:3;5486:16;5483:25;5480:45;;;5521:1;5518;5511:12;5480:45;5570:6;5565:3;5558:4;5551:5;5547:16;5534:43;5624:1;5617:4;5608:6;5601:5;5597:18;5593:29;5586:40;5294:338;;;;;:::o;5637:222::-;5680:5;5733:3;5726:4;5718:6;5714:17;5710:27;5700:55;;5751:1;5748;5741:12;5700:55;5773:80;5849:3;5840:6;5827:20;5820:4;5812:6;5808:17;5773:80;:::i;5864:687::-;5970:6;5978;5986;5994;6047:3;6035:9;6026:7;6022:23;6018:33;6015:53;;;6064:1;6061;6054:12;6015:53;6087:29;6106:9;6087:29;:::i;:::-;6077:39;;6135:38;6169:2;6158:9;6154:18;6135:38;:::i;:::-;6125:48;;6224:2;6213:9;6209:18;6196:32;6251:18;6243:6;6240:30;6237:50;;;6283:1;6280;6273:12;6237:50;6306;6348:7;6339:6;6328:9;6324:22;6306:50;:::i;:::-;6296:60;;;6409:2;6398:9;6394:18;6381:32;6438:18;6428:8;6425:32;6422:52;;;6470:1;6467;6460:12;6422:52;6493;6537:7;6526:8;6515:9;6511:24;6493:52;:::i;:::-;6483:62;;;5864:687;;;;;;;:::o;6556:374::-;6633:6;6641;6649;6702:2;6690:9;6681:7;6677:23;6673:32;6670:52;;;6718:1;6715;6708:12;6670:52;6741:29;6760:9;6741:29;:::i;:::-;6731:39;;6789:38;6823:2;6812:9;6808:18;6789:38;:::i;:::-;6556:374;;6779:48;;-1:-1:-1;;;6896:2:1;6881:18;;;;6868:32;;6556:374::o;7158:522::-;7252:6;7260;7268;7276;7284;7337:3;7325:9;7316:7;7312:23;7308:33;7305:53;;;7354:1;7351;7344:12;7305:53;7377:29;7396:9;7377:29;:::i;:::-;7367:39;;7425:38;7459:2;7448:9;7444:18;7425:38;:::i;:::-;7415:48;;7482:37;7515:2;7504:9;7500:18;7482:37;:::i;:::-;7472:47;-1:-1:-1;7588:2:1;7573:18;;7560:32;;-1:-1:-1;7635:39:1;7669:3;7654:19;;7635:39;:::i;:::-;7625:49;;7158:522;;;;;;;;:::o;7867:184::-;7925:6;7978:2;7966:9;7957:7;7953:23;7949:32;7946:52;;;7994:1;7991;7984:12;7946:52;8017:28;8035:9;8017:28;:::i;9146:118::-;9232:5;9225:13;9218:21;9211:5;9208:32;9198:60;;9254:1;9251;9244:12;9269:315;9334:6;9342;9395:2;9383:9;9374:7;9370:23;9366:32;9363:52;;;9411:1;9408;9401:12;9363:52;9434:29;9453:9;9434:29;:::i;:::-;9424:39;;9513:2;9502:9;9498:18;9485:32;9526:28;9548:5;9526:28;:::i;:::-;9573:5;9563:15;;;9269:315;;;;;:::o;9589:713::-;9684:6;9692;9700;9708;9761:3;9749:9;9740:7;9736:23;9732:33;9729:53;;;9778:1;9775;9768:12;9729:53;9801:29;9820:9;9801:29;:::i;:::-;9791:39;;9849:38;9883:2;9872:9;9868:18;9849:38;:::i;:::-;9839:48;-1:-1:-1;9956:2:1;9941:18;;9928:32;;-1:-1:-1;10035:2:1;10020:18;;10007:32;10062:18;10051:30;;10048:50;;;10094:1;10091;10084:12;10048:50;10117:22;;10170:4;10162:13;;10158:27;-1:-1:-1;10148:55:1;;10199:1;10196;10189:12;10148:55;10222:74;10288:7;10283:2;10270:16;10265:2;10261;10257:11;10222:74;:::i;10307:730::-;10402:6;10410;10418;10471:2;10459:9;10450:7;10446:23;10442:32;10439:52;;;10487:1;10484;10477:12;10439:52;10527:9;10514:23;10560:18;10552:6;10549:30;10546:50;;;10592:1;10589;10582:12;10546:50;10615:22;;10668:4;10660:13;;10656:27;-1:-1:-1;10646:55:1;;10697:1;10694;10687:12;10646:55;10737:2;10724:16;10763:18;10755:6;10752:30;10749:50;;;10795:1;10792;10785:12;10749:50;10850:7;10843:4;10833:6;10830:1;10826:14;10822:2;10818:23;10814:34;10811:47;10808:67;;;10871:1;10868;10861:12;10808:67;10902:4;10894:13;;;;10926:6;;-1:-1:-1;10986:20:1;;10973:34;;10307:730;-1:-1:-1;;;10307:730:1:o;11042:495::-;11128:6;11136;11144;11152;11205:3;11193:9;11184:7;11180:23;11176:33;11173:53;;;11222:1;11219;11212:12;11173:53;11267:23;;;-1:-1:-1;11333:38:1;11367:2;11352:18;;11333:38;:::i;11542:258::-;11609:6;11617;11670:2;11658:9;11649:7;11645:23;11641:32;11638:52;;;11686:1;11683;11676:12;11638:52;11709:29;11728:9;11709:29;:::i;:::-;11699:39;;11757:37;11790:2;11779:9;11775:18;11757:37;:::i;11805:447::-;11890:6;11898;11906;11914;11967:3;11955:9;11946:7;11942:23;11938:33;11935:53;;;11984:1;11981;11974:12;11935:53;12007:29;12026:9;12007:29;:::i;:::-;11997:39;;12055:37;12088:2;12077:9;12073:18;12055:37;:::i;12257:260::-;12325:6;12333;12386:2;12374:9;12365:7;12361:23;12357:32;12354:52;;;12402:1;12399;12392:12;12354:52;12425:29;12444:9;12425:29;:::i;:::-;12415:39;;12473:38;12507:2;12496:9;12492:18;12473:38;:::i;12522:380::-;12601:1;12597:12;;;;12644;;;12665:61;;12719:4;12711:6;12707:17;12697:27;;12665:61;12772:2;12764:6;12761:14;12741:18;12738:38;12735:161;;12818:10;12813:3;12809:20;12806:1;12799:31;12853:4;12850:1;12843:15;12881:4;12878:1;12871:15;12735:161;;12522:380;;;:::o;12907:127::-;12968:10;12963:3;12959:20;12956:1;12949:31;12999:4;12996:1;12989:15;13023:4;13020:1;13013:15;13039:127;13100:10;13095:3;13091:20;13088:1;13081:31;13131:4;13128:1;13121:15;13155:4;13152:1;13145:15;13171:135;13210:3;13231:17;;;13228:43;;13251:18;;:::i;:::-;-1:-1:-1;13298:1:1;13287:13;;13171:135::o;13311:127::-;13372:10;13367:3;13363:20;13360:1;13353:31;13403:4;13400:1;13393:15;13427:4;13424:1;13417:15;13443:120;13483:1;13509;13499:35;;13514:18;;:::i;:::-;-1:-1:-1;13548:9:1;;13443:120::o;13568:243::-;-1:-1:-1;;;;;13683:42:1;;;13639;;;13635:91;;13738:44;;13735:70;;;13785:18;;:::i;13816:317::-;-1:-1:-1;;;;;13901:42:1;;;13945;;;13897:91;14008:52;;;;14079:24;;;14069:58;;14107:18;;:::i;:::-;14069:58;13816:317;;;;:::o;14138:168::-;14211:9;;;14242;;14259:15;;;14253:22;;14239:37;14229:71;;14280:18;;:::i;14311:167::-;14406:10;14379:18;;;14399;;;14375:43;;14430:19;;14427:45;;;14452:18;;:::i;14483:170::-;14580:10;14573:18;;;14553;;;14549:43;;14604:20;;14601:46;;;14627:18;;:::i;15181:184::-;15251:6;15304:2;15292:9;15283:7;15279:23;15275:32;15272:52;;;15320:1;15317;15310:12;15272:52;-1:-1:-1;15343:16:1;;15181:184;-1:-1:-1;15181:184:1:o;15370:125::-;15435:9;;;15456:10;;;15453:36;;;15469:18;;:::i;16511:240::-;-1:-1:-1;;;;;16580:42:1;;;16624;;;16576:91;;16679:43;;16676:69;;;16725:18;;:::i;16756:188::-;16794:3;16838:10;16831:5;16827:22;16873:10;16864:7;16861:23;16858:49;;16887:18;;:::i;:::-;16936:1;16923:15;;16756:188;-1:-1:-1;;16756:188:1:o;16949:301::-;17078:3;17116:6;17110:13;17162:6;17155:4;17147:6;17143:17;17138:3;17132:37;17224:1;17188:16;;17213:13;;;-1:-1:-1;17188:16:1;16949:301;-1:-1:-1;16949:301:1:o;17605:687::-;17685:6;17738:2;17726:9;17717:7;17713:23;17709:32;17706:52;;;17754:1;17751;17744:12;17706:52;17787:9;17781:16;17820:18;17812:6;17809:30;17806:50;;;17852:1;17849;17842:12;17806:50;17875:22;;17928:4;17920:13;;17916:27;-1:-1:-1;17906:55:1;;17957:1;17954;17947:12;17906:55;17990:2;17984:9;18015:53;18031:36;18060:6;18031:36;:::i;18015:53::-;18091:6;18084:5;18077:21;18139:7;18134:2;18125:6;18121:2;18117:15;18113:24;18110:37;18107:57;;;18160:1;18157;18150:12;18107:57;18208:6;18203:2;18199;18195:11;18190:2;18183:5;18179:14;18173:42;18260:1;18235:18;;;18255:2;18231:27;18224:38;;;;18239:5;17605:687;-1:-1:-1;;;;17605:687:1:o;18297:241::-;18336:7;18415:1;18411:2;18400:17;18396:1;18392:2;18381:17;18377:41;18453:11;18449:2;18438:27;18427:38;;18496:11;18487:7;18484:24;18474:58;;18512:18;;:::i;18543:305::-;18582:1;18624;18620:2;18609:17;18661:1;18657:2;18646:17;18682:3;18672:37;;18689:18;;:::i;:::-;-1:-1:-1;;;;;;18725:48:1;;-1:-1:-1;;18775:15:1;;18721:70;18718:96;;;18794:18;;:::i;:::-;18828:14;;;18543:305;-1:-1:-1;;;18543:305:1:o;18853:249::-;18953:2;18942:17;;;18923;;;;18919:41;-1:-1:-1;;;;;;18975:50:1;;-1:-1:-1;;;;;19027:45:1;;18972:101;18969:127;;;19076:18;;:::i;19107:185::-;19145:3;19189:10;19182:5;19178:22;19219:7;19209:41;;19230:18;;:::i;:::-;-1:-1:-1;;19266:20:1;;19107:185;-1:-1:-1;;19107:185:1:o;21033:178::-;21072:1;21106:10;21103:1;21099:18;21136:3;21126:37;;21143:18;;:::i;:::-;21201:3;21188:10;21185:1;21181:18;21177:28;21172:33;;;21033:178;;;;:::o;21216:244::-;21327:10;21300:18;;;21320;;;21296:43;21359:28;;;;21406:24;;;21396:58;;21434:18;;:::i;21465:245::-;21563:2;21533:17;;;21552;;;;21529:41;-1:-1:-1;;;;;21585:44:1;;-1:-1:-1;;;;;;21631:49:1;;21582:99;21579:125;;;21684:18;;:::i;21715:227::-;21755:1;-1:-1:-1;;;;;21786:1:1;21782:42;21843:3;21833:37;;21850:18;;:::i;:::-;21932:3;-1:-1:-1;;;;;21892:1:1;21888:42;21884:52;21879:57;;;21715:227;;;;:::o;22394:128::-;22461:9;;;22482:11;;;22479:37;;;22496:18;;:::i;22653:518::-;22755:2;22750:3;22747:11;22744:421;;;22791:5;22788:1;22781:16;22835:4;22832:1;22822:18;22905:2;22893:10;22889:19;22886:1;22882:27;22876:4;22872:38;22941:4;22929:10;22926:20;22923:47;;;-1:-1:-1;22964:4:1;22923:47;23019:2;23014:3;23010:12;23007:1;23003:20;22997:4;22993:31;22983:41;;23074:81;23092:2;23085:5;23082:13;23074:81;;;23151:1;23137:16;;23118:1;23107:13;23074:81;;23347:1299;23473:3;23467:10;23500:18;23492:6;23489:30;23486:56;;;23522:18;;:::i;:::-;23551:97;23641:6;23601:38;23633:4;23627:11;23601:38;:::i;:::-;23595:4;23551:97;:::i;:::-;23697:4;23728:2;23717:14;;23745:1;23740:649;;;;24433:1;24450:6;24447:89;;;-1:-1:-1;24502:19:1;;;24496:26;24447:89;-1:-1:-1;;23304:1:1;23300:11;;;23296:24;23292:29;23282:40;23328:1;23324:11;;;23279:57;24549:81;;23710:930;;23740:649;22600:1;22593:14;;;22637:4;22624:18;;-1:-1:-1;;23776:20:1;;;23894:222;23908:7;23905:1;23902:14;23894:222;;;23990:19;;;23984:26;23969:42;;24097:4;24082:20;;;;24050:1;24038:14;;;;23924:12;23894:222;;;23898:3;24144:6;24135:7;24132:19;24129:201;;;24205:19;;;24199:26;-1:-1:-1;;24288:1:1;24284:14;;;24300:3;24280:24;24276:37;24272:42;24257:58;24242:74;;24129:201;-1:-1:-1;;;;24376:1:1;24360:14;;;24356:22;24343:36;;-1:-1:-1;23347:1299:1:o;24651:245::-;24718:6;24771:2;24759:9;24750:7;24746:23;24742:32;24739:52;;;24787:1;24784;24777:12;24739:52;24819:9;24813:16;24838:28;24860:5;24838:28;:::i;25312:485::-;-1:-1:-1;;;;;25543:32:1;;;25525:51;;25612:32;;25607:2;25592:18;;25585:60;25676:2;25661:18;;25654:34;;;25724:3;25719:2;25704:18;;25697:31;;;-1:-1:-1;;25745:46:1;;25771:19;;25763:6;25745:46;:::i;25802:249::-;25871:6;25924:2;25912:9;25903:7;25899:23;25895:32;25892:52;;;25940:1;25937;25930:12;25892:52;25972:9;25966:16;25991:30;26015:5;25991:30;:::i
Swarm Source
ipfs://0e1289de6d63347d6b2d8403f46866f5755bcf23805297a4c9297cf074120231
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.