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 earned(uint256 tokenId) external view returns (uint256); function checkpoint_token() external; function checkpoint_total_supply() external; function getClaimableRewards(uint256 tokenId) external view returns ( address[] memory tokens, uint256[] memory amounts, uint256[] memory periods ); 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 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) && _ownerOf(tokenId) != address(0)) { if (_distributor.earned(tokenId) > 0) { _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; 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); LockedBalance memory oldLock = LockedBalance({ amount: int128(uint128(amount)), end: lock.endTime }); delete _locks[tokenId]; _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
6080604052606d805463ffffffff60a01b1916600f60a01b1790553480156024575f5ffd5b50602b602f565b60df565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615607e5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460dc5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615483806100ec5f395ff3fe608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c806375619ab51161017b578063bbe33ea5116100e4578063ddacc94a1161009e578063e58f594711610079578063e58f5947146107ee578063e985e9c514610813578063f2fde38b14610826578063f7b188a514610839575f5ffd5b8063ddacc94a146107b5578063df0c78ef146107c8578063df215157146107db575f5ffd5b8063bbe33ea51461073f578063bcc0022514610752578063beb8310914610774578063c5b1c7d014610787578063c87b56dd1461078f578063d89dd269146107a2575f5ffd5b806395d89b411161013557806395d89b41146106a257806397612d4b146106aa57806398a3f422146106bd5780639b7d02ad146106dc578063a22cb46514610719578063b88d4fde1461072c575f5ffd5b806375619ab51461055d57806389f839c6146105705780638b25e8c1146105f35780638da5cb5b146106065780638ff4249014610636578063900cf0cf1461067d575f5ffd5b8063268dc1991161021d5780635594a045116101d75780635594a045146104dc578063586c2600146104ef5780635c975abb146105245780636352211e1461052f57806370a0823114610542578063715018a614610555575f5ffd5b8063268dc1991461045e5780632a90752d1461046f5780632e1a7d4d146104905780632e720f7d146104a357806342842e0e146104b65780635312ea8e146104c9575f5ffd5b80631d237a491161026e5780631d237a49146103635780631f5ab022146103e85780632016a0d2146103fb57806320a194b81461040e57806323b872dd1461042057806324c44c5b14610433575f5ffd5b806301ffc9a7146102b557806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d5780630f45cc811461033257806313de148b14610343575b5f5ffd5b6102c86102c33660046149e3565b610841565b60405190151581526020015b60405180910390f35b6102e5610892565b6040516102d49190614a2c565b610305610300366004614a3e565b610933565b6040516001600160a01b0390911681526020016102d4565b61033061032b366004614a70565b610947565b005b6064546001600160a01b0316610305565b610356610351366004614a98565b610956565b6040516102d49190614ab1565b6103b5610371366004614b06565b606b60209081525f928352604080842090915290825290208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60408051600f95860b81529390940b602084015263ffffffff9182169383019390935290911660608201526080016102d4565b6103306103f6366004614b46565b610a4b565b610330610409366004614c4e565b610f4b565b606f54600160a01b900460ff166102c8565b61033061042e366004614cd3565b611146565b610446610441366004614b06565b611160565b6040516001600160801b0390911681526020016102d4565b606e546001600160801b0316610446565b61048261047d366004614d0d565b611270565b6040519081526020016102d4565b61033061049e366004614a3e565b611665565b6103306104b1366004614a98565b611981565b6103306104c4366004614cd3565b6119d2565b6103306104d7366004614a3e565b6119ec565b606d54610305906001600160a01b031681565b6105116104fd366004614d67565b606c6020525f9081526040902054600f0b81565b604051600f9190910b81526020016102d4565b60325460ff166102c8565b61030561053d366004614a3e565b611b85565b610482610550366004614a98565b611b8f565b610330611be7565b61033061056b366004614a98565b611bfa565b6105bc61057e366004614a3e565b60666020525f9081526040902080546001909101546001600160801b0380831692600160801b9004169063ffffffff80821691600160201b90041684565b604080516001600160801b03958616815294909316602085015263ffffffff918216928401929092521660608201526080016102d4565b610446610601366004614a3e565b611ca4565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610305565b6103b5610644366004614d67565b60686020525f908152604090208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60695461068d9063ffffffff1681565b60405163ffffffff90911681526020016102d4565b6102e5611e40565b6104466106b8366004614d67565b611e7e565b6104826106cb366004614a3e565b60706020525f908152604090205481565b6107076106ea366004614a98565b6001600160a01b03165f9081526067602052604090205460ff1690565b60405160ff90911681526020016102d4565b610330610727366004614d8d565b611eea565b61033061073a366004614dc2565b611ef5565b61033061074d366004614e2d565b611f0b565b610707610760366004614a98565b60676020525f908152604090205460ff1681565b610330610782366004614ea2565b612359565b610330612751565b6102e561079d366004614a3e565b6127b7565b6104466107b0366004614ec5565b61290a565b6104466107c3366004614b06565b612983565b6104466107d6366004614ec5565b612ace565b6104826107e9366004614eed565b612b82565b61068d6107fc366004614a3e565b606a6020525f908152604090205463ffffffff1681565b6102c8610821366004614f17565b612f2c565b610330610834366004614a98565b612f78565b610330612fb2565b5f6001600160e01b031982166380ac58cd60e01b148061087157506001600160e01b03198216635b5e139f60e01b145b8061088c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f51602061542e5f395f51905f5280546060919081906108b190614f3f565b80601f01602080910402602001604051908101604052809291908181526020018280546108dd90614f3f565b80156109285780601f106108ff57610100808354040283529160200191610928565b820191905f5260205f20905b81548152906001019060200180831161090b57829003601f168201915b505050505091505090565b5f61093d82612fc2565b5061088c82612ff9565b610952828233613032565b5050565b6001600160a01b0381165f9081526067602052604090205460609060ff168067ffffffffffffffff81111561098d5761098d614b89565b6040519080825280602002602001820160405280156109b6578160200160208202803683370190505b5091508060ff165f036109c95750919050565b5f805b606554600160a01b900463ffffffff16811015610a4357846001600160a01b03166109f68261303f565b6001600160a01b031603610a3b5780848381518110610a1757610a17614f77565b602090810291909101015281610a2c81614f9f565b9250508260ff16821015610a43575b6001016109cc565b505050919050565b610a53613078565b610a5b6130cf565b8180421115610a7d57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b9004909216606083015286919015801590610afa5750806040015163ffffffff164263ffffffff16105b15610c3d5780515f90610b1f90670de0b6b3a7640000906001600160801b0316614fcb565b90505f610b3c670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b031690505f610b5d670de0b6b3a764000062ed4e00614ffd565b6001600160801b0316610b708385615026565b610b7a9190614fcb565b90505f819050806001600160801b031685602001516001600160801b031614610c3857610bf0866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613115565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b33610c4788611b85565b6001600160a01b031614610c6e576040516359dc379f60e01b815260040160405180910390fd5b5f878152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b900490911660608201529103610ce957604051632254ea3d60e11b815260040160405180910390fd5b5f878260400151610cfa919061503d565b90505f610d074283615059565b905062ed4e0063ffffffff82161115610d3357604051637616640160e01b815260040160405180910390fd5b5f610d40845f015161312e565b90505f610d4d8284613158565b9050886001600160801b0316816001600160801b03161015610d8257604051638199f5f360e01b815260040160405180910390fd5b8451610d8e908261323a565b610ddd8c6040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b81526020018863ffffffff16815250613115565b6040518060800160405280865f01516001600160801b03168152602001836001600160801b031681526020018563ffffffff1681526020014263ffffffff1681525060665f8e81526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055509050508b336001600160a01b03167f3032be442129e161b4ae1cdee94871a69de2c16ee2007f31fc209a715673455c8684604051610f2c92919063ffffffff9290921682526001600160801b0316602082015260400190565b60405180910390a35050505050505050610f4560015f55565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610f905750825b90505f8267ffffffffffffffff166001148015610fac5750303b155b905081158015610fba575080155b15610fd85760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561100257845460ff60401b1916600160401b1785555b6001600160a01b038916158061101f57506001600160a01b038816155b1561103d5760405163d92e233d60e01b815260040160405180910390fd5b61104787876132b2565b61104f6132c4565b6110576132d4565b611060336132e4565b6110686132f5565b606480546001600160a01b03808c166001600160a01b031992831617909255606f8054928b16929091169190911790555f805260686020527fad6f8124f6081c2622ab3a16acd47af73d52fe87b755c3f897263c58ba3fdbd880544263ffffffff90811663ffffffff194392909216600160201b029190911667ffffffffffffffff1990921691909117179055831561113b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b611150838261334a565b61115b83838361346b565b505050565b5f8163ffffffff165f0361118757604051637616640160e01b815260040160405180910390fd5b5f838152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361120257604051632254ea3d60e11b815260040160405180910390fd5b5f838260400151611213919061503d565b90505f6112204283615059565b905062ed4e0063ffffffff8216111561124c57604051637616640160e01b815260040160405180910390fd5b5f611259845f015161312e565b90506112658183613158565b979650505050505050565b5f611279613078565b6112816130cf565b82804211156112a357604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f036112cc5760405163162908e360e11b815260040160405180910390fd5b63ffffffff851615806112e7575062ed4e0063ffffffff8616115b1561130557604051637616640160e01b815260040160405180910390fd5b6001600160a01b03871661132c5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0387165f90815260676020526040902054606460ff909116106113695760405163133cbc4f60e01b815260040160405180910390fd5b5f611374864261503d565b90505f5f6113838989886134ee565b915091505f60405180604001604052808b600f0b81526020018563ffffffff1681525090506113d05f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613115565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061143a9190615075565b60645490915061145e906001600160a01b031633306001600160801b038f16613594565b6114716001600160801b038c168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114db9190615075565b146114f9576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b19909316929092179092556001600160a01b038e165f908152606760205260409020805460ff80821690940190931660ff199093169290921790915596506115658c886135ff565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff1990941692909116919091179190911790556115f98b8461323a565b604080516001600160801b038d16815263ffffffff8716602082015288916001600160a01b038f16917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061165c60015f55565b95945050505050565b61166d613078565b5f6116778261303f565b90506001600160a01b03811661169f57604051626f708760e21b815260040160405180910390fd5b6001600160a01b03811633146116c8576040516359dc379f60e01b815260040160405180910390fd5b5f828152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361174357604051632254ea3d60e11b815260040160405180910390fd5b806040015163ffffffff164263ffffffff1610156117745760405163342ad40160e11b815260040160405180910390fd5b80515f61178085611ca4565b90505f670de0b6b3a76400006117a26001600160801b03808516908616615026565b6117ac9190614fcb565b9050816001600160801b0316836001600160801b0316826117cd9190614fcb565b146117eb57604051630fc12e3560e11b815260040160405180910390fd5b5f6117fe670de0b6b3a764000083614fcb565b90506001600160801b038111156118285760405163162908e360e11b815260040160405180910390fd5b606e80548291905f906118459084906001600160801b0316614fde565b82546001600160801b039182166101009390930a928302919092021990911617905550604080518082018252600f86900b81528682015163ffffffff166020808301919091525f8a815260668252838120818155600101805467ffffffffffffffff19169055835180850190945280845290830152906118c89089908390613115565b5f888152606a60205260409020805463ffffffff191690556118e988613618565b335f818152606760205260409020805460ff19811660ff9182165f190190911617905560645461192e916001600160a01b03909116906001600160801b038816613650565b6040516001600160801b0386168152889033907f8903a5b5d08a841e7f68438387f1da20c84dea756379ed37e633ff3854b99b849060200160405180910390a35050505050505061197e60015f55565b50565b611989613680565b6001600160a01b0381166119b05760405163d92e233d60e01b815260040160405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b61115b83838360405180602001604052805f815250611ef5565b6119f4613078565b606f54600160a01b900460ff16611a4a5760405162461bcd60e51b81526020600482015260156024820152744e6f7420696e20656d657267656e6379206d6f646560581b60448201526064015b60405180910390fd5b33611a5482611b85565b6001600160a01b031614611a7b576040516359dc379f60e01b815260040160405180910390fd5b5f818152606660208181526040808420815160808101835281546001600160801b03808216808452600160801b909204168286015260018301805463ffffffff80821696850196909652600160201b810490951660608401528888529590945294905567ffffffffffffffff1916909155611af583613618565b335f818152606760205260409020805460ff19811660ff9182165f1901909116179055606454611b3a916001600160a01b03909116906001600160801b038416613650565b6040516001600160801b0382168152839033907f4f27eb511b2a4633cfb633ac1c4a99b4c298ca6488b29ec26f3504a5927f67289060200160405180910390a3505061197e60015f55565b5f61088c82612fc2565b5f5f51602061542e5f395f51905f526001600160a01b038316611bc7576040516322718ad960e21b81525f6004820152602401611a41565b6001600160a01b039092165f908152600390920160205250604090205490565b611bef613680565b611bf85f6136db565b565b611c02613680565b6001600160a01b038116611c295760405163d92e233d60e01b815260040160405180910390fd5b6065546001600160a01b031615611c825760405162461bcd60e51b815260206004820152601760248201527f4469737472696275746f7220616c7265616479207365740000000000000000006044820152606401611a41565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152606660209081526040808320815160808101835281546001600160801b038082168352600160801b90910416938101939093526001015463ffffffff808216928401839052600160201b90910481166060840152421610611d135750670de0b6b3a764000092915050565b5f611d29670de0b6b3a764000062ed4e00614ffd565b6001600160801b0316611d4c670de0b6b3a7640000673782dace9d900000614fde565b8351611d64916001600160801b039081169116615026565b611d6e9190614fcb565b90506001600160801b03811115611d985760405163162908e360e11b815260040160405180910390fd5b604082015181905f90611dac904290615059565b90505f611dc863ffffffff83166001600160801b038516615026565b611dda90670de0b6b3a764000061508c565b9050673782dace9d9000006001600160801b0382161115611e095750673782dace9d9000009695505050505050565b670de0b6b3a76400006001600160801b0382161015611e365750670de0b6b3a76400009695505050505050565b9695505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060915f51602061542e5f395f51905f52916108b190614f3f565b60695463ffffffff9081165f90815260686020908152604080832081516080810183528154600f81810b8352600160801b909104900b938101939093526001015480851691830191909152600160201b9004909216606083015290611ee3818461374b565b9392505050565b610952338383613860565b611eff848361334a565b610f458484848461390f565b611f13613078565b611f1b6130cf565b8080421115611f3d57604051631ab7da6b60e01b815260040160405180910390fd5b6002831015611f5f5760405163162908e360e11b815260040160405180910390fd5b5f80805b858110156120685733611f8d888884818110611f8157611f81614f77565b90506020020135611b85565b6001600160a01b031614611fb4576040516359dc379f60e01b815260040160405180910390fd5b5f60665f898985818110611fca57611fca614f77565b602090810292909201358352508181019290925260409081015f20815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152915061203d908561509f565b93508263ffffffff16816040015163ffffffff16111561205f57806040015192505b50600101611f63565b505f6120744283615059565b905062ed4e0063ffffffff821611156120a057604051637616640160e01b815260040160405180910390fd5b5f62ed4e006120c0670de0b6b3a76400006001600160801b038716615026565b6120ca9190614fcb565b90505f6065601481819054906101000a900463ffffffff166120eb906150be565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16905061211a33826135ff565b5f5b88811015612205575f8a8a8381811061213757612137614f77565b602090810292909201355f818152606684526040808220815160808101835281546001600160801b038082168352600160801b909104168188015260019091015463ffffffff808216838501908152600160201b90920481166060840152835180850185528351600f0b8152915116818801528251808401909352838352958201929092529194509291506121cf9084908390613115565b5f838152606660205260408120908155600101805467ffffffffffffffff191690556121fa83613618565b50505060010161211c565b50604080518082018252600f87900b815263ffffffff861660208083019190915282518084019093525f808452908301529061224390839083613115565b604080516080810182526001600160801b038089168252858116602080840191825263ffffffff808b16858701908152428216606087019081525f8a815260668552888120975195518716600160801b0295909616949094178655516001958601805494518316600160201b0267ffffffffffffffff1990951691909216179290921790915533808352606790915290839020805460ff8082168f900390940190931660ff199093169290921790915590518391907fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f859782893495490612341908a908a906001600160801b0392909216825263ffffffff16602082015260400190565b60405180910390a35050505050505061115b60015f55565b612361613078565b6123696130cf565b818042111561238b57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b90049092166060830152869190158015906124085750806040015163ffffffff164263ffffffff16105b1561254b5780515f9061242d90670de0b6b3a7640000906001600160801b0316614fcb565b90505f61244a670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b031690505f61246b670de0b6b3a764000062ed4e00614ffd565b6001600160801b031661247e8385615026565b6124889190614fcb565b90505f819050806001600160801b031685602001516001600160801b031614612546576124fe866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613115565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b3261255588611b85565b6001600160a01b03161461257c576040516359dc379f60e01b815260040160405180910390fd5b856001600160801b03165f036125a55760405163162908e360e11b815260040160405180910390fd5b5f878152606660205260408120805490916001600160801b0390911690036125e057604051632254ea3d60e11b815260040160405180910390fd5b600181015463ffffffff908116429091161061260f576040516307b7d7dd60e51b815260040160405180910390fd5b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612655573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126799190615075565b60645490915061269d906001600160a01b031633306001600160801b038c16613594565b6126b06001600160801b0389168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156126f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271a9190615075565b14612738576040516312171d8360e31b815260040160405180910390fd5b612743898988613927565b5050505050610f4560015f55565b612759613680565b606f805460ff60a01b1916600160a01b1790556127746132f5565b606f546040516001600160a01b0390911681527fc0a1c7e9f05b4d536e1ff8606bae9b847cdb43ef4a9b2d7a503a88cee08dccdb906020015b60405180910390a1565b60605f6127c38361303f565b6001600160a01b0316036127e957604051626f708760e21b815260040160405180910390fd5b606d546001600160a01b0316612812576040516338a69c8d60e21b815260040160405180910390fd5b606d54604051602481018490525f9182916001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b031663c87b56dd60e01b1790525161286791906150e2565b5f60405180830381855afa9150503d805f811461289f576040519150601f19603f3d011682016040523d82523d5f602084013e6128a4565b606091505b5091509150816128ee5760405162461bcd60e51b8152602060048201526015602482015274105c9d081c1c9bde1e4818d85b1b0819985a5b1959605a1b6044820152606401611a41565b8080602001905181019061290291906150f8565b949350505050565b5f63ffffffff82161580612926575062ed4e0063ffffffff8316115b1561294457604051637616640160e01b815260040160405180910390fd5b826001600160801b03165f0361296d5760405163162908e360e11b815260040160405180910390fd5b5f6129778461312e565b90506129028184613158565b5f828152606a602052604081205463ffffffff168082036129a7575f91505061088c565b604080516080810182525f808252602082018190529181018290526060810191909152815b60018163ffffffff1610612ac3575f868152606b6020908152604080832063ffffffff80861685529083529281902081516080810183528154600f81810b8352600160801b909104900b9381019390935260010154808416918301829052600160201b90048316606083015290935090861610612ab1575f826040015186612a549190615059565b63ffffffff169050670de0b6b3a7640000818460200151612a75919061516d565b612a7f919061518c565b8351612a8b91906151c8565b600f0b8084525f1315612a9c575f83525b5050516001600160801b0316915061088c9050565b80612abb816151f5565b9150506129cc565b505f95945050505050565b606d545f90819063ffffffff600160a01b909104811690841611612af25782612b0c565b606d54612b0c90600160a01b900463ffffffff1684615059565b90505f62ed4e00612b2d670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b0316866001600160801b0316612b4a9190615026565b612b549190614fcb565b905080612b7063ffffffff84166001600160801b038316615026565b611e3690670de0b6b3a764000061508c565b5f612b8b613078565b612b936130cf565b8280421115612bb557604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f03612bde5760405163162908e360e11b815260040160405180910390fd5b63ffffffff85161580612bf9575062ed4e0063ffffffff8616115b15612c1757604051637616640160e01b815260040160405180910390fd5b335f90815260676020526040902054606460ff90911610612c4b5760405163133cbc4f60e01b815260040160405180910390fd5b5f612c56864261503d565b90505f5f612c658989886134ee565b915091505f60405180604001604052808b600f0b81526020018563ffffffff168152509050612cb25f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613115565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612cf8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d1c9190615075565b606454909150612d40906001600160a01b031633306001600160801b038f16613594565b612d536001600160801b038c168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612d99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dbd9190615075565b14612ddb576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b1990931692909217909255335f818152606760205260409020805460ff80821690950190941660ff19909416939093179092559750612e3e90886135ff565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff199094169290911691909117919091179055612ed28b8461323a565b604080516001600160801b038d16815263ffffffff87166020820152889133917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061290260015f55565b6001600160a01b039182165f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b612f80613680565b6001600160a01b038116612fa957604051631e4fbdf760e01b81525f6004820152602401611a41565b61197e816136db565b612fba613680565b611bf8613af9565b5f5f612fcd8361303f565b90506001600160a01b03811661088c57604051637e27328960e01b815260048101849052602401611a41565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b61115b8383836001613b32565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60025f54036130c95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611a41565b60025f55565b60325460ff1615611bf85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611a41565b61311d613c45565b821561115b5761115b838383613db7565b5f62ed4e0061314e670de0b6b3a76400006001600160801b038516615026565b61088c9190614fcb565b5f826001600160801b03165f036131785750670de0b6b3a764000061088c565b5f61319263ffffffff84166001600160801b038616615026565b90505f6131ab62ed4e006001600160801b038716615026565b6131c5670de0b6b3a7640000673782dace9d900000614fde565b6131d8906001600160801b031684615026565b6131e29190614fcb565b6131f490670de0b6b3a764000061508c565b9050673782dace9d90000081111561321857673782dace9d9000009250505061088c565b670de0b6b3a764000081101561290257670de0b6b3a76400009250505061088c565b5f670de0b6b3a764000061325a6001600160801b03848116908616615026565b6132649190614fcb565b606e805491925082915f906132839084906001600160801b031661509f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b60015f55565b6132ba613ffd565b6109528282614046565b6132cc613ffd565b611bf8614076565b6132dc613ffd565b611bf861407e565b6132ec613ffd565b61197e81614092565b6132fd6130cf565b6032805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133323390565b6040516001600160a01b0390911681526020016127ad565b6001600160a01b0382161580159061336c57506065546001600160a01b031615155b801561338957505f61337d8261303f565b6001600160a01b031614155b156109525760655460405163135bb63160e21b8152600481018390525f916001600160a01b031690634d6ed8c490602401602060405180830381865afa1580156133d5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133f99190615075565b11156109525760655460405163379607f560e01b8152600481018390526001600160a01b039091169063379607f5906024016020604051808303815f875af1158015613447573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115b9190615075565b6001600160a01b03821661349457604051633250574960e11b81525f6004820152602401611a41565b5f6134a083833361409a565b9050836001600160a01b0316816001600160a01b031614610f45576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401611a41565b5f8062ed4e0061350f670de0b6b3a76400006001600160801b038816615026565b6135199190614fcb565b91506135258285613158565b9050673782dace9d9000006001600160801b038216111561355957604051638f651fb760e01b815260040160405180910390fd5b826001600160801b0316816001600160801b0316101561358c57604051638199f5f360e01b815260040160405180910390fd5b935093915050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f459085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261419c565b610952828260405180602001604052805f81525061426f565b5f6136245f835f61409a565b90506001600160a01b03811661095257604051637e27328960e01b815260048101839052602401611a41565b6040516001600160a01b03831660248201526044810182905261115b90849063a9059cbb60e01b906064016135c8565b336136b27f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611bf85760405163118cdaa760e01b8152336004820152602401611a41565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f5f8390505f62093a808083604001516137659190615213565b61376f919061523a565b90505f5b60ff81101561383b5761378962093a808361503d565b91505f63ffffffff80871690841611156137a5578592506137bf565b5063ffffffff82165f908152606c6020526040902054600f0b5b60408401516137ce9084615059565b63ffffffff1684602001516137e3919061516d565b845185906137f29083906151c8565b600f0b90525063ffffffff8087169084160361380e575061383b565b80846020018181516138209190615259565b600f0b9052505063ffffffff82166040840152600101613773565b505f825f0151600f0b121561384e575f82525b50516001600160801b03169392505050565b5f51602061542e5f395f51905f526001600160a01b0383166138a057604051630b61174360e31b81526001600160a01b0384166004820152602401611a41565b6001600160a01b038481165f818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b61391a848484611146565b610f453385858585614282565b5f838152606660205260408120805490916001600160801b039091169061394e858361509f565b600184015490915063ffffffff165f6139674283615059565b90505f6139738461312e565b90505f6139808284613158565b90505f61398c8b611ca4565b9050806001600160801b0316826001600160801b0316116139ad57806139af565b815b91506139c56103e8670de0b6b3a7640000615286565b6001600160801b03168a6001600160801b03161180156139f65750886001600160801b0316826001600160801b0316105b15613a1457604051638199f5f360e01b815260040160405180910390fd5b613a598b60405180604001604052808a600f0b81526020018863ffffffff1681525060405180604001604052808a600f0b81526020018963ffffffff16815250613115565b6001600160801b03838116600160801b0290871617885560018801805463ffffffff4216600160201b0267ffffffff0000000019909116179055613a9d8a8361323a565b604080516001600160801b038c81168252888116602083015284168183015290518c9133917f1381e2f7d0d4b71a58d34dc3db2051dd52769766e65eabf380c9b4ea93f0890b9181900360600190a35050505050505050505050565b613b016143aa565b6032805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613332565b5f51602061542e5f395f51905f528180613b5457506001600160a01b03831615155b15613c15575f613b6385612fc2565b90506001600160a01b03841615801590613b8f5750836001600160a01b0316816001600160a01b031614155b8015613ba25750613ba08185612f2c565b155b15613bcb5760405163a9fbf51f60e01b81526001600160a01b0385166004820152602401611a41565b8215613c135784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5f93845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b60695463ffffffff16613c77604080516080810182525f80825260208201819052918101829052606081019190915290565b63ffffffff821615613cf05760685f613c91600185615059565b63ffffffff908116825260208083019390935260409182015f2082516080810184528154600f81810b8352600160801b909104900b948101949094526001015480821692840192909252600160201b9091041660608201529050613d1d565b50604080516080810182525f808252602082015263ffffffff428116928201929092524390911660608201525b60408101515f63ffffffff808316429091161115613d7e576040830151613d4a9063ffffffff16426152b3565b6060840151613d5f9063ffffffff16436152b3565b613d7190670de0b6b3a7640000615026565b613d7b9190614fcb565b90505b613d8a838383876143f3565b9250613d9784600161503d565b6069805463ffffffff191663ffffffff9290921691909117905550505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091524263ffffffff16846020015163ffffffff16118015613e2157505f845f0151600f0b135b15613e9357835162ed4e0090613e4090670de0b6b3a76400009061516d565b613e4a919061518c565b600f0b602080840191909152840151670de0b6b3a764000090613e6e904290615059565b63ffffffff168360200151613e83919061516d565b613e8d919061518c565b600f0b82525b4263ffffffff16836020015163ffffffff16118015613eb757505f835f0151600f0b135b15613f2957825162ed4e0090613ed690670de0b6b3a76400009061516d565b613ee0919061518c565b600f0b602080830191909152830151670de0b6b3a764000090613f04904290615059565b63ffffffff168260200151613f19919061516d565b613f23919061518c565b600f0b81525b613f3d8484846020015184602001516145f8565b5f858152606a6020526040812054613f5c9063ffffffff16600161503d565b5f878152606a60209081526040808320805463ffffffff95861663ffffffff199091168117909155428516878301908152438616606089019081529b8552606b84528285209185529083529220855195909101516001600160801b03908116600160801b02951694909417845551600193909301805497518216600160201b0267ffffffffffffffff19909816939091169290921795909517905550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611bf857604051631afcd79f60e31b815260040160405180910390fd5b61404e613ffd565b5f51602061542e5f395f51905f5280614067848261530a565b5060018101610f45838261530a565b6132ac613ffd565b614086613ffd565b6032805460ff19169055565b612f80613ffd565b5f5f51602061542e5f395f51905f52816140b38561303f565b90506001600160a01b038416156140cf576140cf818587614733565b6001600160a01b0381161561410b576140ea5f865f5f613b32565b6001600160a01b0381165f908152600383016020526040902080545f190190555b6001600160a01b0386161561413b576001600160a01b0386165f9081526003830160205260409020805460010190555b5f85815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b5f6141f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147979092919063ffffffff16565b905080515f148061421057508080602001905181019061421091906153c5565b61115b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a41565b61427983836147a5565b61115b335f8585855b6001600160a01b0383163b156143a357604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906142c49088908890879087906004016153e0565b6020604051808303815f875af19250505080156142fe575060408051601f3d908101601f191682019092526142fb91810190615412565b60015b614365573d80801561432b576040519150601f19603f3d011682016040523d82523d5f602084013e614330565b606091505b5080515f0361435d57604051633250574960e11b81526001600160a01b0385166004820152602401611a41565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146143a157604051633250574960e11b81526001600160a01b0385166004820152602401611a41565b505b5050505050565b60325460ff16611bf85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611a41565b604080516080810182525f808252602082018190529181018290526060810191909152845f62093a806144268188615213565b614430919061523a565b90505f5b60ff8110156145ec5761444a62093a808361503d565b91505f63ffffffff428116908416111561446657429250614480565b5063ffffffff82165f908152606c6020526040902054600f0b5b61448a8884615059565b63ffffffff16896020015161449f919061516d565b89518a906144ae9083906151c8565b600f0b9052506020890180518291906144c8908390615259565b600f0b90525063ffffffff83166040808b0191909152840151670de0b6b3a7640000906144f59085615059565b61450e9063ffffffff166001600160801b038a16615026565b6145189190614fcb565b846060015163ffffffff1661452d919061508c565b63ffffffff90811660608b015242811690841603614557575063ffffffff431660608901526145ec565b8860685f846145678a600161503d565b614571919061503d565b63ffffffff908116825260208083019390935260409182015f208451938501516001600160801b03908116600160801b02941693909317835590830151600190920180546060909401518216600160201b0267ffffffffffffffff199094169290911691909117919091179055509095508590600101614434565b50959695505050505050565b4263ffffffff16846020015163ffffffff1611156146995760208085015163ffffffff165f908152606c9091526040902054600f0b6146378382615259565b9050846020015163ffffffff16846020015163ffffffff16036146615761465e82826151c8565b90505b60208581015163ffffffff165f908152606c9091526040902080546001600160801b0319166001600160801b03929092169190911790555b4263ffffffff16836020015163ffffffff161115610f4557836020015163ffffffff16836020015163ffffffff161115610f455760208084015163ffffffff165f908152606c9091526040902054600f0b6146f482826151c8565b60208086015163ffffffff165f908152606c9091526040902080546001600160801b039092166001600160801b03199092169190911790555050505050565b61473e838383614806565b61115b576001600160a01b03831661476c57604051637e27328960e01b815260048101829052602401611a41565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401611a41565b606061290284845f8561486a565b6001600160a01b0382166147ce57604051633250574960e11b81525f6004820152602401611a41565b5f6147da83835f61409a565b90506001600160a01b0381161561115b576040516339e3563760e11b81525f6004820152602401611a41565b5f6001600160a01b038316158015906129025750826001600160a01b0316846001600160a01b0316148061483f575061483f8484612f2c565b806129025750826001600160a01b031661485883612ff9565b6001600160a01b031614949350505050565b6060824710156148cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a41565b5f5f866001600160a01b031685876040516148e691906150e2565b5f6040518083038185875af1925050503d805f8114614920576040519150601f19603f3d011682016040523d82523d5f602084013e614925565b606091505b5091509150611265878383876060831561499f5782515f03614998576001600160a01b0385163b6149985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a41565b5081612902565b61290283838151156149b45781518083602001fd5b8060405162461bcd60e51b8152600401611a419190614a2c565b6001600160e01b03198116811461197e575f5ffd5b5f602082840312156149f3575f5ffd5b8135611ee3816149ce565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f611ee360208301846149fe565b5f60208284031215614a4e575f5ffd5b5035919050565b80356001600160a01b0381168114614a6b575f5ffd5b919050565b5f5f60408385031215614a81575f5ffd5b614a8a83614a55565b946020939093013593505050565b5f60208284031215614aa8575f5ffd5b611ee382614a55565b602080825282518282018190525f918401906040840190835b81811015614ae8578351835260209384019390920191600101614aca565b509095945050505050565b803563ffffffff81168114614a6b575f5ffd5b5f5f60408385031215614b17575f5ffd5b82359150614b2760208401614af3565b90509250929050565b80356001600160801b0381168114614a6b575f5ffd5b5f5f5f5f60808587031215614b59575f5ffd5b84359350614b6960208601614af3565b925060408501359150614b7e60608601614b30565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614bc657614bc6614b89565b604052919050565b5f67ffffffffffffffff821115614be757614be7614b89565b50601f01601f191660200190565b5f614c07614c0284614bce565b614b9d565b9050828152838383011115614c1a575f5ffd5b828260208301375f602084830101529392505050565b5f82601f830112614c3f575f5ffd5b611ee383833560208501614bf5565b5f5f5f5f60808587031215614c61575f5ffd5b614c6a85614a55565b9350614c7860208601614a55565b9250604085013567ffffffffffffffff811115614c93575f5ffd5b614c9f87828801614c30565b925050606085013567ffffffffffffffff811115614cbb575f5ffd5b614cc787828801614c30565b91505092959194509250565b5f5f5f60608486031215614ce5575f5ffd5b614cee84614a55565b9250614cfc60208501614a55565b929592945050506040919091013590565b5f5f5f5f5f60a08688031215614d21575f5ffd5b614d2a86614a55565b9450614d3860208701614b30565b9350614d4660408701614af3565b925060608601359150614d5b60808701614b30565b90509295509295909350565b5f60208284031215614d77575f5ffd5b611ee382614af3565b801515811461197e575f5ffd5b5f5f60408385031215614d9e575f5ffd5b614da783614a55565b91506020830135614db781614d80565b809150509250929050565b5f5f5f5f60808587031215614dd5575f5ffd5b614dde85614a55565b9350614dec60208601614a55565b925060408501359150606085013567ffffffffffffffff811115614e0e575f5ffd5b8501601f81018713614e1e575f5ffd5b614cc787823560208401614bf5565b5f5f5f60408486031215614e3f575f5ffd5b833567ffffffffffffffff811115614e55575f5ffd5b8401601f81018613614e65575f5ffd5b803567ffffffffffffffff811115614e7b575f5ffd5b8660208260051b8401011115614e8f575f5ffd5b6020918201979096509401359392505050565b5f5f5f5f60808587031215614eb5575f5ffd5b84359350614b6960208601614b30565b5f5f60408385031215614ed6575f5ffd5b614edf83614b30565b9150614b2760208401614af3565b5f5f5f5f60808587031215614f00575f5ffd5b614f0985614b30565b9350614b6960208601614af3565b5f5f60408385031215614f28575f5ffd5b614f3183614a55565b9150614b2760208401614a55565b600181811c90821680614f5357607f821691505b602082108103614f7157634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201614fb057614fb0614f8b565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f82614fd957614fd9614fb7565b500490565b6001600160801b03828116828216039081111561088c5761088c614f8b565b6001600160801b03818116838216029081169081811461501f5761501f614f8b565b5092915050565b808202811582820484141761088c5761088c614f8b565b63ffffffff818116838216019081111561088c5761088c614f8b565b63ffffffff828116828216039081111561088c5761088c614f8b565b5f60208284031215615085575f5ffd5b5051919050565b8082018082111561088c5761088c614f8b565b6001600160801b03818116838216019081111561088c5761088c614f8b565b5f63ffffffff821663ffffffff81036150d9576150d9614f8b565b60010192915050565b5f82518060208501845e5f920191825250919050565b5f60208284031215615108575f5ffd5b815167ffffffffffffffff81111561511e575f5ffd5b8201601f8101841361512e575f5ffd5b805161513c614c0282614bce565b818152856020838501011115615150575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f82600f0b82600f0b0280600f0b915080821461501f5761501f614f8b565b5f81600f0b83600f0b806151a2576151a2614fb7565b60016001607f1b031982145f19821416156151bf576151bf614f8b565b90059392505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b038213171561088c5761088c614f8b565b5f63ffffffff82168061520a5761520a614f8b565b5f190192915050565b5f63ffffffff83168061522857615228614fb7565b8063ffffffff84160491505092915050565b63ffffffff818116838216029081169081811461501f5761501f614f8b565b600f81810b9083900b0160016001607f1b03811360016001607f1b03198212171561088c5761088c614f8b565b5f6001600160801b0383168061529e5761529e614fb7565b806001600160801b0384160491505092915050565b8181038181111561088c5761088c614f8b565b601f82111561115b57805f5260205f20601f840160051c810160208510156152eb5750805b601f840160051c820191505b818110156143a3575f81556001016152f7565b815167ffffffffffffffff81111561532457615324614b89565b615338816153328454614f3f565b846152c6565b6020601f82116001811461536a575f83156153535750848201515b5f19600385901b1c1916600184901b1784556143a3565b5f84815260208120601f198516915b828110156153995787850151825560209485019460019092019101615379565b50848210156153b657868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f602082840312156153d5575f5ffd5b8151611ee381614d80565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90611e36908301846149fe565b5f60208284031215615422575f5ffd5b8151611ee3816149ce56fe80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300a264697066735822122069d4d7cbc5e3d1b2ee5f273b5133a8c9f8152b4f3e917cf225b1b2ab6963e4fe64736f6c634300081b0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b50600436106102b1575f3560e01c806375619ab51161017b578063bbe33ea5116100e4578063ddacc94a1161009e578063e58f594711610079578063e58f5947146107ee578063e985e9c514610813578063f2fde38b14610826578063f7b188a514610839575f5ffd5b8063ddacc94a146107b5578063df0c78ef146107c8578063df215157146107db575f5ffd5b8063bbe33ea51461073f578063bcc0022514610752578063beb8310914610774578063c5b1c7d014610787578063c87b56dd1461078f578063d89dd269146107a2575f5ffd5b806395d89b411161013557806395d89b41146106a257806397612d4b146106aa57806398a3f422146106bd5780639b7d02ad146106dc578063a22cb46514610719578063b88d4fde1461072c575f5ffd5b806375619ab51461055d57806389f839c6146105705780638b25e8c1146105f35780638da5cb5b146106065780638ff4249014610636578063900cf0cf1461067d575f5ffd5b8063268dc1991161021d5780635594a045116101d75780635594a045146104dc578063586c2600146104ef5780635c975abb146105245780636352211e1461052f57806370a0823114610542578063715018a614610555575f5ffd5b8063268dc1991461045e5780632a90752d1461046f5780632e1a7d4d146104905780632e720f7d146104a357806342842e0e146104b65780635312ea8e146104c9575f5ffd5b80631d237a491161026e5780631d237a49146103635780631f5ab022146103e85780632016a0d2146103fb57806320a194b81461040e57806323b872dd1461042057806324c44c5b14610433575f5ffd5b806301ffc9a7146102b557806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d5780630f45cc811461033257806313de148b14610343575b5f5ffd5b6102c86102c33660046149e3565b610841565b60405190151581526020015b60405180910390f35b6102e5610892565b6040516102d49190614a2c565b610305610300366004614a3e565b610933565b6040516001600160a01b0390911681526020016102d4565b61033061032b366004614a70565b610947565b005b6064546001600160a01b0316610305565b610356610351366004614a98565b610956565b6040516102d49190614ab1565b6103b5610371366004614b06565b606b60209081525f928352604080842090915290825290208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60408051600f95860b81529390940b602084015263ffffffff9182169383019390935290911660608201526080016102d4565b6103306103f6366004614b46565b610a4b565b610330610409366004614c4e565b610f4b565b606f54600160a01b900460ff166102c8565b61033061042e366004614cd3565b611146565b610446610441366004614b06565b611160565b6040516001600160801b0390911681526020016102d4565b606e546001600160801b0316610446565b61048261047d366004614d0d565b611270565b6040519081526020016102d4565b61033061049e366004614a3e565b611665565b6103306104b1366004614a98565b611981565b6103306104c4366004614cd3565b6119d2565b6103306104d7366004614a3e565b6119ec565b606d54610305906001600160a01b031681565b6105116104fd366004614d67565b606c6020525f9081526040902054600f0b81565b604051600f9190910b81526020016102d4565b60325460ff166102c8565b61030561053d366004614a3e565b611b85565b610482610550366004614a98565b611b8f565b610330611be7565b61033061056b366004614a98565b611bfa565b6105bc61057e366004614a3e565b60666020525f9081526040902080546001909101546001600160801b0380831692600160801b9004169063ffffffff80821691600160201b90041684565b604080516001600160801b03958616815294909316602085015263ffffffff918216928401929092521660608201526080016102d4565b610446610601366004614a3e565b611ca4565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316610305565b6103b5610644366004614d67565b60686020525f908152604090208054600190910154600f82810b92600160801b9004900b9063ffffffff80821691600160201b90041684565b60695461068d9063ffffffff1681565b60405163ffffffff90911681526020016102d4565b6102e5611e40565b6104466106b8366004614d67565b611e7e565b6104826106cb366004614a3e565b60706020525f908152604090205481565b6107076106ea366004614a98565b6001600160a01b03165f9081526067602052604090205460ff1690565b60405160ff90911681526020016102d4565b610330610727366004614d8d565b611eea565b61033061073a366004614dc2565b611ef5565b61033061074d366004614e2d565b611f0b565b610707610760366004614a98565b60676020525f908152604090205460ff1681565b610330610782366004614ea2565b612359565b610330612751565b6102e561079d366004614a3e565b6127b7565b6104466107b0366004614ec5565b61290a565b6104466107c3366004614b06565b612983565b6104466107d6366004614ec5565b612ace565b6104826107e9366004614eed565b612b82565b61068d6107fc366004614a3e565b606a6020525f908152604090205463ffffffff1681565b6102c8610821366004614f17565b612f2c565b610330610834366004614a98565b612f78565b610330612fb2565b5f6001600160e01b031982166380ac58cd60e01b148061087157506001600160e01b03198216635b5e139f60e01b145b8061088c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f51602061542e5f395f51905f5280546060919081906108b190614f3f565b80601f01602080910402602001604051908101604052809291908181526020018280546108dd90614f3f565b80156109285780601f106108ff57610100808354040283529160200191610928565b820191905f5260205f20905b81548152906001019060200180831161090b57829003601f168201915b505050505091505090565b5f61093d82612fc2565b5061088c82612ff9565b610952828233613032565b5050565b6001600160a01b0381165f9081526067602052604090205460609060ff168067ffffffffffffffff81111561098d5761098d614b89565b6040519080825280602002602001820160405280156109b6578160200160208202803683370190505b5091508060ff165f036109c95750919050565b5f805b606554600160a01b900463ffffffff16811015610a4357846001600160a01b03166109f68261303f565b6001600160a01b031603610a3b5780848381518110610a1757610a17614f77565b602090810291909101015281610a2c81614f9f565b9250508260ff16821015610a43575b6001016109cc565b505050919050565b610a53613078565b610a5b6130cf565b8180421115610a7d57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b9004909216606083015286919015801590610afa5750806040015163ffffffff164263ffffffff16105b15610c3d5780515f90610b1f90670de0b6b3a7640000906001600160801b0316614fcb565b90505f610b3c670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b031690505f610b5d670de0b6b3a764000062ed4e00614ffd565b6001600160801b0316610b708385615026565b610b7a9190614fcb565b90505f819050806001600160801b031685602001516001600160801b031614610c3857610bf0866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613115565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b33610c4788611b85565b6001600160a01b031614610c6e576040516359dc379f60e01b815260040160405180910390fd5b5f878152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b900490911660608201529103610ce957604051632254ea3d60e11b815260040160405180910390fd5b5f878260400151610cfa919061503d565b90505f610d074283615059565b905062ed4e0063ffffffff82161115610d3357604051637616640160e01b815260040160405180910390fd5b5f610d40845f015161312e565b90505f610d4d8284613158565b9050886001600160801b0316816001600160801b03161015610d8257604051638199f5f360e01b815260040160405180910390fd5b8451610d8e908261323a565b610ddd8c6040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b81526020018863ffffffff16815250613115565b6040518060800160405280865f01516001600160801b03168152602001836001600160801b031681526020018563ffffffff1681526020014263ffffffff1681525060665f8e81526020019081526020015f205f820151815f015f6101000a8154816001600160801b0302191690836001600160801b031602179055506020820151815f0160106101000a8154816001600160801b0302191690836001600160801b031602179055506040820151816001015f6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055509050508b336001600160a01b03167f3032be442129e161b4ae1cdee94871a69de2c16ee2007f31fc209a715673455c8684604051610f2c92919063ffffffff9290921682526001600160801b0316602082015260400190565b60405180910390a35050505050505050610f4560015f55565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610f905750825b90505f8267ffffffffffffffff166001148015610fac5750303b155b905081158015610fba575080155b15610fd85760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561100257845460ff60401b1916600160401b1785555b6001600160a01b038916158061101f57506001600160a01b038816155b1561103d5760405163d92e233d60e01b815260040160405180910390fd5b61104787876132b2565b61104f6132c4565b6110576132d4565b611060336132e4565b6110686132f5565b606480546001600160a01b03808c166001600160a01b031992831617909255606f8054928b16929091169190911790555f805260686020527fad6f8124f6081c2622ab3a16acd47af73d52fe87b755c3f897263c58ba3fdbd880544263ffffffff90811663ffffffff194392909216600160201b029190911667ffffffffffffffff1990921691909117179055831561113b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b611150838261334a565b61115b83838361346b565b505050565b5f8163ffffffff165f0361118757604051637616640160e01b815260040160405180910390fd5b5f838152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361120257604051632254ea3d60e11b815260040160405180910390fd5b5f838260400151611213919061503d565b90505f6112204283615059565b905062ed4e0063ffffffff8216111561124c57604051637616640160e01b815260040160405180910390fd5b5f611259845f015161312e565b90506112658183613158565b979650505050505050565b5f611279613078565b6112816130cf565b82804211156112a357604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f036112cc5760405163162908e360e11b815260040160405180910390fd5b63ffffffff851615806112e7575062ed4e0063ffffffff8616115b1561130557604051637616640160e01b815260040160405180910390fd5b6001600160a01b03871661132c5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0387165f90815260676020526040902054606460ff909116106113695760405163133cbc4f60e01b815260040160405180910390fd5b5f611374864261503d565b90505f5f6113838989886134ee565b915091505f60405180604001604052808b600f0b81526020018563ffffffff1681525090506113d05f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613115565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061143a9190615075565b60645490915061145e906001600160a01b031633306001600160801b038f16613594565b6114716001600160801b038c168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114b7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114db9190615075565b146114f9576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b19909316929092179092556001600160a01b038e165f908152606760205260409020805460ff80821690940190931660ff199093169290921790915596506115658c886135ff565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff1990941692909116919091179190911790556115f98b8461323a565b604080516001600160801b038d16815263ffffffff8716602082015288916001600160a01b038f16917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061165c60015f55565b95945050505050565b61166d613078565b5f6116778261303f565b90506001600160a01b03811661169f57604051626f708760e21b815260040160405180910390fd5b6001600160a01b03811633146116c8576040516359dc379f60e01b815260040160405180910390fd5b5f828152606660209081526040808320815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152910361174357604051632254ea3d60e11b815260040160405180910390fd5b806040015163ffffffff164263ffffffff1610156117745760405163342ad40160e11b815260040160405180910390fd5b80515f61178085611ca4565b90505f670de0b6b3a76400006117a26001600160801b03808516908616615026565b6117ac9190614fcb565b9050816001600160801b0316836001600160801b0316826117cd9190614fcb565b146117eb57604051630fc12e3560e11b815260040160405180910390fd5b5f6117fe670de0b6b3a764000083614fcb565b90506001600160801b038111156118285760405163162908e360e11b815260040160405180910390fd5b606e80548291905f906118459084906001600160801b0316614fde565b82546001600160801b039182166101009390930a928302919092021990911617905550604080518082018252600f86900b81528682015163ffffffff166020808301919091525f8a815260668252838120818155600101805467ffffffffffffffff19169055835180850190945280845290830152906118c89089908390613115565b5f888152606a60205260409020805463ffffffff191690556118e988613618565b335f818152606760205260409020805460ff19811660ff9182165f190190911617905560645461192e916001600160a01b03909116906001600160801b038816613650565b6040516001600160801b0386168152889033907f8903a5b5d08a841e7f68438387f1da20c84dea756379ed37e633ff3854b99b849060200160405180910390a35050505050505061197e60015f55565b50565b611989613680565b6001600160a01b0381166119b05760405163d92e233d60e01b815260040160405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b61115b83838360405180602001604052805f815250611ef5565b6119f4613078565b606f54600160a01b900460ff16611a4a5760405162461bcd60e51b81526020600482015260156024820152744e6f7420696e20656d657267656e6379206d6f646560581b60448201526064015b60405180910390fd5b33611a5482611b85565b6001600160a01b031614611a7b576040516359dc379f60e01b815260040160405180910390fd5b5f818152606660208181526040808420815160808101835281546001600160801b03808216808452600160801b909204168286015260018301805463ffffffff80821696850196909652600160201b810490951660608401528888529590945294905567ffffffffffffffff1916909155611af583613618565b335f818152606760205260409020805460ff19811660ff9182165f1901909116179055606454611b3a916001600160a01b03909116906001600160801b038416613650565b6040516001600160801b0382168152839033907f4f27eb511b2a4633cfb633ac1c4a99b4c298ca6488b29ec26f3504a5927f67289060200160405180910390a3505061197e60015f55565b5f61088c82612fc2565b5f5f51602061542e5f395f51905f526001600160a01b038316611bc7576040516322718ad960e21b81525f6004820152602401611a41565b6001600160a01b039092165f908152600390920160205250604090205490565b611bef613680565b611bf85f6136db565b565b611c02613680565b6001600160a01b038116611c295760405163d92e233d60e01b815260040160405180910390fd5b6065546001600160a01b031615611c825760405162461bcd60e51b815260206004820152601760248201527f4469737472696275746f7220616c7265616479207365740000000000000000006044820152606401611a41565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152606660209081526040808320815160808101835281546001600160801b038082168352600160801b90910416938101939093526001015463ffffffff808216928401839052600160201b90910481166060840152421610611d135750670de0b6b3a764000092915050565b5f611d29670de0b6b3a764000062ed4e00614ffd565b6001600160801b0316611d4c670de0b6b3a7640000673782dace9d900000614fde565b8351611d64916001600160801b039081169116615026565b611d6e9190614fcb565b90506001600160801b03811115611d985760405163162908e360e11b815260040160405180910390fd5b604082015181905f90611dac904290615059565b90505f611dc863ffffffff83166001600160801b038516615026565b611dda90670de0b6b3a764000061508c565b9050673782dace9d9000006001600160801b0382161115611e095750673782dace9d9000009695505050505050565b670de0b6b3a76400006001600160801b0382161015611e365750670de0b6b3a76400009695505050505050565b9695505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060915f51602061542e5f395f51905f52916108b190614f3f565b60695463ffffffff9081165f90815260686020908152604080832081516080810183528154600f81810b8352600160801b909104900b938101939093526001015480851691830191909152600160201b9004909216606083015290611ee3818461374b565b9392505050565b610952338383613860565b611eff848361334a565b610f458484848461390f565b611f13613078565b611f1b6130cf565b8080421115611f3d57604051631ab7da6b60e01b815260040160405180910390fd5b6002831015611f5f5760405163162908e360e11b815260040160405180910390fd5b5f80805b858110156120685733611f8d888884818110611f8157611f81614f77565b90506020020135611b85565b6001600160a01b031614611fb4576040516359dc379f60e01b815260040160405180910390fd5b5f60665f898985818110611fca57611fca614f77565b602090810292909201358352508181019290925260409081015f20815160808101835281546001600160801b03808216808452600160801b909204169482019490945260019091015463ffffffff80821693830193909352600160201b90049091166060820152915061203d908561509f565b93508263ffffffff16816040015163ffffffff16111561205f57806040015192505b50600101611f63565b505f6120744283615059565b905062ed4e0063ffffffff821611156120a057604051637616640160e01b815260040160405180910390fd5b5f62ed4e006120c0670de0b6b3a76400006001600160801b038716615026565b6120ca9190614fcb565b90505f6065601481819054906101000a900463ffffffff166120eb906150be565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16905061211a33826135ff565b5f5b88811015612205575f8a8a8381811061213757612137614f77565b602090810292909201355f818152606684526040808220815160808101835281546001600160801b038082168352600160801b909104168188015260019091015463ffffffff808216838501908152600160201b90920481166060840152835180850185528351600f0b8152915116818801528251808401909352838352958201929092529194509291506121cf9084908390613115565b5f838152606660205260408120908155600101805467ffffffffffffffff191690556121fa83613618565b50505060010161211c565b50604080518082018252600f87900b815263ffffffff861660208083019190915282518084019093525f808452908301529061224390839083613115565b604080516080810182526001600160801b038089168252858116602080840191825263ffffffff808b16858701908152428216606087019081525f8a815260668552888120975195518716600160801b0295909616949094178655516001958601805494518316600160201b0267ffffffffffffffff1990951691909216179290921790915533808352606790915290839020805460ff8082168f900390940190931660ff199093169290921790915590518391907fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f859782893495490612341908a908a906001600160801b0392909216825263ffffffff16602082015260400190565b60405180910390a35050505050505061115b60015f55565b612361613078565b6123696130cf565b818042111561238b57604051631ab7da6b60e01b815260040160405180910390fd5b5f85815260666020908152604091829020825160808101845281546001600160801b03808216808452600160801b909204169382019390935260019091015463ffffffff80821694830194909452600160201b90049092166060830152869190158015906124085750806040015163ffffffff164263ffffffff16105b1561254b5780515f9061242d90670de0b6b3a7640000906001600160801b0316614fcb565b90505f61244a670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b031690505f61246b670de0b6b3a764000062ed4e00614ffd565b6001600160801b031661247e8385615026565b6124889190614fcb565b90505f819050806001600160801b031685602001516001600160801b031614612546576124fe866040518060400160405280885f0151600f0b8152602001886040015163ffffffff168152506040518060400160405280895f0151600f0b8152602001896040015163ffffffff16815250613115565b5f86815260666020526040902080546001600160801b03808416600160801b029116178155600101805463ffffffff4216600160201b0267ffffffff00000000199091161790555b505050505b3261255588611b85565b6001600160a01b03161461257c576040516359dc379f60e01b815260040160405180910390fd5b856001600160801b03165f036125a55760405163162908e360e11b815260040160405180910390fd5b5f878152606660205260408120805490916001600160801b0390911690036125e057604051632254ea3d60e11b815260040160405180910390fd5b600181015463ffffffff908116429091161061260f576040516307b7d7dd60e51b815260040160405180910390fd5b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612655573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126799190615075565b60645490915061269d906001600160a01b031633306001600160801b038c16613594565b6126b06001600160801b0389168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156126f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271a9190615075565b14612738576040516312171d8360e31b815260040160405180910390fd5b612743898988613927565b5050505050610f4560015f55565b612759613680565b606f805460ff60a01b1916600160a01b1790556127746132f5565b606f546040516001600160a01b0390911681527fc0a1c7e9f05b4d536e1ff8606bae9b847cdb43ef4a9b2d7a503a88cee08dccdb906020015b60405180910390a1565b60605f6127c38361303f565b6001600160a01b0316036127e957604051626f708760e21b815260040160405180910390fd5b606d546001600160a01b0316612812576040516338a69c8d60e21b815260040160405180910390fd5b606d54604051602481018490525f9182916001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b031663c87b56dd60e01b1790525161286791906150e2565b5f60405180830381855afa9150503d805f811461289f576040519150601f19603f3d011682016040523d82523d5f602084013e6128a4565b606091505b5091509150816128ee5760405162461bcd60e51b8152602060048201526015602482015274105c9d081c1c9bde1e4818d85b1b0819985a5b1959605a1b6044820152606401611a41565b8080602001905181019061290291906150f8565b949350505050565b5f63ffffffff82161580612926575062ed4e0063ffffffff8316115b1561294457604051637616640160e01b815260040160405180910390fd5b826001600160801b03165f0361296d5760405163162908e360e11b815260040160405180910390fd5b5f6129778461312e565b90506129028184613158565b5f828152606a602052604081205463ffffffff168082036129a7575f91505061088c565b604080516080810182525f808252602082018190529181018290526060810191909152815b60018163ffffffff1610612ac3575f868152606b6020908152604080832063ffffffff80861685529083529281902081516080810183528154600f81810b8352600160801b909104900b9381019390935260010154808416918301829052600160201b90048316606083015290935090861610612ab1575f826040015186612a549190615059565b63ffffffff169050670de0b6b3a7640000818460200151612a75919061516d565b612a7f919061518c565b8351612a8b91906151c8565b600f0b8084525f1315612a9c575f83525b5050516001600160801b0316915061088c9050565b80612abb816151f5565b9150506129cc565b505f95945050505050565b606d545f90819063ffffffff600160a01b909104811690841611612af25782612b0c565b606d54612b0c90600160a01b900463ffffffff1684615059565b90505f62ed4e00612b2d670de0b6b3a7640000673782dace9d900000614fde565b6001600160801b0316866001600160801b0316612b4a9190615026565b612b549190614fcb565b905080612b7063ffffffff84166001600160801b038316615026565b611e3690670de0b6b3a764000061508c565b5f612b8b613078565b612b936130cf565b8280421115612bb557604051631ab7da6b60e01b815260040160405180910390fd5b856001600160801b03165f03612bde5760405163162908e360e11b815260040160405180910390fd5b63ffffffff85161580612bf9575062ed4e0063ffffffff8616115b15612c1757604051637616640160e01b815260040160405180910390fd5b335f90815260676020526040902054606460ff90911610612c4b5760405163133cbc4f60e01b815260040160405180910390fd5b5f612c56864261503d565b90505f5f612c658989886134ee565b915091505f60405180604001604052808b600f0b81526020018563ffffffff168152509050612cb25f60405180604001604052805f600f0b81526020015f63ffffffff1681525083613115565b6064546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015612cf8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d1c9190615075565b606454909150612d40906001600160a01b031633306001600160801b038f16613594565b612d536001600160801b038c168261508c565b6064546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612d99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dbd9190615075565b14612ddb576040516312171d8360e31b815260040160405180910390fd5b60658054600163ffffffff600160a01b80840482168381019092160263ffffffff60a01b1990931692909217909255335f818152606760205260409020805460ff80821690950190941660ff19909416939093179092559750612e3e90886135ff565b604080516080810182526001600160801b03808e168252868116602080840191825263ffffffff808b16858701908152428216606087019081525f8f8152606690945296909220945192518416600160801b0292909316919091178355516001909201805493518216600160201b0267ffffffffffffffff199094169290911691909117919091179055612ed28b8461323a565b604080516001600160801b038d16815263ffffffff87166020820152889133917fdbd81f1b10e6f1395ede56cabac59119f8be0cb5ca3ef0ca44f8597828934954910160405180910390a350505050505061290260015f55565b6001600160a01b039182165f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b612f80613680565b6001600160a01b038116612fa957604051631e4fbdf760e01b81525f6004820152602401611a41565b61197e816136db565b612fba613680565b611bf8613af9565b5f5f612fcd8361303f565b90506001600160a01b03811661088c57604051637e27328960e01b815260048101849052602401611a41565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b031690565b61115b8383836001613b32565b5f9081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031690565b60025f54036130c95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611a41565b60025f55565b60325460ff1615611bf85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611a41565b61311d613c45565b821561115b5761115b838383613db7565b5f62ed4e0061314e670de0b6b3a76400006001600160801b038516615026565b61088c9190614fcb565b5f826001600160801b03165f036131785750670de0b6b3a764000061088c565b5f61319263ffffffff84166001600160801b038616615026565b90505f6131ab62ed4e006001600160801b038716615026565b6131c5670de0b6b3a7640000673782dace9d900000614fde565b6131d8906001600160801b031684615026565b6131e29190614fcb565b6131f490670de0b6b3a764000061508c565b9050673782dace9d90000081111561321857673782dace9d9000009250505061088c565b670de0b6b3a764000081101561290257670de0b6b3a76400009250505061088c565b5f670de0b6b3a764000061325a6001600160801b03848116908616615026565b6132649190614fcb565b606e805491925082915f906132839084906001600160801b031661509f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b60015f55565b6132ba613ffd565b6109528282614046565b6132cc613ffd565b611bf8614076565b6132dc613ffd565b611bf861407e565b6132ec613ffd565b61197e81614092565b6132fd6130cf565b6032805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133323390565b6040516001600160a01b0390911681526020016127ad565b6001600160a01b0382161580159061336c57506065546001600160a01b031615155b801561338957505f61337d8261303f565b6001600160a01b031614155b156109525760655460405163135bb63160e21b8152600481018390525f916001600160a01b031690634d6ed8c490602401602060405180830381865afa1580156133d5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133f99190615075565b11156109525760655460405163379607f560e01b8152600481018390526001600160a01b039091169063379607f5906024016020604051808303815f875af1158015613447573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115b9190615075565b6001600160a01b03821661349457604051633250574960e11b81525f6004820152602401611a41565b5f6134a083833361409a565b9050836001600160a01b0316816001600160a01b031614610f45576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401611a41565b5f8062ed4e0061350f670de0b6b3a76400006001600160801b038816615026565b6135199190614fcb565b91506135258285613158565b9050673782dace9d9000006001600160801b038216111561355957604051638f651fb760e01b815260040160405180910390fd5b826001600160801b0316816001600160801b0316101561358c57604051638199f5f360e01b815260040160405180910390fd5b935093915050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f459085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261419c565b610952828260405180602001604052805f81525061426f565b5f6136245f835f61409a565b90506001600160a01b03811661095257604051637e27328960e01b815260048101839052602401611a41565b6040516001600160a01b03831660248201526044810182905261115b90849063a9059cbb60e01b906064016135c8565b336136b27f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614611bf85760405163118cdaa760e01b8152336004820152602401611a41565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f5f8390505f62093a808083604001516137659190615213565b61376f919061523a565b90505f5b60ff81101561383b5761378962093a808361503d565b91505f63ffffffff80871690841611156137a5578592506137bf565b5063ffffffff82165f908152606c6020526040902054600f0b5b60408401516137ce9084615059565b63ffffffff1684602001516137e3919061516d565b845185906137f29083906151c8565b600f0b90525063ffffffff8087169084160361380e575061383b565b80846020018181516138209190615259565b600f0b9052505063ffffffff82166040840152600101613773565b505f825f0151600f0b121561384e575f82525b50516001600160801b03169392505050565b5f51602061542e5f395f51905f526001600160a01b0383166138a057604051630b61174360e31b81526001600160a01b0384166004820152602401611a41565b6001600160a01b038481165f818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b61391a848484611146565b610f453385858585614282565b5f838152606660205260408120805490916001600160801b039091169061394e858361509f565b600184015490915063ffffffff165f6139674283615059565b90505f6139738461312e565b90505f6139808284613158565b90505f61398c8b611ca4565b9050806001600160801b0316826001600160801b0316116139ad57806139af565b815b91506139c56103e8670de0b6b3a7640000615286565b6001600160801b03168a6001600160801b03161180156139f65750886001600160801b0316826001600160801b0316105b15613a1457604051638199f5f360e01b815260040160405180910390fd5b613a598b60405180604001604052808a600f0b81526020018863ffffffff1681525060405180604001604052808a600f0b81526020018963ffffffff16815250613115565b6001600160801b03838116600160801b0290871617885560018801805463ffffffff4216600160201b0267ffffffff0000000019909116179055613a9d8a8361323a565b604080516001600160801b038c81168252888116602083015284168183015290518c9133917f1381e2f7d0d4b71a58d34dc3db2051dd52769766e65eabf380c9b4ea93f0890b9181900360600190a35050505050505050505050565b613b016143aa565b6032805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613332565b5f51602061542e5f395f51905f528180613b5457506001600160a01b03831615155b15613c15575f613b6385612fc2565b90506001600160a01b03841615801590613b8f5750836001600160a01b0316816001600160a01b031614155b8015613ba25750613ba08185612f2c565b155b15613bcb5760405163a9fbf51f60e01b81526001600160a01b0385166004820152602401611a41565b8215613c135784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5f93845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b60695463ffffffff16613c77604080516080810182525f80825260208201819052918101829052606081019190915290565b63ffffffff821615613cf05760685f613c91600185615059565b63ffffffff908116825260208083019390935260409182015f2082516080810184528154600f81810b8352600160801b909104900b948101949094526001015480821692840192909252600160201b9091041660608201529050613d1d565b50604080516080810182525f808252602082015263ffffffff428116928201929092524390911660608201525b60408101515f63ffffffff808316429091161115613d7e576040830151613d4a9063ffffffff16426152b3565b6060840151613d5f9063ffffffff16436152b3565b613d7190670de0b6b3a7640000615026565b613d7b9190614fcb565b90505b613d8a838383876143f3565b9250613d9784600161503d565b6069805463ffffffff191663ffffffff9290921691909117905550505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091524263ffffffff16846020015163ffffffff16118015613e2157505f845f0151600f0b135b15613e9357835162ed4e0090613e4090670de0b6b3a76400009061516d565b613e4a919061518c565b600f0b602080840191909152840151670de0b6b3a764000090613e6e904290615059565b63ffffffff168360200151613e83919061516d565b613e8d919061518c565b600f0b82525b4263ffffffff16836020015163ffffffff16118015613eb757505f835f0151600f0b135b15613f2957825162ed4e0090613ed690670de0b6b3a76400009061516d565b613ee0919061518c565b600f0b602080830191909152830151670de0b6b3a764000090613f04904290615059565b63ffffffff168260200151613f19919061516d565b613f23919061518c565b600f0b81525b613f3d8484846020015184602001516145f8565b5f858152606a6020526040812054613f5c9063ffffffff16600161503d565b5f878152606a60209081526040808320805463ffffffff95861663ffffffff199091168117909155428516878301908152438616606089019081529b8552606b84528285209185529083529220855195909101516001600160801b03908116600160801b02951694909417845551600193909301805497518216600160201b0267ffffffffffffffff19909816939091169290921795909517905550505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611bf857604051631afcd79f60e31b815260040160405180910390fd5b61404e613ffd565b5f51602061542e5f395f51905f5280614067848261530a565b5060018101610f45838261530a565b6132ac613ffd565b614086613ffd565b6032805460ff19169055565b612f80613ffd565b5f5f51602061542e5f395f51905f52816140b38561303f565b90506001600160a01b038416156140cf576140cf818587614733565b6001600160a01b0381161561410b576140ea5f865f5f613b32565b6001600160a01b0381165f908152600383016020526040902080545f190190555b6001600160a01b0386161561413b576001600160a01b0386165f9081526003830160205260409020805460010190555b5f85815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b5f6141f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147979092919063ffffffff16565b905080515f148061421057508080602001905181019061421091906153c5565b61115b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611a41565b61427983836147a5565b61115b335f8585855b6001600160a01b0383163b156143a357604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906142c49088908890879087906004016153e0565b6020604051808303815f875af19250505080156142fe575060408051601f3d908101601f191682019092526142fb91810190615412565b60015b614365573d80801561432b576040519150601f19603f3d011682016040523d82523d5f602084013e614330565b606091505b5080515f0361435d57604051633250574960e11b81526001600160a01b0385166004820152602401611a41565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146143a157604051633250574960e11b81526001600160a01b0385166004820152602401611a41565b505b5050505050565b60325460ff16611bf85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611a41565b604080516080810182525f808252602082018190529181018290526060810191909152845f62093a806144268188615213565b614430919061523a565b90505f5b60ff8110156145ec5761444a62093a808361503d565b91505f63ffffffff428116908416111561446657429250614480565b5063ffffffff82165f908152606c6020526040902054600f0b5b61448a8884615059565b63ffffffff16896020015161449f919061516d565b89518a906144ae9083906151c8565b600f0b9052506020890180518291906144c8908390615259565b600f0b90525063ffffffff83166040808b0191909152840151670de0b6b3a7640000906144f59085615059565b61450e9063ffffffff166001600160801b038a16615026565b6145189190614fcb565b846060015163ffffffff1661452d919061508c565b63ffffffff90811660608b015242811690841603614557575063ffffffff431660608901526145ec565b8860685f846145678a600161503d565b614571919061503d565b63ffffffff908116825260208083019390935260409182015f208451938501516001600160801b03908116600160801b02941693909317835590830151600190920180546060909401518216600160201b0267ffffffffffffffff199094169290911691909117919091179055509095508590600101614434565b50959695505050505050565b4263ffffffff16846020015163ffffffff1611156146995760208085015163ffffffff165f908152606c9091526040902054600f0b6146378382615259565b9050846020015163ffffffff16846020015163ffffffff16036146615761465e82826151c8565b90505b60208581015163ffffffff165f908152606c9091526040902080546001600160801b0319166001600160801b03929092169190911790555b4263ffffffff16836020015163ffffffff161115610f4557836020015163ffffffff16836020015163ffffffff161115610f455760208084015163ffffffff165f908152606c9091526040902054600f0b6146f482826151c8565b60208086015163ffffffff165f908152606c9091526040902080546001600160801b039092166001600160801b03199092169190911790555050505050565b61473e838383614806565b61115b576001600160a01b03831661476c57604051637e27328960e01b815260048101829052602401611a41565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401611a41565b606061290284845f8561486a565b6001600160a01b0382166147ce57604051633250574960e11b81525f6004820152602401611a41565b5f6147da83835f61409a565b90506001600160a01b0381161561115b576040516339e3563760e11b81525f6004820152602401611a41565b5f6001600160a01b038316158015906129025750826001600160a01b0316846001600160a01b0316148061483f575061483f8484612f2c565b806129025750826001600160a01b031661485883612ff9565b6001600160a01b031614949350505050565b6060824710156148cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611a41565b5f5f866001600160a01b031685876040516148e691906150e2565b5f6040518083038185875af1925050503d805f8114614920576040519150601f19603f3d011682016040523d82523d5f602084013e614925565b606091505b5091509150611265878383876060831561499f5782515f03614998576001600160a01b0385163b6149985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611a41565b5081612902565b61290283838151156149b45781518083602001fd5b8060405162461bcd60e51b8152600401611a419190614a2c565b6001600160e01b03198116811461197e575f5ffd5b5f602082840312156149f3575f5ffd5b8135611ee3816149ce565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f611ee360208301846149fe565b5f60208284031215614a4e575f5ffd5b5035919050565b80356001600160a01b0381168114614a6b575f5ffd5b919050565b5f5f60408385031215614a81575f5ffd5b614a8a83614a55565b946020939093013593505050565b5f60208284031215614aa8575f5ffd5b611ee382614a55565b602080825282518282018190525f918401906040840190835b81811015614ae8578351835260209384019390920191600101614aca565b509095945050505050565b803563ffffffff81168114614a6b575f5ffd5b5f5f60408385031215614b17575f5ffd5b82359150614b2760208401614af3565b90509250929050565b80356001600160801b0381168114614a6b575f5ffd5b5f5f5f5f60808587031215614b59575f5ffd5b84359350614b6960208601614af3565b925060408501359150614b7e60608601614b30565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614bc657614bc6614b89565b604052919050565b5f67ffffffffffffffff821115614be757614be7614b89565b50601f01601f191660200190565b5f614c07614c0284614bce565b614b9d565b9050828152838383011115614c1a575f5ffd5b828260208301375f602084830101529392505050565b5f82601f830112614c3f575f5ffd5b611ee383833560208501614bf5565b5f5f5f5f60808587031215614c61575f5ffd5b614c6a85614a55565b9350614c7860208601614a55565b9250604085013567ffffffffffffffff811115614c93575f5ffd5b614c9f87828801614c30565b925050606085013567ffffffffffffffff811115614cbb575f5ffd5b614cc787828801614c30565b91505092959194509250565b5f5f5f60608486031215614ce5575f5ffd5b614cee84614a55565b9250614cfc60208501614a55565b929592945050506040919091013590565b5f5f5f5f5f60a08688031215614d21575f5ffd5b614d2a86614a55565b9450614d3860208701614b30565b9350614d4660408701614af3565b925060608601359150614d5b60808701614b30565b90509295509295909350565b5f60208284031215614d77575f5ffd5b611ee382614af3565b801515811461197e575f5ffd5b5f5f60408385031215614d9e575f5ffd5b614da783614a55565b91506020830135614db781614d80565b809150509250929050565b5f5f5f5f60808587031215614dd5575f5ffd5b614dde85614a55565b9350614dec60208601614a55565b925060408501359150606085013567ffffffffffffffff811115614e0e575f5ffd5b8501601f81018713614e1e575f5ffd5b614cc787823560208401614bf5565b5f5f5f60408486031215614e3f575f5ffd5b833567ffffffffffffffff811115614e55575f5ffd5b8401601f81018613614e65575f5ffd5b803567ffffffffffffffff811115614e7b575f5ffd5b8660208260051b8401011115614e8f575f5ffd5b6020918201979096509401359392505050565b5f5f5f5f60808587031215614eb5575f5ffd5b84359350614b6960208601614b30565b5f5f60408385031215614ed6575f5ffd5b614edf83614b30565b9150614b2760208401614af3565b5f5f5f5f60808587031215614f00575f5ffd5b614f0985614b30565b9350614b6960208601614af3565b5f5f60408385031215614f28575f5ffd5b614f3183614a55565b9150614b2760208401614a55565b600181811c90821680614f5357607f821691505b602082108103614f7157634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201614fb057614fb0614f8b565b5060010190565b634e487b7160e01b5f52601260045260245ffd5b5f82614fd957614fd9614fb7565b500490565b6001600160801b03828116828216039081111561088c5761088c614f8b565b6001600160801b03818116838216029081169081811461501f5761501f614f8b565b5092915050565b808202811582820484141761088c5761088c614f8b565b63ffffffff818116838216019081111561088c5761088c614f8b565b63ffffffff828116828216039081111561088c5761088c614f8b565b5f60208284031215615085575f5ffd5b5051919050565b8082018082111561088c5761088c614f8b565b6001600160801b03818116838216019081111561088c5761088c614f8b565b5f63ffffffff821663ffffffff81036150d9576150d9614f8b565b60010192915050565b5f82518060208501845e5f920191825250919050565b5f60208284031215615108575f5ffd5b815167ffffffffffffffff81111561511e575f5ffd5b8201601f8101841361512e575f5ffd5b805161513c614c0282614bce565b818152856020838501011115615150575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f82600f0b82600f0b0280600f0b915080821461501f5761501f614f8b565b5f81600f0b83600f0b806151a2576151a2614fb7565b60016001607f1b031982145f19821416156151bf576151bf614f8b565b90059392505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b038213171561088c5761088c614f8b565b5f63ffffffff82168061520a5761520a614f8b565b5f190192915050565b5f63ffffffff83168061522857615228614fb7565b8063ffffffff84160491505092915050565b63ffffffff818116838216029081169081811461501f5761501f614f8b565b600f81810b9083900b0160016001607f1b03811360016001607f1b03198212171561088c5761088c614f8b565b5f6001600160801b0383168061529e5761529e614fb7565b806001600160801b0384160491505092915050565b8181038181111561088c5761088c614f8b565b601f82111561115b57805f5260205f20601f840160051c810160208510156152eb5750805b601f840160051c820191505b818110156143a3575f81556001016152f7565b815167ffffffffffffffff81111561532457615324614b89565b615338816153328454614f3f565b846152c6565b6020601f82116001811461536a575f83156153535750848201515b5f19600385901b1c1916600184901b1784556143a3565b5f84815260208120601f198516915b828110156153995787850151825560209485019460019092019101615379565b50848210156153b657868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f602082840312156153d5575f5ffd5b8151611ee381614d80565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90611e36908301846149fe565b5f60208284031215615422575f5ffd5b8151611ee3816149ce56fe80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300a264697066735822122069d4d7cbc5e3d1b2ee5f273b5133a8c9f8152b4f3e917cf225b1b2ab6963e4fe64736f6c634300081b0033
Deployed Bytecode Sourcemap
151821:31944: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;:::-;;181277:104;181361:12;;-1:-1:-1;;;;;181361:12:0;181277:104;;181764:562;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;154019:68::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;154019:68:0;;;;;;;;;;-1:-1:-1;;;154019: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;154019:68:0;3545:449:1;169997:1664:0;;;;;;:::i;:::-;;:::i;155590:736::-;;;;;;:::i;:::-;;:::i;181389:96::-;181463:14;;-1:-1:-1;;;181463:14:0;;;;181389:96;;163727:191;;;;;;:::i;:::-;;:::i;183155:603::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;7099:47:1;;;7081:66;;7069:2;7054:18;183155:603:0;6935:218:1;181493:109:0;181574:20;;-1:-1:-1;;;;;181574:20:0;181493:109;;168303:1686;;;;;;:::i;:::-;;:::i;:::-;;;7831:25:1;;;7819:2;7804:18;168303:1686:0;7685:177:1;164161:1504:0;;;;;;:::i;:::-;;:::i;181610:146::-;;;;;;:::i;:::-;;:::i;105278:134::-;;;;;;:::i;:::-;;:::i;180461:585::-;;;;;;:::i;:::-;;:::i;154146:23::-;;;;;-1:-1:-1;;;;;154146:23:0;;;154094:45;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8229:2:1;8218:22;;;;8200:41;;8188:2;8173:18;154094:45:0;8056:191:1;145967:86:0;146038:7;;;;145967:86;;102417:120;;;;;;:::i;:::-;;:::i;102084:271::-;;;;;;:::i;:::-;;:::i;150262:103::-;;;:::i;156334:280::-;;;;;;:::i;:::-;;:::i;153745:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;153745:46:0;;;;-1:-1:-1;;;153745:46:0;;;;;;;;;-1:-1:-1;;;153745: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;153745:46:0;8252:503:1;157861:858:0;;;;;;:::i;:::-;;:::i;149527:147::-;148358:22;149658:8;-1:-1:-1;;;;;149658:8:0;149527:147;;153887:44;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;153887:44:0;;;;;;;;;;-1:-1:-1;;;153887:44:0;;;;;153938:19;;;;;;;;;;;;8934:10:1;8922:23;;;8904:42;;8892:2;8877:18;153938:19:0;8760:192:1;102822:153:0;;;:::i;175413:199::-;;;;;;:::i;:::-;;:::i;155315:45::-;;;;;;:::i;:::-;;;;;;;;;;;;;;181153:116;;;;;;:::i;:::-;-1:-1:-1;;;;;181241:20:0;181216:5;181241:20;;;:14;:20;;;;;;;;;181153:116;;;;9129:4:1;9117:17;;;9099:36;;9087:2;9072:18;181153:116:0;8957:184:1;104122:146:0;;;;;;:::i;:::-;;:::i;163926:226::-;;;;;;:::i;:::-;;:::i;176429:2466::-;;;;;;:::i;:::-;;:::i;153799:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;174301:1104;;;;;;:::i;:::-;;:::i;180281:172::-;;;:::i;182330:495::-;;;;;;:::i;:::-;;:::i;182829:322::-;;;;;;:::i;:::-;;:::i;178903:828::-;;;;;;:::i;:::-;;:::i;179739:506::-;;;;;;:::i;:::-;;:::i;166504:1791::-;;;;;;:::i;:::-;;:::i;153964:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;104339:213;;;;;;:::i;:::-;;:::i;150520:220::-;;;;;;:::i;:::-;;:::i;181054: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;181764:562::-;-1:-1:-1;;;;;181877:21:0;;181863:11;181877:21;;;:14;:21;;;;;;181825:25;;181877:21;;;181920:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;181920:20:0;;181909:31;;181955:5;:10;;181964:1;181955:10;181951:31;;181967:15;181764:562;;;:::o;181951:31::-;182003:20;;182038:245;182064:12;;-1:-1:-1;;;182064:12:0;;;;182059:17;;182038:245;;;182119:5;-1:-1:-1;;;;;182103:21:0;:12;182112:2;182103:8;:12::i;:::-;-1:-1:-1;;;;;182103:21:0;;182099:173;;182170:2;182145:8;182154:12;182145:22;;;;;;;;:::i;:::-;;;;;;;;;;:27;182191:14;;;;:::i;:::-;;;;182244:5;182228:21;;:12;:21;182224:32;182251:5;182224:32;;182078:4;;182038:245;;;;182303:15;;181764:562;;;:::o;169997:1664::-;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;170195:8:::2;156714;156696:15;:26;156692:56;;;156731:17;;-1:-1:-1::0;;;156731:17:0::2;;;;;;;;;;;156692:56;156825:24:::3;156852:15:::0;;;:6:::3;:15;::::0;;;;;;;;156825:42;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;156825:42:0;;::::3;::::0;;;-1:-1:-1;;;156825:42:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;156825:42:0;::::3;::::0;;::::3;::::0;;;;170210:7;;156825:42;156882:15;;;;:57:::3;;;156927:4;:12;;;156901:38;;156908:15;156901:38;;;156882:57;156878:956;;;157041:11:::0;;157010:20:::3;::::0;157033:32:::3;::::0;153393:4:::3;::::0;-1:-1:-1;;;;;157033:20:0::3;:32;:::i;:::-;157010:55:::0;-1:-1:-1;157080:22:0::3;157105:32;153345:4;153291;157105:32;:::i;:::-;-1:-1:-1::0;;;;;157080:57:0::3;::::0;-1:-1:-1;157152:17:0::3;157207:19;153393:4;153187:8;157207:19;:::i;:::-;-1:-1:-1::0;;;;;157172:55:0::3;157173:29;157188:14:::0;157173:12;:29:::3;:::i;:::-;157172:55;;;;:::i;:::-;157152:75;;157242:16;157269:9;157242:37;;157376:8;-1:-1:-1::0;;;;;157362:22:0::3;:4;:10;;;-1:-1:-1::0;;;;;157362:22:0::3;;157358:465;;157447:220;157481:7;157511:57;;;;;;;;157540:4;:11;;;157511:57;;;;;;157555:4;:12;;;157511:57;;;;::::0;157591::::3;;;;;;;;157620:4;:11;;;157591:57;;;;;;157635:4;:12;;;157591:57;;;;::::0;157447:11:::3;:220::i;:::-;157704:15;::::0;;;:6:::3;:15;::::0;;;;:32;;-1:-1:-1;;;;;157704:32:0;;::::3;-1:-1:-1::0;;;157704:32:0::3;::::0;::::3;;::::0;;-1:-1:-1;157755:26:0::3;:52:::0;;::::3;157791:15;157755:52;-1:-1:-1::0;;;157755:52:0::3;-1:-1:-1::0;;157755:52:0;;::::3;;::::0;;157358:465:::3;156941:893;;;;156878:956;170254:10:::4;170234:16;170242:7:::0;170234::::4;:16::i;:::-;-1:-1:-1::0;;;;;170234:30:0::4;;170230:58;;170273:15;;-1:-1:-1::0;;;170273:15:0::4;;;;;;;;;;;170230:58;170309:24;170336:15:::0;;;:6:::4;:15;::::0;;;;;;;170309:42;;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;;;170309:42:0;;::::4;::::0;;;-1:-1:-1;;;170309:42:0;;::::4;;::::0;;::::4;::::0;;;;;;;::::4;::::0;::::4;::::0;;::::4;::::0;;;;;;;-1:-1:-1;;;170309:42:0;::::4;::::0;;::::4;::::0;;;;;170366:16;170362:44:::4;;170391:15;;-1:-1:-1::0;;;170391:15:0::4;;;;;;;;;;;170362:44;170462:17;170497:18;170482:4;:12;;;:33;;;;:::i;:::-;170462:53:::0;-1:-1:-1;170526:29:0::4;170558:36;170578:15;170462:53:::0;170558:36:::4;:::i;:::-;170526:68:::0;-1:-1:-1;153187:8:0::4;170609:32;::::0;::::4;;170605:62;;;170650:17;;-1:-1:-1::0;;;170650:17:0::4;;;;;;;;;;;170605:62;170755:16;170774:31;170793:4;:11;;;170774:18;:31::i;:::-;170755:50;;170816:18;170837:54;170858:8;170868:22;170837:20;:54::i;:::-;170816:75;;170919:13;-1:-1:-1::0;;;;;170906:26:0::4;:10;-1:-1:-1::0;;;;;170906:26:0::4;;170902:57;;;170941:18;;-1:-1:-1::0;;;170941:18:0::4;;;;;;;;;;;170902:57;171051:11:::0;;171015:83:::4;::::0;171077:10;171015:21:::4;:83::i;:::-;171142:186;171168:7;171190:57;;;;;;;;171219:4;:11;;;171190:57;;;;;;171234:4;:12;;;171190:57;;;;::::0;171262:55:::4;;;;;;;;171291:4;:11;;;171262:55;;;;;;171306:10;171262:55;;;;::::0;171142:11:::4;:186::i;:::-;171397:173;;;;;;;;171433:4;:11;;;-1:-1:-1::0;;;;;171397:173:0::4;;;;;171550:8;-1:-1:-1::0;;;;;171397:173:0::4;;;;;171468:10;171397:173;;;;;;171512:15;171397:173;;;;::::0;171379:6:::4;:15;171386:7;171379:15;;;;;;;;;;;:191;;;;;;;;;;;;;-1:-1:-1::0;;;;;171379:191:0::4;;;;;-1:-1:-1::0;;;;;171379:191:0::4;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;171379:191:0::4;;;;;-1:-1:-1::0;;;;;171379:191:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;171621:7;171609:10;-1:-1:-1::0;;;;;171596:57:0::4;;171630:10;171642;171596: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;171596:57:0::4;;;;;;;;170219:1442;;;;;156814:1039:::3;156759:1;145602::::2;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;169997:1664;;;;:::o;155590: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;;;;;155786:26:0;::::1;::::0;;:77:::1;;-1:-1:-1::0;;;;;;155832:31:0;::::1;::::0;155786:77:::1;155782:103;;;155872:13;;-1:-1:-1::0;;;155872:13:0::1;;;;;;;;;;;155782:103;155910:27;155924:4;155930:6;155910:13;:27::i;:::-;155948:24;:22;:24::i;:::-;155983:17;:15;:17::i;:::-;156011:26;156026:10;156011:14;:26::i;:::-;156050:8;:6;:8::i;:::-;156069:12;:46:::0;;-1:-1:-1;;;;;156069:46:0;;::::1;-1:-1:-1::0;;;;;;156069:46:0;;::::1;;::::0;;;156126:25:::1;:45:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;156069:12:::1;156221:15:::0;;:12:::1;:15;::::0;:19;:42;;156302:15:::1;156221;156274:44:::0;;::::1;-1:-1:-1::0;;156250:12:0::1;156221:42:::0;;;::::1;-1:-1:-1::0;;;156221:42:0::1;156274:44:::0;;;;-1:-1:-1;;156274: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;;;;;155590:736;;;;:::o;163727:191::-;163827:35;163848:4;163854:7;163827:20;:35::i;:::-;163873:36;163892:4;163897:2;163901:7;163873:18;:36::i;:::-;163727:191;;;:::o;183155:603::-;183259:7;183279:18;:23;;183301:1;183279:23;183275:53;;183311:17;;-1:-1:-1;;;183311:17:0;;;;;;;;;;;183275:53;183341:24;183368:15;;;:6;:15;;;;;;;;183341:42;;;;;;;;;-1:-1:-1;;;;;183341:42:0;;;;;;-1:-1:-1;;;183341:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;183341:42:0;;;;;;;;;;183394:16;183390:44;;183419:15;;-1:-1:-1;;;183419:15:0;;;;;;;;;;;183390:44;183447:17;183482:18;183467:4;:12;;;:33;;;;:::i;:::-;183447:53;-1:-1:-1;183507:24:0;183534:36;183554:15;183447:53;183534:36;:::i;:::-;183507:63;-1:-1:-1;153187:8:0;183581:27;;;;183577:57;;;183617:17;;-1:-1:-1;;;183617:17:0;;;;;;;;;;;183577:57;183647:13;183663:31;183682:4;:11;;;183663:18;:31::i;:::-;183647:47;;183708:46;183729:5;183736:17;183708:20;:46::i;:::-;183701:53;183155:603;-1:-1:-1;;;;;;;183155:603:0:o;168303:1686::-;168520:15;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;168501:8:::2;156714;156696:15;:26;156692:56;;;156731:17;;-1:-1:-1::0;;;156731:17:0::2;;;;;;;;;;;156692:56;168548:6:::3;-1:-1:-1::0;;;;;168548:11:0::3;168558:1;168548:11:::0;168544:39:::3;;168568:15;;-1:-1:-1::0;;;168568:15:0::3;;;;;;;;;;;168544:39;168594:17;::::0;::::3;::::0;;:43:::3;;-1:-1:-1::0;153187:8:0::3;168615:22;::::0;::::3;;168594:43;168590:73;;;168646:17;;-1:-1:-1::0;;;168646:17:0::3;;;;;;;;;;;168590:73;-1:-1:-1::0;;;;;168674:23:0;::::3;168670:49;;168706:13;;-1:-1:-1::0;;;168706:13:0::3;;;;;;;;;;;168670:49;-1:-1:-1::0;;;;;168730:25:0;::::3;;::::0;;;:14:::3;:25;::::0;;;;;153448:3:::3;168730:47;:25:::0;;::::3;:47;168726:77;;168786:17;;-1:-1:-1::0;;;168786:17:0::3;;;;;;;;;;;168726:77;168816:17;168836:38;168862:12:::0;168843:15:::3;168836:38;:::i;:::-;168816:58;;168888:13;168903:18;168925:61;168950:6;168958:12;168972:13;168925:24;:61::i;:::-;168887:99;;;;169031:28;169062:90;;;;;;;;169110:6;169062:90;;;;;;169134:10;169062:90;;;;::::0;169031:121:::3;;169207:44;169219:1;169222:19;;;;;;;;169236:1;169222:19;;;;;;169239:1;169222:19;;;;::::0;169243:7:::3;169207:11;:44::i;:::-;169328:12;::::0;:37:::3;::::0;-1:-1:-1;;;169328:37:0;;169359:4:::3;169328:37;::::0;::::3;1488:51:1::0;169304:21:0::3;::::0;-1:-1:-1;;;;;169328:12:0::3;::::0;:22:::3;::::0;1461:18:1;;169328:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;169372:12;::::0;169304:61;;-1:-1:-1;169372:64:0::3;::::0;-1:-1:-1;;;;;169372:12:0::3;169402:10;169422:4;-1:-1:-1::0;;;;;169372:64:0;::::3;:29;:64::i;:::-;169488:22;-1:-1:-1::0;;;;;169488:22:0;::::3;:13:::0;:22:::3;:::i;:::-;169447:12;::::0;:37:::3;::::0;-1:-1:-1;;;169447:37:0;;169478:4:::3;169447:37;::::0;::::3;1488:51:1::0;-1:-1:-1;;;;;169447:12:0;;::::3;::::0;:22:::3;::::0;1461:18:1;;169447:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;169443:102;;169529:16;;-1:-1:-1::0;;;169529:16:0::3;;;;;;;;;;;169443:102;169589:12;:14:::0;;::::3;;-1:-1:-1::0;;;169589:14:0;;::::3;::::0;::::3;::::0;;::::3;::::0;;::::3;;-1:-1:-1::0;;;;169589:14:0;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;;;;;169614:25:0;::::3;-1:-1:-1::0;169614:25:0;;;:14:::3;:25;::::0;;;;:27;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;-1:-1:-1::0;;169614:27:0;;::::3;::::0;;;::::3;::::0;;;169589:14;-1:-1:-1;169661:29:0::3;169629:9:::0;169589:14;169661:9:::3;:29::i;:::-;169721:145;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;169721:145:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;169819:15:::3;169721:145:::0;::::3;::::0;;;;;;-1:-1:-1;169703:15:0;;;:6:::3;:15:::0;;;;;;;:163;;;;;::::3;-1:-1:-1::0;;;169703:163:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;169703:163:0::3;-1:-1:-1::0;;169703:163:0;;;;;;::::3;::::0;;;;;;;::::3;::::0;;169879:41:::3;169753:6:::0;169909:10;169879:21:::3;:41::i;:::-;169938:47;::::0;;-1:-1:-1;;;;;15690:47:1;;15672:66;;15786:10;15774:23;;15769:2;15754:18;;15747:51;169957:7:0;;-1:-1:-1;;;;;169938:47:0;::::3;::::0;::::3;::::0;15645:18:1;169938:47:0::3;;;;;;;168537:1452;;;;;145602:1:::2;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;168303:1686;;;;;;;:::o;164161:1504::-;143037:21;:19;:21::i;:::-;164229:13:::1;164245:17;164254:7;164245:8;:17::i;:::-;164229:33:::0;-1:-1:-1;;;;;;164277:19:0;::::1;164273:48;;164305:16;;-1:-1:-1::0;;;164305:16:0::1;;;;;;;;;;;164273:48;-1:-1:-1::0;;;;;164336:19:0;::::1;164345:10;164336:19;164332:47;;164364:15;;-1:-1:-1::0;;;164364:15:0::1;;;;;;;;;;;164332:47;164400:24;164427:15:::0;;;:6:::1;:15;::::0;;;;;;;164400:42;;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;164400:42:0;;::::1;::::0;;;-1:-1:-1;;;164400:42:0;;::::1;;::::0;;::::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;164400:42:0;::::1;::::0;;::::1;::::0;;;;;164457:16;164453:44:::1;;164482:15;;-1:-1:-1::0;;;164482:15:0::1;;;;;;;;;;;164453:44;164538:4;:12;;;164512:38;;164519:15;164512:38;;;164508:67;;;164559:16;;-1:-1:-1::0;;;164559:16:0::1;;;;;;;;;;;164508:67;164613:11:::0;;164596:14:::1;164676:29;164697:7:::0;164676:20:::1;:29::i;:::-;164655:50:::0;-1:-1:-1;164716:22:0::1;153393:4;164742:37;-1:-1:-1::0;;;;;164760:19:0;;::::1;::::0;164742:15;::::1;:37;:::i;:::-;164741:51;;;;:::i;:::-;164716:76;;164851:10;-1:-1:-1::0;;;;;164843:19:0::1;164832:6;-1:-1:-1::0;;;;;164824:15:0::1;164807:14;:32;;;;:::i;:::-;:55;164803:85;;164871:17;;-1:-1:-1::0;;;164871:17:0::1;;;;;;;;;;;164803:85;164899:30;164932:26;153393:4;164932:14:::0;:26:::1;:::i;:::-;164899:59:::0;-1:-1:-1;;;;;;164973:42:0;::::1;164969:70;;;165024:15;;-1:-1:-1::0;;;165024:15:0::1;;;;;;;;;;;164969:70;165050:20;:55:::0;;165082:22;;165050:20;::::1;::::0;:55:::1;::::0;165082:22;;-1:-1:-1;;;;;165050:55:0::1;;:::i;:::-;::::0;;-1:-1:-1;;;;;165050:55:0;;::::1;;::::0;;;::::1;::::0;;::::1;::::0;;;::::1;;::::0;;::::1;;::::0;;-1:-1:-1;165157:104:0::1;::::0;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;165237:12;;::::1;::::0;165157:104:::1;;;::::0;;::::1;::::0;;;;-1:-1:-1;165281:15:0;;;:6:::1;:15:::0;;;;;165274:22;;;-1:-1:-1;165274:22:0::1;::::0;;-1:-1:-1;;165274:22:0;;;165347:19;;;;::::1;::::0;;;;;;;;::::1;::::0;165157:104;165317:50:::1;::::0;165288:7;;165157:104;;165317:11:::1;:50::i;:::-;165395:23;::::0;;;:14:::1;:23;::::0;;;;165388:30;;-1:-1:-1;;165388:30:0::1;::::0;;165439:14:::1;165410:7:::0;165439:5:::1;:14::i;:::-;165504:10;165489:26;::::0;;;:14:::1;:26;::::0;;;;:28;;-1:-1:-1;;165489:28:0;::::1;;::::0;;::::1;-1:-1:-1::0;;165489:28:0;;;::::1;;::::0;;165549:12:::1;::::0;:45:::1;::::0;-1:-1:-1;;;;;165549:12:0;;::::1;::::0;-1:-1:-1;;;;;165549:45:0;::::1;:25;:45::i;:::-;165620:37;::::0;-1:-1:-1;;;;;7099:47:1;;7081:66;;165641:7:0;;165629:10:::1;::::0;165620:37:::1;::::0;7069:2:1;7054:18;165620:37:0::1;;;;;;;164218:1447;;;;;;;143081:20:::0;142298:1;143601:7;:22;143418:213;143081:20;164161:1504;:::o;181610:146::-;149413:13;:11;:13::i;:::-;-1:-1:-1;;;;;181680:23:0;::::1;181676:49;;181712:13;;-1:-1:-1::0;;;181712:13:0::1;;;;;;;;;;;181676:49;181732:8;:20:::0;;-1:-1:-1;;;;;;181732:20:0::1;-1:-1:-1::0;;;;;181732:20:0;;;::::1;::::0;;;::::1;::::0;;181610:146::o;105278:134::-;105365:39;105382:4;105388:2;105392:7;105365:39;;;;;;;;;;;;:16;:39::i;180461:585::-;143037:21;:19;:21::i;:::-;180546:14:::1;::::0;-1:-1:-1;;;180546:14:0;::::1;;;180538:48;;;::::0;-1:-1:-1;;;180538:48:0;;16011:2:1;180538: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;;180538:48:0::1;;;;;;;;;180621:10;180601:16;180609:7:::0;180601::::1;:16::i;:::-;-1:-1:-1::0;;;;;180601:30:0::1;;180597:58;;180640:15;;-1:-1:-1::0;;;180640:15:0::1;;;;;;;;;;;180597:58;180676:24;180703:15:::0;;;:6:::1;:15;::::0;;;;;;;180676:42;;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;180676:42:0;;::::1;::::0;;;-1:-1:-1;;;180676:42:0;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;180676:42:0;::::1;::::0;;::::1;::::0;;;;180785:15;;;;;;;180778:22;;;-1:-1:-1;;180778:22:0;;;;180811:14:::1;180710:7:::0;180811:5:::1;:14::i;:::-;180876:10;180861:26;::::0;;;:14:::1;:26;::::0;;;;:28;;-1:-1:-1;;180861:28:0;::::1;;::::0;;::::1;-1:-1:-1::0;;180861:28:0;;;::::1;;::::0;;180921:12:::1;::::0;:45:::1;::::0;-1:-1:-1;;;;;180921:12:0;;::::1;::::0;-1:-1:-1;;;;;180921:45:0;::::1;:25;:45::i;:::-;180992:46;::::0;-1:-1:-1;;;;;7099:47:1;;7081:66;;181022:7:0;;181010:10:::1;::::0;180992:46:::1;::::0;7069:2:1;7054:18;180992:46:0::1;;;;;;;180527: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;156334:280::-;149413:13;:11;:13::i;:::-;-1:-1:-1;;;;;156414:26:0;::::1;156410:52;;156449:13;;-1:-1:-1::0;;;156449:13:0::1;;;;;;;;;;;156410:52;156485:12;::::0;-1:-1:-1;;;;;156485:12:0::1;156477:35:::0;156473:74:::1;;156514:33;::::0;-1:-1:-1;;;156514:33:0;;16361:2:1;156514:33:0::1;::::0;::::1;16343:21:1::0;16400:2;16380:18;;;16373:30;16439:25;16419:18;;;16412:53;16482:18;;156514:33:0::1;16159:347:1::0;156473:74:0::1;156558:12;:48:::0;;-1:-1:-1;;;;;;156558:48:0::1;-1:-1:-1::0;;;;;156558:48:0;;;::::1;::::0;;;::::1;::::0;;156334:280::o;157861:858::-;157929:7;157976:15;;;:6;:15;;;;;;;;157949:42;;;;;;;;;-1:-1:-1;;;;;157949:42:0;;;;;-1:-1:-1;;;157949:42:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;157949:42:0;;;;;;;;;158013:15;158006:39;;158002:67;;-1:-1:-1;153345:4:0;;157861:858;-1:-1:-1;;157861:858:0:o;158002:67::-;158152:17;158235:19;153393:4;153187:8;158235:19;:::i;:::-;-1:-1:-1;;;;;158172:83:0;158197:32;153345:4;153291;158197:32;:::i;:::-;158181:11;;158173:57;;-1:-1:-1;;;;;158173:57:0;;;;:20;:57;:::i;:::-;158172:83;;;;:::i;:::-;158152:103;-1:-1:-1;;;;;;158270:29:0;;158266:57;;;158308:15;;-1:-1:-1;;;158308:15:0;;;;;;;;;;;158266:57;158407:12;;;;158358:9;;158334:13;;158407:38;;158429:15;;158407:38;:::i;:::-;158389:56;-1:-1:-1;158456:18:0;158504:25;;;;-1:-1:-1;;;;;158504:14:0;;:25;:::i;:::-;158485:45;;153345:4;158485:45;:::i;:::-;158456:75;-1:-1:-1;153291:4:0;-1:-1:-1;;;;;158556:27:0;;;158552:54;;;-1:-1:-1;153291:4:0;;157861:858;-1:-1:-1;;;;;;157861:858:0:o;158552:54::-;153345:4;-1:-1:-1;;;;;158621:28:0;;;158617:56;;;-1:-1:-1;153345:4:0;;157861:858;-1:-1:-1;;;;;;157861:858:0:o;158617:56::-;158701:10;157861:858;-1:-1:-1;;;;;;157861:858:0:o;102822:153::-;102958:9;102951:16;;102869:13;;-1:-1:-1;;;;;;;;;;;101087:21:0;102951:16;;;:::i;175413:199::-;175540:5;;;;;;175482:7;175527:19;;;:12;:19;;;;;;;;175502:44;;;;;;;;;;;;;;;-1:-1:-1;;;175502:44:0;;;;;;;;;;;;175540:5;175502:44;;;;;;;;;;;;-1:-1:-1;;;175502:44:0;;;;;;;;;175482:7;175572:31;175502:44;175593:9;175572;:31::i;:::-;175557:47;175413:199;-1:-1:-1;;;175413:199:0:o;104122:146::-;104208:52;25437:10;104241:8;104251;104208:18;:52::i;163926:226::-;164050:35;164071:4;164077:7;164050:20;:35::i;:::-;164097:47;164120:4;164126:2;164130:7;164139:4;164097:22;:47::i;176429:2466::-;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;176566:8:::2;156714;156696:15;:26;156692:56;;;156731:17;;-1:-1:-1::0;;;156731:17:0::2;;;;;;;;;;;156692:56;176609:1:::3;176591:19:::0;::::3;176587:47;;;176619:15;;-1:-1:-1::0;;;176619:15:0::3;;;;;;;;;;;176587:47;176655:19;::::0;;176790:376:::3;176810:19:::0;;::::3;176790:376;;;176879:10;176855:20;176863:8:::0;;176872:1;176863:11;;::::3;;;;;:::i;:::-;;;;;;;176855:7;:20::i;:::-;-1:-1:-1::0;;;;;176855:34:0::3;;176851:62;;176898:15;;-1:-1:-1::0;;;176898:15:0::3;;;;;;;;;;;176851:62;176942:24;176969:6;:19;176976:8;;176985:1;176976:11;;;;;;;:::i;:::-;;::::0;;::::3;::::0;;;::::3;;176969:19:::0;;-1:-1:-1;176969:19:0;;::::3;::::0;;;;;;;;-1:-1:-1;176969:19:0;176942:46;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;176942:46:0;;::::3;::::0;;;-1:-1:-1;;;176942:46:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;176942:46:0;::::3;::::0;;::::3;::::0;;;;;-1:-1:-1;177017:26:0::3;::::0;;::::3;:::i;:::-;;;177077:13;177062:28;;:4;:12;;;:28;;;177058:97;;;177127:4;:12;;;177111:28;;177058:97;-1:-1:-1::0;176831:3:0::3;;176790:376;;;-1:-1:-1::0;177225:24:0::3;177252:39;177275:15;177252:13:::0;:39:::3;:::i;:::-;177225:66:::0;-1:-1:-1;153187:8:0::3;177306:27;::::0;::::3;;177302:57;;;177342:17;;-1:-1:-1::0;;;177342:17:0::3;;;;;;;;;;;177302:57;177435:16;153187:8;177463:32;153393:4;-1:-1:-1::0;;;;;177463:20:0;::::3;:32;:::i;:::-;177462:44;;;;:::i;:::-;177435:72;;177528:18;177551:12;;177549:14;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;177528:35;;;;177574:33;177584:10;177596;177574:9;:33::i;:::-;177682:9;177677:512;177697:19:::0;;::::3;177677:512;;;177738:15;177756:8;;177765:1;177756:11;;;;;;;:::i;:::-;;::::0;;::::3;::::0;;;::::3;;177782:27;177812:15:::0;;;:6:::3;:15:::0;;;;;;177782:45;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;177782:45:0;;::::3;::::0;;-1:-1:-1;;;177782:45:0;;::::3;;::::0;;::::3;::::0;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;-1:-1:-1;;;177782:45:0;;::::3;::::0;::::3;::::0;;;;177896:127;;;;::::3;::::0;;177952:14;;177896:127:::3;;::::0;;177992:15;;177896:127:::3;::::0;;::::3;::::0;178091:19;;;;::::3;::::0;;;;;;;;::::3;::::0;;;;177756:11;;-1:-1:-1;177782:45:0;177896:127;-1:-1:-1;178052:59:0::3;::::0;177756:11;;177896:127;;178052:11:::3;:59::i;:::-;178133:15;::::0;;;:6:::3;:15;::::0;;;;178126:22;;;;::::3;::::0;;-1:-1:-1;;178126:22:0;;;178163:14:::3;178140:7:::0;178163:5:::3;:14::i;:::-;-1:-1:-1::0;;;177718:3:0::3;;177677:512;;;-1:-1:-1::0;178260:110:0::3;::::0;;;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;::::0;::::3;;::::0;;::::3;::::0;;;;178415:19;;;;::::3;::::0;;;178229:28:::3;178415:19:::0;;;;;::::3;::::0;178260:110;178391:53:::3;::::0;178403:10;;178260:110;178391:11:::3;:53::i;:::-;178486:176;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;178486:176:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;178604:15:::3;178486:176:::0;::::3;::::0;;;;;;-1:-1:-1;178465:18:0;;;:6:::3;:18:::0;;;;;:197;;;;;::::3;-1:-1:-1::0;;;178465:197:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;178465:197:0::3;-1:-1:-1::0;;178465:197:0;;;;;;::::3;::::0;;;;::::3;::::0;;;178750:10:::3;178735:26:::0;;;:14:::3;:26:::0;;;;;;;;;::::3;::::0;;::::3;:51:::0;;::::3;:55:::0;;::::3;178700:91:::0;;::::3;-1:-1:-1::0;;178700:91:0;;::::3;::::0;;;::::3;::::0;;;178828:59;;178472:10;;178750;178828:59:::3;::::0;::::3;::::0;178522:11;;178557: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;178828:59:0::3;;;;;;;;176576:2319;;;;;;145602:1:::2;143081:20:::0;142298:1;143601:7;:22;143418:213;174301:1104;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;174506:8:::2;156714;156696:15;:26;156692:56;;;156731:17;;-1:-1:-1::0;;;156731:17:0::2;;;;;;;;;;;156692:56;156825:24:::3;156852:15:::0;;;:6:::3;:15;::::0;;;;;;;;156825:42;;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;156825:42:0;;::::3;::::0;;;-1:-1:-1;;;156825:42:0;;::::3;;::::0;;::::3;::::0;;;;;;;::::3;::::0;::::3;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;156825:42:0;::::3;::::0;;::::3;::::0;;;;174521:7;;156825:42;156882:15;;;;:57:::3;;;156927:4;:12;;;156901:38;;156908:15;156901:38;;;156882:57;156878:956;;;157041:11:::0;;157010:20:::3;::::0;157033:32:::3;::::0;153393:4:::3;::::0;-1:-1:-1;;;;;157033:20:0::3;:32;:::i;:::-;157010:55:::0;-1:-1:-1;157080:22:0::3;157105:32;153345:4;153291;157105:32;:::i;:::-;-1:-1:-1::0;;;;;157080:57:0::3;::::0;-1:-1:-1;157152:17:0::3;157207:19;153393:4;153187:8;157207:19;:::i;:::-;-1:-1:-1::0;;;;;157172:55:0::3;157173:29;157188:14:::0;157173:12;:29:::3;:::i;:::-;157172:55;;;;:::i;:::-;157152:75;;157242:16;157269:9;157242:37;;157376:8;-1:-1:-1::0;;;;;157362:22:0::3;:4;:10;;;-1:-1:-1::0;;;;;157362:22:0::3;;157358:465;;157447:220;157481:7;157511:57;;;;;;;;157540:4;:11;;;157511:57;;;;;;157555:4;:12;;;157511:57;;;;::::0;157591::::3;;;;;;;;157620:4;:11;;;157591:57;;;;;;157635:4;:12;;;157591:57;;;;::::0;157447:11:::3;:220::i;:::-;157704:15;::::0;;;:6:::3;:15;::::0;;;;:32;;-1:-1:-1;;;;;157704:32:0;;::::3;-1:-1:-1::0;;;157704:32:0::3;::::0;::::3;;::::0;;-1:-1:-1;157755:26:0::3;:52:::0;;::::3;157791:15;157755:52;-1:-1:-1::0;;;157755:52:0::3;-1:-1:-1::0;;157755:52:0;;::::3;;::::0;;157358:465:::3;156941:893;;;;156878:956;174595:9:::4;174575:16;174583:7:::0;174575::::4;:16::i;:::-;-1:-1:-1::0;;;;;174575:29:0::4;;174571:57;;174613:15;;-1:-1:-1::0;;;174613:15:0::4;;;;;;;;;;;174571:57;174643:16;-1:-1:-1::0;;;;;174643:21:0::4;174663:1;174643:21:::0;174639:49:::4;;174673:15;;-1:-1:-1::0;;;174673:15:0::4;;;;;;;;;;;174639:49;174758:25;174786:15:::0;;;:6:::4;:15;::::0;;;;174816:11;;174786:15;;-1:-1:-1;;;;;174816:11:0;;::::4;:16:::0;;174812:44:::4;;174841:15;;-1:-1:-1::0;;;174841:15:0::4;;;;;;;;;;;174812:44;174898:12;::::0;::::4;::::0;::::4;::::0;;::::4;174878:15;174871:39:::0;;::::4;;174867:65;;174919:13;;-1:-1:-1::0;;;174919:13:0::4;;;;;;;;;;;174867:65;175005:12;::::0;:37:::4;::::0;-1:-1:-1;;;175005:37:0;;175036:4:::4;175005:37;::::0;::::4;1488:51:1::0;174981:21:0::4;::::0;-1:-1:-1;;;;;175005:12:0::4;::::0;:22:::4;::::0;1461:18:1;;175005:37:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;175053:12;::::0;174981:61;;-1:-1:-1;175053:74:0::4;::::0;-1:-1:-1;;;;;175053:12:0::4;175083:10;175103:4;-1:-1:-1::0;;;;;175053:74:0;::::4;:29;:74::i;:::-;175183:32;-1:-1:-1::0;;;;;175183:32:0;::::4;:13:::0;:32:::4;:::i;:::-;175142:12;::::0;:37:::4;::::0;-1:-1:-1;;;175142:37:0;;175173:4:::4;175142:37;::::0;::::4;1488:51:1::0;-1:-1:-1;;;;;175142:12:0;;::::4;::::0;:22:::4;::::0;1461:18:1;;175142:37:0::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:73;175138:115;;175237:16;;-1:-1:-1::0;;;175237:16:0::4;;;;;;;;;;;175138:115;175335:62;175356:7;175365:16;175383:13;175335:20;:62::i;:::-;174530:875;;156814:1039:::3;156759:1;145602::::2;143081:20:::0;142298:1;143601:7;:22;143418:213;180281:172;149413:13;:11;:13::i;:::-;180342:14:::1;:21:::0;;-1:-1:-1;;;;180342:21:0::1;-1:-1:-1::0;;;180342:21:0::1;::::0;;180374:8:::1;:6;:8::i;:::-;180419:25;::::0;180398:47:::1;::::0;-1:-1:-1;;;;;180419:25:0;;::::1;1488:51:1::0;;180398:47:0::1;::::0;1476:2:1;1461:18;180398:47:0::1;;;;;;;;180281:172::o:0;182330:495::-;182403:13;182458:1;182429:17;182438:7;182429:8;:17::i;:::-;-1:-1:-1;;;;;182429:31:0;;182425:60;;182469:16;;-1:-1:-1;;;182469:16:0;;;;;;;;;;;182425:60;182496:8;;-1:-1:-1;;;;;182496:8:0;182492:52;;182527:17;;-1:-1:-1;;;182527:17:0;;;;;;;;;;;182492:52;182637:8;;182667:53;;;;;7831:25:1;;;182602:12:0;;;;-1:-1:-1;;;;;182637:8:0;;;;7804:18:1;;182667:53:0;;;-1:-1:-1;;182667:53:0;;;;;;;;;;;;;;-1:-1:-1;;;;;182667:53:0;-1:-1:-1;;;182667:53:0;;;182637:90;;;182667:53;182637:90;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182601:126;;;;182742:7;182734:41;;;;-1:-1:-1;;;182734:41:0;;17457:2:1;182734:41:0;;;17439:21:1;17496:2;17476:18;;;17469:30;-1:-1:-1;;;17515:18:1;;;17508:51;17576:18;;182734:41:0;17255:345:1;182734:41:0;182806:4;182795:26;;;;;;;;;;;;:::i;:::-;182788:33;182330:495;-1:-1:-1;;;;182330:495:0:o;182829:322::-;182914:7;182934:13;;;;;:35;;-1:-1:-1;153187:8:0;182951:18;;;;182934:35;182930:65;;;182978:17;;-1:-1:-1;;;182978:17:0;;;;;;;;;;;182930:65;183006:6;-1:-1:-1;;;;;183006:11:0;183016:1;183006:11;183002:39;;183026:15;;-1:-1:-1;;;183026:15:0;;;;;;;;;;;183002:39;183054:13;183070:26;183089:6;183070:18;:26::i;:::-;183054:42;;183110:37;183131:5;183138:8;183110:20;:37::i;178903:828::-;178984:7;179023:23;;;:14;:23;;;;;;;;179061:14;;;179057:28;;179084:1;179077:8;;;;;179057:28;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;179191:9:0;179175:528;179207:1;179202;:6;;;179175:528;;179242:25;;;;:16;:25;;;;;;;;:28;;;;;;;;;;;;;179230:40;;;;;;;;;;;;;;;-1:-1:-1;;;179230:40:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;179230:40:0;;;;;;;;;;-1:-1:-1;179289:25:0;;;-1:-1:-1;179285:407:0;;179342:16;179388:9;:12;;;179376:9;:24;;;;:::i;:::-;179368:33;;179342:60;;153393:4;179475:9;179457;:15;;;:27;;;;:::i;:::-;179456:49;;;;:::i;:::-;179438:14;;:68;;;;:::i;:::-;179421:85;;;;;:14;-1:-1:-1;179525:85:0;;;179589:1;179572:18;;179525:85;-1:-1:-1;;179659:14:0;-1:-1:-1;;;;;179643:32:0;;-1:-1:-1;179628:48:0;;-1:-1:-1;179628:48:0;179285:407;179210:3;;;;:::i;:::-;;;;179175:528;;;-1:-1:-1;179722:1:0;;178903:828;-1:-1:-1;;;;;178903:828:0:o;179739:506::-;179918:15;;179823:7;;;;179918:15;-1:-1:-1;;;179918:15:0;;;;;179903:30;;;;:78;;179969:12;179903:78;;;179951:15;;179936:30;;-1:-1:-1;;;179951:15:0;;;;179936:12;:30;:::i;:::-;179882:99;-1:-1:-1;180045:17:0;153187:8;180085:32;153345:4;153291;180085:32;:::i;:::-;-1:-1:-1;;;;;180066:52:0;180074:6;-1:-1:-1;;;;;180066:15:0;:52;;;;:::i;:::-;180065:64;;;;:::i;:::-;180045:84;-1:-1:-1;180045:84:0;180211:28;;;;-1:-1:-1;;;;;180211:14:0;;:28;:::i;:::-;180192:48;;153345:4;180192:48;:::i;166504:1791::-;166714:15;143037:21;:19;:21::i;:::-;145572:19:::1;:17;:19::i;:::-;166695:8:::2;156714;156696:15;:26;156692:56;;;156731:17;;-1:-1:-1::0;;;156731:17:0::2;;;;;;;;;;;156692:56;166746:6:::3;-1:-1:-1::0;;;;;166746:11:0::3;166756:1;166746:11:::0;166742:39:::3;;166766:15;;-1:-1:-1::0;;;166766:15:0::3;;;;;;;;;;;166742:39;166796:17;::::0;::::3;::::0;;:43:::3;;-1:-1:-1::0;153187:8:0::3;166817:22;::::0;::::3;;166796:43;166792:73;;;166848:17;;-1:-1:-1::0;;;166848:17:0::3;;;;;;;;;;;166792:73;166895:10;166880:26;::::0;;;:14:::3;:26;::::0;;;;;153448:3:::3;166880:48;:26:::0;;::::3;:48;166876:78;;166937:17;;-1:-1:-1::0;;;166937:17:0::3;;;;;;;;;;;166876:78;166975:17;166995:38;167021:12:::0;167002:15:::3;166995:38;:::i;:::-;166975:58;;167055:13;167070:18;167092:61;167117:6;167125:12;167139:13;167092:24;:61::i;:::-;167054:99;;;;167210:28;167241:102;;;;;;;;167293:6;167241:102;;;;;;167321:10;167241:102;;;;::::0;167210:133:::3;;167410:44;167422:1;167425:19;;;;;;;;167439:1;167425:19;;;;;;167442:1;167425:19;;;;::::0;167446:7:::3;167410:11;:44::i;:::-;167543:12;::::0;:37:::3;::::0;-1:-1:-1;;;167543:37:0;;167574:4:::3;167543:37;::::0;::::3;1488:51:1::0;167519:21:0::3;::::0;-1:-1:-1;;;;;167543:12:0::3;::::0;:22:::3;::::0;1461:18:1;;167543:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;167591:12;::::0;167519:61;;-1:-1:-1;167591:64:0::3;::::0;-1:-1:-1;;;;;167591:12:0::3;167621:10;167641:4;-1:-1:-1::0;;;;;167591:64:0;::::3;:29;:64::i;:::-;167711:22;-1:-1:-1::0;;;;;167711:22:0;::::3;:13:::0;:22:::3;:::i;:::-;167670:12;::::0;:37:::3;::::0;-1:-1:-1;;;167670:37:0;;167701:4:::3;167670:37;::::0;::::3;1488:51:1::0;-1:-1:-1;;;;;167670:12:0;;::::3;::::0;:22:::3;::::0;1461:18:1;;167670:37:0::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;167666:106;;167756:16;;-1:-1:-1::0;;;167756:16:0::3;;;;;;;;;;;167666:106;167828:12;:14:::0;;::::3;;-1:-1:-1::0;;;167828:14:0;;::::3;::::0;::::3;::::0;;::::3;::::0;;::::3;;-1:-1:-1::0;;;;167828:14:0;;::::3;::::0;;;::::3;::::0;;;167872:10:::3;-1:-1:-1::0;167857:26:0;;;:14:::3;:26;::::0;;;;:28;;::::3;::::0;;::::3;::::0;;::::3;::::0;;::::3;-1:-1:-1::0;;167857:28:0;;::::3;::::0;;;::::3;::::0;;;167828:14;-1:-1:-1;167917:30:0::3;::::0;167828:14;167917:9:::3;:30::i;:::-;167986:165;::::0;;::::3;::::0;::::3;::::0;;-1:-1:-1;;;;;167986:165:0;;::::3;::::0;;;;::::3;;::::0;;::::3;::::0;;;::::3;::::0;;::::3;::::0;;;;;;168096:15:::3;167986:165:::0;::::3;::::0;;;;;;-1:-1:-1;167968:15:0;;;:6:::3;:15:::0;;;;;;;:183;;;;;::::3;-1:-1:-1::0;;;167968:183:0::3;::::0;;;::::3;::::0;;;::::3;::::0;;;;;;::::3;::::0;;;;;::::3;-1:-1:-1::0;;;167968:183:0::3;-1:-1:-1::0;;167968:183:0;;;;;;::::3;::::0;;;;;;;::::3;::::0;;168172:41:::3;168022:6:::0;168202:10;168172:21:::3;:41::i;:::-;168239:48;::::0;;-1:-1:-1;;;;;15690:47:1;;15672:66;;15786:10;15774:23;;15769:2;15754:18;;15747:51;168259:7:0;;168247:10:::3;::::0;168239:48:::3;::::0;15645:18:1;168239:48:0::3;;;;;;;166731: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;181054:68::-:0;149413:13;:11;:13::i;:::-;181104: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;158727:363:0;158883:19;:17;:19::i;:::-;158927:12;;158923:160;;158956:115;158991:7;159018:9;159047;158956:16;:115::i;171669:195::-;171735:7;153187:8;171817:27;153393:4;-1:-1:-1;;;;;171817:15:0;;:27;:::i;:::-;171816:39;;;;:::i;171872:687::-;171957:7;172071:5;-1:-1:-1;;;;;172071:10:0;172080:1;172071:10;172067:38;;-1:-1:-1;153345:4:0;172083:22;;172067:38;172126:12;172141:25;;;;-1:-1:-1;;;;;172141:14:0;;:25;:::i;:::-;172126:40;-1:-1:-1;172235:18:0;172336:24;153187:8;-1:-1:-1;;;;;172336:14:0;;:24;:::i;:::-;172298:32;153345:4;153291;172298:32;:::i;:::-;172290:41;;-1:-1:-1;;;;;172290:41:0;:4;:41;:::i;:::-;172289:72;;;;:::i;:::-;172256:106;;153345:4;172256:106;:::i;:::-;172235:127;-1:-1:-1;153291:4:0;172387:27;;172383:54;;;153291:4;172416:21;;;;;;172383:54;153345:4;172452:28;;172448:56;;;153345:4;172482:22;;;;;;166269:227;166356:22;153393:4;166381:37;-1:-1:-1;;;;;166399:19:0;;;;166381:15;;:37;:::i;:::-;:49;;;;:::i;:::-;166441:20;:47;;166356:74;;-1:-1:-1;166356:74:0;;166441:20;;:47;;166356:74;;-1:-1:-1;;;;;166441:47:0;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;166441:47:0;;;;;-1:-1:-1;;;;;166441:47:0;;;;;;166345:151;166269: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;163371:347:0;-1:-1:-1;;;;;163491:18:0;;;;;;:57;;-1:-1:-1;163521:12:0;;-1:-1:-1;;;;;163521:12:0;163513:35;;163491:57;:92;;;;-1:-1:-1;163581:1:0;163552:17;163561:7;163552:8;:17::i;:::-;-1:-1:-1;;;;;163552:31:0;;;163491:92;163487:224;;;163604:12;;:28;;-1:-1:-1;;;163604:28:0;;;;;7831:25:1;;;163635:1:0;;-1:-1:-1;;;;;163604:12:0;;:19;;7804:18:1;;163604:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:32;163600:100;;;163657:12;;:27;;-1:-1:-1;;;163657:27:0;;;;;7831:25:1;;;-1:-1:-1;;;;;163657:12:0;;;;:18;;7804::1;;163657: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;165678:583:0;165829:13;;153187:8;165958:27;153393:4;-1:-1:-1;;;;;165958:15:0;;:27;:::i;:::-;165957:39;;;;:::i;:::-;165941:56;;166064:41;166085:5;166092:12;166064:20;:41::i;:::-;166051:54;-1:-1:-1;153291:4:0;-1:-1:-1;;;;;166130:27:0;;;166126:59;;;166166:19;;-1:-1:-1;;;166166:19:0;;;;;;;;;;;166126:59;166213:13;-1:-1:-1;;;;;166200:26:0;:10;-1:-1:-1;;;;;166200:26:0;;166196:57;;;166235:18;;-1:-1:-1;;;166235:18:0;;;;;;;;;;;166196:57;165678: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;175620:801::-;175692:7;175712:22;175737:5;175712:30;;175753:9;153233;;175766;:12;;;:19;;;;:::i;:::-;175765:28;;;;:::i;:::-;175753:40;-1:-1:-1;175819:9:0;175814:460;175838:3;175834:1;:7;175814:460;;;175863:10;153233:9;175863:10;;:::i;:::-;;-1:-1:-1;175888:13:0;175924:6;;;;;;;;175920:119;;;175956:1;175951:6;;175920:119;;;-1:-1:-1;176007:16:0;;;;;;;:12;:16;;;;;;;;175920:119;176109:12;;;;176104:17;;:2;:17;:::i;:::-;176096:26;;176071:9;:15;;;:52;;;;:::i;:::-;176053:70;;:9;;:70;;;;;:::i;:::-;;;;;-1:-1:-1;176142:7:0;;;;;;;;176138:53;;176170:5;;;176138:53;176224:6;176205:9;:15;;:25;;;;;;;:::i;:::-;;;;;-1:-1:-1;;176245:17:0;;;:12;;;:17;175843:3;;175814:460;;;;176307:1;176290:9;:14;;;:18;;;176286:69;;;176342:1;176325:18;;176286:69;-1:-1:-1;176396:14:0;-1:-1:-1;;;;;176380:32:0;;175620:801;-1:-1:-1;;;175620: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;172624:1669::-;172773:25;172801:15;;;:6;:15;;;;;172909:11;;172801:15;;-1:-1:-1;;;;;172909:11:0;;;;172951:28;172963:16;172909:11;172951:28;:::i;:::-;173007:12;;;;172931:48;;-1:-1:-1;173007:12:0;;172990:14;173057:33;173074:15;173007:12;173057:33;:::i;:::-;173030:60;;173158:16;173177:29;173196:9;173177:18;:29::i;:::-;173158:48;;173217:18;173238:49;173259:8;173269:17;173238:20;:49::i;:::-;173217:70;;173364:25;173392:29;173413:7;173392:20;:29::i;:::-;173364:57;;173458:17;-1:-1:-1;;;;;173445:30:0;:10;-1:-1:-1;;;;;173445:30:0;;:63;;173491:17;173445:63;;;173478:10;173445:63;173432:76;-1:-1:-1;173600:16:0;173612:4;153393;173600:16;:::i;:::-;-1:-1:-1;;;;;173581:35:0;:16;-1:-1:-1;;;;;173581:35:0;;:65;;;;;173633:13;-1:-1:-1;;;;;173620:26:0;:10;-1:-1:-1;;;;;173620:26:0;;173581:65;173577:123;;;173670:18;;-1:-1:-1;;;173670:18:0;;;;;;;;;;;173577:123;173743:174;173769:7;173791:50;;;;;;;;173820:9;173791:50;;;;;;173833:7;173791:50;;;;;173856;;;;;;;;173885:9;173856:50;;;;;;173898:7;173856:50;;;;;173743:11;:174::i;:::-;-1:-1:-1;;;;;174002:21:0;;;-1:-1:-1;;;174002:21:0;173968:23;;;174002:21;;;173968:23;174034:15;;:41;;;174059:15;174034:41;-1:-1:-1;;;174034:41:0;-1:-1:-1;;174034:41:0;;;;;;174131:51;174153:16;174171:10;174131:21;:51::i;:::-;174208:77;;;-1:-1:-1;;;;;22167:47:1;;;22149:66;;22251:47;;;22246:2;22231:18;;22224:75;22335:47;;22315:18;;;22308:75;174208:77:0;;174236:7;;174224:10;;174208:77;;;;;22137:2:1;174208:77:0;;;172762:1531;;;;;;;;172624: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;159098:950::-;159163:5;;;;159179:22;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;159179:22:0;159226:10;;;;159222:289;;159265:12;:24;159278:10;159287:1;159278:6;:10;:::i;:::-;159265:24;;;;;;;;;;;;;;;;;;-1:-1:-1;159265:24:0;159253:36;;;;;;;;;;;;;;;-1:-1:-1;;;159253:36:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;159253:36:0;;;;;;;;;-1:-1:-1;159222:289:0;;;-1:-1:-1;159334:165:0;;;;;;;;-1:-1:-1;159334:165:0;;;;;;;;159423:15;159334:165;;;;;;;;;159470:12;159334:165;;;;;;;159222:289;159547:12;;;;159523:21;159617:40;;;;159624:15;159617:40;;;;159613:198;;;159785:12;;;;159767:30;;;;:15;:30;:::i;:::-;159724:13;;;;159709:28;;;;:12;:28;:::i;:::-;159696:42;;153393:4;159696:42;:::i;:::-;159695:103;;;;:::i;:::-;159674:125;;159613:198;159874:135;159914:9;159938:14;159967:10;159992:6;159874:25;:135::i;:::-;159862:147;-1:-1:-1;160030:10:0;:6;160039:1;160030:10;:::i;:::-;160022:5;:18;;-1:-1:-1;;160022:18:0;;;;;;;;;;;;-1:-1:-1;;;;159098:950:0:o;161340:1198::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;161594:15:0;161571:39;;:9;:13;;;:39;;;:63;;;;;161633:1;161614:9;:16;;;:20;;;161571:63;161567:276;;;161665:16;;153187:8;;161665:36;;153393:4;;161665:36;:::i;:::-;161664:49;;;;:::i;:::-;161651:62;;:10;;;;:62;;;;161769:13;;;153393:4;;161769:39;;161792:15;;161769:39;:::i;:::-;161761:48;;161741:4;:10;;;:69;;;;:::i;:::-;161740:91;;;;:::i;:::-;161728:103;;;;161567:276;161890:15;161867:39;;:9;:13;;;:39;;;:63;;;;;161929:1;161910:9;:16;;;:20;;;161867:63;161863:276;;;161961:16;;153187:8;;161961:36;;153393:4;;161961:36;:::i;:::-;161960:49;;;;:::i;:::-;161947:62;;:10;;;;:62;;;;162065:13;;;153393:4;;162065:39;;162088:15;;162065:39;:::i;:::-;162057:48;;162037:4;:10;;;:69;;;;:::i;:::-;162036:91;;;;:::i;:::-;162024:103;;;;161863:276;162151:134;162191:9;162215;162239:4;:10;;;162264:4;:10;;;162151:25;:134::i;:::-;162298:16;162317:23;;;:14;:23;;;;;;:27;;:23;;;:27;:::i;:::-;162355:23;;;;:14;:23;;;;;;;;:35;;;;;;-1:-1:-1;;162355:35:0;;;;;;;;162418:15;162401:33;;:7;;;:33;;;162463:12;162445:31;;:8;;;:31;;;162487:25;;;:16;:25;;;;;:36;;;;;;;;:43;;;;;;;-1:-1:-1;;;;;162487:43:0;;;-1:-1:-1;;;162487:43:0;;;;;;;;;;162355:35;162487:43;;;;;;;;;;-1:-1:-1;;;162487:43:0;-1:-1:-1;;162487:43:0;;;;;;;;;;;;;;;;;-1:-1:-1;;;;161340: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;160056:1276:0;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;160291:9:0;160259:29;153233:9;160324:21;153233:9;160324:14;:21;:::i;:::-;160323:30;;;;:::i;:::-;160311:42;-1:-1:-1;160379:9:0;160374:914;160398:3;160394:1;:7;160374:914;;;160423:10;153233:9;160423:10;;:::i;:::-;;-1:-1:-1;160448:13:0;160498:28;160510:15;160498:28;;;;;;160494:163;;;160559:15;160547:28;;160494:163;;;-1:-1:-1;160625:16:0;;;;;;;:12;:16;;;;;;;;160494:163;160736:19;160741:14;160736:2;:19;:::i;:::-;160728:28;;160703:9;:15;;;:54;;;;:::i;:::-;160685:72;;:9;;:72;;;;;:::i;:::-;;;;;-1:-1:-1;160772:15:0;;;:25;;160791:6;;160772:15;:25;;160791:6;;160772:25;:::i;:::-;;;;;-1:-1:-1;160812:17:0;;;:12;;;;:17;;;;160947:19;;;153393:4;;160942:24;;160827:2;160942:24;:::i;:::-;160919:48;;;;-1:-1:-1;;;;;160919:19:0;;:48;:::i;:::-;160918:62;;;;:::i;:::-;160867:16;:20;;;:113;;;;;;:::i;:::-;160844:137;;;;:13;;;:137;161027:15;161014:29;;;;;;161010:219;;-1:-1:-1;161064:36:0;161087:12;161064:36;:13;;;:36;161119:5;;161010:219;161204:9;161165:12;:36;161198:1;161178:10;:6;161187:1;161178:10;:::i;:::-;:22;;;;:::i;:::-;161165:36;;;;;;;;;;;;;;;;;;-1:-1:-1;161165:36:0;:48;;;;;;-1:-1:-1;;;;;161165:48:0;;;-1:-1:-1;;;161165:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;161165:48:0;-1:-1:-1;;161165:48:0;;;;;;;;;;;;;;;;;-1:-1:-1;161274:2:0;;-1:-1:-1;161274:2:0;;160403:3;;160374:914;;;-1:-1:-1;161315:9:0;;160056:1276;-1:-1:-1;;;;;;160056:1276:0:o;162546:814::-;162769:15;162746:39;;:9;:13;;;:39;;;162742:314;;;162834:13;;;;;162821:27;;162802:16;162821:27;;;:12;:27;;;;;;;;;162863:21;162876:8;162821:27;162863:21;:::i;:::-;;;162920:9;:13;;;162903:30;;:9;:13;;;:30;;;162899:92;;162954:21;162967:8;162954:21;;:::i;:::-;;;162899:92;163018:13;;;;;163005:27;;;;;;:12;:27;;;;;;:39;;-1:-1:-1;;;;;;163005:39:0;-1:-1:-1;;;;;163005:39:0;;;;;;;;;;162742:314;163095:15;163072:39;;:9;:13;;;:39;;;163068:285;;;163148:9;:13;;;163132:29;;:9;:13;;;:29;;;163128:214;;;163214:13;;;;;163201:27;;163182:16;163201:27;;;:12;:27;;;;;;;;;163247:21;163260:8;163201:27;163247:21;:::i;:::-;163300:13;;;;;163287:27;;;;;;:12;:27;;;;;;:39;;-1:-1:-1;;;;;163287:39:0;;;-1:-1:-1;;;;;;163287:39:0;;;;;;;;;-1:-1:-1;162546: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://69d4d7cbc5e3d1b2ee5f273b5133a8c9f8152b4f3e917cf225b1b2ab6963e4fe
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.