Source Code
Overview
APE Balance
More Info
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint Primary | 17121551 | 9 days ago | IN | 1 APE | 0.00000147 |
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17121551 | 9 days ago | 1 APE |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ApeColorNFT
Compiler Version
v0.8.29+commit.ab55807c
Contract Source Code (Solidity)
/** *Submitted for verification at curtis.apescan.io on 2025-04-05 */ // Sources flattened with hardhat v2.22.19 https://hardhat.org // SPDX-License-Identifier: MIT // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.29; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File @openzeppelin/contracts/access/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) 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 Ownable is Context { address private _owner; /** * @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. */ constructor(address initialOwner) { 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) { 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 { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File @openzeppelin/contracts/interfaces/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) 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); } // File @openzeppelin/contracts/utils/introspection/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) 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); } // File @openzeppelin/contracts/token/ERC721/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol) 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); } // File @openzeppelin/contracts/token/ERC721/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) 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); } // File @openzeppelin/contracts/token/ERC721/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721Receiver.sol) 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); } // File @openzeppelin/contracts/token/ERC721/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/utils/ERC721Utils.sol) 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)) } } } } } } // File @openzeppelin/contracts/utils/introspection/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) 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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol) // 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)) } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) 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) } } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol) 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; } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) 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); } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (utils/Strings.sol) pragma solidity ^0.8.20; /** * @dev String operations. */ library Strings { using SafeCast for *; 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 The string being parsed contains characters that are not in scope of the given base. */ error StringsInvalidChar(); /** * @dev The string being parsed is not a properly formatted address. */ error StringsInvalidAddressFormat(); /** * @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)); } /** * @dev Parse a decimal string and returns the value as a `uint256`. * * Requirements: * - The string must be formatted as `[0-9]*` * - The result must fit into an `uint256` type */ function parseUint(string memory input) internal pure returns (uint256) { return parseUint(input, 0, bytes(input).length); } /** * @dev Variant of {parseUint} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `[0-9]*` * - The result must fit into an `uint256` type */ function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { (bool success, uint256 value) = tryParseUint(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) { return _tryParseUintUncheckedBounds(input, 0, bytes(input).length); } /** * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid * character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseUint( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, uint256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseUintUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseUint} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseUintUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, uint256 value) { bytes memory buffer = bytes(input); uint256 result = 0; for (uint256 i = begin; i < end; ++i) { uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); if (chr > 9) return (false, 0); result *= 10; result += chr; } return (true, result); } /** * @dev Parse a decimal string and returns the value as a `int256`. * * Requirements: * - The string must be formatted as `[-+]?[0-9]*` * - The result must fit in an `int256` type. */ function parseInt(string memory input) internal pure returns (int256) { return parseInt(input, 0, bytes(input).length); } /** * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `[-+]?[0-9]*` * - The result must fit in an `int256` type. */ function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) { (bool success, int256 value) = tryParseInt(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if * the result does not fit in a `int256`. * * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. */ function tryParseInt(string memory input) internal pure returns (bool success, int256 value) { return _tryParseIntUncheckedBounds(input, 0, bytes(input).length); } uint256 private constant ABS_MIN_INT256 = 2 ** 255; /** * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid * character or if the result does not fit in a `int256`. * * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. */ function tryParseInt( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, int256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseIntUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseInt} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseIntUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, int256 value) { bytes memory buffer = bytes(input); // Check presence of a negative sign. bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty bool positiveSign = sign == bytes1("+"); bool negativeSign = sign == bytes1("-"); uint256 offset = (positiveSign || negativeSign).toUint(); (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end); if (absSuccess && absValue < ABS_MIN_INT256) { return (true, negativeSign ? -int256(absValue) : int256(absValue)); } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) { return (true, type(int256).min); } else return (false, 0); } /** * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as a `uint256`. * * Requirements: * - The string must be formatted as `(0x)?[0-9a-fA-F]*` * - The result must fit in an `uint256` type. */ function parseHexUint(string memory input) internal pure returns (uint256) { return parseHexUint(input, 0, bytes(input).length); } /** * @dev Variant of {parseHexUint} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `(0x)?[0-9a-fA-F]*` * - The result must fit in an `uint256` type. */ function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { (bool success, uint256 value) = tryParseHexUint(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) { return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length); } /** * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an * invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseHexUint( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, uint256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseHexUintUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseHexUint} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseHexUintUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, uint256 value) { bytes memory buffer = bytes(input); // skip 0x prefix if present bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty uint256 offset = hasPrefix.toUint() * 2; uint256 result = 0; for (uint256 i = begin + offset; i < end; ++i) { uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); if (chr > 15) return (false, 0); result *= 16; unchecked { // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check). // This guaratees that adding a value < 16 will not cause an overflow, hence the unchecked. result += chr; } } return (true, result); } /** * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as an `address`. * * Requirements: * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}` */ function parseAddress(string memory input) internal pure returns (address) { return parseAddress(input, 0, bytes(input).length); } /** * @dev Variant of {parseAddress} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}` */ function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) { (bool success, address value) = tryParseAddress(input, begin, end); if (!success) revert StringsInvalidAddressFormat(); return value; } /** * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly * formatted address. See {parseAddress} requirements. */ function tryParseAddress(string memory input) internal pure returns (bool success, address value) { return tryParseAddress(input, 0, bytes(input).length); } /** * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly * formatted address. See {parseAddress} requirements. */ function tryParseAddress( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, address value) { if (end > bytes(input).length || begin > end) return (false, address(0)); bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty uint256 expectedLength = 40 + hasPrefix.toUint() * 2; // check that input is the correct length if (end - begin == expectedLength) { // length guarantees that this does not overflow, and value is at most type(uint160).max (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end); return (s, address(uint160(v))); } else { return (false, address(0)); } } function _tryParseChr(bytes1 chr) private pure returns (uint8) { uint8 value = uint8(chr); // Try to parse `chr`: // - Case 1: [0-9] // - Case 2: [a-f] // - Case 3: [A-F] // - otherwise not supported unchecked { if (value > 47 && value < 58) value -= 48; else if (value > 96 && value < 103) value -= 87; else if (value > 64 && value < 71) value -= 55; else return type(uint8).max; } return value; } /** * @dev Reads a bytes32 from a bytes array without bounds checking. * * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the * assembly block as such would prevent some optimizations. */ function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { // This is not memory safe in the general case, but all calls to this private function are within bounds. assembly ("memory-safe") { value := mload(add(buffer, add(0x20, offset))) } } } // File @openzeppelin/contracts/token/ERC721/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/ERC721.sol) 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 ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, 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) { 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) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { 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) { 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) { 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) { 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 { 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) { 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 { // 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 { 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; } } // File contracts/ApeColorNFT.sol // Original license: SPDX_License_Identifier: MIT pragma solidity ^0.8.29; contract ApeColorNFT is ERC721, Ownable { // Contatore manuale per gli ID dei token uint256 private _tokenIdCounter; address public treasury = 0x9f9AFAD1C7aEcc9d80E2208bB5A8292160F3CF17; uint256 public constant MINT_FEE = 1 ether; uint256 public constant MIX_FEE = 0.1 ether; struct ColorData { uint8 r; uint8 g; uint8 b; bool isPrimary; string name; } mapping(uint256 => ColorData) private _colors; constructor() ERC721("ApeColor", "APECOLOR") Ownable(msg.sender) {} /// @dev Verifica l'esistenza del token function _customExists(uint256 tokenId) internal view returns (bool) { return _ownerOf(tokenId) != address(0) && bytes(_colors[tokenId].name).length > 0; } /// @notice Mint di un nuovo NFT primario function mintPrimary(string memory color) external payable { require(msg.value == MINT_FEE, "Invia esattamente 1 APE"); (bool success, ) = treasury.call{value: msg.value}(""); require(success, "Transferimento fallito"); uint256 tokenId = _tokenIdCounter; // Usa il contatore manuale _safeMint(msg.sender, tokenId); (uint8 r, uint8 g, uint8 b) = _getColorValue(color); _colors[tokenId] = ColorData(r, g, b, true, color); _tokenIdCounter++; // Incrementa manualmente il contatore } /// @notice Mescola NFT per creare un nuovo colore function mixColors( uint256[] memory tokenIds, uint256[] memory percentages, string memory newName ) external payable { require(msg.value == MIX_FEE, "Invia esattamente 0.1 APE"); (bool success, ) = treasury.call{value: msg.value}(""); require(success, "Transferimento fallito"); require(tokenIds.length == percentages.length, "Input non validi"); uint256 totalR; uint256 totalG; uint256 totalB; uint256 totalPercentage = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(_customExists(tokenIds[i]), "Token non esistente"); require(ownerOf(tokenIds[i]) == msg.sender, "Non sei il proprietario"); ColorData memory c = _colors[tokenIds[i]]; totalR += c.r * percentages[i]; totalG += c.g * percentages[i]; totalB += c.b * percentages[i]; totalPercentage += percentages[i]; _burn(tokenIds[i]); } require(totalPercentage == 100, "Le percentuali devono sommare a 100"); uint256 newTokenId = _tokenIdCounter; // Usa il contatore manuale _safeMint(msg.sender, newTokenId); _colors[newTokenId] = ColorData( uint8(totalR / 100), uint8(totalG / 100), uint8(totalB / 100), false, newName ); _tokenIdCounter++; // Incrementa manualmente il contatore } /// @notice Imposta un nuovo tesoro function setTreasury(address _newTreasury) external onlyOwner { treasury = _newTreasury; } /// @notice Ottieni dati del colore function getColorData(uint256 tokenId) external view returns ( uint8 r, uint8 g, uint8 b, bool isPrimary, string memory name ) { require(_customExists(tokenId), "NFT non esistente"); ColorData memory color = _colors[tokenId]; return (color.r, color.g, color.b, color.isPrimary, color.name); } /// @dev Ottieni valori RGB da nome colore function _getColorValue(string memory color) private pure returns (uint8 r, uint8 g, uint8 b) { bytes32 colorHash = keccak256(abi.encodePacked(color)); if (colorHash == keccak256("red")) return (255, 0, 0); if (colorHash == keccak256("green")) return (0, 255, 0); if (colorHash == keccak256("blue")) return (0, 0, 255); if (colorHash == keccak256("white")) return (255, 255, 255); if (colorHash == keccak256("black")) return (0, 0, 0); return (0, 0, 0); } }
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"inputs":[],"name":"MINT_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"getColorData","outputs":[{"internalType":"uint8","name":"r","type":"uint8"},{"internalType":"uint8","name":"g","type":"uint8"},{"internalType":"uint8","name":"b","type":"uint8"},{"internalType":"bool","name":"isPrimary","type":"bool"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","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":[{"internalType":"string","name":"color","type":"string"}],"name":"mintPrimary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"percentages","type":"uint256[]"},{"internalType":"string","name":"newName","type":"string"}],"name":"mixColors","outputs":[],"stateMutability":"payable","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":"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":"_newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052739f9afad1c7aecc9d80e2208bb5a8292160f3cf1760085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610063575f5ffd5b50336040518060400160405280600881526020017f417065436f6c6f720000000000000000000000000000000000000000000000008152506040518060400160405280600881526020017f415045434f4c4f52000000000000000000000000000000000000000000000000815250815f90816100df9190610477565b5080600190816100ef9190610477565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610162575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016101599190610585565b60405180910390fd5b6101718161017760201b60201c565b5061059e565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806102b557607f821691505b6020821081036102c8576102c7610271565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261032a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826102ef565b61033486836102ef565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61037861037361036e8461034c565b610355565b61034c565b9050919050565b5f819050919050565b6103918361035e565b6103a561039d8261037f565b8484546102fb565b825550505050565b5f5f905090565b6103bc6103ad565b6103c7818484610388565b505050565b5b818110156103ea576103df5f826103b4565b6001810190506103cd565b5050565b601f82111561042f57610400816102ce565b610409846102e0565b81016020851015610418578190505b61042c610424856102e0565b8301826103cc565b50505b505050565b5f82821c905092915050565b5f61044f5f1984600802610434565b1980831691505092915050565b5f6104678383610440565b9150826002028217905092915050565b6104808261023a565b67ffffffffffffffff81111561049957610498610244565b5b6104a3825461029e565b6104ae8282856103ee565b5f60209050601f8311600181146104df575f84156104cd578287015190505b6104d7858261045c565b86555061053e565b601f1984166104ed866102ce565b5f5b82811015610514578489015182556001820191506020850194506020810190506104ef565b86831015610531578489015161052d601f891682610440565b8355505b6001600288020188555050505b505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61056f82610546565b9050919050565b61057f81610565565b82525050565b5f6020820190506105985f830184610576565b92915050565b61385f806105ab5f395ff3fe60806040526004361061013f575f3560e01c80638184eae2116100b5578063b88d4fde1161006e578063b88d4fde14610433578063c87b56dd1461045b578063d7bf81a314610497578063e985e9c5146104c1578063f0f44260146104fd578063f2fde38b146105255761013f565b80638184eae2146103555780638da5cb5b14610371578063959b44cb1461039b57806395d89b41146103b7578063a22cb465146103e1578063b7cc6ce3146104095761013f565b806342842e0e1161010757806342842e0e1461023557806361d027b31461025d5780636352211e1461028757806370a08231146102c3578063715018a6146102ff578063799ebe62146103155761013f565b806301ffc9a71461014357806306fdde031461017f578063081812fc146101a9578063095ea7b3146101e557806323b872dd1461020d575b5f5ffd5b34801561014e575f5ffd5b50610169600480360381019061016491906126d9565b61054d565b604051610176919061271e565b60405180910390f35b34801561018a575f5ffd5b5061019361062e565b6040516101a091906127a7565b60405180910390f35b3480156101b4575f5ffd5b506101cf60048036038101906101ca91906127fa565b6106bd565b6040516101dc9190612864565b60405180910390f35b3480156101f0575f5ffd5b5061020b600480360381019061020691906128a7565b6106d8565b005b348015610218575f5ffd5b50610233600480360381019061022e91906128e5565b6106ee565b005b348015610240575f5ffd5b5061025b600480360381019061025691906128e5565b6107ed565b005b348015610268575f5ffd5b5061027161080c565b60405161027e9190612864565b60405180910390f35b348015610292575f5ffd5b506102ad60048036038101906102a891906127fa565b610831565b6040516102ba9190612864565b60405180910390f35b3480156102ce575f5ffd5b506102e960048036038101906102e49190612935565b610842565b6040516102f6919061296f565b60405180910390f35b34801561030a575f5ffd5b506103136108f8565b005b348015610320575f5ffd5b5061033b600480360381019061033691906127fa565b61090b565b60405161034c9594939291906129a3565b60405180910390f35b61036f600480360381019061036a9190612b27565b610aa1565b005b34801561037c575f5ffd5b50610385610ccf565b6040516103929190612864565b60405180910390f35b6103b560048036038101906103b09190612c32565b610cf7565b005b3480156103c2575f5ffd5b506103cb611304565b6040516103d891906127a7565b60405180910390f35b3480156103ec575f5ffd5b5061040760048036038101906104029190612d00565b611394565b005b348015610414575f5ffd5b5061041d6113aa565b60405161042a919061296f565b60405180910390f35b34801561043e575f5ffd5b5061045960048036038101906104549190612ddc565b6113b6565b005b348015610466575f5ffd5b50610481600480360381019061047c91906127fa565b6113db565b60405161048e91906127a7565b60405180910390f35b3480156104a2575f5ffd5b506104ab611441565b6040516104b8919061296f565b60405180910390f35b3480156104cc575f5ffd5b506104e760048036038101906104e29190612e5c565b61144d565b6040516104f4919061271e565b60405180910390f35b348015610508575f5ffd5b50610523600480360381019061051e9190612935565b6114db565b005b348015610530575f5ffd5b5061054b60048036038101906105469190612935565b611526565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061061757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106275750610626826115aa565b5b9050919050565b60605f805461063c90612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461066890612ec7565b80156106b35780601f1061068a576101008083540402835291602001916106b3565b820191905f5260205f20905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b5f6106c782611613565b506106d182611699565b9050919050565b6106ea82826106e56116d2565b6116d9565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361075e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016107559190612864565b60405180910390fd5b5f610771838361076c6116d2565b6116eb565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107e7578382826040517f64283d7b0000000000000000000000000000000000000000000000000000000081526004016107de93929190612ef7565b60405180910390fd5b50505050565b61080783838360405180602001604052805f8152506113b6565b505050565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f61083b82611613565b9050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108b3575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016108aa9190612864565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6109006118f6565b6109095f61197d565b565b5f5f5f5f606061091a86611a40565b610959576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095090612f76565b60405180910390fd5b5f60095f8881526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546109f390612ec7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1f90612ec7565b8015610a6a5780601f10610a4157610100808354040283529160200191610a6a565b820191905f5260205f20905b815481529060010190602001808311610a4d57829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b670de0b6b3a76400003414610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae290612fde565b60405180910390fd5b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610b3190613029565b5f6040518083038185875af1925050503d805f8114610b6b576040519150601f19603f3d011682016040523d82523d5f602084013e610b70565b606091505b5050905080610bb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bab90613087565b60405180910390fd5b5f6007549050610bc43382611aab565b5f5f5f610bd086611ac8565b9250925092506040518060a001604052808460ff1681526020018360ff1681526020018260ff1681526020016001151581526020018781525060095f8681526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610cac9190613245565b5090505060075f815480929190610cc290613341565b9190505550505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b67016345785d8a00003414610d41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d38906133d2565b60405180910390fd5b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610d8790613029565b5f6040518083038185875af1925050503d805f8114610dc1576040519150601f19603f3d011682016040523d82523d5f602084013e610dc6565b606091505b5050905080610e0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0190613087565b60405180910390fd5b8251845114610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e459061343a565b60405180910390fd5b5f5f5f5f5f90505f5f90505b885181101561119157610e86898281518110610e7957610e78613458565b5b6020026020010151611a40565b610ec5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebc906134cf565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16610eff8a8381518110610ef257610ef1613458565b5b6020026020010151610831565b73ffffffffffffffffffffffffffffffffffffffff1614610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613537565b60405180910390fd5b5f60095f8b8481518110610f6c57610f6b613458565b5b602002602001015181526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff1615151515815260200160018201805461100990612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461103590612ec7565b80156110805780601f1061105757610100808354040283529160200191611080565b820191905f5260205f20905b81548152906001019060200180831161106357829003601f168201915b505050505081525050905088828151811061109e5761109d613458565b5b6020026020010151815f015160ff166110b79190613555565b866110c29190613596565b95508882815181106110d7576110d6613458565b5b6020026020010151816020015160ff166110f19190613555565b856110fc9190613596565b945088828151811061111157611110613458565b5b6020026020010151816040015160ff1661112b9190613555565b846111369190613596565b935088828151811061114b5761114a613458565b5b60200260200101518361115e9190613596565b92506111838a838151811061117657611175613458565b5b6020026020010151611c1a565b508080600101915050610e5a565b50606481146111d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111cc90613639565b60405180910390fd5b5f60075490506111e53382611aab565b6040518060a001604052806064876111fd9190613684565b60ff1681526020016064866112129190613684565b60ff1681526020016064856112279190613684565b60ff1681526020015f151581526020018881525060095f8381526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff02191690831515021790555060808201518160010190816112de9190613245565b5090505060075f8154809291906112f490613341565b9190505550505050505050505050565b60606001805461131390612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461133f90612ec7565b801561138a5780601f106113615761010080835404028352916020019161138a565b820191905f5260205f20905b81548152906001019060200180831161136d57829003601f168201915b5050505050905090565b6113a661139f6116d2565b8383611c9c565b5050565b67016345785d8a000081565b6113c18484846106ee565b6113d56113cc6116d2565b85858585611e05565b50505050565b60606113e682611613565b505f6113f0611fb1565b90505f81511161140e5760405180602001604052805f815250611439565b8061141884611fc7565b6040516020016114299291906136ee565b6040516020818303038152906040525b915050919050565b670de0b6b3a764000081565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6114e36118f6565b8060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61152e6118f6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361159e575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016115959190612864565b60405180910390fd5b6115a78161197d565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f61161e83612091565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169057826040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611687919061296f565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6116e683838360016120ca565b505050565b5f5f6116f684612091565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461173757611736818486612289565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146117c2576117765f855f5f6120ca565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461184157600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6118fe6116d2565b73ffffffffffffffffffffffffffffffffffffffff1661191c610ccf565b73ffffffffffffffffffffffffffffffffffffffff161461197b5761193f6116d2565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016119729190612864565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f73ffffffffffffffffffffffffffffffffffffffff16611a6183612091565b73ffffffffffffffffffffffffffffffffffffffff1614158015611aa457505f60095f8481526020019081526020015f206001018054611aa090612ec7565b9050115b9050919050565b611ac4828260405180602001604052805f81525061234c565b5050565b5f5f5f5f84604051602001611add9190613711565b6040516020818303038152906040528051906020012090507f8eec9d5ae546887db6b6a3889e6591fe96f3c16bc9d921551a4aac3adce529968103611b2c5760ff5f5f93509350935050611c13565b7ff99e8d094ee97e7be9a3d7269f09f9996041160cc5c134b6a863be5b0ce9b5bd8103611b63575f60ff5f93509350935050611c13565b7ffa187c1e7b6b42ab8b2d9415ab7e6b1e71b551fcdc8151ebafe46e40a10d90ad8103611b9a575f5f60ff93509350935050611c13565b7f9556cb7cbc30102cf4b9d59a768a00c66490eb985d62a29a2cf323bd26e1edf28103611bd25760ff8060ff93509350935050611c13565b7fcd39e4b5a3bdc91dff58d0487ec1187739723321e0d423a3db36aae72e5aaa178103611c08575f5f5f93509350935050611c13565b5f5f5f935093509350505b9193909250565b5f611c265f835f6116eb565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c9857816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611c8f919061296f565b60405180910390fd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d0c57816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401611d039190612864565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611df8919061271e565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611faa578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b8152600401611e639493929190613779565b6020604051808303815f875af1925050508015611e9e57506040513d601f19601f82011682018060405250810190611e9b91906137d7565b60015b611f1f573d805f8114611ecc576040519150601f19603f3d011682016040523d82523d5f602084013e611ed1565b606091505b505f815103611f1757836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f0e9190612864565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611fa857836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f9f9190612864565b60405180910390fd5b505b5050505050565b606060405180602001604052805f815250905090565b60605f6001611fd58461236f565b0190505f8167ffffffffffffffff811115611ff357611ff2612a03565b5b6040519080825280601f01601f1916602001820160405280156120255781602001600182028036833780820191505090505b5090505f82602001820190505b600115612086578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161207b5761207a613657565b5b0494505f8503612032575b819350505050919050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061210257505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612234575f61211184611613565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561217b57508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561218e575061218c818461144d565b155b156121d057826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016121c79190612864565b60405180910390fd5b811561223257838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6122948383836124c0565b612347575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361230857806040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016122ff919061296f565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161233e929190613802565b60405180910390fd5b505050565b6123568383612580565b61236a6123616116d2565b5f858585611e05565b505050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106123cb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816123c1576123c0613657565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612408576d04ee2d6d415b85acef810000000083816123fe576123fd613657565b5b0492506020810190505b662386f26fc10000831061243757662386f26fc10000838161242d5761242c613657565b5b0492506010810190505b6305f5e1008310612460576305f5e100838161245657612455613657565b5b0492506008810190505b612710831061248557612710838161247b5761247a613657565b5b0492506004810190505b606483106124a8576064838161249e5761249d613657565b5b0492506002810190505b600a83106124b7576001810190505b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561257757508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806125385750612537848461144d565b5b8061257657508273ffffffffffffffffffffffffffffffffffffffff1661255e83611699565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036125f0575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125e79190612864565b60405180910390fd5b5f6125fc83835f6116eb565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461266e575f6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016126659190612864565b60405180910390fd5b505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126b881612684565b81146126c2575f5ffd5b50565b5f813590506126d3816126af565b92915050565b5f602082840312156126ee576126ed61267c565b5b5f6126fb848285016126c5565b91505092915050565b5f8115159050919050565b61271881612704565b82525050565b5f6020820190506127315f83018461270f565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61277982612737565b6127838185612741565b9350612793818560208601612751565b61279c8161275f565b840191505092915050565b5f6020820190508181035f8301526127bf818461276f565b905092915050565b5f819050919050565b6127d9816127c7565b81146127e3575f5ffd5b50565b5f813590506127f4816127d0565b92915050565b5f6020828403121561280f5761280e61267c565b5b5f61281c848285016127e6565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61284e82612825565b9050919050565b61285e81612844565b82525050565b5f6020820190506128775f830184612855565b92915050565b61288681612844565b8114612890575f5ffd5b50565b5f813590506128a18161287d565b92915050565b5f5f604083850312156128bd576128bc61267c565b5b5f6128ca85828601612893565b92505060206128db858286016127e6565b9150509250929050565b5f5f5f606084860312156128fc576128fb61267c565b5b5f61290986828701612893565b935050602061291a86828701612893565b925050604061292b868287016127e6565b9150509250925092565b5f6020828403121561294a5761294961267c565b5b5f61295784828501612893565b91505092915050565b612969816127c7565b82525050565b5f6020820190506129825f830184612960565b92915050565b5f60ff82169050919050565b61299d81612988565b82525050565b5f60a0820190506129b65f830188612994565b6129c36020830187612994565b6129d06040830186612994565b6129dd606083018561270f565b81810360808301526129ef818461276f565b90509695505050505050565b5f5ffd5b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612a398261275f565b810181811067ffffffffffffffff82111715612a5857612a57612a03565b5b80604052505050565b5f612a6a612673565b9050612a768282612a30565b919050565b5f67ffffffffffffffff821115612a9557612a94612a03565b5b612a9e8261275f565b9050602081019050919050565b828183375f83830152505050565b5f612acb612ac684612a7b565b612a61565b905082815260208101848484011115612ae757612ae66129ff565b5b612af2848285612aab565b509392505050565b5f82601f830112612b0e57612b0d6129fb565b5b8135612b1e848260208601612ab9565b91505092915050565b5f60208284031215612b3c57612b3b61267c565b5b5f82013567ffffffffffffffff811115612b5957612b58612680565b5b612b6584828501612afa565b91505092915050565b5f67ffffffffffffffff821115612b8857612b87612a03565b5b602082029050602081019050919050565b5f5ffd5b5f612baf612baa84612b6e565b612a61565b90508083825260208201905060208402830185811115612bd257612bd1612b99565b5b835b81811015612bfb5780612be788826127e6565b845260208401935050602081019050612bd4565b5050509392505050565b5f82601f830112612c1957612c186129fb565b5b8135612c29848260208601612b9d565b91505092915050565b5f5f5f60608486031215612c4957612c4861267c565b5b5f84013567ffffffffffffffff811115612c6657612c65612680565b5b612c7286828701612c05565b935050602084013567ffffffffffffffff811115612c9357612c92612680565b5b612c9f86828701612c05565b925050604084013567ffffffffffffffff811115612cc057612cbf612680565b5b612ccc86828701612afa565b9150509250925092565b612cdf81612704565b8114612ce9575f5ffd5b50565b5f81359050612cfa81612cd6565b92915050565b5f5f60408385031215612d1657612d1561267c565b5b5f612d2385828601612893565b9250506020612d3485828601612cec565b9150509250929050565b5f67ffffffffffffffff821115612d5857612d57612a03565b5b612d618261275f565b9050602081019050919050565b5f612d80612d7b84612d3e565b612a61565b905082815260208101848484011115612d9c57612d9b6129ff565b5b612da7848285612aab565b509392505050565b5f82601f830112612dc357612dc26129fb565b5b8135612dd3848260208601612d6e565b91505092915050565b5f5f5f5f60808587031215612df457612df361267c565b5b5f612e0187828801612893565b9450506020612e1287828801612893565b9350506040612e23878288016127e6565b925050606085013567ffffffffffffffff811115612e4457612e43612680565b5b612e5087828801612daf565b91505092959194509250565b5f5f60408385031215612e7257612e7161267c565b5b5f612e7f85828601612893565b9250506020612e9085828601612893565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680612ede57607f821691505b602082108103612ef157612ef0612e9a565b5b50919050565b5f606082019050612f0a5f830186612855565b612f176020830185612960565b612f246040830184612855565b949350505050565b7f4e4654206e6f6e206573697374656e74650000000000000000000000000000005f82015250565b5f612f60601183612741565b9150612f6b82612f2c565b602082019050919050565b5f6020820190508181035f830152612f8d81612f54565b9050919050565b7f496e766961206573617474616d656e74652031204150450000000000000000005f82015250565b5f612fc8601783612741565b9150612fd382612f94565b602082019050919050565b5f6020820190508181035f830152612ff581612fbc565b9050919050565b5f81905092915050565b50565b5f6130145f83612ffc565b915061301f82613006565b5f82019050919050565b5f61303382613009565b9150819050919050565b7f5472616e73666572696d656e746f2066616c6c69746f000000000000000000005f82015250565b5f613071601683612741565b915061307c8261303d565b602082019050919050565b5f6020820190508181035f83015261309e81613065565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026131017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826130c6565b61310b86836130c6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61314661314161313c846127c7565b613123565b6127c7565b9050919050565b5f819050919050565b61315f8361312c565b61317361316b8261314d565b8484546130d2565b825550505050565b5f5f905090565b61318a61317b565b613195818484613156565b505050565b5b818110156131b8576131ad5f82613182565b60018101905061319b565b5050565b601f8211156131fd576131ce816130a5565b6131d7846130b7565b810160208510156131e6578190505b6131fa6131f2856130b7565b83018261319a565b50505b505050565b5f82821c905092915050565b5f61321d5f1984600802613202565b1980831691505092915050565b5f613235838361320e565b9150826002028217905092915050565b61324e82612737565b67ffffffffffffffff81111561326757613266612a03565b5b6132718254612ec7565b61327c8282856131bc565b5f60209050601f8311600181146132ad575f841561329b578287015190505b6132a5858261322a565b86555061330c565b601f1984166132bb866130a5565b5f5b828110156132e2578489015182556001820191506020850194506020810190506132bd565b868310156132ff57848901516132fb601f89168261320e565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61334b826127c7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361337d5761337c613314565b5b600182019050919050565b7f496e766961206573617474616d656e746520302e3120415045000000000000005f82015250565b5f6133bc601983612741565b91506133c782613388565b602082019050919050565b5f6020820190508181035f8301526133e9816133b0565b9050919050565b7f496e707574206e6f6e2076616c696469000000000000000000000000000000005f82015250565b5f613424601083612741565b915061342f826133f0565b602082019050919050565b5f6020820190508181035f83015261345181613418565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f546f6b656e206e6f6e206573697374656e7465000000000000000000000000005f82015250565b5f6134b9601383612741565b91506134c482613485565b602082019050919050565b5f6020820190508181035f8301526134e6816134ad565b9050919050565b7f4e6f6e2073656920696c2070726f70726965746172696f0000000000000000005f82015250565b5f613521601783612741565b915061352c826134ed565b602082019050919050565b5f6020820190508181035f83015261354e81613515565b9050919050565b5f61355f826127c7565b915061356a836127c7565b9250828202613578816127c7565b9150828204841483151761358f5761358e613314565b5b5092915050565b5f6135a0826127c7565b91506135ab836127c7565b92508282019050808211156135c3576135c2613314565b5b92915050565b7f4c652070657263656e7475616c69206465766f6e6f20736f6d6d6172652061205f8201527f3130300000000000000000000000000000000000000000000000000000000000602082015250565b5f613623602383612741565b915061362e826135c9565b604082019050919050565b5f6020820190508181035f83015261365081613617565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61368e826127c7565b9150613699836127c7565b9250826136a9576136a8613657565b5b828204905092915050565b5f81905092915050565b5f6136c882612737565b6136d281856136b4565b93506136e2818560208601612751565b80840191505092915050565b5f6136f982856136be565b915061370582846136be565b91508190509392505050565b5f61371c82846136be565b915081905092915050565b5f81519050919050565b5f82825260208201905092915050565b5f61374b82613727565b6137558185613731565b9350613765818560208601612751565b61376e8161275f565b840191505092915050565b5f60808201905061378c5f830187612855565b6137996020830186612855565b6137a66040830185612960565b81810360608301526137b88184613741565b905095945050505050565b5f815190506137d1816126af565b92915050565b5f602082840312156137ec576137eb61267c565b5b5f6137f9848285016137c3565b91505092915050565b5f6040820190506138155f830185612855565b6138226020830184612960565b939250505056fea26469706673582212207015c2498cd4cfd52d569157881584cad4a5c67a9375b8c8b29ccef597d2037664736f6c634300081d0033
Deployed Bytecode
0x60806040526004361061013f575f3560e01c80638184eae2116100b5578063b88d4fde1161006e578063b88d4fde14610433578063c87b56dd1461045b578063d7bf81a314610497578063e985e9c5146104c1578063f0f44260146104fd578063f2fde38b146105255761013f565b80638184eae2146103555780638da5cb5b14610371578063959b44cb1461039b57806395d89b41146103b7578063a22cb465146103e1578063b7cc6ce3146104095761013f565b806342842e0e1161010757806342842e0e1461023557806361d027b31461025d5780636352211e1461028757806370a08231146102c3578063715018a6146102ff578063799ebe62146103155761013f565b806301ffc9a71461014357806306fdde031461017f578063081812fc146101a9578063095ea7b3146101e557806323b872dd1461020d575b5f5ffd5b34801561014e575f5ffd5b50610169600480360381019061016491906126d9565b61054d565b604051610176919061271e565b60405180910390f35b34801561018a575f5ffd5b5061019361062e565b6040516101a091906127a7565b60405180910390f35b3480156101b4575f5ffd5b506101cf60048036038101906101ca91906127fa565b6106bd565b6040516101dc9190612864565b60405180910390f35b3480156101f0575f5ffd5b5061020b600480360381019061020691906128a7565b6106d8565b005b348015610218575f5ffd5b50610233600480360381019061022e91906128e5565b6106ee565b005b348015610240575f5ffd5b5061025b600480360381019061025691906128e5565b6107ed565b005b348015610268575f5ffd5b5061027161080c565b60405161027e9190612864565b60405180910390f35b348015610292575f5ffd5b506102ad60048036038101906102a891906127fa565b610831565b6040516102ba9190612864565b60405180910390f35b3480156102ce575f5ffd5b506102e960048036038101906102e49190612935565b610842565b6040516102f6919061296f565b60405180910390f35b34801561030a575f5ffd5b506103136108f8565b005b348015610320575f5ffd5b5061033b600480360381019061033691906127fa565b61090b565b60405161034c9594939291906129a3565b60405180910390f35b61036f600480360381019061036a9190612b27565b610aa1565b005b34801561037c575f5ffd5b50610385610ccf565b6040516103929190612864565b60405180910390f35b6103b560048036038101906103b09190612c32565b610cf7565b005b3480156103c2575f5ffd5b506103cb611304565b6040516103d891906127a7565b60405180910390f35b3480156103ec575f5ffd5b5061040760048036038101906104029190612d00565b611394565b005b348015610414575f5ffd5b5061041d6113aa565b60405161042a919061296f565b60405180910390f35b34801561043e575f5ffd5b5061045960048036038101906104549190612ddc565b6113b6565b005b348015610466575f5ffd5b50610481600480360381019061047c91906127fa565b6113db565b60405161048e91906127a7565b60405180910390f35b3480156104a2575f5ffd5b506104ab611441565b6040516104b8919061296f565b60405180910390f35b3480156104cc575f5ffd5b506104e760048036038101906104e29190612e5c565b61144d565b6040516104f4919061271e565b60405180910390f35b348015610508575f5ffd5b50610523600480360381019061051e9190612935565b6114db565b005b348015610530575f5ffd5b5061054b60048036038101906105469190612935565b611526565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061061757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106275750610626826115aa565b5b9050919050565b60605f805461063c90612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461066890612ec7565b80156106b35780601f1061068a576101008083540402835291602001916106b3565b820191905f5260205f20905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b5f6106c782611613565b506106d182611699565b9050919050565b6106ea82826106e56116d2565b6116d9565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361075e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016107559190612864565b60405180910390fd5b5f610771838361076c6116d2565b6116eb565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107e7578382826040517f64283d7b0000000000000000000000000000000000000000000000000000000081526004016107de93929190612ef7565b60405180910390fd5b50505050565b61080783838360405180602001604052805f8152506113b6565b505050565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f61083b82611613565b9050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108b3575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016108aa9190612864565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6109006118f6565b6109095f61197d565b565b5f5f5f5f606061091a86611a40565b610959576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095090612f76565b60405180910390fd5b5f60095f8881526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546109f390612ec7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1f90612ec7565b8015610a6a5780601f10610a4157610100808354040283529160200191610a6a565b820191905f5260205f20905b815481529060010190602001808311610a4d57829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b670de0b6b3a76400003414610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae290612fde565b60405180910390fd5b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610b3190613029565b5f6040518083038185875af1925050503d805f8114610b6b576040519150601f19603f3d011682016040523d82523d5f602084013e610b70565b606091505b5050905080610bb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bab90613087565b60405180910390fd5b5f6007549050610bc43382611aab565b5f5f5f610bd086611ac8565b9250925092506040518060a001604052808460ff1681526020018360ff1681526020018260ff1681526020016001151581526020018781525060095f8681526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610cac9190613245565b5090505060075f815480929190610cc290613341565b9190505550505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b67016345785d8a00003414610d41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d38906133d2565b60405180910390fd5b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1634604051610d8790613029565b5f6040518083038185875af1925050503d805f8114610dc1576040519150601f19603f3d011682016040523d82523d5f602084013e610dc6565b606091505b5050905080610e0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0190613087565b60405180910390fd5b8251845114610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e459061343a565b60405180910390fd5b5f5f5f5f5f90505f5f90505b885181101561119157610e86898281518110610e7957610e78613458565b5b6020026020010151611a40565b610ec5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebc906134cf565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16610eff8a8381518110610ef257610ef1613458565b5b6020026020010151610831565b73ffffffffffffffffffffffffffffffffffffffff1614610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613537565b60405180910390fd5b5f60095f8b8481518110610f6c57610f6b613458565b5b602002602001015181526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff1615151515815260200160018201805461100990612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461103590612ec7565b80156110805780601f1061105757610100808354040283529160200191611080565b820191905f5260205f20905b81548152906001019060200180831161106357829003601f168201915b505050505081525050905088828151811061109e5761109d613458565b5b6020026020010151815f015160ff166110b79190613555565b866110c29190613596565b95508882815181106110d7576110d6613458565b5b6020026020010151816020015160ff166110f19190613555565b856110fc9190613596565b945088828151811061111157611110613458565b5b6020026020010151816040015160ff1661112b9190613555565b846111369190613596565b935088828151811061114b5761114a613458565b5b60200260200101518361115e9190613596565b92506111838a838151811061117657611175613458565b5b6020026020010151611c1a565b508080600101915050610e5a565b50606481146111d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111cc90613639565b60405180910390fd5b5f60075490506111e53382611aab565b6040518060a001604052806064876111fd9190613684565b60ff1681526020016064866112129190613684565b60ff1681526020016064856112279190613684565b60ff1681526020015f151581526020018881525060095f8381526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff02191690831515021790555060808201518160010190816112de9190613245565b5090505060075f8154809291906112f490613341565b9190505550505050505050505050565b60606001805461131390612ec7565b80601f016020809104026020016040519081016040528092919081815260200182805461133f90612ec7565b801561138a5780601f106113615761010080835404028352916020019161138a565b820191905f5260205f20905b81548152906001019060200180831161136d57829003601f168201915b5050505050905090565b6113a661139f6116d2565b8383611c9c565b5050565b67016345785d8a000081565b6113c18484846106ee565b6113d56113cc6116d2565b85858585611e05565b50505050565b60606113e682611613565b505f6113f0611fb1565b90505f81511161140e5760405180602001604052805f815250611439565b8061141884611fc7565b6040516020016114299291906136ee565b6040516020818303038152906040525b915050919050565b670de0b6b3a764000081565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6114e36118f6565b8060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61152e6118f6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361159e575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016115959190612864565b60405180910390fd5b6115a78161197d565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f61161e83612091565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169057826040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611687919061296f565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6116e683838360016120ca565b505050565b5f5f6116f684612091565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461173757611736818486612289565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146117c2576117765f855f5f6120ca565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461184157600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6118fe6116d2565b73ffffffffffffffffffffffffffffffffffffffff1661191c610ccf565b73ffffffffffffffffffffffffffffffffffffffff161461197b5761193f6116d2565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016119729190612864565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f73ffffffffffffffffffffffffffffffffffffffff16611a6183612091565b73ffffffffffffffffffffffffffffffffffffffff1614158015611aa457505f60095f8481526020019081526020015f206001018054611aa090612ec7565b9050115b9050919050565b611ac4828260405180602001604052805f81525061234c565b5050565b5f5f5f5f84604051602001611add9190613711565b6040516020818303038152906040528051906020012090507f8eec9d5ae546887db6b6a3889e6591fe96f3c16bc9d921551a4aac3adce529968103611b2c5760ff5f5f93509350935050611c13565b7ff99e8d094ee97e7be9a3d7269f09f9996041160cc5c134b6a863be5b0ce9b5bd8103611b63575f60ff5f93509350935050611c13565b7ffa187c1e7b6b42ab8b2d9415ab7e6b1e71b551fcdc8151ebafe46e40a10d90ad8103611b9a575f5f60ff93509350935050611c13565b7f9556cb7cbc30102cf4b9d59a768a00c66490eb985d62a29a2cf323bd26e1edf28103611bd25760ff8060ff93509350935050611c13565b7fcd39e4b5a3bdc91dff58d0487ec1187739723321e0d423a3db36aae72e5aaa178103611c08575f5f5f93509350935050611c13565b5f5f5f935093509350505b9193909250565b5f611c265f835f6116eb565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c9857816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611c8f919061296f565b60405180910390fd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d0c57816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401611d039190612864565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611df8919061271e565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611faa578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b8152600401611e639493929190613779565b6020604051808303815f875af1925050508015611e9e57506040513d601f19601f82011682018060405250810190611e9b91906137d7565b60015b611f1f573d805f8114611ecc576040519150601f19603f3d011682016040523d82523d5f602084013e611ed1565b606091505b505f815103611f1757836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f0e9190612864565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611fa857836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f9f9190612864565b60405180910390fd5b505b5050505050565b606060405180602001604052805f815250905090565b60605f6001611fd58461236f565b0190505f8167ffffffffffffffff811115611ff357611ff2612a03565b5b6040519080825280601f01601f1916602001820160405280156120255781602001600182028036833780820191505090505b5090505f82602001820190505b600115612086578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161207b5761207a613657565b5b0494505f8503612032575b819350505050919050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061210257505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612234575f61211184611613565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561217b57508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561218e575061218c818461144d565b155b156121d057826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016121c79190612864565b60405180910390fd5b811561223257838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6122948383836124c0565b612347575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361230857806040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016122ff919061296f565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161233e929190613802565b60405180910390fd5b505050565b6123568383612580565b61236a6123616116d2565b5f858585611e05565b505050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106123cb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816123c1576123c0613657565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612408576d04ee2d6d415b85acef810000000083816123fe576123fd613657565b5b0492506020810190505b662386f26fc10000831061243757662386f26fc10000838161242d5761242c613657565b5b0492506010810190505b6305f5e1008310612460576305f5e100838161245657612455613657565b5b0492506008810190505b612710831061248557612710838161247b5761247a613657565b5b0492506004810190505b606483106124a8576064838161249e5761249d613657565b5b0492506002810190505b600a83106124b7576001810190505b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561257757508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806125385750612537848461144d565b5b8061257657508273ffffffffffffffffffffffffffffffffffffffff1661255e83611699565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036125f0575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016125e79190612864565b60405180910390fd5b5f6125fc83835f6116eb565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461266e575f6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016126659190612864565b60405180910390fd5b505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126b881612684565b81146126c2575f5ffd5b50565b5f813590506126d3816126af565b92915050565b5f602082840312156126ee576126ed61267c565b5b5f6126fb848285016126c5565b91505092915050565b5f8115159050919050565b61271881612704565b82525050565b5f6020820190506127315f83018461270f565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61277982612737565b6127838185612741565b9350612793818560208601612751565b61279c8161275f565b840191505092915050565b5f6020820190508181035f8301526127bf818461276f565b905092915050565b5f819050919050565b6127d9816127c7565b81146127e3575f5ffd5b50565b5f813590506127f4816127d0565b92915050565b5f6020828403121561280f5761280e61267c565b5b5f61281c848285016127e6565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61284e82612825565b9050919050565b61285e81612844565b82525050565b5f6020820190506128775f830184612855565b92915050565b61288681612844565b8114612890575f5ffd5b50565b5f813590506128a18161287d565b92915050565b5f5f604083850312156128bd576128bc61267c565b5b5f6128ca85828601612893565b92505060206128db858286016127e6565b9150509250929050565b5f5f5f606084860312156128fc576128fb61267c565b5b5f61290986828701612893565b935050602061291a86828701612893565b925050604061292b868287016127e6565b9150509250925092565b5f6020828403121561294a5761294961267c565b5b5f61295784828501612893565b91505092915050565b612969816127c7565b82525050565b5f6020820190506129825f830184612960565b92915050565b5f60ff82169050919050565b61299d81612988565b82525050565b5f60a0820190506129b65f830188612994565b6129c36020830187612994565b6129d06040830186612994565b6129dd606083018561270f565b81810360808301526129ef818461276f565b90509695505050505050565b5f5ffd5b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612a398261275f565b810181811067ffffffffffffffff82111715612a5857612a57612a03565b5b80604052505050565b5f612a6a612673565b9050612a768282612a30565b919050565b5f67ffffffffffffffff821115612a9557612a94612a03565b5b612a9e8261275f565b9050602081019050919050565b828183375f83830152505050565b5f612acb612ac684612a7b565b612a61565b905082815260208101848484011115612ae757612ae66129ff565b5b612af2848285612aab565b509392505050565b5f82601f830112612b0e57612b0d6129fb565b5b8135612b1e848260208601612ab9565b91505092915050565b5f60208284031215612b3c57612b3b61267c565b5b5f82013567ffffffffffffffff811115612b5957612b58612680565b5b612b6584828501612afa565b91505092915050565b5f67ffffffffffffffff821115612b8857612b87612a03565b5b602082029050602081019050919050565b5f5ffd5b5f612baf612baa84612b6e565b612a61565b90508083825260208201905060208402830185811115612bd257612bd1612b99565b5b835b81811015612bfb5780612be788826127e6565b845260208401935050602081019050612bd4565b5050509392505050565b5f82601f830112612c1957612c186129fb565b5b8135612c29848260208601612b9d565b91505092915050565b5f5f5f60608486031215612c4957612c4861267c565b5b5f84013567ffffffffffffffff811115612c6657612c65612680565b5b612c7286828701612c05565b935050602084013567ffffffffffffffff811115612c9357612c92612680565b5b612c9f86828701612c05565b925050604084013567ffffffffffffffff811115612cc057612cbf612680565b5b612ccc86828701612afa565b9150509250925092565b612cdf81612704565b8114612ce9575f5ffd5b50565b5f81359050612cfa81612cd6565b92915050565b5f5f60408385031215612d1657612d1561267c565b5b5f612d2385828601612893565b9250506020612d3485828601612cec565b9150509250929050565b5f67ffffffffffffffff821115612d5857612d57612a03565b5b612d618261275f565b9050602081019050919050565b5f612d80612d7b84612d3e565b612a61565b905082815260208101848484011115612d9c57612d9b6129ff565b5b612da7848285612aab565b509392505050565b5f82601f830112612dc357612dc26129fb565b5b8135612dd3848260208601612d6e565b91505092915050565b5f5f5f5f60808587031215612df457612df361267c565b5b5f612e0187828801612893565b9450506020612e1287828801612893565b9350506040612e23878288016127e6565b925050606085013567ffffffffffffffff811115612e4457612e43612680565b5b612e5087828801612daf565b91505092959194509250565b5f5f60408385031215612e7257612e7161267c565b5b5f612e7f85828601612893565b9250506020612e9085828601612893565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680612ede57607f821691505b602082108103612ef157612ef0612e9a565b5b50919050565b5f606082019050612f0a5f830186612855565b612f176020830185612960565b612f246040830184612855565b949350505050565b7f4e4654206e6f6e206573697374656e74650000000000000000000000000000005f82015250565b5f612f60601183612741565b9150612f6b82612f2c565b602082019050919050565b5f6020820190508181035f830152612f8d81612f54565b9050919050565b7f496e766961206573617474616d656e74652031204150450000000000000000005f82015250565b5f612fc8601783612741565b9150612fd382612f94565b602082019050919050565b5f6020820190508181035f830152612ff581612fbc565b9050919050565b5f81905092915050565b50565b5f6130145f83612ffc565b915061301f82613006565b5f82019050919050565b5f61303382613009565b9150819050919050565b7f5472616e73666572696d656e746f2066616c6c69746f000000000000000000005f82015250565b5f613071601683612741565b915061307c8261303d565b602082019050919050565b5f6020820190508181035f83015261309e81613065565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026131017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826130c6565b61310b86836130c6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61314661314161313c846127c7565b613123565b6127c7565b9050919050565b5f819050919050565b61315f8361312c565b61317361316b8261314d565b8484546130d2565b825550505050565b5f5f905090565b61318a61317b565b613195818484613156565b505050565b5b818110156131b8576131ad5f82613182565b60018101905061319b565b5050565b601f8211156131fd576131ce816130a5565b6131d7846130b7565b810160208510156131e6578190505b6131fa6131f2856130b7565b83018261319a565b50505b505050565b5f82821c905092915050565b5f61321d5f1984600802613202565b1980831691505092915050565b5f613235838361320e565b9150826002028217905092915050565b61324e82612737565b67ffffffffffffffff81111561326757613266612a03565b5b6132718254612ec7565b61327c8282856131bc565b5f60209050601f8311600181146132ad575f841561329b578287015190505b6132a5858261322a565b86555061330c565b601f1984166132bb866130a5565b5f5b828110156132e2578489015182556001820191506020850194506020810190506132bd565b868310156132ff57848901516132fb601f89168261320e565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61334b826127c7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361337d5761337c613314565b5b600182019050919050565b7f496e766961206573617474616d656e746520302e3120415045000000000000005f82015250565b5f6133bc601983612741565b91506133c782613388565b602082019050919050565b5f6020820190508181035f8301526133e9816133b0565b9050919050565b7f496e707574206e6f6e2076616c696469000000000000000000000000000000005f82015250565b5f613424601083612741565b915061342f826133f0565b602082019050919050565b5f6020820190508181035f83015261345181613418565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f546f6b656e206e6f6e206573697374656e7465000000000000000000000000005f82015250565b5f6134b9601383612741565b91506134c482613485565b602082019050919050565b5f6020820190508181035f8301526134e6816134ad565b9050919050565b7f4e6f6e2073656920696c2070726f70726965746172696f0000000000000000005f82015250565b5f613521601783612741565b915061352c826134ed565b602082019050919050565b5f6020820190508181035f83015261354e81613515565b9050919050565b5f61355f826127c7565b915061356a836127c7565b9250828202613578816127c7565b9150828204841483151761358f5761358e613314565b5b5092915050565b5f6135a0826127c7565b91506135ab836127c7565b92508282019050808211156135c3576135c2613314565b5b92915050565b7f4c652070657263656e7475616c69206465766f6e6f20736f6d6d6172652061205f8201527f3130300000000000000000000000000000000000000000000000000000000000602082015250565b5f613623602383612741565b915061362e826135c9565b604082019050919050565b5f6020820190508181035f83015261365081613617565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61368e826127c7565b9150613699836127c7565b9250826136a9576136a8613657565b5b828204905092915050565b5f81905092915050565b5f6136c882612737565b6136d281856136b4565b93506136e2818560208601612751565b80840191505092915050565b5f6136f982856136be565b915061370582846136be565b91508190509392505050565b5f61371c82846136be565b915081905092915050565b5f81519050919050565b5f82825260208201905092915050565b5f61374b82613727565b6137558185613731565b9350613765818560208601612751565b61376e8161275f565b840191505092915050565b5f60808201905061378c5f830187612855565b6137996020830186612855565b6137a66040830185612960565b81810360608301526137b88184613741565b905095945050505050565b5f815190506137d1816126af565b92915050565b5f602082840312156137ec576137eb61267c565b5b5f6137f9848285016137c3565b91505092915050565b5f6040820190506138155f830185612855565b6138226020830184612960565b939250505056fea26469706673582212207015c2498cd4cfd52d569157881584cad4a5c67a9375b8c8b29ccef597d2037664736f6c634300081d0033
Deployed Bytecode Sourcemap
126195:4157:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110767:305;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111598:91;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;112770:158;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;112589:115;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;113439:588;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;114098:134;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;126329:68;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111411:120;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111136:213;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3572:103;;;;;;;;;;;;;:::i;:::-;;129396:374;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;127061:562;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2897:87;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;127687:1507;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;111758:95;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;113000:146;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;126453:43;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;114303:236;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;111924:260;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;126404:42;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;113217:155;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;129243:104;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3830:220;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;110767:305;110869:4;110921:25;110906:40;;;:11;:40;;;;:105;;;;110978:33;110963:48;;;:11;:48;;;;110906:105;:158;;;;111028:36;111052:11;111028:23;:36::i;:::-;110906:158;110886:178;;110767:305;;;:::o;111598:91::-;111643:13;111676:5;111669:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111598:91;:::o;112770:158::-;112837:7;112857:22;112871:7;112857:13;:22::i;:::-;;112899:21;112912:7;112899:12;:21::i;:::-;112892:28;;112770:158;;;:::o;112589:115::-;112661:35;112670:2;112674:7;112683:12;:10;:12::i;:::-;112661:8;:35::i;:::-;112589:115;;:::o;113439:588::-;113548:1;113534:16;;:2;:16;;;113530:89;;113604:1;113574:33;;;;;;;;;;;:::i;:::-;;;;;;;;113530:89;113840:21;113864:34;113872:2;113876:7;113885:12;:10;:12::i;:::-;113864:7;:34::i;:::-;113840:58;;113930:4;113913:21;;:13;:21;;;113909:111;;113979:4;113985:7;113994:13;113958:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;113909:111;113519:508;113439:588;;;:::o;114098:134::-;114185:39;114202:4;114208:2;114212:7;114185:39;;;;;;;;;;;;:16;:39::i;:::-;114098:134;;;:::o;126329:68::-;;;;;;;;;;;;;:::o;111411:120::-;111474:7;111501:22;111515:7;111501:13;:22::i;:::-;111494:29;;111411:120;;;:::o;111136:213::-;111199:7;111240:1;111223:19;;:5;:19;;;111219:89;;111293:1;111266:30;;;;;;;;;;;:::i;:::-;;;;;;;;111219:89;111325:9;:16;111335:5;111325:16;;;;;;;;;;;;;;;;111318:23;;111136:213;;;:::o;3572:103::-;2783:13;:11;:13::i;:::-;3637:30:::1;3664:1;3637:18;:30::i;:::-;3572:103::o:0;129396:374::-;129468:7;129486;129504;129522:14;129547:18;129592:22;129606:7;129592:13;:22::i;:::-;129584:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;129647:22;129672:7;:16;129680:7;129672:16;;;;;;;;;;;129647:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;129707:5;:7;;;129716:5;:7;;;129725:5;:7;;;129734:5;:15;;;129751:5;:10;;;129699:63;;;;;;;;;;;129396:374;;;;;;;:::o;127061:562::-;126439:7;127139:9;:21;127131:57;;;;;;;;;;;;:::i;:::-;;;;;;;;;127200:12;127218:8;;;;;;;;;;;:13;;127239:9;127218:35;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127199:54;;;127272:7;127264:42;;;;;;;;;;;;:::i;:::-;;;;;;;;;127319:15;127337;;127319:33;;127391:30;127401:10;127413:7;127391:9;:30::i;:::-;127435:7;127444;127453;127464:21;127479:5;127464:14;:21::i;:::-;127434:51;;;;;;127515:31;;;;;;;;127525:1;127515:31;;;;;;127528:1;127515:31;;;;;;127531:1;127515:31;;;;;;127534:4;127515:31;;;;;;127540:5;127515:31;;;127496:7;:16;127504:7;127496:16;;;;;;;;;;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;127559:15;;:17;;;;;;;;;:::i;:::-;;;;;;127120:503;;;;;127061:562;:::o;2897:87::-;2943:7;2970:6;;;;;;;;;;;2963:13;;2897:87;:::o;127687:1507::-;126487:9;127856;:20;127848:58;;;;;;;;;;;;:::i;:::-;;;;;;;;;127918:12;127936:8;;;;;;;;;;;:13;;127957:9;127936:35;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127917:54;;;127990:7;127982:42;;;;;;;;;;;;:::i;:::-;;;;;;;;;128062:11;:18;128043:8;:15;:37;128035:66;;;;;;;;;;;;:::i;:::-;;;;;;;;;128114:14;128140;128166;128191:23;128217:1;128191:27;;128236:9;128248:1;128236:13;;128231:488;128255:8;:15;128251:1;:19;128231:488;;;128300:26;128314:8;128323:1;128314:11;;;;;;;;:::i;:::-;;;;;;;;128300:13;:26::i;:::-;128292:58;;;;;;;;;;;;:::i;:::-;;;;;;;;;128397:10;128373:34;;:20;128381:8;128390:1;128381:11;;;;;;;;:::i;:::-;;;;;;;;128373:7;:20::i;:::-;:34;;;128365:70;;;;;;;;;;;;:::i;:::-;;;;;;;;;128450:18;128471:7;:20;128479:8;128488:1;128479:11;;;;;;;;:::i;:::-;;;;;;;;128471:20;;;;;;;;;;;128450:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128522:11;128534:1;128522:14;;;;;;;;:::i;:::-;;;;;;;;128516:1;:3;;;:20;;;;;;:::i;:::-;128506:30;;;;;:::i;:::-;;;128567:11;128579:1;128567:14;;;;;;;;:::i;:::-;;;;;;;;128561:1;:3;;;:20;;;;;;:::i;:::-;128551:30;;;;;:::i;:::-;;;128612:11;128624:1;128612:14;;;;;;;;:::i;:::-;;;;;;;;128606:1;:3;;;:20;;;;;;:::i;:::-;128596:30;;;;;:::i;:::-;;;128660:11;128672:1;128660:14;;;;;;;;:::i;:::-;;;;;;;;128641:33;;;;;:::i;:::-;;;128689:18;128695:8;128704:1;128695:11;;;;;;;;:::i;:::-;;;;;;;;128689:5;:18::i;:::-;128277:442;128272:3;;;;;;;128231:488;;;;128758:3;128739:15;:22;128731:70;;;;;;;;;;;;:::i;:::-;;;;;;;;;128814:18;128835:15;;128814:36;;128889:33;128899:10;128911;128889:9;:33::i;:::-;128955:164;;;;;;;;128994:3;128985:6;:12;;;;:::i;:::-;128955:164;;;;;;129028:3;129019:6;:12;;;;:::i;:::-;128955:164;;;;;;129062:3;129053:6;:12;;;;:::i;:::-;128955:164;;;;;;129081:5;128955:164;;;;;;129101:7;128955:164;;;128933:7;:19;128941:10;128933:19;;;;;;;;;;;:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;129130:15;;:17;;;;;;;;;:::i;:::-;;;;;;127837:1357;;;;;;127687:1507;;;:::o;111758:95::-;111805:13;111838:7;111831:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111758:95;:::o;113000:146::-;113086:52;113105:12;:10;:12::i;:::-;113119:8;113129;113086:18;:52::i;:::-;113000:146;;:::o;126453:43::-;126487:9;126453:43;:::o;114303:236::-;114417:31;114430:4;114436:2;114440:7;114417:12;:31::i;:::-;114459:72;114493:12;:10;:12::i;:::-;114507:4;114513:2;114517:7;114526:4;114459:33;:72::i;:::-;114303:236;;;;:::o;111924:260::-;111988:13;112014:22;112028:7;112014:13;:22::i;:::-;;112049:21;112073:10;:8;:10::i;:::-;112049:34;;112125:1;112107:7;112101:21;:25;:75;;;;;;;;;;;;;;;;;112143:7;112152:18;:7;:16;:18::i;:::-;112129:42;;;;;;;;;:::i;:::-;;;;;;;;;;;;;112101:75;112094:82;;;111924:260;;;:::o;126404:42::-;126439:7;126404:42;:::o;113217:155::-;113305:4;113329:18;:25;113348:5;113329:25;;;;;;;;;;;;;;;:35;113355:8;113329:35;;;;;;;;;;;;;;;;;;;;;;;;;113322:42;;113217:155;;;;:::o;129243:104::-;2783:13;:11;:13::i;:::-;129327:12:::1;129316:8;;:23;;;;;;;;;;;;;;;;;;129243:104:::0;:::o;3830:220::-;2783:13;:11;:13::i;:::-;3935:1:::1;3915:22;;:8;:22;;::::0;3911:93:::1;;3989:1;3961:31;;;;;;;;;;;:::i;:::-;;;;;;;;3911:93;4014:28;4033:8;4014:18;:28::i;:::-;3830:220:::0;:::o;22055:148::-;22131:4;22170:25;22155:40;;;:11;:40;;;;22148:47;;22055:148;;;:::o;125821:247::-;125884:7;125904:13;125920:17;125929:7;125920:8;:17::i;:::-;125904:33;;125969:1;125952:19;;:5;:19;;;125948:90;;126018:7;125995:31;;;;;;;;;;;:::i;:::-;;;;;;;;125948:90;126055:5;126048:12;;;125821:247;;;:::o;115302:129::-;115372:7;115399:15;:24;115415:7;115399:24;;;;;;;;;;;;;;;;;;;;;115392:31;;115302:129;;;:::o;851:98::-;904:7;931:10;924:17;;851:98;:::o;124053:122::-;124134:33;124143:2;124147:7;124156:4;124162;124134:8;:33::i;:::-;124053:122;;;:::o;118263:824::-;118349:7;118369:12;118384:17;118393:7;118384:8;:17::i;:::-;118369:32;;118480:1;118464:18;;:4;:18;;;118460:88;;118499:37;118516:4;118522;118528:7;118499:16;:37::i;:::-;118460:88;118611:1;118595:18;;:4;:18;;;118591:263;;118713:48;118730:1;118734:7;118751:1;118755:5;118713:8;:48::i;:::-;118826:1;118807:9;:15;118817:4;118807:15;;;;;;;;;;;;;;;;:20;;;;;;;;;;;118591:263;118884:1;118870:16;;:2;:16;;;118866:111;;118949:1;118932:9;:13;118942:2;118932:13;;;;;;;;;;;;;;;;:18;;;;;;;;;;;118866:111;119008:2;118989:7;:16;118997:7;118989:16;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;119047:7;119043:2;119028:27;;119037:4;119028:27;;;;;;;;;;;;119075:4;119068:11;;;118263:824;;;;;:::o;3062:166::-;3133:12;:10;:12::i;:::-;3122:23;;:7;:5;:7::i;:::-;:23;;;3118:103;;3196:12;:10;:12::i;:::-;3169:40;;;;;;;;;;;:::i;:::-;;;;;;;;3118:103;3062:166::o;4210:191::-;4284:16;4303:6;;;;;;;;;;;4284:25;;4329:8;4320:6;;:17;;;;;;;;;;;;;;;;;;4384:8;4353:40;;4374:8;4353:40;;;;;;;;;;;;4273:128;4210:191;:::o;126837:169::-;126900:4;126953:1;126924:31;;:17;126933:7;126924:8;:17::i;:::-;:31;;;;:74;;;;;126997:1;126965:7;:16;126973:7;126965:16;;;;;;;;;;;:21;;126959:35;;;;;:::i;:::-;;;:39;126924:74;126917:81;;126837:169;;;:::o;120121:102::-;120189:26;120199:2;120203:7;120189:26;;;;;;;;;;;;:9;:26::i;:::-;120121:102;;:::o;129826:523::-;129893:7;129902;129911;129931:17;129978:5;129961:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;129951:34;;;;;;129931:54;;130013:16;130000:9;:29;129996:53;;130039:3;130044:1;130047;130031:18;;;;;;;;;129996:53;130077:18;130064:9;:31;130060:55;;130105:1;130108:3;130113:1;130097:18;;;;;;;;;130060:55;130143:17;130130:9;:30;130126:54;;130170:1;130173;130176:3;130162:18;;;;;;;;;130126:54;130208:18;130195:9;:31;130191:59;;130236:3;130241;130246;130228:22;;;;;;;;;130191:59;130278:18;130265:9;:31;130261:53;;130306:1;130309;130312;130298:16;;;;;;;;;130261:53;130333:1;130336;130339;130325:16;;;;;;;129826:523;;;;;;:::o;120999:232::-;121051:21;121075:40;121091:1;121095:7;121112:1;121075:7;:40::i;:::-;121051:64;;121155:1;121130:27;;:13;:27;;;121126:98;;121204:7;121181:31;;;;;;;;;;;:::i;:::-;;;;;;;;121126:98;121040:191;120999:232;:::o;125260:318::-;125388:1;125368:22;;:8;:22;;;125364:93;;125436:8;125414:31;;;;;;;;;;;:::i;:::-;;;;;;;;125364:93;125505:8;125467:18;:25;125486:5;125467:25;;;;;;;;;;;;;;;:35;125493:8;125467:35;;;;;;;;;;;;;;;;:46;;;;;;;;;;;;;;;;;;125551:8;125529:41;;125544:5;125529:41;;;125561:8;125529:41;;;;;;:::i;:::-;;;;;;;;125260:318;;;:::o;20263:948::-;20467:1;20450:2;:14;;;:18;20446:758;;;20505:2;20489:36;;;20526:8;20536:4;20542:7;20551:4;20489:67;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;20485:708;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20869:1;20852:6;:13;:18;20848:330;;20994:2;20958:39;;;;;;;;;;;:::i;:::-;;;;;;;;20848:330;21128:6;21122:13;21113:6;21109:2;21105:15;21098:38;20485:708;20614:41;;;20604:51;;;:6;:51;;;;20600:185;;20762:2;20726:39;;;;;;;;;;;:::i;:::-;;;;;;;;20600:185;20557:243;20446:758;20263:948;;;;;:::o;112433:94::-;112484:13;112510:9;;;;;;;;;;;;;;112433:94;:::o;93206:650::-;93262:13;93313:14;93350:1;93330:17;93341:5;93330:10;:17::i;:::-;:21;93313:38;;93366:20;93400:6;93389:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93366:41;;93422:11;93519:6;93515:2;93511:15;93503:6;93499:28;93492:35;;93556:254;93563:4;93556:254;;;93588:5;;;;;;;;93694:10;93689:2;93682:5;93678:14;93673:32;93668:3;93660:46;93752:2;93743:11;;;;;;:::i;:::-;;;;;93786:1;93777:5;:10;93556:254;93773:21;93556:254;93831:6;93824:13;;;;;93206:650;;;:::o;115064:117::-;115130:7;115157;:16;115165:7;115157:16;;;;;;;;;;;;;;;;;;;;;115150:23;;115064:117;;;:::o;124363:678::-;124525:9;:31;;;;124554:1;124538:18;;:4;:18;;;;124525:31;124521:471;;;124573:13;124589:22;124603:7;124589:13;:22::i;:::-;124573:38;;124758:1;124742:18;;:4;:18;;;;:35;;;;;124773:4;124764:13;;:5;:13;;;;124742:35;:69;;;;;124782:29;124799:5;124806:4;124782:16;:29::i;:::-;124781:30;124742:69;124738:144;;;124861:4;124839:27;;;;;;;;;;;:::i;:::-;;;;;;;;124738:144;124902:9;124898:83;;;124957:7;124953:2;124937:28;;124946:5;124937:28;;;;;;;;;;;;124898:83;124558:434;124521:471;125031:2;125004:15;:24;125020:7;125004:24;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;124363:678;;;;:::o;116470:376::-;116583:38;116597:5;116604:7;116613;116583:13;:38::i;:::-;116578:261;;116659:1;116642:19;;:5;:19;;;116638:190;;116712:7;116689:31;;;;;;;;;;;:::i;:::-;;;;;;;;116638:190;116795:7;116804;116768:44;;;;;;;;;;;;:::i;:::-;;;;;;;;116578:261;116470:376;;;:::o;120450:210::-;120545:18;120551:2;120555:7;120545:5;:18::i;:::-;120574:78;120608:12;:10;:12::i;:::-;120630:1;120634:2;120638:7;120647:4;120574:33;:78::i;:::-;120450:210;;;:::o;86423:948::-;86476:7;86496:14;86513:1;86496:18;;86563:8;86554:5;:17;86550:106;;86601:8;86592:17;;;;;;:::i;:::-;;;;;86638:2;86628:12;;;;86550:106;86683:8;86674:5;:17;86670:106;;86721:8;86712:17;;;;;;:::i;:::-;;;;;86758:2;86748:12;;;;86670:106;86803:8;86794:5;:17;86790:106;;86841:8;86832:17;;;;;;:::i;:::-;;;;;86878:2;86868:12;;;;86790:106;86923:7;86914:5;:16;86910:103;;86960:7;86951:16;;;;;;:::i;:::-;;;;;86996:1;86986:11;;;;86910:103;87040:7;87031:5;:16;87027:103;;87077:7;87068:16;;;;;;:::i;:::-;;;;;87113:1;87103:11;;;;87027:103;87157:7;87148:5;:16;87144:103;;87194:7;87185:16;;;;;;:::i;:::-;;;;;87230:1;87220:11;;;;87144:103;87274:7;87265:5;:16;87261:68;;87312:1;87302:11;;;;87261:68;87357:6;87350:13;;;86423:948;;;:::o;115751:276::-;115854:4;115910:1;115891:21;;:7;:21;;;;:128;;;;;115939:7;115930:16;;:5;:16;;;:52;;;;115950:32;115967:5;115974:7;115950:16;:32::i;:::-;115930:52;:88;;;;116011:7;115986:32;;:21;115999:7;115986:12;:21::i;:::-;:32;;;115930:88;115891:128;115871:148;;115751:276;;;;;:::o;119423:335::-;119505:1;119491:16;;:2;:16;;;119487:89;;119561:1;119531:33;;;;;;;;;;;:::i;:::-;;;;;;;;119487:89;119586:21;119610:32;119618:2;119622:7;119639:1;119610:7;:32::i;:::-;119586:56;;119682:1;119657:27;;:13;:27;;;119653:98;;119736:1;119708:31;;;;;;;;;;;:::i;:::-;;;;;;;;119653:98;119476:282;119423:335;;:::o;7:75:1:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:149;370:7;410:66;403:5;399:78;388:89;;334:149;;;:::o;489:120::-;561:23;578:5;561:23;:::i;:::-;554:5;551:34;541:62;;599:1;596;589:12;541:62;489:120;:::o;615:137::-;660:5;698:6;685:20;676:29;;714:32;740:5;714:32;:::i;:::-;615:137;;;;:::o;758:327::-;816:6;865:2;853:9;844:7;840:23;836:32;833:119;;;871:79;;:::i;:::-;833:119;991:1;1016:52;1060:7;1051:6;1040:9;1036:22;1016:52;:::i;:::-;1006:62;;962:116;758:327;;;;:::o;1091:90::-;1125:7;1168:5;1161:13;1154:21;1143:32;;1091:90;;;:::o;1187:109::-;1268:21;1283:5;1268:21;:::i;:::-;1263:3;1256:34;1187:109;;:::o;1302:210::-;1389:4;1427:2;1416:9;1412:18;1404:26;;1440:65;1502:1;1491:9;1487:17;1478:6;1440:65;:::i;:::-;1302:210;;;;:::o;1518:99::-;1570:6;1604:5;1598:12;1588:22;;1518:99;;;:::o;1623:169::-;1707:11;1741:6;1736:3;1729:19;1781:4;1776:3;1772:14;1757:29;;1623:169;;;;:::o;1798:139::-;1887:6;1882:3;1877;1871:23;1928:1;1919:6;1914:3;1910:16;1903:27;1798:139;;;:::o;1943:102::-;1984:6;2035:2;2031:7;2026:2;2019:5;2015:14;2011:28;2001:38;;1943:102;;;:::o;2051:377::-;2139:3;2167:39;2200:5;2167:39;:::i;:::-;2222:71;2286:6;2281:3;2222:71;:::i;:::-;2215:78;;2302:65;2360:6;2355:3;2348:4;2341:5;2337:16;2302:65;:::i;:::-;2392:29;2414:6;2392:29;:::i;:::-;2387:3;2383:39;2376:46;;2143:285;2051:377;;;;:::o;2434:313::-;2547:4;2585:2;2574:9;2570:18;2562:26;;2634:9;2628:4;2624:20;2620:1;2609:9;2605:17;2598:47;2662:78;2735:4;2726:6;2662:78;:::i;:::-;2654:86;;2434:313;;;;:::o;2753:77::-;2790:7;2819:5;2808:16;;2753:77;;;:::o;2836:122::-;2909:24;2927:5;2909:24;:::i;:::-;2902:5;2899:35;2889:63;;2948:1;2945;2938:12;2889:63;2836:122;:::o;2964:139::-;3010:5;3048:6;3035:20;3026:29;;3064:33;3091:5;3064:33;:::i;:::-;2964:139;;;;:::o;3109:329::-;3168:6;3217:2;3205:9;3196:7;3192:23;3188:32;3185:119;;;3223:79;;:::i;:::-;3185:119;3343:1;3368:53;3413:7;3404:6;3393:9;3389:22;3368:53;:::i;:::-;3358:63;;3314:117;3109:329;;;;:::o;3444:126::-;3481:7;3521:42;3514:5;3510:54;3499:65;;3444:126;;;:::o;3576:96::-;3613:7;3642:24;3660:5;3642:24;:::i;:::-;3631:35;;3576:96;;;:::o;3678:118::-;3765:24;3783:5;3765:24;:::i;:::-;3760:3;3753:37;3678:118;;:::o;3802:222::-;3895:4;3933:2;3922:9;3918:18;3910:26;;3946:71;4014:1;4003:9;3999:17;3990:6;3946:71;:::i;:::-;3802:222;;;;:::o;4030:122::-;4103:24;4121:5;4103:24;:::i;:::-;4096:5;4093:35;4083:63;;4142:1;4139;4132:12;4083:63;4030:122;:::o;4158:139::-;4204:5;4242:6;4229:20;4220:29;;4258:33;4285:5;4258:33;:::i;:::-;4158:139;;;;:::o;4303:474::-;4371:6;4379;4428:2;4416:9;4407:7;4403:23;4399:32;4396:119;;;4434:79;;:::i;:::-;4396:119;4554:1;4579:53;4624:7;4615:6;4604:9;4600:22;4579:53;:::i;:::-;4569:63;;4525:117;4681:2;4707:53;4752:7;4743:6;4732:9;4728:22;4707:53;:::i;:::-;4697:63;;4652:118;4303:474;;;;;:::o;4783:619::-;4860:6;4868;4876;4925:2;4913:9;4904:7;4900:23;4896:32;4893:119;;;4931:79;;:::i;:::-;4893:119;5051:1;5076:53;5121:7;5112:6;5101:9;5097:22;5076:53;:::i;:::-;5066:63;;5022:117;5178:2;5204:53;5249:7;5240:6;5229:9;5225:22;5204:53;:::i;:::-;5194:63;;5149:118;5306:2;5332:53;5377:7;5368:6;5357:9;5353:22;5332:53;:::i;:::-;5322:63;;5277:118;4783:619;;;;;:::o;5408:329::-;5467:6;5516:2;5504:9;5495:7;5491:23;5487:32;5484:119;;;5522:79;;:::i;:::-;5484:119;5642:1;5667:53;5712:7;5703:6;5692:9;5688:22;5667:53;:::i;:::-;5657:63;;5613:117;5408:329;;;;:::o;5743:118::-;5830:24;5848:5;5830:24;:::i;:::-;5825:3;5818:37;5743:118;;:::o;5867:222::-;5960:4;5998:2;5987:9;5983:18;5975:26;;6011:71;6079:1;6068:9;6064:17;6055:6;6011:71;:::i;:::-;5867:222;;;;:::o;6095:86::-;6130:7;6170:4;6163:5;6159:16;6148:27;;6095:86;;;:::o;6187:112::-;6270:22;6286:5;6270:22;:::i;:::-;6265:3;6258:35;6187:112;;:::o;6305:719::-;6512:4;6550:3;6539:9;6535:19;6527:27;;6564:67;6628:1;6617:9;6613:17;6604:6;6564:67;:::i;:::-;6641:68;6705:2;6694:9;6690:18;6681:6;6641:68;:::i;:::-;6719;6783:2;6772:9;6768:18;6759:6;6719:68;:::i;:::-;6797:66;6859:2;6848:9;6844:18;6835:6;6797:66;:::i;:::-;6911:9;6905:4;6901:20;6895:3;6884:9;6880:19;6873:49;6939:78;7012:4;7003:6;6939:78;:::i;:::-;6931:86;;6305:719;;;;;;;;:::o;7030:117::-;7139:1;7136;7129:12;7153:117;7262:1;7259;7252:12;7276:180;7324:77;7321:1;7314:88;7421:4;7418:1;7411:15;7445:4;7442:1;7435:15;7462:281;7545:27;7567:4;7545:27;:::i;:::-;7537:6;7533:40;7675:6;7663:10;7660:22;7639:18;7627:10;7624:34;7621:62;7618:88;;;7686:18;;:::i;:::-;7618:88;7726:10;7722:2;7715:22;7505:238;7462:281;;:::o;7749:129::-;7783:6;7810:20;;:::i;:::-;7800:30;;7839:33;7867:4;7859:6;7839:33;:::i;:::-;7749:129;;;:::o;7884:308::-;7946:4;8036:18;8028:6;8025:30;8022:56;;;8058:18;;:::i;:::-;8022:56;8096:29;8118:6;8096:29;:::i;:::-;8088:37;;8180:4;8174;8170:15;8162:23;;7884:308;;;:::o;8198:148::-;8296:6;8291:3;8286;8273:30;8337:1;8328:6;8323:3;8319:16;8312:27;8198:148;;;:::o;8352:425::-;8430:5;8455:66;8471:49;8513:6;8471:49;:::i;:::-;8455:66;:::i;:::-;8446:75;;8544:6;8537:5;8530:21;8582:4;8575:5;8571:16;8620:3;8611:6;8606:3;8602:16;8599:25;8596:112;;;8627:79;;:::i;:::-;8596:112;8717:54;8764:6;8759:3;8754;8717:54;:::i;:::-;8436:341;8352:425;;;;;:::o;8797:340::-;8853:5;8902:3;8895:4;8887:6;8883:17;8879:27;8869:122;;8910:79;;:::i;:::-;8869:122;9027:6;9014:20;9052:79;9127:3;9119:6;9112:4;9104:6;9100:17;9052:79;:::i;:::-;9043:88;;8859:278;8797:340;;;;:::o;9143:509::-;9212:6;9261:2;9249:9;9240:7;9236:23;9232:32;9229:119;;;9267:79;;:::i;:::-;9229:119;9415:1;9404:9;9400:17;9387:31;9445:18;9437:6;9434:30;9431:117;;;9467:79;;:::i;:::-;9431:117;9572:63;9627:7;9618:6;9607:9;9603:22;9572:63;:::i;:::-;9562:73;;9358:287;9143:509;;;;:::o;9658:311::-;9735:4;9825:18;9817:6;9814:30;9811:56;;;9847:18;;:::i;:::-;9811:56;9897:4;9889:6;9885:17;9877:25;;9957:4;9951;9947:15;9939:23;;9658:311;;;:::o;9975:117::-;10084:1;10081;10074:12;10115:710;10211:5;10236:81;10252:64;10309:6;10252:64;:::i;:::-;10236:81;:::i;:::-;10227:90;;10337:5;10366:6;10359:5;10352:21;10400:4;10393:5;10389:16;10382:23;;10453:4;10445:6;10441:17;10433:6;10429:30;10482:3;10474:6;10471:15;10468:122;;;10501:79;;:::i;:::-;10468:122;10616:6;10599:220;10633:6;10628:3;10625:15;10599:220;;;10708:3;10737:37;10770:3;10758:10;10737:37;:::i;:::-;10732:3;10725:50;10804:4;10799:3;10795:14;10788:21;;10675:144;10659:4;10654:3;10650:14;10643:21;;10599:220;;;10603:21;10217:608;;10115:710;;;;;:::o;10848:370::-;10919:5;10968:3;10961:4;10953:6;10949:17;10945:27;10935:122;;10976:79;;:::i;:::-;10935:122;11093:6;11080:20;11118:94;11208:3;11200:6;11193:4;11185:6;11181:17;11118:94;:::i;:::-;11109:103;;10925:293;10848:370;;;;:::o;11224:1219::-;11361:6;11369;11377;11426:2;11414:9;11405:7;11401:23;11397:32;11394:119;;;11432:79;;:::i;:::-;11394:119;11580:1;11569:9;11565:17;11552:31;11610:18;11602:6;11599:30;11596:117;;;11632:79;;:::i;:::-;11596:117;11737:78;11807:7;11798:6;11787:9;11783:22;11737:78;:::i;:::-;11727:88;;11523:302;11892:2;11881:9;11877:18;11864:32;11923:18;11915:6;11912:30;11909:117;;;11945:79;;:::i;:::-;11909:117;12050:78;12120:7;12111:6;12100:9;12096:22;12050:78;:::i;:::-;12040:88;;11835:303;12205:2;12194:9;12190:18;12177:32;12236:18;12228:6;12225:30;12222:117;;;12258:79;;:::i;:::-;12222:117;12363:63;12418:7;12409:6;12398:9;12394:22;12363:63;:::i;:::-;12353:73;;12148:288;11224:1219;;;;;:::o;12449:116::-;12519:21;12534:5;12519:21;:::i;:::-;12512:5;12509:32;12499:60;;12555:1;12552;12545:12;12499:60;12449:116;:::o;12571:133::-;12614:5;12652:6;12639:20;12630:29;;12668:30;12692:5;12668:30;:::i;:::-;12571:133;;;;:::o;12710:468::-;12775:6;12783;12832:2;12820:9;12811:7;12807:23;12803:32;12800:119;;;12838:79;;:::i;:::-;12800:119;12958:1;12983:53;13028:7;13019:6;13008:9;13004:22;12983:53;:::i;:::-;12973:63;;12929:117;13085:2;13111:50;13153:7;13144:6;13133:9;13129:22;13111:50;:::i;:::-;13101:60;;13056:115;12710:468;;;;;:::o;13184:307::-;13245:4;13335:18;13327:6;13324:30;13321:56;;;13357:18;;:::i;:::-;13321:56;13395:29;13417:6;13395:29;:::i;:::-;13387:37;;13479:4;13473;13469:15;13461:23;;13184:307;;;:::o;13497:423::-;13574:5;13599:65;13615:48;13656:6;13615:48;:::i;:::-;13599:65;:::i;:::-;13590:74;;13687:6;13680:5;13673:21;13725:4;13718:5;13714:16;13763:3;13754:6;13749:3;13745:16;13742:25;13739:112;;;13770:79;;:::i;:::-;13739:112;13860:54;13907:6;13902:3;13897;13860:54;:::i;:::-;13580:340;13497:423;;;;;:::o;13939:338::-;13994:5;14043:3;14036:4;14028:6;14024:17;14020:27;14010:122;;14051:79;;:::i;:::-;14010:122;14168:6;14155:20;14193:78;14267:3;14259:6;14252:4;14244:6;14240:17;14193:78;:::i;:::-;14184:87;;14000:277;13939:338;;;;:::o;14283:943::-;14378:6;14386;14394;14402;14451:3;14439:9;14430:7;14426:23;14422:33;14419:120;;;14458:79;;:::i;:::-;14419:120;14578:1;14603:53;14648:7;14639:6;14628:9;14624:22;14603:53;:::i;:::-;14593:63;;14549:117;14705:2;14731:53;14776:7;14767:6;14756:9;14752:22;14731:53;:::i;:::-;14721:63;;14676:118;14833:2;14859:53;14904:7;14895:6;14884:9;14880:22;14859:53;:::i;:::-;14849:63;;14804:118;14989:2;14978:9;14974:18;14961:32;15020:18;15012:6;15009:30;15006:117;;;15042:79;;:::i;:::-;15006:117;15147:62;15201:7;15192:6;15181:9;15177:22;15147:62;:::i;:::-;15137:72;;14932:287;14283:943;;;;;;;:::o;15232:474::-;15300:6;15308;15357:2;15345:9;15336:7;15332:23;15328:32;15325:119;;;15363:79;;:::i;:::-;15325:119;15483:1;15508:53;15553:7;15544:6;15533:9;15529:22;15508:53;:::i;:::-;15498:63;;15454:117;15610:2;15636:53;15681:7;15672:6;15661:9;15657:22;15636:53;:::i;:::-;15626:63;;15581:118;15232:474;;;;;:::o;15712:180::-;15760:77;15757:1;15750:88;15857:4;15854:1;15847:15;15881:4;15878:1;15871:15;15898:320;15942:6;15979:1;15973:4;15969:12;15959:22;;16026:1;16020:4;16016:12;16047:18;16037:81;;16103:4;16095:6;16091:17;16081:27;;16037:81;16165:2;16157:6;16154:14;16134:18;16131:38;16128:84;;16184:18;;:::i;:::-;16128:84;15949:269;15898:320;;;:::o;16224:442::-;16373:4;16411:2;16400:9;16396:18;16388:26;;16424:71;16492:1;16481:9;16477:17;16468:6;16424:71;:::i;:::-;16505:72;16573:2;16562:9;16558:18;16549:6;16505:72;:::i;:::-;16587;16655:2;16644:9;16640:18;16631:6;16587:72;:::i;:::-;16224:442;;;;;;:::o;16672:167::-;16812:19;16808:1;16800:6;16796:14;16789:43;16672:167;:::o;16845:366::-;16987:3;17008:67;17072:2;17067:3;17008:67;:::i;:::-;17001:74;;17084:93;17173:3;17084:93;:::i;:::-;17202:2;17197:3;17193:12;17186:19;;16845:366;;;:::o;17217:419::-;17383:4;17421:2;17410:9;17406:18;17398:26;;17470:9;17464:4;17460:20;17456:1;17445:9;17441:17;17434:47;17498:131;17624:4;17498:131;:::i;:::-;17490:139;;17217:419;;;:::o;17642:173::-;17782:25;17778:1;17770:6;17766:14;17759:49;17642:173;:::o;17821:366::-;17963:3;17984:67;18048:2;18043:3;17984:67;:::i;:::-;17977:74;;18060:93;18149:3;18060:93;:::i;:::-;18178:2;18173:3;18169:12;18162:19;;17821:366;;;:::o;18193:419::-;18359:4;18397:2;18386:9;18382:18;18374:26;;18446:9;18440:4;18436:20;18432:1;18421:9;18417:17;18410:47;18474:131;18600:4;18474:131;:::i;:::-;18466:139;;18193:419;;;:::o;18618:147::-;18719:11;18756:3;18741:18;;18618:147;;;;:::o;18771:114::-;;:::o;18891:398::-;19050:3;19071:83;19152:1;19147:3;19071:83;:::i;:::-;19064:90;;19163:93;19252:3;19163:93;:::i;:::-;19281:1;19276:3;19272:11;19265:18;;18891:398;;;:::o;19295:379::-;19479:3;19501:147;19644:3;19501:147;:::i;:::-;19494:154;;19665:3;19658:10;;19295:379;;;:::o;19680:172::-;19820:24;19816:1;19808:6;19804:14;19797:48;19680:172;:::o;19858:366::-;20000:3;20021:67;20085:2;20080:3;20021:67;:::i;:::-;20014:74;;20097:93;20186:3;20097:93;:::i;:::-;20215:2;20210:3;20206:12;20199:19;;19858:366;;;:::o;20230:419::-;20396:4;20434:2;20423:9;20419:18;20411:26;;20483:9;20477:4;20473:20;20469:1;20458:9;20454:17;20447:47;20511:131;20637:4;20511:131;:::i;:::-;20503:139;;20230:419;;;:::o;20655:141::-;20704:4;20727:3;20719:11;;20750:3;20747:1;20740:14;20784:4;20781:1;20771:18;20763:26;;20655:141;;;:::o;20802:93::-;20839:6;20886:2;20881;20874:5;20870:14;20866:23;20856:33;;20802:93;;;:::o;20901:107::-;20945:8;20995:5;20989:4;20985:16;20964:37;;20901:107;;;;:::o;21014:393::-;21083:6;21133:1;21121:10;21117:18;21156:97;21186:66;21175:9;21156:97;:::i;:::-;21274:39;21304:8;21293:9;21274:39;:::i;:::-;21262:51;;21346:4;21342:9;21335:5;21331:21;21322:30;;21395:4;21385:8;21381:19;21374:5;21371:30;21361:40;;21090:317;;21014:393;;;;;:::o;21413:60::-;21441:3;21462:5;21455:12;;21413:60;;;:::o;21479:142::-;21529:9;21562:53;21580:34;21589:24;21607:5;21589:24;:::i;:::-;21580:34;:::i;:::-;21562:53;:::i;:::-;21549:66;;21479:142;;;:::o;21627:75::-;21670:3;21691:5;21684:12;;21627:75;;;:::o;21708:269::-;21818:39;21849:7;21818:39;:::i;:::-;21879:91;21928:41;21952:16;21928:41;:::i;:::-;21920:6;21913:4;21907:11;21879:91;:::i;:::-;21873:4;21866:105;21784:193;21708:269;;;:::o;21983:73::-;22028:3;22049:1;22042:8;;21983:73;:::o;22062:189::-;22139:32;;:::i;:::-;22180:65;22238:6;22230;22224:4;22180:65;:::i;:::-;22115:136;22062:189;;:::o;22257:186::-;22317:120;22334:3;22327:5;22324:14;22317:120;;;22388:39;22425:1;22418:5;22388:39;:::i;:::-;22361:1;22354:5;22350:13;22341:22;;22317:120;;;22257:186;;:::o;22449:543::-;22550:2;22545:3;22542:11;22539:446;;;22584:38;22616:5;22584:38;:::i;:::-;22668:29;22686:10;22668:29;:::i;:::-;22658:8;22654:44;22851:2;22839:10;22836:18;22833:49;;;22872:8;22857:23;;22833:49;22895:80;22951:22;22969:3;22951:22;:::i;:::-;22941:8;22937:37;22924:11;22895:80;:::i;:::-;22554:431;;22539:446;22449:543;;;:::o;22998:117::-;23052:8;23102:5;23096:4;23092:16;23071:37;;22998:117;;;;:::o;23121:169::-;23165:6;23198:51;23246:1;23242:6;23234:5;23231:1;23227:13;23198:51;:::i;:::-;23194:56;23279:4;23273;23269:15;23259:25;;23172:118;23121:169;;;;:::o;23295:295::-;23371:4;23517:29;23542:3;23536:4;23517:29;:::i;:::-;23509:37;;23579:3;23576:1;23572:11;23566:4;23563:21;23555:29;;23295:295;;;;:::o;23595:1395::-;23712:37;23745:3;23712:37;:::i;:::-;23814:18;23806:6;23803:30;23800:56;;;23836:18;;:::i;:::-;23800:56;23880:38;23912:4;23906:11;23880:38;:::i;:::-;23965:67;24025:6;24017;24011:4;23965:67;:::i;:::-;24059:1;24083:4;24070:17;;24115:2;24107:6;24104:14;24132:1;24127:618;;;;24789:1;24806:6;24803:77;;;24855:9;24850:3;24846:19;24840:26;24831:35;;24803:77;24906:67;24966:6;24959:5;24906:67;:::i;:::-;24900:4;24893:81;24762:222;24097:887;;24127:618;24179:4;24175:9;24167:6;24163:22;24213:37;24245:4;24213:37;:::i;:::-;24272:1;24286:208;24300:7;24297:1;24294:14;24286:208;;;24379:9;24374:3;24370:19;24364:26;24356:6;24349:42;24430:1;24422:6;24418:14;24408:24;;24477:2;24466:9;24462:18;24449:31;;24323:4;24320:1;24316:12;24311:17;;24286:208;;;24522:6;24513:7;24510:19;24507:179;;;24580:9;24575:3;24571:19;24565:26;24623:48;24665:4;24657:6;24653:17;24642:9;24623:48;:::i;:::-;24615:6;24608:64;24530:156;24507:179;24732:1;24728;24720:6;24716:14;24712:22;24706:4;24699:36;24134:611;;;24097:887;;23687:1303;;;23595:1395;;:::o;24996:180::-;25044:77;25041:1;25034:88;25141:4;25138:1;25131:15;25165:4;25162:1;25155:15;25182:233;25221:3;25244:24;25262:5;25244:24;:::i;:::-;25235:33;;25290:66;25283:5;25280:77;25277:103;;25360:18;;:::i;:::-;25277:103;25407:1;25400:5;25396:13;25389:20;;25182:233;;;:::o;25421:175::-;25561:27;25557:1;25549:6;25545:14;25538:51;25421:175;:::o;25602:366::-;25744:3;25765:67;25829:2;25824:3;25765:67;:::i;:::-;25758:74;;25841:93;25930:3;25841:93;:::i;:::-;25959:2;25954:3;25950:12;25943:19;;25602:366;;;:::o;25974:419::-;26140:4;26178:2;26167:9;26163:18;26155:26;;26227:9;26221:4;26217:20;26213:1;26202:9;26198:17;26191:47;26255:131;26381:4;26255:131;:::i;:::-;26247:139;;25974:419;;;:::o;26399:166::-;26539:18;26535:1;26527:6;26523:14;26516:42;26399:166;:::o;26571:366::-;26713:3;26734:67;26798:2;26793:3;26734:67;:::i;:::-;26727:74;;26810:93;26899:3;26810:93;:::i;:::-;26928:2;26923:3;26919:12;26912:19;;26571:366;;;:::o;26943:419::-;27109:4;27147:2;27136:9;27132:18;27124:26;;27196:9;27190:4;27186:20;27182:1;27171:9;27167:17;27160:47;27224:131;27350:4;27224:131;:::i;:::-;27216:139;;26943:419;;;:::o;27368:180::-;27416:77;27413:1;27406:88;27513:4;27510:1;27503:15;27537:4;27534:1;27527:15;27554:169;27694:21;27690:1;27682:6;27678:14;27671:45;27554:169;:::o;27729:366::-;27871:3;27892:67;27956:2;27951:3;27892:67;:::i;:::-;27885:74;;27968:93;28057:3;27968:93;:::i;:::-;28086:2;28081:3;28077:12;28070:19;;27729:366;;;:::o;28101:419::-;28267:4;28305:2;28294:9;28290:18;28282:26;;28354:9;28348:4;28344:20;28340:1;28329:9;28325:17;28318:47;28382:131;28508:4;28382:131;:::i;:::-;28374:139;;28101:419;;;:::o;28526:173::-;28666:25;28662:1;28654:6;28650:14;28643:49;28526:173;:::o;28705:366::-;28847:3;28868:67;28932:2;28927:3;28868:67;:::i;:::-;28861:74;;28944:93;29033:3;28944:93;:::i;:::-;29062:2;29057:3;29053:12;29046:19;;28705:366;;;:::o;29077:419::-;29243:4;29281:2;29270:9;29266:18;29258:26;;29330:9;29324:4;29320:20;29316:1;29305:9;29301:17;29294:47;29358:131;29484:4;29358:131;:::i;:::-;29350:139;;29077:419;;;:::o;29502:410::-;29542:7;29565:20;29583:1;29565:20;:::i;:::-;29560:25;;29599:20;29617:1;29599:20;:::i;:::-;29594:25;;29654:1;29651;29647:9;29676:30;29694:11;29676:30;:::i;:::-;29665:41;;29855:1;29846:7;29842:15;29839:1;29836:22;29816:1;29809:9;29789:83;29766:139;;29885:18;;:::i;:::-;29766:139;29550:362;29502:410;;;;:::o;29918:191::-;29958:3;29977:20;29995:1;29977:20;:::i;:::-;29972:25;;30011:20;30029:1;30011:20;:::i;:::-;30006:25;;30054:1;30051;30047:9;30040:16;;30075:3;30072:1;30069:10;30066:36;;;30082:18;;:::i;:::-;30066:36;29918:191;;;;:::o;30115:222::-;30255:34;30251:1;30243:6;30239:14;30232:58;30324:5;30319:2;30311:6;30307:15;30300:30;30115:222;:::o;30343:366::-;30485:3;30506:67;30570:2;30565:3;30506:67;:::i;:::-;30499:74;;30582:93;30671:3;30582:93;:::i;:::-;30700:2;30695:3;30691:12;30684:19;;30343:366;;;:::o;30715:419::-;30881:4;30919:2;30908:9;30904:18;30896:26;;30968:9;30962:4;30958:20;30954:1;30943:9;30939:17;30932:47;30996:131;31122:4;30996:131;:::i;:::-;30988:139;;30715:419;;;:::o;31140:180::-;31188:77;31185:1;31178:88;31285:4;31282:1;31275:15;31309:4;31306:1;31299:15;31326:185;31366:1;31383:20;31401:1;31383:20;:::i;:::-;31378:25;;31417:20;31435:1;31417:20;:::i;:::-;31412:25;;31456:1;31446:35;;31461:18;;:::i;:::-;31446:35;31503:1;31500;31496:9;31491:14;;31326:185;;;;:::o;31517:148::-;31619:11;31656:3;31641:18;;31517:148;;;;:::o;31671:390::-;31777:3;31805:39;31838:5;31805:39;:::i;:::-;31860:89;31942:6;31937:3;31860:89;:::i;:::-;31853:96;;31958:65;32016:6;32011:3;32004:4;31997:5;31993:16;31958:65;:::i;:::-;32048:6;32043:3;32039:16;32032:23;;31781:280;31671:390;;;;:::o;32067:435::-;32247:3;32269:95;32360:3;32351:6;32269:95;:::i;:::-;32262:102;;32381:95;32472:3;32463:6;32381:95;:::i;:::-;32374:102;;32493:3;32486:10;;32067:435;;;;;:::o;32508:275::-;32640:3;32662:95;32753:3;32744:6;32662:95;:::i;:::-;32655:102;;32774:3;32767:10;;32508:275;;;;:::o;32789:98::-;32840:6;32874:5;32868:12;32858:22;;32789:98;;;:::o;32893:168::-;32976:11;33010:6;33005:3;32998:19;33050:4;33045:3;33041:14;33026:29;;32893:168;;;;:::o;33067:373::-;33153:3;33181:38;33213:5;33181:38;:::i;:::-;33235:70;33298:6;33293:3;33235:70;:::i;:::-;33228:77;;33314:65;33372:6;33367:3;33360:4;33353:5;33349:16;33314:65;:::i;:::-;33404:29;33426:6;33404:29;:::i;:::-;33399:3;33395:39;33388:46;;33157:283;33067:373;;;;:::o;33446:640::-;33641:4;33679:3;33668:9;33664:19;33656:27;;33693:71;33761:1;33750:9;33746:17;33737:6;33693:71;:::i;:::-;33774:72;33842:2;33831:9;33827:18;33818:6;33774:72;:::i;:::-;33856;33924:2;33913:9;33909:18;33900:6;33856:72;:::i;:::-;33975:9;33969:4;33965:20;33960:2;33949:9;33945:18;33938:48;34003:76;34074:4;34065:6;34003:76;:::i;:::-;33995:84;;33446:640;;;;;;;:::o;34092:141::-;34148:5;34179:6;34173:13;34164:22;;34195:32;34221:5;34195:32;:::i;:::-;34092:141;;;;:::o;34239:349::-;34308:6;34357:2;34345:9;34336:7;34332:23;34328:32;34325:119;;;34363:79;;:::i;:::-;34325:119;34483:1;34508:63;34563:7;34554:6;34543:9;34539:22;34508:63;:::i;:::-;34498:73;;34454:127;34239:349;;;;:::o;34594:332::-;34715:4;34753:2;34742:9;34738:18;34730:26;;34766:71;34834:1;34823:9;34819:17;34810:6;34766:71;:::i;:::-;34847:72;34915:2;34904:9;34900:18;34891:6;34847:72;:::i;:::-;34594:332;;;;;:::o
Swarm Source
ipfs://7015c2498cd4cfd52d569157881584cad4a5c67a9375b8c8b29ccef597d20376
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.