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 | 17125036 | 8 days ago | IN | 1 APE | 0.00000148 |
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17125036 | 8 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.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract 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/utils/Base64.sol // Original license: SPDX_License_Identifier: MIT pragma solidity ^0.8.0; library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; uint256 encodedLen = 4 * ((len + 2) / 3); bytes memory result = new bytes(encodedLen + 32); uint256 i = 0; uint256 j = 0; for (; i < len - 2; i += 3) { uint256 value = (uint256(uint8(data[i])) << 16) | (uint256(uint8(data[i + 1])) << 8) | uint256(uint8(data[i + 2])); result[j++] = TABLE[(value >> 18) & 0x3F]; result[j++] = TABLE[(value >> 12) & 0x3F]; result[j++] = TABLE[(value >> 6) & 0x3F]; result[j++] = TABLE[value & 0x3F]; } if (i < len) { uint256 value = uint256(uint8(data[i])) << 16; if (i + 1 < len) { value |= uint256(uint8(data[i + 1])) << 8; } result[j++] = TABLE[(value >> 18) & 0x3F]; result[j++] = TABLE[(value >> 12) & 0x3F]; if (i + 1 < len) { result[j++] = TABLE[(value >> 6) & 0x3F]; result[j++] = '='; } else { result[j++] = '='; result[j++] = '='; } } return string(result); } } // File contracts/ApeColorNFT.sol // Original license: SPDX_License_Identifier: MIT pragma solidity ^0.8.29; contract ApeColorNFT is ERC721, Ownable { uint256 public constant MINT_FEE = 1 ether; uint256 public constant MIX_FEE = 0.1 ether; address public treasury; uint256 private _tokenIdCounter; struct ColorData { uint8 r; uint8 g; uint8 b; bool isPrimary; string name; } mapping(uint256 => ColorData) private _colors; constructor(address _treasury) ERC721("ApeColor", "APECOLOR") Ownable(msg.sender) { treasury = _treasury; } function mintPrimary(string memory color) external payable { require(msg.value == MINT_FEE, "Send exactly 1 ETH"); _sendValue(treasury, msg.value); uint256 tokenId = _tokenIdCounter; _safeMint(msg.sender, tokenId); (uint8 r, uint8 g, uint8 b) = _getColorValue(color); _colors[tokenId] = ColorData(r, g, b, true, color); _tokenIdCounter++; } function mixColors( uint256[] memory tokenIds, uint256[] memory percentages, string memory newName ) external payable { require(bytes(newName).length > 0, "Name cannot be empty"); require(msg.value == MIX_FEE, "Send exactly 0.1 ETH"); _sendValue(treasury, msg.value); require(tokenIds.length == percentages.length, "Invalid input"); (uint256 totalR, uint256 totalG, uint256 totalB) = _calculateMixedColor(tokenIds, percentages); uint256 newTokenId = _tokenIdCounter; _safeMint(msg.sender, newTokenId); _colors[newTokenId] = ColorData( uint8(totalR / 100), uint8(totalG / 100), uint8(totalB / 100), false, newName ); _tokenIdCounter++; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_customExists(tokenId), "Token does not exist"); return string(abi.encodePacked( "https://ape-color-metadata.vercel.app/api/metadata", // <-- Sostituisci con la tua URL "?chain=ethereum", "&contract=", Strings.toHexString(address(this)), "&tokenId=", Strings.toString(tokenId) )); } function getColorData(uint256 tokenId) external view returns ( uint8 r, uint8 g, uint8 b, bool isPrimary, string memory name ) { require(_customExists(tokenId), "NFT does not exist"); ColorData memory color = _colors[tokenId]; return (color.r, color.g, color.b, color.isPrimary, color.name); } function _calculateMixedColor( uint256[] memory tokenIds, uint256[] memory percentages ) internal returns (uint256 totalR, uint256 totalG, uint256 totalB) { uint256 totalPercentage = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(_customExists(tokenIds[i]), "Token does not exist"); require(ownerOf(tokenIds[i]) == msg.sender, "Not token owner"); 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, "Percentages must sum to 100"); return (totalR, totalG, totalB); } function _sendValue(address recipient, uint256 amount) internal { (bool success, ) = recipient.call{value: amount}(""); require(success, "Transfer failed"); } function _customExists(uint256 tokenId) internal view returns (bool) { return _ownerOf(tokenId) != address(0) && bytes(_colors[tokenId].name).length > 0; } function _getColorValue(string memory color) internal pure returns (uint8 r, uint8 g, uint8 b) { bytes32 colorHash = keccak256(abi.encodePacked(color)); if (colorHash == keccak256(abi.encodePacked("red"))) { return (255, 0, 0); } else if (colorHash == keccak256(abi.encodePacked("green"))) { return (0, 255, 0); } else if (colorHash == keccak256(abi.encodePacked("blue"))) { return (0, 0, 255); } revert("Invalid color"); } function setTreasury(address _newTreasury) external onlyOwner { treasury = _newTreasury; } }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"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"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","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
608060405234801561000f575f5ffd5b50604051614409380380614409833981810160405281019061003191906102a6565b336040518060400160405280600881526020017f417065436f6c6f720000000000000000000000000000000000000000000000008152506040518060400160405280600881526020017f415045434f4c4f52000000000000000000000000000000000000000000000000815250815f90816100ac919061050e565b5080600190816100bc919061050e565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361012f575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161012691906105ec565b60405180910390fd5b61013e8161018560201b60201c565b508060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610605565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102758261024c565b9050919050565b6102858161026b565b811461028f575f5ffd5b50565b5f815190506102a08161027c565b92915050565b5f602082840312156102bb576102ba610248565b5b5f6102c884828501610292565b91505092915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061034c57607f821691505b60208210810361035f5761035e610308565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026103c17fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610386565b6103cb8683610386565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61040f61040a610405846103e3565b6103ec565b6103e3565b9050919050565b5f819050919050565b610428836103f5565b61043c61043482610416565b848454610392565b825550505050565b5f5f905090565b610453610444565b61045e81848461041f565b505050565b5b81811015610481576104765f8261044b565b600181019050610464565b5050565b601f8211156104c65761049781610365565b6104a084610377565b810160208510156104af578190505b6104c36104bb85610377565b830182610463565b50505b505050565b5f82821c905092915050565b5f6104e65f19846008026104cb565b1980831691505092915050565b5f6104fe83836104d7565b9150826002028217905092915050565b610517826102d1565b67ffffffffffffffff8111156105305761052f6102db565b5b61053a8254610335565b610545828285610485565b5f60209050601f831160018114610576575f8415610564578287015190505b61056e85826104f3565b8655506105d5565b601f19841661058486610365565b5f5b828110156105ab57848901518255600182019150602085019450602081019050610586565b868310156105c857848901516105c4601f8916826104d7565b8355505b6001600288020188555050505b505050505050565b6105e68161026b565b82525050565b5f6020820190506105ff5f8301846105dd565b92915050565b613df7806106125f395ff3fe60806040526004361061013f575f3560e01c80638184eae2116100b5578063b88d4fde1161006e578063b88d4fde14610433578063c87b56dd1461045b578063d7bf81a314610497578063e985e9c5146104c1578063f0f44260146104fd578063f2fde38b146105255761013f565b80638184eae2146103555780638da5cb5b14610371578063959b44cb1461039b57806395d89b41146103b7578063a22cb465146103e1578063b7cc6ce3146104095761013f565b806342842e0e1161010757806342842e0e1461023557806361d027b31461025d5780636352211e1461028757806370a08231146102c3578063715018a6146102ff578063799ebe62146103155761013f565b806301ffc9a71461014357806306fdde031461017f578063081812fc146101a9578063095ea7b3146101e557806323b872dd1461020d575b5f5ffd5b34801561014e575f5ffd5b50610169600480360381019061016491906128e5565b61054d565b604051610176919061292a565b60405180910390f35b34801561018a575f5ffd5b5061019361062e565b6040516101a091906129b3565b60405180910390f35b3480156101b4575f5ffd5b506101cf60048036038101906101ca9190612a06565b6106bd565b6040516101dc9190612a70565b60405180910390f35b3480156101f0575f5ffd5b5061020b60048036038101906102069190612ab3565b6106d8565b005b348015610218575f5ffd5b50610233600480360381019061022e9190612af1565b6106ee565b005b348015610240575f5ffd5b5061025b60048036038101906102569190612af1565b6107ed565b005b348015610268575f5ffd5b5061027161080c565b60405161027e9190612a70565b60405180910390f35b348015610292575f5ffd5b506102ad60048036038101906102a89190612a06565b610831565b6040516102ba9190612a70565b60405180910390f35b3480156102ce575f5ffd5b506102e960048036038101906102e49190612b41565b610842565b6040516102f69190612b7b565b60405180910390f35b34801561030a575f5ffd5b506103136108f8565b005b348015610320575f5ffd5b5061033b60048036038101906103369190612a06565b61090b565b60405161034c959493929190612baf565b60405180910390f35b61036f600480360381019061036a9190612d33565b610aa1565b005b34801561037c575f5ffd5b50610385610c30565b6040516103929190612a70565b60405180910390f35b6103b560048036038101906103b09190612e3e565b610c58565b005b3480156103c2575f5ffd5b506103cb610e94565b6040516103d891906129b3565b60405180910390f35b3480156103ec575f5ffd5b5061040760048036038101906104029190612f0c565b610f24565b005b348015610414575f5ffd5b5061041d610f3a565b60405161042a9190612b7b565b60405180910390f35b34801561043e575f5ffd5b5061045960048036038101906104549190612fe8565b610f46565b005b348015610466575f5ffd5b50610481600480360381019061047c9190612a06565b610f6b565b60405161048e91906129b3565b60405180910390f35b3480156104a2575f5ffd5b506104ab610fee565b6040516104b89190612b7b565b60405180910390f35b3480156104cc575f5ffd5b506104e760048036038101906104e29190613068565b610ffa565b6040516104f4919061292a565b60405180910390f35b348015610508575f5ffd5b50610523600480360381019061051e9190612b41565b611088565b005b348015610530575f5ffd5b5061054b60048036038101906105469190612b41565b6110d3565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061061757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610627575061062682611157565b5b9050919050565b60605f805461063c906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610668906130d3565b80156106b35780601f1061068a576101008083540402835291602001916106b3565b820191905f5260205f20905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b5f6106c7826111c0565b506106d182611246565b9050919050565b6106ea82826106e561127f565b611286565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361075e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016107559190612a70565b60405180910390fd5b5f610771838361076c61127f565b611298565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107e7578382826040517f64283d7b0000000000000000000000000000000000000000000000000000000081526004016107de93929190613103565b60405180910390fd5b50505050565b61080783838360405180602001604052805f815250610f46565b505050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f61083b826111c0565b9050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108b3575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016108aa9190612a70565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6109006114a3565b6109095f61152a565b565b5f5f5f5f606061091a866115ed565b610959576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095090613182565b60405180910390fd5b5f60095f8881526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546109f3906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1f906130d3565b8015610a6a5780601f10610a4157610100808354040283529160200191610a6a565b820191905f5260205f20905b815481529060010190602001808311610a4d57829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b670de0b6b3a76400003414610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae2906131ea565b60405180910390fd5b610b1660075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634611658565b5f6008549050610b263382611705565b5f5f5f610b3285611722565b9250925092506040518060a001604052808460ff1681526020018360ff1681526020018260ff1681526020016001151581526020018681525060095f8681526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610c0e91906133a8565b5090505060085f815480929190610c24906134a4565b91905055505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f815111610c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9290613535565b60405180910390fd5b67016345785d8a00003414610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc9061359d565b60405180910390fd5b610d1060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634611658565b8151835114610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90613605565b60405180910390fd5b5f5f5f610d618686611842565b9250925092505f6008549050610d773382611705565b6040518060a00160405280606486610d8f9190613650565b60ff168152602001606485610da49190613650565b60ff168152602001606484610db99190613650565b60ff1681526020015f151581526020018681525060095f8381526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610e7091906133a8565b5090505060085f815480929190610e86906134a4565b919050555050505050505050565b606060018054610ea3906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ecf906130d3565b8015610f1a5780601f10610ef157610100808354040283529160200191610f1a565b820191905f5260205f20905b815481529060010190602001808311610efd57829003601f168201915b5050505050905090565b610f36610f2f61127f565b8383611bd1565b5050565b67016345785d8a000081565b610f518484846106ee565b610f65610f5c61127f565b85858585611d3a565b50505050565b6060610f76826115ed565b610fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fac906136ca565b60405180910390fd5b610fbe30611ee6565b610fc783611f13565b604051602001610fd8929190613870565b6040516020818303038152906040529050919050565b670de0b6b3a764000081565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6110906114a3565b8060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6110db6114a3565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361114b575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016111429190612a70565b60405180910390fd5b6111548161152a565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f6111cb83611fdd565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361123d57826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016112349190612b7b565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6112938383836001612016565b505050565b5f5f6112a384611fdd565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146112e4576112e38184866121d5565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461136f576113235f855f5f612016565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146113ee57600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6114ab61127f565b73ffffffffffffffffffffffffffffffffffffffff166114c9610c30565b73ffffffffffffffffffffffffffffffffffffffff1614611528576114ec61127f565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161151f9190612a70565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f73ffffffffffffffffffffffffffffffffffffffff1661160e83611fdd565b73ffffffffffffffffffffffffffffffffffffffff161415801561165157505f60095f8481526020019081526020015f20600101805461164d906130d3565b9050115b9050919050565b5f8273ffffffffffffffffffffffffffffffffffffffff168260405161167d906138ec565b5f6040518083038185875af1925050503d805f81146116b7576040519150601f19603f3d011682016040523d82523d5f602084013e6116bc565b606091505b5050905080611700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f79061394a565b60405180910390fd5b505050565b61171e828260405180602001604052805f815250612298565b5050565b5f5f5f5f846040516020016117379190613968565b60405160208183030381529060405280519060200120905060405160200161175e906139c8565b60405160208183030381529060405280519060200120810361178a5760ff5f5f9350935093505061183b565b60405160200161179990613a26565b6040516020818303038152906040528051906020012081036117c5575f60ff5f9350935093505061183b565b6040516020016117d490613a84565b604051602081830303815290604052805190602001208103611800575f5f60ff9350935093505061183b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183290613ae2565b60405180910390fd5b9193909250565b5f5f5f5f5f90505f5f90505b8651811015611b855761187a87828151811061186d5761186c613b00565b5b60200260200101516115ed565b6118b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b0906136ca565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166118f38883815181106118e6576118e5613b00565b5b6020026020010151610831565b73ffffffffffffffffffffffffffffffffffffffff1614611949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194090613b77565b60405180910390fd5b5f60095f8984815181106119605761195f613b00565b5b602002602001015181526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546119fd906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a29906130d3565b8015611a745780601f10611a4b57610100808354040283529160200191611a74565b820191905f5260205f20905b815481529060010190602001808311611a5757829003601f168201915b5050505050815250509050868281518110611a9257611a91613b00565b5b6020026020010151815f015160ff16611aab9190613b95565b86611ab69190613bd6565b9550868281518110611acb57611aca613b00565b5b6020026020010151816020015160ff16611ae59190613b95565b85611af09190613bd6565b9450868281518110611b0557611b04613b00565b5b6020026020010151816040015160ff16611b1f9190613b95565b84611b2a9190613bd6565b9350868281518110611b3f57611b3e613b00565b5b602002602001015183611b529190613bd6565b9250611b77888381518110611b6a57611b69613b00565b5b60200260200101516122bb565b50808060010191505061184e565b5060648114611bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc090613c53565b60405180910390fd5b509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c4157816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401611c389190612a70565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d2d919061292a565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611edf578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b8152600401611d989493929190613cc3565b6020604051808303815f875af1925050508015611dd357506040513d601f19601f82011682018060405250810190611dd09190613d21565b60015b611e54573d805f8114611e01576040519150601f19603f3d011682016040523d82523d5f602084013e611e06565b606091505b505f815103611e4c57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611e439190612a70565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611edd57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611ed49190612a70565b60405180910390fd5b505b5050505050565b6060611f0c8273ffffffffffffffffffffffffffffffffffffffff16601460ff1661233d565b9050919050565b60605f6001611f218461257b565b0190505f8167ffffffffffffffff811115611f3f57611f3e612c0f565b5b6040519080825280601f01601f191660200182016040528015611f715781602001600182028036833780820191505090505b5090505f82602001820190505b600115611fd2578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611fc757611fc6613623565b5b0494505f8503611f7e575b819350505050919050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061204e57505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612180575f61205d846111c0565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120c757508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156120da57506120d88184610ffa565b155b1561211c57826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016121139190612a70565b60405180910390fd5b811561217e57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6121e08383836126cc565b612293575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361225457806040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161224b9190612b7b565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161228a929190613d4c565b60405180910390fd5b505050565b6122a2838361278c565b6122b66122ad61127f565b5f858585611d3a565b505050565b5f6122c75f835f611298565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361233957816040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016123309190612b7b565b60405180910390fd5b5050565b60605f8390505f60028460026123539190613b95565b61235d9190613bd6565b67ffffffffffffffff81111561237657612375612c0f565b5b6040519080825280601f01601f1916602001820160405280156123a85781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f815181106123df576123de613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061244257612441613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f60018560026124809190613b95565b61248a9190613bd6565b90505b6001811115612529577f3031323334353637383961626364656600000000000000000000000000000000600f8416601081106124cc576124cb613b00565b5b1a60f81b8282815181106124e3576124e2613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600483901c92508061252290613d73565b905061248d565b505f82146125705784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401612567929190613d9a565b60405180910390fd5b809250505092915050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106125d7577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816125cd576125cc613623565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612614576d04ee2d6d415b85acef8100000000838161260a57612609613623565b5b0492506020810190505b662386f26fc10000831061264357662386f26fc10000838161263957612638613623565b5b0492506010810190505b6305f5e100831061266c576305f5e100838161266257612661613623565b5b0492506008810190505b612710831061269157612710838161268757612686613623565b5b0492506004810190505b606483106126b457606483816126aa576126a9613623565b5b0492506002810190505b600a83106126c3576001810190505b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561278357508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061274457506127438484610ffa565b5b8061278257508273ffffffffffffffffffffffffffffffffffffffff1661276a83611246565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036127fc575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016127f39190612a70565b60405180910390fd5b5f61280883835f611298565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461287a575f6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016128719190612a70565b60405180910390fd5b505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6128c481612890565b81146128ce575f5ffd5b50565b5f813590506128df816128bb565b92915050565b5f602082840312156128fa576128f9612888565b5b5f612907848285016128d1565b91505092915050565b5f8115159050919050565b61292481612910565b82525050565b5f60208201905061293d5f83018461291b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61298582612943565b61298f818561294d565b935061299f81856020860161295d565b6129a88161296b565b840191505092915050565b5f6020820190508181035f8301526129cb818461297b565b905092915050565b5f819050919050565b6129e5816129d3565b81146129ef575f5ffd5b50565b5f81359050612a00816129dc565b92915050565b5f60208284031215612a1b57612a1a612888565b5b5f612a28848285016129f2565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612a5a82612a31565b9050919050565b612a6a81612a50565b82525050565b5f602082019050612a835f830184612a61565b92915050565b612a9281612a50565b8114612a9c575f5ffd5b50565b5f81359050612aad81612a89565b92915050565b5f5f60408385031215612ac957612ac8612888565b5b5f612ad685828601612a9f565b9250506020612ae7858286016129f2565b9150509250929050565b5f5f5f60608486031215612b0857612b07612888565b5b5f612b1586828701612a9f565b9350506020612b2686828701612a9f565b9250506040612b37868287016129f2565b9150509250925092565b5f60208284031215612b5657612b55612888565b5b5f612b6384828501612a9f565b91505092915050565b612b75816129d3565b82525050565b5f602082019050612b8e5f830184612b6c565b92915050565b5f60ff82169050919050565b612ba981612b94565b82525050565b5f60a082019050612bc25f830188612ba0565b612bcf6020830187612ba0565b612bdc6040830186612ba0565b612be9606083018561291b565b8181036080830152612bfb818461297b565b90509695505050505050565b5f5ffd5b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612c458261296b565b810181811067ffffffffffffffff82111715612c6457612c63612c0f565b5b80604052505050565b5f612c7661287f565b9050612c828282612c3c565b919050565b5f67ffffffffffffffff821115612ca157612ca0612c0f565b5b612caa8261296b565b9050602081019050919050565b828183375f83830152505050565b5f612cd7612cd284612c87565b612c6d565b905082815260208101848484011115612cf357612cf2612c0b565b5b612cfe848285612cb7565b509392505050565b5f82601f830112612d1a57612d19612c07565b5b8135612d2a848260208601612cc5565b91505092915050565b5f60208284031215612d4857612d47612888565b5b5f82013567ffffffffffffffff811115612d6557612d6461288c565b5b612d7184828501612d06565b91505092915050565b5f67ffffffffffffffff821115612d9457612d93612c0f565b5b602082029050602081019050919050565b5f5ffd5b5f612dbb612db684612d7a565b612c6d565b90508083825260208201905060208402830185811115612dde57612ddd612da5565b5b835b81811015612e075780612df388826129f2565b845260208401935050602081019050612de0565b5050509392505050565b5f82601f830112612e2557612e24612c07565b5b8135612e35848260208601612da9565b91505092915050565b5f5f5f60608486031215612e5557612e54612888565b5b5f84013567ffffffffffffffff811115612e7257612e7161288c565b5b612e7e86828701612e11565b935050602084013567ffffffffffffffff811115612e9f57612e9e61288c565b5b612eab86828701612e11565b925050604084013567ffffffffffffffff811115612ecc57612ecb61288c565b5b612ed886828701612d06565b9150509250925092565b612eeb81612910565b8114612ef5575f5ffd5b50565b5f81359050612f0681612ee2565b92915050565b5f5f60408385031215612f2257612f21612888565b5b5f612f2f85828601612a9f565b9250506020612f4085828601612ef8565b9150509250929050565b5f67ffffffffffffffff821115612f6457612f63612c0f565b5b612f6d8261296b565b9050602081019050919050565b5f612f8c612f8784612f4a565b612c6d565b905082815260208101848484011115612fa857612fa7612c0b565b5b612fb3848285612cb7565b509392505050565b5f82601f830112612fcf57612fce612c07565b5b8135612fdf848260208601612f7a565b91505092915050565b5f5f5f5f6080858703121561300057612fff612888565b5b5f61300d87828801612a9f565b945050602061301e87828801612a9f565b935050604061302f878288016129f2565b925050606085013567ffffffffffffffff8111156130505761304f61288c565b5b61305c87828801612fbb565b91505092959194509250565b5f5f6040838503121561307e5761307d612888565b5b5f61308b85828601612a9f565b925050602061309c85828601612a9f565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806130ea57607f821691505b6020821081036130fd576130fc6130a6565b5b50919050565b5f6060820190506131165f830186612a61565b6131236020830185612b6c565b6131306040830184612a61565b949350505050565b7f4e465420646f6573206e6f7420657869737400000000000000000000000000005f82015250565b5f61316c60128361294d565b915061317782613138565b602082019050919050565b5f6020820190508181035f83015261319981613160565b9050919050565b7f53656e642065786163746c7920312045544800000000000000000000000000005f82015250565b5f6131d460128361294d565b91506131df826131a0565b602082019050919050565b5f6020820190508181035f830152613201816131c8565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026132647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613229565b61326e8683613229565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6132a96132a461329f846129d3565b613286565b6129d3565b9050919050565b5f819050919050565b6132c28361328f565b6132d66132ce826132b0565b848454613235565b825550505050565b5f5f905090565b6132ed6132de565b6132f88184846132b9565b505050565b5b8181101561331b576133105f826132e5565b6001810190506132fe565b5050565b601f8211156133605761333181613208565b61333a8461321a565b81016020851015613349578190505b61335d6133558561321a565b8301826132fd565b50505b505050565b5f82821c905092915050565b5f6133805f1984600802613365565b1980831691505092915050565b5f6133988383613371565b9150826002028217905092915050565b6133b182612943565b67ffffffffffffffff8111156133ca576133c9612c0f565b5b6133d482546130d3565b6133df82828561331f565b5f60209050601f831160018114613410575f84156133fe578287015190505b613408858261338d565b86555061346f565b601f19841661341e86613208565b5f5b8281101561344557848901518255600182019150602085019450602081019050613420565b86831015613462578489015161345e601f891682613371565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6134ae826129d3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036134e0576134df613477565b5b600182019050919050565b7f4e616d652063616e6e6f7420626520656d7074790000000000000000000000005f82015250565b5f61351f60148361294d565b915061352a826134eb565b602082019050919050565b5f6020820190508181035f83015261354c81613513565b9050919050565b7f53656e642065786163746c7920302e31204554480000000000000000000000005f82015250565b5f61358760148361294d565b915061359282613553565b602082019050919050565b5f6020820190508181035f8301526135b48161357b565b9050919050565b7f496e76616c696420696e707574000000000000000000000000000000000000005f82015250565b5f6135ef600d8361294d565b91506135fa826135bb565b602082019050919050565b5f6020820190508181035f83015261361c816135e3565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61365a826129d3565b9150613665836129d3565b92508261367557613674613623565b5b828204905092915050565b7f546f6b656e20646f6573206e6f742065786973740000000000000000000000005f82015250565b5f6136b460148361294d565b91506136bf82613680565b602082019050919050565b5f6020820190508181035f8301526136e1816136a8565b9050919050565b5f81905092915050565b7f68747470733a2f2f6170652d636f6c6f722d6d657461646174612e76657263655f8201527f6c2e6170702f6170692f6d657461646174610000000000000000000000000000602082015250565b5f61374c6032836136e8565b9150613757826136f2565b603282019050919050565b7f3f636861696e3d657468657265756d00000000000000000000000000000000005f82015250565b5f613796600f836136e8565b91506137a182613762565b600f82019050919050565b7f26636f6e74726163743d000000000000000000000000000000000000000000005f82015250565b5f6137e0600a836136e8565b91506137eb826137ac565b600a82019050919050565b5f61380082612943565b61380a81856136e8565b935061381a81856020860161295d565b80840191505092915050565b7f26746f6b656e49643d00000000000000000000000000000000000000000000005f82015250565b5f61385a6009836136e8565b915061386582613826565b600982019050919050565b5f61387a82613740565b91506138858261378a565b9150613890826137d4565b915061389c82856137f6565b91506138a78261384e565b91506138b382846137f6565b91508190509392505050565b5f81905092915050565b50565b5f6138d75f836138bf565b91506138e2826138c9565b5f82019050919050565b5f6138f6826138cc565b9150819050919050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f613934600f8361294d565b915061393f82613900565b602082019050919050565b5f6020820190508181035f83015261396181613928565b9050919050565b5f61397382846137f6565b915081905092915050565b7f72656400000000000000000000000000000000000000000000000000000000005f82015250565b5f6139b26003836136e8565b91506139bd8261397e565b600382019050919050565b5f6139d2826139a6565b9150819050919050565b7f677265656e0000000000000000000000000000000000000000000000000000005f82015250565b5f613a106005836136e8565b9150613a1b826139dc565b600582019050919050565b5f613a3082613a04565b9150819050919050565b7f626c7565000000000000000000000000000000000000000000000000000000005f82015250565b5f613a6e6004836136e8565b9150613a7982613a3a565b600482019050919050565b5f613a8e82613a62565b9150819050919050565b7f496e76616c696420636f6c6f72000000000000000000000000000000000000005f82015250565b5f613acc600d8361294d565b9150613ad782613a98565b602082019050919050565b5f6020820190508181035f830152613af981613ac0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e6f7420746f6b656e206f776e657200000000000000000000000000000000005f82015250565b5f613b61600f8361294d565b9150613b6c82613b2d565b602082019050919050565b5f6020820190508181035f830152613b8e81613b55565b9050919050565b5f613b9f826129d3565b9150613baa836129d3565b9250828202613bb8816129d3565b91508282048414831517613bcf57613bce613477565b5b5092915050565b5f613be0826129d3565b9150613beb836129d3565b9250828201905080821115613c0357613c02613477565b5b92915050565b7f50657263656e7461676573206d7573742073756d20746f2031303000000000005f82015250565b5f613c3d601b8361294d565b9150613c4882613c09565b602082019050919050565b5f6020820190508181035f830152613c6a81613c31565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f613c9582613c71565b613c9f8185613c7b565b9350613caf81856020860161295d565b613cb88161296b565b840191505092915050565b5f608082019050613cd65f830187612a61565b613ce36020830186612a61565b613cf06040830185612b6c565b8181036060830152613d028184613c8b565b905095945050505050565b5f81519050613d1b816128bb565b92915050565b5f60208284031215613d3657613d35612888565b5b5f613d4384828501613d0d565b91505092915050565b5f604082019050613d5f5f830185612a61565b613d6c6020830184612b6c565b9392505050565b5f613d7d826129d3565b91505f8203613d8f57613d8e613477565b5b600182039050919050565b5f604082019050613dad5f830185612b6c565b613dba6020830184612b6c565b939250505056fea2646970667358221220e0f9c364f6154e65282bf6722412a55fea42f4b4fa3b850655629616349a121864736f6c634300081d00330000000000000000000000009f9afad1c7aecc9d80e2208bb5a8292160f3cf17
Deployed Bytecode
0x60806040526004361061013f575f3560e01c80638184eae2116100b5578063b88d4fde1161006e578063b88d4fde14610433578063c87b56dd1461045b578063d7bf81a314610497578063e985e9c5146104c1578063f0f44260146104fd578063f2fde38b146105255761013f565b80638184eae2146103555780638da5cb5b14610371578063959b44cb1461039b57806395d89b41146103b7578063a22cb465146103e1578063b7cc6ce3146104095761013f565b806342842e0e1161010757806342842e0e1461023557806361d027b31461025d5780636352211e1461028757806370a08231146102c3578063715018a6146102ff578063799ebe62146103155761013f565b806301ffc9a71461014357806306fdde031461017f578063081812fc146101a9578063095ea7b3146101e557806323b872dd1461020d575b5f5ffd5b34801561014e575f5ffd5b50610169600480360381019061016491906128e5565b61054d565b604051610176919061292a565b60405180910390f35b34801561018a575f5ffd5b5061019361062e565b6040516101a091906129b3565b60405180910390f35b3480156101b4575f5ffd5b506101cf60048036038101906101ca9190612a06565b6106bd565b6040516101dc9190612a70565b60405180910390f35b3480156101f0575f5ffd5b5061020b60048036038101906102069190612ab3565b6106d8565b005b348015610218575f5ffd5b50610233600480360381019061022e9190612af1565b6106ee565b005b348015610240575f5ffd5b5061025b60048036038101906102569190612af1565b6107ed565b005b348015610268575f5ffd5b5061027161080c565b60405161027e9190612a70565b60405180910390f35b348015610292575f5ffd5b506102ad60048036038101906102a89190612a06565b610831565b6040516102ba9190612a70565b60405180910390f35b3480156102ce575f5ffd5b506102e960048036038101906102e49190612b41565b610842565b6040516102f69190612b7b565b60405180910390f35b34801561030a575f5ffd5b506103136108f8565b005b348015610320575f5ffd5b5061033b60048036038101906103369190612a06565b61090b565b60405161034c959493929190612baf565b60405180910390f35b61036f600480360381019061036a9190612d33565b610aa1565b005b34801561037c575f5ffd5b50610385610c30565b6040516103929190612a70565b60405180910390f35b6103b560048036038101906103b09190612e3e565b610c58565b005b3480156103c2575f5ffd5b506103cb610e94565b6040516103d891906129b3565b60405180910390f35b3480156103ec575f5ffd5b5061040760048036038101906104029190612f0c565b610f24565b005b348015610414575f5ffd5b5061041d610f3a565b60405161042a9190612b7b565b60405180910390f35b34801561043e575f5ffd5b5061045960048036038101906104549190612fe8565b610f46565b005b348015610466575f5ffd5b50610481600480360381019061047c9190612a06565b610f6b565b60405161048e91906129b3565b60405180910390f35b3480156104a2575f5ffd5b506104ab610fee565b6040516104b89190612b7b565b60405180910390f35b3480156104cc575f5ffd5b506104e760048036038101906104e29190613068565b610ffa565b6040516104f4919061292a565b60405180910390f35b348015610508575f5ffd5b50610523600480360381019061051e9190612b41565b611088565b005b348015610530575f5ffd5b5061054b60048036038101906105469190612b41565b6110d3565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061061757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610627575061062682611157565b5b9050919050565b60605f805461063c906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610668906130d3565b80156106b35780601f1061068a576101008083540402835291602001916106b3565b820191905f5260205f20905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b5f6106c7826111c0565b506106d182611246565b9050919050565b6106ea82826106e561127f565b611286565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361075e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016107559190612a70565b60405180910390fd5b5f610771838361076c61127f565b611298565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107e7578382826040517f64283d7b0000000000000000000000000000000000000000000000000000000081526004016107de93929190613103565b60405180910390fd5b50505050565b61080783838360405180602001604052805f815250610f46565b505050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f61083b826111c0565b9050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108b3575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016108aa9190612a70565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6109006114a3565b6109095f61152a565b565b5f5f5f5f606061091a866115ed565b610959576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095090613182565b60405180910390fd5b5f60095f8881526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546109f3906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1f906130d3565b8015610a6a5780601f10610a4157610100808354040283529160200191610a6a565b820191905f5260205f20905b815481529060010190602001808311610a4d57829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b670de0b6b3a76400003414610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae2906131ea565b60405180910390fd5b610b1660075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634611658565b5f6008549050610b263382611705565b5f5f5f610b3285611722565b9250925092506040518060a001604052808460ff1681526020018360ff1681526020018260ff1681526020016001151581526020018681525060095f8681526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610c0e91906133a8565b5090505060085f815480929190610c24906134a4565b91905055505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f815111610c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9290613535565b60405180910390fd5b67016345785d8a00003414610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc9061359d565b60405180910390fd5b610d1060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634611658565b8151835114610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90613605565b60405180910390fd5b5f5f5f610d618686611842565b9250925092505f6008549050610d773382611705565b6040518060a00160405280606486610d8f9190613650565b60ff168152602001606485610da49190613650565b60ff168152602001606484610db99190613650565b60ff1681526020015f151581526020018681525060095f8381526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a81548160ff021916908360ff1602179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151815f0160036101000a81548160ff0219169083151502179055506080820151816001019081610e7091906133a8565b5090505060085f815480929190610e86906134a4565b919050555050505050505050565b606060018054610ea3906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ecf906130d3565b8015610f1a5780601f10610ef157610100808354040283529160200191610f1a565b820191905f5260205f20905b815481529060010190602001808311610efd57829003601f168201915b5050505050905090565b610f36610f2f61127f565b8383611bd1565b5050565b67016345785d8a000081565b610f518484846106ee565b610f65610f5c61127f565b85858585611d3a565b50505050565b6060610f76826115ed565b610fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fac906136ca565b60405180910390fd5b610fbe30611ee6565b610fc783611f13565b604051602001610fd8929190613870565b6040516020818303038152906040529050919050565b670de0b6b3a764000081565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6110906114a3565b8060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6110db6114a3565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361114b575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016111429190612a70565b60405180910390fd5b6111548161152a565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f6111cb83611fdd565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361123d57826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016112349190612b7b565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6112938383836001612016565b505050565b5f5f6112a384611fdd565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146112e4576112e38184866121d5565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461136f576113235f855f5f612016565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146113ee57600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6114ab61127f565b73ffffffffffffffffffffffffffffffffffffffff166114c9610c30565b73ffffffffffffffffffffffffffffffffffffffff1614611528576114ec61127f565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161151f9190612a70565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f73ffffffffffffffffffffffffffffffffffffffff1661160e83611fdd565b73ffffffffffffffffffffffffffffffffffffffff161415801561165157505f60095f8481526020019081526020015f20600101805461164d906130d3565b9050115b9050919050565b5f8273ffffffffffffffffffffffffffffffffffffffff168260405161167d906138ec565b5f6040518083038185875af1925050503d805f81146116b7576040519150601f19603f3d011682016040523d82523d5f602084013e6116bc565b606091505b5050905080611700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f79061394a565b60405180910390fd5b505050565b61171e828260405180602001604052805f815250612298565b5050565b5f5f5f5f846040516020016117379190613968565b60405160208183030381529060405280519060200120905060405160200161175e906139c8565b60405160208183030381529060405280519060200120810361178a5760ff5f5f9350935093505061183b565b60405160200161179990613a26565b6040516020818303038152906040528051906020012081036117c5575f60ff5f9350935093505061183b565b6040516020016117d490613a84565b604051602081830303815290604052805190602001208103611800575f5f60ff9350935093505061183b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183290613ae2565b60405180910390fd5b9193909250565b5f5f5f5f5f90505f5f90505b8651811015611b855761187a87828151811061186d5761186c613b00565b5b60200260200101516115ed565b6118b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b0906136ca565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166118f38883815181106118e6576118e5613b00565b5b6020026020010151610831565b73ffffffffffffffffffffffffffffffffffffffff1614611949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194090613b77565b60405180910390fd5b5f60095f8984815181106119605761195f613b00565b5b602002602001015181526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff161515151581526020016001820180546119fd906130d3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a29906130d3565b8015611a745780601f10611a4b57610100808354040283529160200191611a74565b820191905f5260205f20905b815481529060010190602001808311611a5757829003601f168201915b5050505050815250509050868281518110611a9257611a91613b00565b5b6020026020010151815f015160ff16611aab9190613b95565b86611ab69190613bd6565b9550868281518110611acb57611aca613b00565b5b6020026020010151816020015160ff16611ae59190613b95565b85611af09190613bd6565b9450868281518110611b0557611b04613b00565b5b6020026020010151816040015160ff16611b1f9190613b95565b84611b2a9190613bd6565b9350868281518110611b3f57611b3e613b00565b5b602002602001015183611b529190613bd6565b9250611b77888381518110611b6a57611b69613b00565b5b60200260200101516122bb565b50808060010191505061184e565b5060648114611bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc090613c53565b60405180910390fd5b509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c4157816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401611c389190612a70565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d2d919061292a565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611edf578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b8152600401611d989493929190613cc3565b6020604051808303815f875af1925050508015611dd357506040513d601f19601f82011682018060405250810190611dd09190613d21565b60015b611e54573d805f8114611e01576040519150601f19603f3d011682016040523d82523d5f602084013e611e06565b606091505b505f815103611e4c57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611e439190612a70565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611edd57836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611ed49190612a70565b60405180910390fd5b505b5050505050565b6060611f0c8273ffffffffffffffffffffffffffffffffffffffff16601460ff1661233d565b9050919050565b60605f6001611f218461257b565b0190505f8167ffffffffffffffff811115611f3f57611f3e612c0f565b5b6040519080825280601f01601f191660200182016040528015611f715781602001600182028036833780820191505090505b5090505f82602001820190505b600115611fd2578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611fc757611fc6613623565b5b0494505f8503611f7e575b819350505050919050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b808061204e57505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612180575f61205d846111c0565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120c757508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156120da57506120d88184610ffa565b155b1561211c57826040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526004016121139190612a70565b60405180910390fd5b811561217e57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6121e08383836126cc565b612293575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361225457806040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161224b9190612b7b565b60405180910390fd5b81816040517f177e802f00000000000000000000000000000000000000000000000000000000815260040161228a929190613d4c565b60405180910390fd5b505050565b6122a2838361278c565b6122b66122ad61127f565b5f858585611d3a565b505050565b5f6122c75f835f611298565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361233957816040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016123309190612b7b565b60405180910390fd5b5050565b60605f8390505f60028460026123539190613b95565b61235d9190613bd6565b67ffffffffffffffff81111561237657612375612c0f565b5b6040519080825280601f01601f1916602001820160405280156123a85781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f815181106123df576123de613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061244257612441613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f60018560026124809190613b95565b61248a9190613bd6565b90505b6001811115612529577f3031323334353637383961626364656600000000000000000000000000000000600f8416601081106124cc576124cb613b00565b5b1a60f81b8282815181106124e3576124e2613b00565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600483901c92508061252290613d73565b905061248d565b505f82146125705784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401612567929190613d9a565b60405180910390fd5b809250505092915050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106125d7577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816125cd576125cc613623565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612614576d04ee2d6d415b85acef8100000000838161260a57612609613623565b5b0492506020810190505b662386f26fc10000831061264357662386f26fc10000838161263957612638613623565b5b0492506010810190505b6305f5e100831061266c576305f5e100838161266257612661613623565b5b0492506008810190505b612710831061269157612710838161268757612686613623565b5b0492506004810190505b606483106126b457606483816126aa576126a9613623565b5b0492506002810190505b600a83106126c3576001810190505b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561278357508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061274457506127438484610ffa565b5b8061278257508273ffffffffffffffffffffffffffffffffffffffff1661276a83611246565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036127fc575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016127f39190612a70565b60405180910390fd5b5f61280883835f611298565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461287a575f6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016128719190612a70565b60405180910390fd5b505050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6128c481612890565b81146128ce575f5ffd5b50565b5f813590506128df816128bb565b92915050565b5f602082840312156128fa576128f9612888565b5b5f612907848285016128d1565b91505092915050565b5f8115159050919050565b61292481612910565b82525050565b5f60208201905061293d5f83018461291b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61298582612943565b61298f818561294d565b935061299f81856020860161295d565b6129a88161296b565b840191505092915050565b5f6020820190508181035f8301526129cb818461297b565b905092915050565b5f819050919050565b6129e5816129d3565b81146129ef575f5ffd5b50565b5f81359050612a00816129dc565b92915050565b5f60208284031215612a1b57612a1a612888565b5b5f612a28848285016129f2565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612a5a82612a31565b9050919050565b612a6a81612a50565b82525050565b5f602082019050612a835f830184612a61565b92915050565b612a9281612a50565b8114612a9c575f5ffd5b50565b5f81359050612aad81612a89565b92915050565b5f5f60408385031215612ac957612ac8612888565b5b5f612ad685828601612a9f565b9250506020612ae7858286016129f2565b9150509250929050565b5f5f5f60608486031215612b0857612b07612888565b5b5f612b1586828701612a9f565b9350506020612b2686828701612a9f565b9250506040612b37868287016129f2565b9150509250925092565b5f60208284031215612b5657612b55612888565b5b5f612b6384828501612a9f565b91505092915050565b612b75816129d3565b82525050565b5f602082019050612b8e5f830184612b6c565b92915050565b5f60ff82169050919050565b612ba981612b94565b82525050565b5f60a082019050612bc25f830188612ba0565b612bcf6020830187612ba0565b612bdc6040830186612ba0565b612be9606083018561291b565b8181036080830152612bfb818461297b565b90509695505050505050565b5f5ffd5b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612c458261296b565b810181811067ffffffffffffffff82111715612c6457612c63612c0f565b5b80604052505050565b5f612c7661287f565b9050612c828282612c3c565b919050565b5f67ffffffffffffffff821115612ca157612ca0612c0f565b5b612caa8261296b565b9050602081019050919050565b828183375f83830152505050565b5f612cd7612cd284612c87565b612c6d565b905082815260208101848484011115612cf357612cf2612c0b565b5b612cfe848285612cb7565b509392505050565b5f82601f830112612d1a57612d19612c07565b5b8135612d2a848260208601612cc5565b91505092915050565b5f60208284031215612d4857612d47612888565b5b5f82013567ffffffffffffffff811115612d6557612d6461288c565b5b612d7184828501612d06565b91505092915050565b5f67ffffffffffffffff821115612d9457612d93612c0f565b5b602082029050602081019050919050565b5f5ffd5b5f612dbb612db684612d7a565b612c6d565b90508083825260208201905060208402830185811115612dde57612ddd612da5565b5b835b81811015612e075780612df388826129f2565b845260208401935050602081019050612de0565b5050509392505050565b5f82601f830112612e2557612e24612c07565b5b8135612e35848260208601612da9565b91505092915050565b5f5f5f60608486031215612e5557612e54612888565b5b5f84013567ffffffffffffffff811115612e7257612e7161288c565b5b612e7e86828701612e11565b935050602084013567ffffffffffffffff811115612e9f57612e9e61288c565b5b612eab86828701612e11565b925050604084013567ffffffffffffffff811115612ecc57612ecb61288c565b5b612ed886828701612d06565b9150509250925092565b612eeb81612910565b8114612ef5575f5ffd5b50565b5f81359050612f0681612ee2565b92915050565b5f5f60408385031215612f2257612f21612888565b5b5f612f2f85828601612a9f565b9250506020612f4085828601612ef8565b9150509250929050565b5f67ffffffffffffffff821115612f6457612f63612c0f565b5b612f6d8261296b565b9050602081019050919050565b5f612f8c612f8784612f4a565b612c6d565b905082815260208101848484011115612fa857612fa7612c0b565b5b612fb3848285612cb7565b509392505050565b5f82601f830112612fcf57612fce612c07565b5b8135612fdf848260208601612f7a565b91505092915050565b5f5f5f5f6080858703121561300057612fff612888565b5b5f61300d87828801612a9f565b945050602061301e87828801612a9f565b935050604061302f878288016129f2565b925050606085013567ffffffffffffffff8111156130505761304f61288c565b5b61305c87828801612fbb565b91505092959194509250565b5f5f6040838503121561307e5761307d612888565b5b5f61308b85828601612a9f565b925050602061309c85828601612a9f565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806130ea57607f821691505b6020821081036130fd576130fc6130a6565b5b50919050565b5f6060820190506131165f830186612a61565b6131236020830185612b6c565b6131306040830184612a61565b949350505050565b7f4e465420646f6573206e6f7420657869737400000000000000000000000000005f82015250565b5f61316c60128361294d565b915061317782613138565b602082019050919050565b5f6020820190508181035f83015261319981613160565b9050919050565b7f53656e642065786163746c7920312045544800000000000000000000000000005f82015250565b5f6131d460128361294d565b91506131df826131a0565b602082019050919050565b5f6020820190508181035f830152613201816131c8565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026132647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613229565b61326e8683613229565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6132a96132a461329f846129d3565b613286565b6129d3565b9050919050565b5f819050919050565b6132c28361328f565b6132d66132ce826132b0565b848454613235565b825550505050565b5f5f905090565b6132ed6132de565b6132f88184846132b9565b505050565b5b8181101561331b576133105f826132e5565b6001810190506132fe565b5050565b601f8211156133605761333181613208565b61333a8461321a565b81016020851015613349578190505b61335d6133558561321a565b8301826132fd565b50505b505050565b5f82821c905092915050565b5f6133805f1984600802613365565b1980831691505092915050565b5f6133988383613371565b9150826002028217905092915050565b6133b182612943565b67ffffffffffffffff8111156133ca576133c9612c0f565b5b6133d482546130d3565b6133df82828561331f565b5f60209050601f831160018114613410575f84156133fe578287015190505b613408858261338d565b86555061346f565b601f19841661341e86613208565b5f5b8281101561344557848901518255600182019150602085019450602081019050613420565b86831015613462578489015161345e601f891682613371565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6134ae826129d3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036134e0576134df613477565b5b600182019050919050565b7f4e616d652063616e6e6f7420626520656d7074790000000000000000000000005f82015250565b5f61351f60148361294d565b915061352a826134eb565b602082019050919050565b5f6020820190508181035f83015261354c81613513565b9050919050565b7f53656e642065786163746c7920302e31204554480000000000000000000000005f82015250565b5f61358760148361294d565b915061359282613553565b602082019050919050565b5f6020820190508181035f8301526135b48161357b565b9050919050565b7f496e76616c696420696e707574000000000000000000000000000000000000005f82015250565b5f6135ef600d8361294d565b91506135fa826135bb565b602082019050919050565b5f6020820190508181035f83015261361c816135e3565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61365a826129d3565b9150613665836129d3565b92508261367557613674613623565b5b828204905092915050565b7f546f6b656e20646f6573206e6f742065786973740000000000000000000000005f82015250565b5f6136b460148361294d565b91506136bf82613680565b602082019050919050565b5f6020820190508181035f8301526136e1816136a8565b9050919050565b5f81905092915050565b7f68747470733a2f2f6170652d636f6c6f722d6d657461646174612e76657263655f8201527f6c2e6170702f6170692f6d657461646174610000000000000000000000000000602082015250565b5f61374c6032836136e8565b9150613757826136f2565b603282019050919050565b7f3f636861696e3d657468657265756d00000000000000000000000000000000005f82015250565b5f613796600f836136e8565b91506137a182613762565b600f82019050919050565b7f26636f6e74726163743d000000000000000000000000000000000000000000005f82015250565b5f6137e0600a836136e8565b91506137eb826137ac565b600a82019050919050565b5f61380082612943565b61380a81856136e8565b935061381a81856020860161295d565b80840191505092915050565b7f26746f6b656e49643d00000000000000000000000000000000000000000000005f82015250565b5f61385a6009836136e8565b915061386582613826565b600982019050919050565b5f61387a82613740565b91506138858261378a565b9150613890826137d4565b915061389c82856137f6565b91506138a78261384e565b91506138b382846137f6565b91508190509392505050565b5f81905092915050565b50565b5f6138d75f836138bf565b91506138e2826138c9565b5f82019050919050565b5f6138f6826138cc565b9150819050919050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f613934600f8361294d565b915061393f82613900565b602082019050919050565b5f6020820190508181035f83015261396181613928565b9050919050565b5f61397382846137f6565b915081905092915050565b7f72656400000000000000000000000000000000000000000000000000000000005f82015250565b5f6139b26003836136e8565b91506139bd8261397e565b600382019050919050565b5f6139d2826139a6565b9150819050919050565b7f677265656e0000000000000000000000000000000000000000000000000000005f82015250565b5f613a106005836136e8565b9150613a1b826139dc565b600582019050919050565b5f613a3082613a04565b9150819050919050565b7f626c7565000000000000000000000000000000000000000000000000000000005f82015250565b5f613a6e6004836136e8565b9150613a7982613a3a565b600482019050919050565b5f613a8e82613a62565b9150819050919050565b7f496e76616c696420636f6c6f72000000000000000000000000000000000000005f82015250565b5f613acc600d8361294d565b9150613ad782613a98565b602082019050919050565b5f6020820190508181035f830152613af981613ac0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e6f7420746f6b656e206f776e657200000000000000000000000000000000005f82015250565b5f613b61600f8361294d565b9150613b6c82613b2d565b602082019050919050565b5f6020820190508181035f830152613b8e81613b55565b9050919050565b5f613b9f826129d3565b9150613baa836129d3565b9250828202613bb8816129d3565b91508282048414831517613bcf57613bce613477565b5b5092915050565b5f613be0826129d3565b9150613beb836129d3565b9250828201905080821115613c0357613c02613477565b5b92915050565b7f50657263656e7461676573206d7573742073756d20746f2031303000000000005f82015250565b5f613c3d601b8361294d565b9150613c4882613c09565b602082019050919050565b5f6020820190508181035f830152613c6a81613c31565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f613c9582613c71565b613c9f8185613c7b565b9350613caf81856020860161295d565b613cb88161296b565b840191505092915050565b5f608082019050613cd65f830187612a61565b613ce36020830186612a61565b613cf06040830185612b6c565b8181036060830152613d028184613c8b565b905095945050505050565b5f81519050613d1b816128bb565b92915050565b5f60208284031215613d3657613d35612888565b5b5f613d4384828501613d0d565b91505092915050565b5f604082019050613d5f5f830185612a61565b613d6c6020830184612b6c565b9392505050565b5f613d7d826129d3565b91505f8203613d8f57613d8e613477565b5b600182039050919050565b5f604082019050613dad5f830185612b6c565b613dba6020830184612b6c565b939250505056fea2646970667358221220e0f9c364f6154e65282bf6722412a55fea42f4b4fa3b850655629616349a121864736f6c634300081d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009f9afad1c7aecc9d80e2208bb5a8292160f3cf17
-----Decoded View---------------
Arg [0] : _treasury (address): 0x9f9AFAD1C7aEcc9d80E2208bB5A8292160F3CF17
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009f9afad1c7aecc9d80e2208bb5a8292160f3cf17
Deployed Bytecode Sourcemap
127814:4538: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;:::-;;127962:23;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111411:120;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111136:213;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3572:103;;;;;;;;;;;;;:::i;:::-;;130087:375;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;128349:412;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2897:87;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;128769:836;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;111758:95;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;113000:146;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;127910:43;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;114303:236;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;129613:466;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;127861:42;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;113217:155;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;132245: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;127962:23::-;;;;;;;;;;;;;:::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;130087:375::-;130159:7;130177;130195;130213:14;130238:18;130283:22;130297:7;130283:13;:22::i;:::-;130275:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;130339:22;130364:7;:16;130372:7;130364:16;;;;;;;;;;;130339:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;130399:5;:7;;;130408:5;:7;;;130417:5;:7;;;130426:5;:15;;;130443:5;:10;;;130391:63;;;;;;;;;;;130087:375;;;;;;;:::o;128349:412::-;127896:7;128427:9;:21;128419:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;128482:31;128493:8;;;;;;;;;;;128503:9;128482:10;:31::i;:::-;128526:15;128544;;128526:33;;128570:30;128580:10;128592:7;128570:9;:30::i;:::-;128614:7;128623;128632;128643:21;128658:5;128643:14;:21::i;:::-;128613:51;;;;;;128694:31;;;;;;;;128704:1;128694:31;;;;;;128707:1;128694:31;;;;;;128710:1;128694:31;;;;;;128713:4;128694:31;;;;;;128719:5;128694:31;;;128675:7;:16;128683:7;128675:16;;;;;;;;;;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;128736:15;;:17;;;;;;;;;:::i;:::-;;;;;;128408:353;;;;128349:412;:::o;2897:87::-;2943:7;2970:6;;;;;;;;;;;2963:13;;2897:87;:::o;128769:836::-;128962:1;128944:7;128938:21;:25;128930:58;;;;;;;;;;;;:::i;:::-;;;;;;;;;127944:9;129007;:20;128999:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;129063:31;129074:8;;;;;;;;;;;129084:9;129063:10;:31::i;:::-;129132:11;:18;129113:8;:15;:37;129105:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;129182:14;129198;129214;129232:43;129253:8;129263:11;129232:20;:43::i;:::-;129181:94;;;;;;129288:18;129309:15;;129288:36;;129335:33;129345:10;129357;129335:9;:33::i;:::-;129403:164;;;;;;;;129442:3;129433:6;:12;;;;:::i;:::-;129403:164;;;;;;129476:3;129467:6;:12;;;;:::i;:::-;129403:164;;;;;;129510:3;129501:6;:12;;;;:::i;:::-;129403:164;;;;;;129529:5;129403:164;;;;;;129549:7;129403:164;;;129381:7;:19;129389:10;129381:19;;;;;;;;;;;:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;129580:15;;:17;;;;;;;;;:::i;:::-;;;;;;128919:686;;;;128769:836;;;:::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;127910:43::-;127944:9;127910: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;129613:466::-;129678:13;129712:22;129726:7;129712:13;:22::i;:::-;129704:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;129972:34;130000:4;129972:19;:34::i;:::-;130034:25;130051:7;130034:16;:25::i;:::-;129794:276;;;;;;;;;:::i;:::-;;;;;;;;;;;;;129780:291;;129613:466;;;:::o;127861:42::-;127896:7;127861:42;:::o;113217:155::-;113305:4;113329:18;:25;113348:5;113329:25;;;;;;;;;;;;;;;:35;113355:8;113329:35;;;;;;;;;;;;;;;;;;;;;;;;;113322:42;;113217:155;;;;:::o;132245:104::-;2783:13;:11;:13::i;:::-;132329:12:::1;132318:8;;:23;;;;;;;;;;;;;;;;;;132245: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;131529:169::-;131592:4;131645:1;131616:31;;:17;131625:7;131616:8;:17::i;:::-;:31;;;;:74;;;;;131689:1;131657:7;:16;131665:7;131657:16;;;;;;;;;;;:21;;131651:35;;;;;:::i;:::-;;;:39;131616:74;131609:81;;131529:169;;;:::o;131340:181::-;131416:12;131434:9;:14;;131456:6;131434:33;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;131415:52;;;131486:7;131478:35;;;;;;;;;;;;:::i;:::-;;;;;;;;;131404:117;131340:181;;:::o;120121:102::-;120189:26;120199:2;120203:7;120189:26;;;;;;;;;;;;:9;:26::i;:::-;120121:102;;:::o;131706:531::-;131774:7;131783;131792;131812:17;131859:5;131842:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;131832:34;;;;;;131812:54;;131914:23;;;;;;;:::i;:::-;;;;;;;;;;;;;131904:34;;;;;;131891:9;:47;131887:309;;131963:3;131968:1;131971;131955:18;;;;;;;;;131887:309;132018:25;;;;;;;:::i;:::-;;;;;;;;;;;;;132008:36;;;;;;131995:9;:49;131991:205;;132069:1;132072:3;132077:1;132061:18;;;;;;;;;131991:205;132124:24;;;;;;;:::i;:::-;;;;;;;;;;;;;132114:35;;;;;;132101:9;:48;132097:99;;132174:1;132177;132180:3;132166:18;;;;;;;;;132097:99;132206:23;;;;;;;;;;:::i;:::-;;;;;;;;131706:531;;;;;;:::o;130470:862::-;130600:14;130616;130632;130659:23;130685:1;130659:27;;130704:9;130716:1;130704:13;;130699:509;130723:8;:15;130719:1;:19;130699:509;;;130768:26;130782:8;130791:1;130782:11;;;;;;;;:::i;:::-;;;;;;;;130768:13;:26::i;:::-;130760:59;;;;;;;;;;;;:::i;:::-;;;;;;;;;130866:10;130842:34;;:20;130850:8;130859:1;130850:11;;;;;;;;:::i;:::-;;;;;;;;130842:7;:20::i;:::-;:34;;;130834:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;130925:18;130946:7;:20;130954:8;130963:1;130954:11;;;;;;;;:::i;:::-;;;;;;;;130946:20;;;;;;;;;;;130925:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;130997:11;131009:1;130997:14;;;;;;;;:::i;:::-;;;;;;;;130991:1;:3;;;:20;;;;;;:::i;:::-;130981:30;;;;;:::i;:::-;;;131042:11;131054:1;131042:14;;;;;;;;:::i;:::-;;;;;;;;131036:1;:3;;;:20;;;;;;:::i;:::-;131026:30;;;;;:::i;:::-;;;131087:11;131099:1;131087:14;;;;;;;;:::i;:::-;;;;;;;;131081:1;:3;;;:20;;;;;;:::i;:::-;131071:30;;;;;:::i;:::-;;;131135:11;131147:1;131135:14;;;;;;;;:::i;:::-;;;;;;;;131116:33;;;;;:::i;:::-;;;131178:18;131184:8;131193:1;131184:11;;;;;;;;:::i;:::-;;;;;;;;131178:5;:18::i;:::-;130745:463;130740:3;;;;;;;130699:509;;;;131245:3;131226:15;:22;131218:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;131293:31;130470:862;;;;;:::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;95250:150::-;95308:13;95341:51;95369:4;95353:22;;92647:2;95341:51;;:11;:51::i;:::-;95334:58;;95250:150;;;:::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;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;94547:538::-;94622:13;94648:18;94669:5;94648:26;;94685:19;94730:1;94721:6;94717:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;94707:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94685:47;;94743:15;:6;94750:1;94743:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;94769;:6;94776:1;94769:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;94800:9;94825:1;94816:6;94812:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;94800:26;;94795:143;94832:1;94828;:5;94795:143;;;94867:10;94891:3;94878:10;:16;94867:28;;;;;;;:::i;:::-;;;;;94855:6;94862:1;94855:9;;;;;;;;:::i;:::-;;;;;:40;;;;;;;;;;;94925:1;94910:16;;;;;94835:3;;;;:::i;:::-;;;94795:143;;;;94966:1;94952:10;:15;94948:98;;95020:5;95027:6;94991:43;;;;;;;;;;;;:::i;:::-;;;;;;;;94948:98;95070:6;95056:21;;;;94547:538;;;;:::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:168::-;16812:20;16808:1;16800:6;16796:14;16789:44;16672:168;:::o;16846:366::-;16988:3;17009:67;17073:2;17068:3;17009:67;:::i;:::-;17002:74;;17085:93;17174:3;17085:93;:::i;:::-;17203:2;17198:3;17194:12;17187:19;;16846:366;;;:::o;17218:419::-;17384:4;17422:2;17411:9;17407:18;17399:26;;17471:9;17465:4;17461:20;17457:1;17446:9;17442:17;17435:47;17499:131;17625:4;17499:131;:::i;:::-;17491:139;;17218:419;;;:::o;17643:168::-;17783:20;17779:1;17771:6;17767:14;17760:44;17643:168;:::o;17817:366::-;17959:3;17980:67;18044:2;18039:3;17980:67;:::i;:::-;17973:74;;18056:93;18145:3;18056:93;:::i;:::-;18174:2;18169:3;18165:12;18158:19;;17817:366;;;:::o;18189:419::-;18355:4;18393:2;18382:9;18378:18;18370:26;;18442:9;18436:4;18432:20;18428:1;18417:9;18413:17;18406:47;18470:131;18596:4;18470:131;:::i;:::-;18462:139;;18189:419;;;:::o;18614:141::-;18663:4;18686:3;18678:11;;18709:3;18706:1;18699:14;18743:4;18740:1;18730:18;18722:26;;18614:141;;;:::o;18761:93::-;18798:6;18845:2;18840;18833:5;18829:14;18825:23;18815:33;;18761:93;;;:::o;18860:107::-;18904:8;18954:5;18948:4;18944:16;18923:37;;18860:107;;;;:::o;18973:393::-;19042:6;19092:1;19080:10;19076:18;19115:97;19145:66;19134:9;19115:97;:::i;:::-;19233:39;19263:8;19252:9;19233:39;:::i;:::-;19221:51;;19305:4;19301:9;19294:5;19290:21;19281:30;;19354:4;19344:8;19340:19;19333:5;19330:30;19320:40;;19049:317;;18973:393;;;;;:::o;19372:60::-;19400:3;19421:5;19414:12;;19372:60;;;:::o;19438:142::-;19488:9;19521:53;19539:34;19548:24;19566:5;19548:24;:::i;:::-;19539:34;:::i;:::-;19521:53;:::i;:::-;19508:66;;19438:142;;;:::o;19586:75::-;19629:3;19650:5;19643:12;;19586:75;;;:::o;19667:269::-;19777:39;19808:7;19777:39;:::i;:::-;19838:91;19887:41;19911:16;19887:41;:::i;:::-;19879:6;19872:4;19866:11;19838:91;:::i;:::-;19832:4;19825:105;19743:193;19667:269;;;:::o;19942:73::-;19987:3;20008:1;20001:8;;19942:73;:::o;20021:189::-;20098:32;;:::i;:::-;20139:65;20197:6;20189;20183:4;20139:65;:::i;:::-;20074:136;20021:189;;:::o;20216:186::-;20276:120;20293:3;20286:5;20283:14;20276:120;;;20347:39;20384:1;20377:5;20347:39;:::i;:::-;20320:1;20313:5;20309:13;20300:22;;20276:120;;;20216:186;;:::o;20408:543::-;20509:2;20504:3;20501:11;20498:446;;;20543:38;20575:5;20543:38;:::i;:::-;20627:29;20645:10;20627:29;:::i;:::-;20617:8;20613:44;20810:2;20798:10;20795:18;20792:49;;;20831:8;20816:23;;20792:49;20854:80;20910:22;20928:3;20910:22;:::i;:::-;20900:8;20896:37;20883:11;20854:80;:::i;:::-;20513:431;;20498:446;20408:543;;;:::o;20957:117::-;21011:8;21061:5;21055:4;21051:16;21030:37;;20957:117;;;;:::o;21080:169::-;21124:6;21157:51;21205:1;21201:6;21193:5;21190:1;21186:13;21157:51;:::i;:::-;21153:56;21238:4;21232;21228:15;21218:25;;21131:118;21080:169;;;;:::o;21254:295::-;21330:4;21476:29;21501:3;21495:4;21476:29;:::i;:::-;21468:37;;21538:3;21535:1;21531:11;21525:4;21522:21;21514:29;;21254:295;;;;:::o;21554:1395::-;21671:37;21704:3;21671:37;:::i;:::-;21773:18;21765:6;21762:30;21759:56;;;21795:18;;:::i;:::-;21759:56;21839:38;21871:4;21865:11;21839:38;:::i;:::-;21924:67;21984:6;21976;21970:4;21924:67;:::i;:::-;22018:1;22042:4;22029:17;;22074:2;22066:6;22063:14;22091:1;22086:618;;;;22748:1;22765:6;22762:77;;;22814:9;22809:3;22805:19;22799:26;22790:35;;22762:77;22865:67;22925:6;22918:5;22865:67;:::i;:::-;22859:4;22852:81;22721:222;22056:887;;22086:618;22138:4;22134:9;22126:6;22122:22;22172:37;22204:4;22172:37;:::i;:::-;22231:1;22245:208;22259:7;22256:1;22253:14;22245:208;;;22338:9;22333:3;22329:19;22323:26;22315:6;22308:42;22389:1;22381:6;22377:14;22367:24;;22436:2;22425:9;22421:18;22408:31;;22282:4;22279:1;22275:12;22270:17;;22245:208;;;22481:6;22472:7;22469:19;22466:179;;;22539:9;22534:3;22530:19;22524:26;22582:48;22624:4;22616:6;22612:17;22601:9;22582:48;:::i;:::-;22574:6;22567:64;22489:156;22466:179;22691:1;22687;22679:6;22675:14;22671:22;22665:4;22658:36;22093:611;;;22056:887;;21646:1303;;;21554:1395;;:::o;22955:180::-;23003:77;23000:1;22993:88;23100:4;23097:1;23090:15;23124:4;23121:1;23114:15;23141:233;23180:3;23203:24;23221:5;23203:24;:::i;:::-;23194:33;;23249:66;23242:5;23239:77;23236:103;;23319:18;;:::i;:::-;23236:103;23366:1;23359:5;23355:13;23348:20;;23141:233;;;:::o;23380:170::-;23520:22;23516:1;23508:6;23504:14;23497:46;23380:170;:::o;23556:366::-;23698:3;23719:67;23783:2;23778:3;23719:67;:::i;:::-;23712:74;;23795:93;23884:3;23795:93;:::i;:::-;23913:2;23908:3;23904:12;23897:19;;23556:366;;;:::o;23928:419::-;24094:4;24132:2;24121:9;24117:18;24109:26;;24181:9;24175:4;24171:20;24167:1;24156:9;24152:17;24145:47;24209:131;24335:4;24209:131;:::i;:::-;24201:139;;23928:419;;;:::o;24353:170::-;24493:22;24489:1;24481:6;24477:14;24470:46;24353:170;:::o;24529:366::-;24671:3;24692:67;24756:2;24751:3;24692:67;:::i;:::-;24685:74;;24768:93;24857:3;24768:93;:::i;:::-;24886:2;24881:3;24877:12;24870:19;;24529:366;;;:::o;24901:419::-;25067:4;25105:2;25094:9;25090:18;25082:26;;25154:9;25148:4;25144:20;25140:1;25129:9;25125:17;25118:47;25182:131;25308:4;25182:131;:::i;:::-;25174:139;;24901:419;;;:::o;25326:163::-;25466:15;25462:1;25454:6;25450:14;25443:39;25326:163;:::o;25495:366::-;25637:3;25658:67;25722:2;25717:3;25658:67;:::i;:::-;25651:74;;25734:93;25823:3;25734:93;:::i;:::-;25852:2;25847:3;25843:12;25836:19;;25495:366;;;:::o;25867:419::-;26033:4;26071:2;26060:9;26056:18;26048:26;;26120:9;26114:4;26110:20;26106:1;26095:9;26091:17;26084:47;26148:131;26274:4;26148:131;:::i;:::-;26140:139;;25867:419;;;:::o;26292:180::-;26340:77;26337:1;26330:88;26437:4;26434:1;26427:15;26461:4;26458:1;26451:15;26478:185;26518:1;26535:20;26553:1;26535:20;:::i;:::-;26530:25;;26569:20;26587:1;26569:20;:::i;:::-;26564:25;;26608:1;26598:35;;26613:18;;:::i;:::-;26598:35;26655:1;26652;26648:9;26643:14;;26478:185;;;;:::o;26669:170::-;26809:22;26805:1;26797:6;26793:14;26786:46;26669:170;:::o;26845:366::-;26987:3;27008:67;27072:2;27067:3;27008:67;:::i;:::-;27001:74;;27084:93;27173:3;27084:93;:::i;:::-;27202:2;27197:3;27193:12;27186:19;;26845:366;;;:::o;27217:419::-;27383:4;27421:2;27410:9;27406:18;27398:26;;27470:9;27464:4;27460:20;27456:1;27445:9;27441:17;27434:47;27498:131;27624:4;27498:131;:::i;:::-;27490:139;;27217:419;;;:::o;27642:148::-;27744:11;27781:3;27766:18;;27642:148;;;;:::o;27796:245::-;27936:34;27932:1;27924:6;27920:14;27913:58;28009:20;28004:2;27996:6;27992:15;27985:45;27796:245;:::o;28051:418::-;28211:3;28236:85;28318:2;28313:3;28236:85;:::i;:::-;28229:92;;28334:93;28423:3;28334:93;:::i;:::-;28456:2;28451:3;28447:12;28440:19;;28051:418;;;:::o;28479:173::-;28623:17;28619:1;28611:6;28607:14;28600:41;28479:173;:::o;28662:418::-;28822:3;28847:85;28929:2;28924:3;28847:85;:::i;:::-;28840:92;;28945:93;29034:3;28945:93;:::i;:::-;29067:2;29062:3;29058:12;29051:19;;28662:418;;;:::o;29090:168::-;29234:12;29230:1;29222:6;29218:14;29211:36;29090:168;:::o;29268:418::-;29428:3;29453:85;29535:2;29530:3;29453:85;:::i;:::-;29446:92;;29551:93;29640:3;29551:93;:::i;:::-;29673:2;29668:3;29664:12;29657:19;;29268:418;;;:::o;29696:410::-;29802:3;29834:39;29867:5;29834:39;:::i;:::-;29893:89;29975:6;29970:3;29893:89;:::i;:::-;29886:96;;29995:65;30053:6;30048:3;30041:4;30034:5;30030:16;29995:65;:::i;:::-;30089:6;30084:3;30080:16;30073:23;;29806:300;29696:410;;;;:::o;30116:167::-;30260:11;30256:1;30248:6;30244:14;30237:35;30116:167;:::o;30293:416::-;30453:3;30478:84;30560:1;30555:3;30478:84;:::i;:::-;30471:91;;30575:93;30664:3;30575:93;:::i;:::-;30697:1;30692:3;30688:11;30681:18;;30293:416;;;:::o;30719:1531::-;31303:3;31329:148;31473:3;31329:148;:::i;:::-;31322:155;;31498:148;31642:3;31498:148;:::i;:::-;31491:155;;31667:148;31811:3;31667:148;:::i;:::-;31660:155;;31836:95;31927:3;31918:6;31836:95;:::i;:::-;31829:102;;31952:148;32096:3;31952:148;:::i;:::-;31945:155;;32121:95;32212:3;32203:6;32121:95;:::i;:::-;32114:102;;32237:3;32230:10;;30719:1531;;;;;:::o;32260:155::-;32361:11;32402:3;32387:18;;32260:155;;;;:::o;32425:118::-;;:::o;32553:414::-;32712:3;32737:83;32818:1;32813:3;32737:83;:::i;:::-;32730:90;;32833:93;32922:3;32833:93;:::i;:::-;32955:1;32950:3;32946:11;32939:18;;32553:414;;;:::o;32977:391::-;33161:3;33187:147;33330:3;33187:147;:::i;:::-;33180:154;;33355:3;33348:10;;32977:391;;;:::o;33378:173::-;33522:17;33518:1;33510:6;33506:14;33499:41;33378:173;:::o;33561:382::-;33703:3;33728:67;33792:2;33787:3;33728:67;:::i;:::-;33721:74;;33808:93;33897:3;33808:93;:::i;:::-;33930:2;33925:3;33921:12;33914:19;;33561:382;;;:::o;33953:435::-;34119:4;34161:2;34150:9;34146:18;34138:26;;34214:9;34208:4;34204:20;34200:1;34189:9;34185:17;34178:47;34246:131;34372:4;34246:131;:::i;:::-;34238:139;;33953:435;;;:::o;34398:287::-;34530:3;34556:95;34647:3;34638:6;34556:95;:::i;:::-;34549:102;;34672:3;34665:10;;34398:287;;;;:::o;34695:161::-;34839:5;34835:1;34827:6;34823:14;34816:29;34695:161;:::o;34866:416::-;35026:3;35051:84;35133:1;35128:3;35051:84;:::i;:::-;35044:91;;35148:93;35237:3;35148:93;:::i;:::-;35270:1;35265:3;35261:11;35254:18;;34866:416;;;:::o;35292:393::-;35477:3;35503:148;35647:3;35503:148;:::i;:::-;35496:155;;35672:3;35665:10;;35292:393;;;:::o;35695:163::-;35839:7;35835:1;35827:6;35823:14;35816:31;35695:163;:::o;35868:416::-;36028:3;36053:84;36135:1;36130:3;36053:84;:::i;:::-;36046:91;;36150:93;36239:3;36150:93;:::i;:::-;36272:1;36267:3;36263:11;36256:18;;35868:416;;;:::o;36294:393::-;36479:3;36505:148;36649:3;36505:148;:::i;:::-;36498:155;;36674:3;36667:10;;36294:393;;;:::o;36697:162::-;36841:6;36837:1;36829:6;36825:14;36818:30;36697:162;:::o;36869:416::-;37029:3;37054:84;37136:1;37131:3;37054:84;:::i;:::-;37047:91;;37151:93;37240:3;37151:93;:::i;:::-;37273:1;37268:3;37264:11;37257:18;;36869:416;;;:::o;37295:393::-;37480:3;37506:148;37650:3;37506:148;:::i;:::-;37499:155;;37675:3;37668:10;;37295:393;;;:::o;37698:171::-;37842:15;37838:1;37830:6;37826:14;37819:39;37698:171;:::o;37879:382::-;38021:3;38046:67;38110:2;38105:3;38046:67;:::i;:::-;38039:74;;38126:93;38215:3;38126:93;:::i;:::-;38248:2;38243:3;38239:12;38232:19;;37879:382;;;:::o;38271:435::-;38437:4;38479:2;38468:9;38464:18;38456:26;;38532:9;38526:4;38522:20;38518:1;38507:9;38503:17;38496:47;38564:131;38690:4;38564:131;:::i;:::-;38556:139;;38271:435;;;:::o;38716:196::-;38768:77;38765:1;38758:88;38869:4;38866:1;38859:15;38897:4;38894:1;38887:15;38922:173;39066:17;39062:1;39054:6;39050:14;39043:41;38922:173;:::o;39105:382::-;39247:3;39272:67;39336:2;39331:3;39272:67;:::i;:::-;39265:74;;39352:93;39441:3;39352:93;:::i;:::-;39474:2;39469:3;39465:12;39458:19;;39105:382;;;:::o;39497:435::-;39663:4;39705:2;39694:9;39690:18;39682:26;;39758:9;39752:4;39748:20;39744:1;39733:9;39729:17;39722:47;39790:131;39916:4;39790:131;:::i;:::-;39782:139;;39497:435;;;:::o;39942:458::-;39982:7;40009:20;40027:1;40009:20;:::i;:::-;40004:25;;40047:20;40065:1;40047:20;:::i;:::-;40042:25;;40106:1;40103;40099:9;40132:30;40150:11;40132:30;:::i;:::-;40121:41;;40331:1;40322:7;40318:15;40315:1;40312:22;40288:1;40281:9;40257:95;40230:159;;40369:18;;:::i;:::-;40230:159;39990:410;39942:458;;;;:::o;40410:211::-;40450:3;40473:20;40491:1;40473:20;:::i;:::-;40468:25;;40511:20;40529:1;40511:20;:::i;:::-;40506:25;;40558:1;40555;40551:9;40544:16;;40583:3;40580:1;40577:10;40574:36;;;40590:18;;:::i;:::-;40574:36;40410:211;;;;:::o;40631:185::-;40775:29;40771:1;40763:6;40759:14;40752:53;40631:185;:::o;40826:382::-;40968:3;40993:67;41057:2;41052:3;40993:67;:::i;:::-;40986:74;;41073:93;41162:3;41073:93;:::i;:::-;41195:2;41190:3;41186:12;41179:19;;40826:382;;;:::o;41218:435::-;41384:4;41426:2;41415:9;41411:18;41403:26;;41479:9;41473:4;41469:20;41465:1;41454:9;41450:17;41443:47;41511:131;41637:4;41511:131;:::i;:::-;41503:139;;41218:435;;;:::o;41663:106::-;41714:6;41752:5;41746:12;41736:22;;41663:106;;;:::o;41779:180::-;41862:11;41900:6;41895:3;41888:19;41944:4;41939:3;41935:14;41920:29;;41779:180;;;;:::o;41969:393::-;42055:3;42087:38;42119:5;42087:38;:::i;:::-;42145:70;42208:6;42203:3;42145:70;:::i;:::-;42138:77;;42228:65;42286:6;42281:3;42274:4;42267:5;42263:16;42228:65;:::i;:::-;42322:29;42344:6;42322:29;:::i;:::-;42317:3;42313:39;42306:46;;42059:303;41969:393;;;;:::o;42372:668::-;42567:4;42609:3;42598:9;42594:19;42586:27;;42627:71;42695:1;42684:9;42680:17;42671:6;42627:71;:::i;:::-;42712:72;42780:2;42769:9;42765:18;42756:6;42712:72;:::i;:::-;42798;42866:2;42855:9;42851:18;42842:6;42798:72;:::i;:::-;42921:9;42915:4;42911:20;42906:2;42895:9;42891:18;42884:48;42953:76;43024:4;43015:6;42953:76;:::i;:::-;42945:84;;42372:668;;;;;;;:::o;43050:153::-;43106:5;43141:6;43135:13;43126:22;;43161:32;43187:5;43161:32;:::i;:::-;43050:153;;;;:::o;43213:373::-;43282:6;43335:2;43323:9;43314:7;43310:23;43306:32;43303:119;;;43341:79;;:::i;:::-;43303:119;43469:1;43498:63;43553:7;43544:6;43533:9;43529:22;43498:63;:::i;:::-;43488:73;;43436:139;43213:373;;;;:::o;43596:348::-;43717:4;43759:2;43748:9;43744:18;43736:26;;43776:71;43844:1;43833:9;43829:17;43820:6;43776:71;:::i;:::-;43861:72;43929:2;43918:9;43914:18;43905:6;43861:72;:::i;:::-;43596:348;;;;;:::o;43954:187::-;43993:3;44020:24;44038:5;44020:24;:::i;:::-;44011:33;;44070:4;44063:5;44060:15;44057:41;;44078:18;;:::i;:::-;44057:41;44129:1;44122:5;44118:13;44111:20;;43954:187;;;:::o;44151:348::-;44272:4;44314:2;44303:9;44299:18;44291:26;;44331:71;44399:1;44388:9;44384:17;44375:6;44331:71;:::i;:::-;44416:72;44484:2;44473:9;44469:18;44460:6;44416:72;:::i;:::-;44151:348;;;;;:::o
Swarm Source
ipfs://e0f9c364f6154e65282bf6722412a55fea42f4b4fa3b850655629616349a1218
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.