Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 29 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 40530883 | 10 days ago | IN | 0 ETH | 0.00000024 | ||||
| Set Approval For... | 40485158 | 11 days ago | IN | 0 ETH | 0.00000014 | ||||
| Safe Transfer Fr... | 40096099 | 20 days ago | IN | 0 ETH | 0.00000018 | ||||
| Set Approval For... | 39926870 | 24 days ago | IN | 0 ETH | 0.00000007 | ||||
| Safe Transfer Fr... | 39802689 | 27 days ago | IN | 0 ETH | 0.00000041 | ||||
| Set Approval For... | 39730018 | 29 days ago | IN | 0 ETH | 0.00000004 | ||||
| Set Approval For... | 39686585 | 30 days ago | IN | 0 ETH | 0.00000017 | ||||
| Set Approval For... | 39471153 | 35 days ago | IN | 0 ETH | 0.00000016 | ||||
| Set Approval For... | 39470694 | 35 days ago | IN | 0 ETH | 0.00000022 | ||||
| Safe Transfer Fr... | 39208988 | 41 days ago | IN | 0 ETH | 0.00000131 | ||||
| Set Approval For... | 39208963 | 41 days ago | IN | 0 ETH | 0.00000033 | ||||
| Set Approval For... | 39080135 | 44 days ago | IN | 0 ETH | 0.00000016 | ||||
| Safe Transfer Fr... | 39058076 | 44 days ago | IN | 0 ETH | 0.00000011 | ||||
| Set Approval For... | 39017548 | 45 days ago | IN | 0 ETH | 0.00000988 | ||||
| Set Approval For... | 39011627 | 45 days ago | IN | 0 ETH | 0.00000008 | ||||
| Safe Transfer Fr... | 38974013 | 46 days ago | IN | 0 ETH | 0.00000027 | ||||
| Set Approval For... | 38937009 | 47 days ago | IN | 0 ETH | 0.00000006 | ||||
| Safe Transfer Fr... | 38713683 | 52 days ago | IN | 0 ETH | 0.00000027 | ||||
| Set Approval For... | 38671405 | 53 days ago | IN | 0 ETH | 0.00000007 | ||||
| Safe Transfer Fr... | 38669548 | 53 days ago | IN | 0 ETH | 0.00000037 | ||||
| Safe Transfer Fr... | 38539745 | 56 days ago | IN | 0 ETH | 0.00000011 | ||||
| Safe Transfer Fr... | 38440515 | 59 days ago | IN | 0 ETH | 0.00000015 | ||||
| Safe Transfer Fr... | 38404456 | 59 days ago | IN | 0 ETH | 0.00000041 | ||||
| Safe Transfer Fr... | 38321702 | 61 days ago | IN | 0 ETH | 0.00000323 | ||||
| Set Approval For... | 38305821 | 62 days ago | IN | 0 ETH | 0.00000011 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BasedStonedNouns
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity)
/**
*Submitted for verification at basescan.org on 2025-04-03
*/
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// 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/IERC721.sol
// 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/IERC721Metadata.sol
// 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/IERC721Receiver.sol
// 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/interfaces/draft-IERC6093.sol
// 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/token/ERC721/utils/ERC721Utils.sol
// 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/Context.sol
// 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/utils/Panic.sol
// 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/SafeCast.sol
// 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/math/Math.sol
// 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/SignedMath.sol
// 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/Strings.sol
// 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/utils/introspection/ERC165.sol
// 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/token/ERC721/ERC721.sol
// 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: @openzeppelin/contracts/access/Ownable.sol
// 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: BasedStonedNouns.sol
pragma solidity ^0.8.0;
contract BasedStonedNouns is ERC721, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 4200;
uint256 public constant MAX_PER_ADDRESS = 42;
uint256 public constant NFT_PRICE = 42 * 10**17; // 4,2 USD in wei
uint256 public totalSupply = 0;
mapping(uint256 => bool) private _mintedIds;
mapping(address => uint256) public mintedPerAddress;
string private _baseTokenURI = "ipfs://QmaSxCmqh7WVX7Saae5tjZCw7VzR9PMfmP5DNisJy3i1Wp/";
uint256 private _nonce = 0;
event MintingStopped(uint256 totalSupply, string message);
event NFTMinted(address indexed recipient, uint256 indexed tokenId); // Evento di debug
constructor() ERC721("Based Stoned Nouns", "BSN") Ownable(msg.sender) {}
function _generateRandomId(address sender) private returns (uint256) {
require(totalSupply < MAX_SUPPLY, "Max supply reached");
uint256 entropy = uint256(
keccak256(
abi.encodePacked(
block.timestamp,
block.number,
sender,
_nonce,
totalSupply,
msg.sender
)
)
);
_nonce++;
uint256 id = (entropy % MAX_SUPPLY) + 1;
while (_mintedIds[id]) {
entropy = uint256(keccak256(abi.encodePacked(entropy, _nonce)));
_nonce++;
id = (entropy % MAX_SUPPLY) + 1;
}
return id;
}
function mintOnPurchaseBatch(address[] calldata recipients, uint256[] calldata purchaseValuesInUSD) external onlyOwner {
require(recipients.length == purchaseValuesInUSD.length, "Array length mismatch");
require(recipients.length > 0, "No recipients provided");
for (uint256 i = 0; i < recipients.length; i++) {
require(recipients[i] != address(0), "Invalid recipient address");
require(purchaseValuesInUSD[i] >= NFT_PRICE, "Purchase value too low");
uint256 nftCount = purchaseValuesInUSD[i] / NFT_PRICE;
if (nftCount > MAX_PER_ADDRESS - mintedPerAddress[recipients[i]]) {
nftCount = MAX_PER_ADDRESS - mintedPerAddress[recipients[i]];
}
if (nftCount == 0) continue;
if (totalSupply + nftCount > MAX_SUPPLY) {
emit MintingStopped(totalSupply, "Max supply reached, minting halted");
return;
}
for (uint256 j = 0; j < nftCount; j++) {
uint256 tokenId = _generateRandomId(recipients[i]);
_mintedIds[tokenId] = true;
totalSupply++;
mintedPerAddress[recipients[i]]++;
_mint(recipients[i], tokenId); // Minting al destinatario corretto
emit NFTMinted(recipients[i], tokenId); // Log per verifica
}
}
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_ownerOf(tokenId) != address(0), "Token ID does not exist");
return string(abi.encodePacked(_baseTokenURI, tokenId.toString(), ".json"));
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
_baseTokenURI = newBaseURI;
}
// Funzione di recupero (opzionale, per recuperare NFT mintati erroneamente)
function recoverNFT(uint256 tokenId, address to) external onlyOwner {
require(_ownerOf(tokenId) == address(this), "Contract does not own this NFT");
_transfer(address(this), to, tokenId);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"MintingStopped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NFTMinted","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":"MAX_PER_ADDRESS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_PRICE","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":"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":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"purchaseValuesInUSD","type":"uint256[]"}],"name":"mintOnPurchaseBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"recoverNFT","outputs":[],"stateMutability":"nonpayable","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":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]Contract Creation Code
60806040525f60075560405180606001604052806036815260200162003a8460369139600a908162000032919062000488565b505f600b5534801562000043575f80fd5b50336040518060400160405280601281526020017f42617365642053746f6e6564204e6f756e7300000000000000000000000000008152506040518060400160405280600381526020017f42534e0000000000000000000000000000000000000000000000000000000000815250815f9081620000c1919062000488565b508060019081620000d3919062000488565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000149575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620001409190620005af565b60405180910390fd5b6200015a816200016160201b60201c565b50620005ca565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620002a057607f821691505b602082108103620002b657620002b56200025b565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200031a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620002dd565b620003268683620002dd565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620003706200036a62000364846200033e565b62000347565b6200033e565b9050919050565b5f819050919050565b6200038b8362000350565b620003a36200039a8262000377565b848454620002e9565b825550505050565b5f90565b620003b9620003ab565b620003c681848462000380565b505050565b5b81811015620003ed57620003e15f82620003af565b600181019050620003cc565b5050565b601f8211156200043c576200040681620002bc565b6200041184620002ce565b8101602085101562000421578190505b620004396200043085620002ce565b830182620003cb565b50505b505050565b5f82821c905092915050565b5f6200045e5f198460080262000441565b1980831691505092915050565b5f6200047883836200044d565b9150826002028217905092915050565b620004938262000224565b67ffffffffffffffff811115620004af57620004ae6200022e565b5b620004bb825462000288565b620004c8828285620003f1565b5f60209050601f831160018114620004fe575f8415620004e9578287015190505b620004f585826200046b565b86555062000564565b601f1984166200050e86620002bc565b5f5b82811015620005375784890151825560018201915060208501945060208101905062000510565b8683101562000557578489015162000553601f8916826200044d565b8355505b6001600288020188555050505b505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000597826200056c565b9050919050565b620005a9816200058b565b82525050565b5f602082019050620005c45f8301846200059e565b92915050565b6134ac80620005d85f395ff3fe608060405234801561000f575f80fd5b5060043610610156575f3560e01c806370a08231116100c1578063c87b56dd1161007a578063c87b56dd1461039e578063d445b978146103ce578063de49899a146103fe578063e985e9c51461041a578063f2fde38b1461044a578063fea6147b1461046657610156565b806370a08231146102f0578063715018a6146103205780638da5cb5b1461032a57806395d89b4114610348578063a22cb46514610366578063b88d4fde1461038257610156565b806323b872dd1161011357806323b872dd1461023057806332cb6b0c1461024c57806342842e0e1461026a57806355f804b3146102865780636352211e146102a2578063676dd563146102d257610156565b806301ffc9a71461015a57806306fdde031461018a578063081812fc146101a8578063095ea7b3146101d85780630aaef285146101f457806318160ddd14610212575b5f80fd5b610174600480360381019061016f91906121cf565b610482565b6040516101819190612214565b60405180910390f35b610192610563565b60405161019f91906122b7565b60405180910390f35b6101c260048036038101906101bd919061230a565b6105f2565b6040516101cf9190612374565b60405180910390f35b6101f260048036038101906101ed91906123b7565b61060d565b005b6101fc610623565b6040516102099190612404565b60405180910390f35b61021a610628565b6040516102279190612404565b60405180910390f35b61024a6004803603810190610245919061241d565b61062e565b005b61025461072d565b6040516102619190612404565b60405180910390f35b610284600480360381019061027f919061241d565b610733565b005b6102a0600480360381019061029b9190612599565b610752565b005b6102bc60048036038101906102b7919061230a565b61076d565b6040516102c99190612374565b60405180910390f35b6102da61077e565b6040516102e79190612404565b60405180910390f35b61030a600480360381019061030591906125e0565b61078a565b6040516103179190612404565b60405180910390f35b610328610840565b005b610332610853565b60405161033f9190612374565b60405180910390f35b61035061087b565b60405161035d91906122b7565b60405180910390f35b610380600480360381019061037b9190612635565b61090b565b005b61039c60048036038101906103979190612711565b610921565b005b6103b860048036038101906103b3919061230a565b610946565b6040516103c591906122b7565b60405180910390f35b6103e860048036038101906103e391906125e0565b6109f0565b6040516103f59190612404565b60405180910390f35b61041860048036038101906104139190612791565b610a05565b005b610434600480360381019061042f91906127cf565b610a92565b6040516104419190612214565b60405180910390f35b610464600480360381019061045f91906125e0565b610b20565b005b610480600480360381019061047b91906128bf565b610ba4565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061054c57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061055c575061055b82611083565b5b9050919050565b60605f80546105719061296a565b80601f016020809104026020016040519081016040528092919081815260200182805461059d9061296a565b80156105e85780601f106105bf576101008083540402835291602001916105e8565b820191905f5260205f20905b8154815290600101906020018083116105cb57829003601f168201915b5050505050905090565b5f6105fc826110ec565b5061060682611172565b9050919050565b61061f828261061a6111ab565b6111b2565b5050565b602a81565b60075481565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361069e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016106959190612374565b60405180910390fd5b5f6106b183836106ac6111ab565b6111c4565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610727578382826040517f64283d7b00000000000000000000000000000000000000000000000000000000815260040161071e9392919061299a565b60405180910390fd5b50505050565b61106881565b61074d83838360405180602001604052805f815250610921565b505050565b61075a6113cf565b80600a90816107699190612b6c565b5050565b5f610777826110ec565b9050919050565b673a4965bf58a4000081565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107fb575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016107f29190612374565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6108486113cf565b6108515f611456565b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461088a9061296a565b80601f01602080910402602001604051908101604052809291908181526020018280546108b69061296a565b80156109015780601f106108d857610100808354040283529160200191610901565b820191905f5260205f20905b8154815290600101906020018083116108e457829003601f168201915b5050505050905090565b61091d6109166111ab565b8383611519565b5050565b61092c84848461062e565b6109406109376111ab565b85858585611682565b50505050565b60605f73ffffffffffffffffffffffffffffffffffffffff166109688361182e565b73ffffffffffffffffffffffffffffffffffffffff16036109be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b590612c85565b60405180910390fd5b600a6109c983611867565b6040516020016109da929190612da7565b6040516020818303038152906040529050919050565b6009602052805f5260405f205f915090505481565b610a0d6113cf565b3073ffffffffffffffffffffffffffffffffffffffff16610a2d8361182e565b73ffffffffffffffffffffffffffffffffffffffff1614610a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7a90612e1f565b60405180910390fd5b610a8e308284611931565b5050565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b610b286113cf565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b98575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610b8f9190612374565b60405180910390fd5b610ba181611456565b50565b610bac6113cf565b818190508484905014610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb90612e87565b60405180910390fd5b5f8484905011610c39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3090612eef565b60405180910390fd5b5f5b8484905081101561107b575f73ffffffffffffffffffffffffffffffffffffffff16858583818110610c7057610c6f612f0d565b5b9050602002016020810190610c8591906125e0565b73ffffffffffffffffffffffffffffffffffffffff1603610cdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd290612f84565b60405180910390fd5b673a4965bf58a40000838383818110610cf757610cf6612f0d565b5b905060200201351015610d3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3690612fec565b60405180910390fd5b5f673a4965bf58a40000848484818110610d5c57610d5b612f0d565b5b90506020020135610d6d9190613064565b905060095f878785818110610d8557610d84612f0d565b5b9050602002016020810190610d9a91906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054602a610de09190613094565b811115610e5b5760095f878785818110610dfd57610dfc612f0d565b5b9050602002016020810190610e1291906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054602a610e589190613094565b90505b5f8103610e685750611068565b61106881600754610e7991906130c7565b1115610ebf577f77a50c4da97e4abdbd21c143b59c138bcad20062660c874096bac823ae081244600754604051610eb0919061316a565b60405180910390a1505061107d565b5f5b81811015611065575f610efa888886818110610ee057610edf612f0d565b5b9050602002016020810190610ef591906125e0565b611a99565b9050600160085f8381526020019081526020015f205f6101000a81548160ff02191690831515021790555060075f815480929190610f3790613196565b919050555060095f898987818110610f5257610f51612f0d565b5b9050602002016020810190610f6791906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190610fb090613196565b9190505550610fe6888886818110610fcb57610fca612f0d565b5b9050602002016020810190610fe091906125e0565b82611be3565b80888886818110610ffa57610ff9612f0d565b5b905060200201602081019061100f91906125e0565b73ffffffffffffffffffffffffffffffffffffffff167f4cc0a9c4a99ddc700de1af2c9f916a7cbfdb71f14801ccff94061ad1ef8a804060405160405180910390a350808061105d90613196565b915050610ec1565b50505b808061107390613196565b915050610c3b565b505b50505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f806110f78361182e565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361116957826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016111609190612404565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6111bf8383836001611cd6565b505050565b5f806111cf8461182e565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146112105761120f818486611e95565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461129b5761124f5f855f80611cd6565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461131a57600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6113d76111ab565b73ffffffffffffffffffffffffffffffffffffffff166113f5610853565b73ffffffffffffffffffffffffffffffffffffffff1614611454576114186111ab565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161144b9190612374565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361158957816040517f5b08ba180000000000000000000000000000000000000000000000000000000081526004016115809190612374565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116759190612214565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611827578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b81526004016116e0949392919061322f565b6020604051808303815f875af192505050801561171b57506040513d601f19601f82011682018060405250810190611718919061328d565b60015b61179c573d805f8114611749576040519150601f19603f3d011682016040523d82523d5f602084013e61174e565b606091505b505f81510361179457836040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260040161178b9190612374565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461182557836040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260040161181c9190612374565b60405180910390fd5b505b5050505050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60605f600161187584611f58565b0190505f8167ffffffffffffffff81111561189357611892612475565b5b6040519080825280601f01601f1916602001820160405280156118c55781602001600182028036833780820191505090505b5090505f82602001820190505b600115611926578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161191b5761191a61300a565b5b0494505f85036118d2575b819350505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119a1575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016119989190612374565b60405180910390fd5b5f6119ad83835f6111c4565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a1f57816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611a169190612404565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a93578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401611a8a9392919061299a565b60405180910390fd5b50505050565b5f61106860075410611ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad790613302565b60405180910390fd5b5f424384600b5460075433604051602001611b0096959493929190613385565b604051602081830303815290604052805190602001205f1c9050600b5f815480929190611b2c90613196565b91905055505f600161106883611b4291906133f4565b611b4c91906130c7565b90505b60085f8281526020019081526020015f205f9054906101000a900460ff1615611bd95781600b54604051602001611b87929190613424565b604051602081830303815290604052805190602001205f1c9150600b5f815480929190611bb390613196565b9190505550600161106883611bc891906133f4565b611bd291906130c7565b9050611b4f565b8092505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c53575f6040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611c4a9190612374565b60405180910390fd5b5f611c5f83835f6111c4565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cd1575f6040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600401611cc89190612374565b60405180910390fd5b505050565b8080611d0e57505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e40575f611d1d846110ec565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d8757508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015611d9a5750611d988184610a92565b155b15611ddc57826040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152600401611dd39190612374565b60405180910390fd5b8115611e3e57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b611ea08383836120a9565b611f53575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611f1457806040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611f0b9190612404565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401611f4a92919061344f565b60405180910390fd5b505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611fb4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611faa57611fa961300a565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611ff1576d04ee2d6d415b85acef81000000008381611fe757611fe661300a565b5b0492506020810190505b662386f26fc10000831061202057662386f26fc1000083816120165761201561300a565b5b0492506010810190505b6305f5e1008310612049576305f5e100838161203f5761203e61300a565b5b0492506008810190505b612710831061206e5761271083816120645761206361300a565b5b0492506004810190505b6064831061209157606483816120875761208661300a565b5b0492506002810190505b600a83106120a0576001810190505b80915050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561216057508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061212157506121208484610a92565b5b8061215f57508273ffffffffffffffffffffffffffffffffffffffff1661214783611172565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121ae8161217a565b81146121b8575f80fd5b50565b5f813590506121c9816121a5565b92915050565b5f602082840312156121e4576121e3612172565b5b5f6121f1848285016121bb565b91505092915050565b5f8115159050919050565b61220e816121fa565b82525050565b5f6020820190506122275f830184612205565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612264578082015181840152602081019050612249565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6122898261222d565b6122938185612237565b93506122a3818560208601612247565b6122ac8161226f565b840191505092915050565b5f6020820190508181035f8301526122cf818461227f565b905092915050565b5f819050919050565b6122e9816122d7565b81146122f3575f80fd5b50565b5f81359050612304816122e0565b92915050565b5f6020828403121561231f5761231e612172565b5b5f61232c848285016122f6565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61235e82612335565b9050919050565b61236e81612354565b82525050565b5f6020820190506123875f830184612365565b92915050565b61239681612354565b81146123a0575f80fd5b50565b5f813590506123b18161238d565b92915050565b5f80604083850312156123cd576123cc612172565b5b5f6123da858286016123a3565b92505060206123eb858286016122f6565b9150509250929050565b6123fe816122d7565b82525050565b5f6020820190506124175f8301846123f5565b92915050565b5f805f6060848603121561243457612433612172565b5b5f612441868287016123a3565b9350506020612452868287016123a3565b9250506040612463868287016122f6565b9150509250925092565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6124ab8261226f565b810181811067ffffffffffffffff821117156124ca576124c9612475565b5b80604052505050565b5f6124dc612169565b90506124e882826124a2565b919050565b5f67ffffffffffffffff82111561250757612506612475565b5b6125108261226f565b9050602081019050919050565b828183375f83830152505050565b5f61253d612538846124ed565b6124d3565b90508281526020810184848401111561255957612558612471565b5b61256484828561251d565b509392505050565b5f82601f8301126125805761257f61246d565b5b813561259084826020860161252b565b91505092915050565b5f602082840312156125ae576125ad612172565b5b5f82013567ffffffffffffffff8111156125cb576125ca612176565b5b6125d78482850161256c565b91505092915050565b5f602082840312156125f5576125f4612172565b5b5f612602848285016123a3565b91505092915050565b612614816121fa565b811461261e575f80fd5b50565b5f8135905061262f8161260b565b92915050565b5f806040838503121561264b5761264a612172565b5b5f612658858286016123a3565b925050602061266985828601612621565b9150509250929050565b5f67ffffffffffffffff82111561268d5761268c612475565b5b6126968261226f565b9050602081019050919050565b5f6126b56126b084612673565b6124d3565b9050828152602081018484840111156126d1576126d0612471565b5b6126dc84828561251d565b509392505050565b5f82601f8301126126f8576126f761246d565b5b81356127088482602086016126a3565b91505092915050565b5f805f806080858703121561272957612728612172565b5b5f612736878288016123a3565b9450506020612747878288016123a3565b9350506040612758878288016122f6565b925050606085013567ffffffffffffffff81111561277957612778612176565b5b612785878288016126e4565b91505092959194509250565b5f80604083850312156127a7576127a6612172565b5b5f6127b4858286016122f6565b92505060206127c5858286016123a3565b9150509250929050565b5f80604083850312156127e5576127e4612172565b5b5f6127f2858286016123a3565b9250506020612803858286016123a3565b9150509250929050565b5f80fd5b5f80fd5b5f8083601f84011261282a5761282961246d565b5b8235905067ffffffffffffffff8111156128475761284661280d565b5b60208301915083602082028301111561286357612862612811565b5b9250929050565b5f8083601f84011261287f5761287e61246d565b5b8235905067ffffffffffffffff81111561289c5761289b61280d565b5b6020830191508360208202830111156128b8576128b7612811565b5b9250929050565b5f805f80604085870312156128d7576128d6612172565b5b5f85013567ffffffffffffffff8111156128f4576128f3612176565b5b61290087828801612815565b9450945050602085013567ffffffffffffffff81111561292357612922612176565b5b61292f8782880161286a565b925092505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061298157607f821691505b6020821081036129945761299361293d565b5b50919050565b5f6060820190506129ad5f830186612365565b6129ba60208301856123f5565b6129c76040830184612365565b949350505050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612a2b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826129f0565b612a3586836129f0565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612a70612a6b612a66846122d7565b612a4d565b6122d7565b9050919050565b5f819050919050565b612a8983612a56565b612a9d612a9582612a77565b8484546129fc565b825550505050565b5f90565b612ab1612aa5565b612abc818484612a80565b505050565b5b81811015612adf57612ad45f82612aa9565b600181019050612ac2565b5050565b601f821115612b2457612af5816129cf565b612afe846129e1565b81016020851015612b0d578190505b612b21612b19856129e1565b830182612ac1565b50505b505050565b5f82821c905092915050565b5f612b445f1984600802612b29565b1980831691505092915050565b5f612b5c8383612b35565b9150826002028217905092915050565b612b758261222d565b67ffffffffffffffff811115612b8e57612b8d612475565b5b612b98825461296a565b612ba3828285612ae3565b5f60209050601f831160018114612bd4575f8415612bc2578287015190505b612bcc8582612b51565b865550612c33565b601f198416612be2866129cf565b5f5b82811015612c0957848901518255600182019150602085019450602081019050612be4565b86831015612c265784890151612c22601f891682612b35565b8355505b6001600288020188555050505b505050505050565b7f546f6b656e20494420646f6573206e6f742065786973740000000000000000005f82015250565b5f612c6f601783612237565b9150612c7a82612c3b565b602082019050919050565b5f6020820190508181035f830152612c9c81612c63565b9050919050565b5f81905092915050565b5f8154612cb98161296a565b612cc38186612ca3565b9450600182165f8114612cdd5760018114612cf257612d24565b60ff1983168652811515820286019350612d24565b612cfb856129cf565b5f5b83811015612d1c57815481890152600182019150602081019050612cfd565b838801955050505b50505092915050565b5f612d378261222d565b612d418185612ca3565b9350612d51818560208601612247565b80840191505092915050565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000005f82015250565b5f612d91600583612ca3565b9150612d9c82612d5d565b600582019050919050565b5f612db28285612cad565b9150612dbe8284612d2d565b9150612dc982612d85565b91508190509392505050565b7f436f6e747261637420646f6573206e6f74206f776e2074686973204e465400005f82015250565b5f612e09601e83612237565b9150612e1482612dd5565b602082019050919050565b5f6020820190508181035f830152612e3681612dfd565b9050919050565b7f4172726179206c656e677468206d69736d6174636800000000000000000000005f82015250565b5f612e71601583612237565b9150612e7c82612e3d565b602082019050919050565b5f6020820190508181035f830152612e9e81612e65565b9050919050565b7f4e6f20726563697069656e74732070726f7669646564000000000000000000005f82015250565b5f612ed9601683612237565b9150612ee482612ea5565b602082019050919050565b5f6020820190508181035f830152612f0681612ecd565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420726563697069656e742061646472657373000000000000005f82015250565b5f612f6e601983612237565b9150612f7982612f3a565b602082019050919050565b5f6020820190508181035f830152612f9b81612f62565b9050919050565b7f50757263686173652076616c756520746f6f206c6f77000000000000000000005f82015250565b5f612fd6601683612237565b9150612fe182612fa2565b602082019050919050565b5f6020820190508181035f83015261300381612fca565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61306e826122d7565b9150613079836122d7565b9250826130895761308861300a565b5b828204905092915050565b5f61309e826122d7565b91506130a9836122d7565b92508282039050818111156130c1576130c0613037565b5b92915050565b5f6130d1826122d7565b91506130dc836122d7565b92508282019050808211156130f4576130f3613037565b5b92915050565b7f4d617820737570706c7920726561636865642c206d696e74696e672068616c745f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f613154602283612237565b915061315f826130fa565b604082019050919050565b5f60408201905061317d5f8301846123f5565b818103602083015261318e81613148565b905092915050565b5f6131a0826122d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131d2576131d1613037565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f613201826131dd565b61320b81856131e7565b935061321b818560208601612247565b6132248161226f565b840191505092915050565b5f6080820190506132425f830187612365565b61324f6020830186612365565b61325c60408301856123f5565b818103606083015261326e81846131f7565b905095945050505050565b5f81519050613287816121a5565b92915050565b5f602082840312156132a2576132a1612172565b5b5f6132af84828501613279565b91505092915050565b7f4d617820737570706c79207265616368656400000000000000000000000000005f82015250565b5f6132ec601283612237565b91506132f7826132b8565b602082019050919050565b5f6020820190508181035f830152613319816132e0565b9050919050565b5f819050919050565b61333a613335826122d7565b613320565b82525050565b5f8160601b9050919050565b5f61335682613340565b9050919050565b5f6133678261334c565b9050919050565b61337f61337a82612354565b61335d565b82525050565b5f6133908289613329565b6020820191506133a08288613329565b6020820191506133b0828761336e565b6014820191506133c08286613329565b6020820191506133d08285613329565b6020820191506133e0828461336e565b601482019150819050979650505050505050565b5f6133fe826122d7565b9150613409836122d7565b9250826134195761341861300a565b5b828206905092915050565b5f61342f8285613329565b60208201915061343f8284613329565b6020820191508190509392505050565b5f6040820190506134625f830185612365565b61346f60208301846123f5565b939250505056fea26469706673582212208374f8073ead4ae203a8a582bbd1b0816e09b4615958a44c3692b5cc0406055c64736f6c63430008140033697066733a2f2f516d615378436d716837575658375361616535746a5a437737567a5239504d666d5035444e69734a7933693157702f
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610156575f3560e01c806370a08231116100c1578063c87b56dd1161007a578063c87b56dd1461039e578063d445b978146103ce578063de49899a146103fe578063e985e9c51461041a578063f2fde38b1461044a578063fea6147b1461046657610156565b806370a08231146102f0578063715018a6146103205780638da5cb5b1461032a57806395d89b4114610348578063a22cb46514610366578063b88d4fde1461038257610156565b806323b872dd1161011357806323b872dd1461023057806332cb6b0c1461024c57806342842e0e1461026a57806355f804b3146102865780636352211e146102a2578063676dd563146102d257610156565b806301ffc9a71461015a57806306fdde031461018a578063081812fc146101a8578063095ea7b3146101d85780630aaef285146101f457806318160ddd14610212575b5f80fd5b610174600480360381019061016f91906121cf565b610482565b6040516101819190612214565b60405180910390f35b610192610563565b60405161019f91906122b7565b60405180910390f35b6101c260048036038101906101bd919061230a565b6105f2565b6040516101cf9190612374565b60405180910390f35b6101f260048036038101906101ed91906123b7565b61060d565b005b6101fc610623565b6040516102099190612404565b60405180910390f35b61021a610628565b6040516102279190612404565b60405180910390f35b61024a6004803603810190610245919061241d565b61062e565b005b61025461072d565b6040516102619190612404565b60405180910390f35b610284600480360381019061027f919061241d565b610733565b005b6102a0600480360381019061029b9190612599565b610752565b005b6102bc60048036038101906102b7919061230a565b61076d565b6040516102c99190612374565b60405180910390f35b6102da61077e565b6040516102e79190612404565b60405180910390f35b61030a600480360381019061030591906125e0565b61078a565b6040516103179190612404565b60405180910390f35b610328610840565b005b610332610853565b60405161033f9190612374565b60405180910390f35b61035061087b565b60405161035d91906122b7565b60405180910390f35b610380600480360381019061037b9190612635565b61090b565b005b61039c60048036038101906103979190612711565b610921565b005b6103b860048036038101906103b3919061230a565b610946565b6040516103c591906122b7565b60405180910390f35b6103e860048036038101906103e391906125e0565b6109f0565b6040516103f59190612404565b60405180910390f35b61041860048036038101906104139190612791565b610a05565b005b610434600480360381019061042f91906127cf565b610a92565b6040516104419190612214565b60405180910390f35b610464600480360381019061045f91906125e0565b610b20565b005b610480600480360381019061047b91906128bf565b610ba4565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061054c57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061055c575061055b82611083565b5b9050919050565b60605f80546105719061296a565b80601f016020809104026020016040519081016040528092919081815260200182805461059d9061296a565b80156105e85780601f106105bf576101008083540402835291602001916105e8565b820191905f5260205f20905b8154815290600101906020018083116105cb57829003601f168201915b5050505050905090565b5f6105fc826110ec565b5061060682611172565b9050919050565b61061f828261061a6111ab565b6111b2565b5050565b602a81565b60075481565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361069e575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016106959190612374565b60405180910390fd5b5f6106b183836106ac6111ab565b6111c4565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610727578382826040517f64283d7b00000000000000000000000000000000000000000000000000000000815260040161071e9392919061299a565b60405180910390fd5b50505050565b61106881565b61074d83838360405180602001604052805f815250610921565b505050565b61075a6113cf565b80600a90816107699190612b6c565b5050565b5f610777826110ec565b9050919050565b673a4965bf58a4000081565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107fb575f6040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016107f29190612374565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6108486113cf565b6108515f611456565b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461088a9061296a565b80601f01602080910402602001604051908101604052809291908181526020018280546108b69061296a565b80156109015780601f106108d857610100808354040283529160200191610901565b820191905f5260205f20905b8154815290600101906020018083116108e457829003601f168201915b5050505050905090565b61091d6109166111ab565b8383611519565b5050565b61092c84848461062e565b6109406109376111ab565b85858585611682565b50505050565b60605f73ffffffffffffffffffffffffffffffffffffffff166109688361182e565b73ffffffffffffffffffffffffffffffffffffffff16036109be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b590612c85565b60405180910390fd5b600a6109c983611867565b6040516020016109da929190612da7565b6040516020818303038152906040529050919050565b6009602052805f5260405f205f915090505481565b610a0d6113cf565b3073ffffffffffffffffffffffffffffffffffffffff16610a2d8361182e565b73ffffffffffffffffffffffffffffffffffffffff1614610a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7a90612e1f565b60405180910390fd5b610a8e308284611931565b5050565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b610b286113cf565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b98575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610b8f9190612374565b60405180910390fd5b610ba181611456565b50565b610bac6113cf565b818190508484905014610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb90612e87565b60405180910390fd5b5f8484905011610c39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3090612eef565b60405180910390fd5b5f5b8484905081101561107b575f73ffffffffffffffffffffffffffffffffffffffff16858583818110610c7057610c6f612f0d565b5b9050602002016020810190610c8591906125e0565b73ffffffffffffffffffffffffffffffffffffffff1603610cdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd290612f84565b60405180910390fd5b673a4965bf58a40000838383818110610cf757610cf6612f0d565b5b905060200201351015610d3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3690612fec565b60405180910390fd5b5f673a4965bf58a40000848484818110610d5c57610d5b612f0d565b5b90506020020135610d6d9190613064565b905060095f878785818110610d8557610d84612f0d565b5b9050602002016020810190610d9a91906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054602a610de09190613094565b811115610e5b5760095f878785818110610dfd57610dfc612f0d565b5b9050602002016020810190610e1291906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054602a610e589190613094565b90505b5f8103610e685750611068565b61106881600754610e7991906130c7565b1115610ebf577f77a50c4da97e4abdbd21c143b59c138bcad20062660c874096bac823ae081244600754604051610eb0919061316a565b60405180910390a1505061107d565b5f5b81811015611065575f610efa888886818110610ee057610edf612f0d565b5b9050602002016020810190610ef591906125e0565b611a99565b9050600160085f8381526020019081526020015f205f6101000a81548160ff02191690831515021790555060075f815480929190610f3790613196565b919050555060095f898987818110610f5257610f51612f0d565b5b9050602002016020810190610f6791906125e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190610fb090613196565b9190505550610fe6888886818110610fcb57610fca612f0d565b5b9050602002016020810190610fe091906125e0565b82611be3565b80888886818110610ffa57610ff9612f0d565b5b905060200201602081019061100f91906125e0565b73ffffffffffffffffffffffffffffffffffffffff167f4cc0a9c4a99ddc700de1af2c9f916a7cbfdb71f14801ccff94061ad1ef8a804060405160405180910390a350808061105d90613196565b915050610ec1565b50505b808061107390613196565b915050610c3b565b505b50505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f806110f78361182e565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361116957826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016111609190612404565b60405180910390fd5b80915050919050565b5f60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f33905090565b6111bf8383836001611cd6565b505050565b5f806111cf8461182e565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146112105761120f818486611e95565b5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461129b5761124f5f855f80611cd6565b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825403925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461131a57600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8460025f8681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6113d76111ab565b73ffffffffffffffffffffffffffffffffffffffff166113f5610853565b73ffffffffffffffffffffffffffffffffffffffff1614611454576114186111ab565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161144b9190612374565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361158957816040517f5b08ba180000000000000000000000000000000000000000000000000000000081526004016115809190612374565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116759190612214565b60405180910390a3505050565b5f8373ffffffffffffffffffffffffffffffffffffffff163b1115611827578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02868685856040518563ffffffff1660e01b81526004016116e0949392919061322f565b6020604051808303815f875af192505050801561171b57506040513d601f19601f82011682018060405250810190611718919061328d565b60015b61179c573d805f8114611749576040519150601f19603f3d011682016040523d82523d5f602084013e61174e565b606091505b505f81510361179457836040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260040161178b9190612374565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461182557836040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260040161181c9190612374565b60405180910390fd5b505b5050505050565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60605f600161187584611f58565b0190505f8167ffffffffffffffff81111561189357611892612475565b5b6040519080825280601f01601f1916602001820160405280156118c55781602001600182028036833780820191505090505b5090505f82602001820190505b600115611926578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161191b5761191a61300a565b5b0494505f85036118d2575b819350505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119a1575f6040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016119989190612374565b60405180910390fd5b5f6119ad83835f6111c4565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a1f57816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611a169190612404565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a93578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401611a8a9392919061299a565b60405180910390fd5b50505050565b5f61106860075410611ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad790613302565b60405180910390fd5b5f424384600b5460075433604051602001611b0096959493929190613385565b604051602081830303815290604052805190602001205f1c9050600b5f815480929190611b2c90613196565b91905055505f600161106883611b4291906133f4565b611b4c91906130c7565b90505b60085f8281526020019081526020015f205f9054906101000a900460ff1615611bd95781600b54604051602001611b87929190613424565b604051602081830303815290604052805190602001205f1c9150600b5f815480929190611bb390613196565b9190505550600161106883611bc891906133f4565b611bd291906130c7565b9050611b4f565b8092505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c53575f6040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611c4a9190612374565b60405180910390fd5b5f611c5f83835f6111c4565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cd1575f6040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600401611cc89190612374565b60405180910390fd5b505050565b8080611d0e57505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e40575f611d1d846110ec565b90505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d8757508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015611d9a5750611d988184610a92565b155b15611ddc57826040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152600401611dd39190612374565b60405180910390fd5b8115611e3e57838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b8360045f8581526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b611ea08383836120a9565b611f53575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611f1457806040517f7e273289000000000000000000000000000000000000000000000000000000008152600401611f0b9190612404565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401611f4a92919061344f565b60405180910390fd5b505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611fb4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611faa57611fa961300a565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611ff1576d04ee2d6d415b85acef81000000008381611fe757611fe661300a565b5b0492506020810190505b662386f26fc10000831061202057662386f26fc1000083816120165761201561300a565b5b0492506010810190505b6305f5e1008310612049576305f5e100838161203f5761203e61300a565b5b0492506008810190505b612710831061206e5761271083816120645761206361300a565b5b0492506004810190505b6064831061209157606483816120875761208661300a565b5b0492506002810190505b600a83106120a0576001810190505b80915050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561216057508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061212157506121208484610a92565b5b8061215f57508273ffffffffffffffffffffffffffffffffffffffff1661214783611172565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121ae8161217a565b81146121b8575f80fd5b50565b5f813590506121c9816121a5565b92915050565b5f602082840312156121e4576121e3612172565b5b5f6121f1848285016121bb565b91505092915050565b5f8115159050919050565b61220e816121fa565b82525050565b5f6020820190506122275f830184612205565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612264578082015181840152602081019050612249565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6122898261222d565b6122938185612237565b93506122a3818560208601612247565b6122ac8161226f565b840191505092915050565b5f6020820190508181035f8301526122cf818461227f565b905092915050565b5f819050919050565b6122e9816122d7565b81146122f3575f80fd5b50565b5f81359050612304816122e0565b92915050565b5f6020828403121561231f5761231e612172565b5b5f61232c848285016122f6565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61235e82612335565b9050919050565b61236e81612354565b82525050565b5f6020820190506123875f830184612365565b92915050565b61239681612354565b81146123a0575f80fd5b50565b5f813590506123b18161238d565b92915050565b5f80604083850312156123cd576123cc612172565b5b5f6123da858286016123a3565b92505060206123eb858286016122f6565b9150509250929050565b6123fe816122d7565b82525050565b5f6020820190506124175f8301846123f5565b92915050565b5f805f6060848603121561243457612433612172565b5b5f612441868287016123a3565b9350506020612452868287016123a3565b9250506040612463868287016122f6565b9150509250925092565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6124ab8261226f565b810181811067ffffffffffffffff821117156124ca576124c9612475565b5b80604052505050565b5f6124dc612169565b90506124e882826124a2565b919050565b5f67ffffffffffffffff82111561250757612506612475565b5b6125108261226f565b9050602081019050919050565b828183375f83830152505050565b5f61253d612538846124ed565b6124d3565b90508281526020810184848401111561255957612558612471565b5b61256484828561251d565b509392505050565b5f82601f8301126125805761257f61246d565b5b813561259084826020860161252b565b91505092915050565b5f602082840312156125ae576125ad612172565b5b5f82013567ffffffffffffffff8111156125cb576125ca612176565b5b6125d78482850161256c565b91505092915050565b5f602082840312156125f5576125f4612172565b5b5f612602848285016123a3565b91505092915050565b612614816121fa565b811461261e575f80fd5b50565b5f8135905061262f8161260b565b92915050565b5f806040838503121561264b5761264a612172565b5b5f612658858286016123a3565b925050602061266985828601612621565b9150509250929050565b5f67ffffffffffffffff82111561268d5761268c612475565b5b6126968261226f565b9050602081019050919050565b5f6126b56126b084612673565b6124d3565b9050828152602081018484840111156126d1576126d0612471565b5b6126dc84828561251d565b509392505050565b5f82601f8301126126f8576126f761246d565b5b81356127088482602086016126a3565b91505092915050565b5f805f806080858703121561272957612728612172565b5b5f612736878288016123a3565b9450506020612747878288016123a3565b9350506040612758878288016122f6565b925050606085013567ffffffffffffffff81111561277957612778612176565b5b612785878288016126e4565b91505092959194509250565b5f80604083850312156127a7576127a6612172565b5b5f6127b4858286016122f6565b92505060206127c5858286016123a3565b9150509250929050565b5f80604083850312156127e5576127e4612172565b5b5f6127f2858286016123a3565b9250506020612803858286016123a3565b9150509250929050565b5f80fd5b5f80fd5b5f8083601f84011261282a5761282961246d565b5b8235905067ffffffffffffffff8111156128475761284661280d565b5b60208301915083602082028301111561286357612862612811565b5b9250929050565b5f8083601f84011261287f5761287e61246d565b5b8235905067ffffffffffffffff81111561289c5761289b61280d565b5b6020830191508360208202830111156128b8576128b7612811565b5b9250929050565b5f805f80604085870312156128d7576128d6612172565b5b5f85013567ffffffffffffffff8111156128f4576128f3612176565b5b61290087828801612815565b9450945050602085013567ffffffffffffffff81111561292357612922612176565b5b61292f8782880161286a565b925092505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061298157607f821691505b6020821081036129945761299361293d565b5b50919050565b5f6060820190506129ad5f830186612365565b6129ba60208301856123f5565b6129c76040830184612365565b949350505050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612a2b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826129f0565b612a3586836129f0565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612a70612a6b612a66846122d7565b612a4d565b6122d7565b9050919050565b5f819050919050565b612a8983612a56565b612a9d612a9582612a77565b8484546129fc565b825550505050565b5f90565b612ab1612aa5565b612abc818484612a80565b505050565b5b81811015612adf57612ad45f82612aa9565b600181019050612ac2565b5050565b601f821115612b2457612af5816129cf565b612afe846129e1565b81016020851015612b0d578190505b612b21612b19856129e1565b830182612ac1565b50505b505050565b5f82821c905092915050565b5f612b445f1984600802612b29565b1980831691505092915050565b5f612b5c8383612b35565b9150826002028217905092915050565b612b758261222d565b67ffffffffffffffff811115612b8e57612b8d612475565b5b612b98825461296a565b612ba3828285612ae3565b5f60209050601f831160018114612bd4575f8415612bc2578287015190505b612bcc8582612b51565b865550612c33565b601f198416612be2866129cf565b5f5b82811015612c0957848901518255600182019150602085019450602081019050612be4565b86831015612c265784890151612c22601f891682612b35565b8355505b6001600288020188555050505b505050505050565b7f546f6b656e20494420646f6573206e6f742065786973740000000000000000005f82015250565b5f612c6f601783612237565b9150612c7a82612c3b565b602082019050919050565b5f6020820190508181035f830152612c9c81612c63565b9050919050565b5f81905092915050565b5f8154612cb98161296a565b612cc38186612ca3565b9450600182165f8114612cdd5760018114612cf257612d24565b60ff1983168652811515820286019350612d24565b612cfb856129cf565b5f5b83811015612d1c57815481890152600182019150602081019050612cfd565b838801955050505b50505092915050565b5f612d378261222d565b612d418185612ca3565b9350612d51818560208601612247565b80840191505092915050565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000005f82015250565b5f612d91600583612ca3565b9150612d9c82612d5d565b600582019050919050565b5f612db28285612cad565b9150612dbe8284612d2d565b9150612dc982612d85565b91508190509392505050565b7f436f6e747261637420646f6573206e6f74206f776e2074686973204e465400005f82015250565b5f612e09601e83612237565b9150612e1482612dd5565b602082019050919050565b5f6020820190508181035f830152612e3681612dfd565b9050919050565b7f4172726179206c656e677468206d69736d6174636800000000000000000000005f82015250565b5f612e71601583612237565b9150612e7c82612e3d565b602082019050919050565b5f6020820190508181035f830152612e9e81612e65565b9050919050565b7f4e6f20726563697069656e74732070726f7669646564000000000000000000005f82015250565b5f612ed9601683612237565b9150612ee482612ea5565b602082019050919050565b5f6020820190508181035f830152612f0681612ecd565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420726563697069656e742061646472657373000000000000005f82015250565b5f612f6e601983612237565b9150612f7982612f3a565b602082019050919050565b5f6020820190508181035f830152612f9b81612f62565b9050919050565b7f50757263686173652076616c756520746f6f206c6f77000000000000000000005f82015250565b5f612fd6601683612237565b9150612fe182612fa2565b602082019050919050565b5f6020820190508181035f83015261300381612fca565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61306e826122d7565b9150613079836122d7565b9250826130895761308861300a565b5b828204905092915050565b5f61309e826122d7565b91506130a9836122d7565b92508282039050818111156130c1576130c0613037565b5b92915050565b5f6130d1826122d7565b91506130dc836122d7565b92508282019050808211156130f4576130f3613037565b5b92915050565b7f4d617820737570706c7920726561636865642c206d696e74696e672068616c745f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f613154602283612237565b915061315f826130fa565b604082019050919050565b5f60408201905061317d5f8301846123f5565b818103602083015261318e81613148565b905092915050565b5f6131a0826122d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131d2576131d1613037565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f613201826131dd565b61320b81856131e7565b935061321b818560208601612247565b6132248161226f565b840191505092915050565b5f6080820190506132425f830187612365565b61324f6020830186612365565b61325c60408301856123f5565b818103606083015261326e81846131f7565b905095945050505050565b5f81519050613287816121a5565b92915050565b5f602082840312156132a2576132a1612172565b5b5f6132af84828501613279565b91505092915050565b7f4d617820737570706c79207265616368656400000000000000000000000000005f82015250565b5f6132ec601283612237565b91506132f7826132b8565b602082019050919050565b5f6020820190508181035f830152613319816132e0565b9050919050565b5f819050919050565b61333a613335826122d7565b613320565b82525050565b5f8160601b9050919050565b5f61335682613340565b9050919050565b5f6133678261334c565b9050919050565b61337f61337a82612354565b61335d565b82525050565b5f6133908289613329565b6020820191506133a08288613329565b6020820191506133b0828761336e565b6014820191506133c08286613329565b6020820191506133d08285613329565b6020820191506133e0828461336e565b601482019150819050979650505050505050565b5f6133fe826122d7565b9150613409836122d7565b9250826134195761341861300a565b5b828206905092915050565b5f61342f8285613329565b60208201915061343f8284613329565b6020820191508190509392505050565b5f6040820190506134625f830185612365565b61346f60208301846123f5565b939250505056fea26469706673582212208374f8073ead4ae203a8a582bbd1b0816e09b4615958a44c3692b5cc0406055c64736f6c63430008140033
Deployed Bytecode Sourcemap
125207:3660:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;106650:305;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;107481:91;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;108653:158;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;108472:115;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;125341:44;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125464:30;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;109322:588;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;125293:41;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;109981:134;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;128452:110;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;107294:120;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125392:47;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;107019:213;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;124303:103;;;:::i;:::-;;123628:87;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;107641:95;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;108883:146;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;110186:236;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;128184:260;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125551:51;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;128652:212;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;109100:155;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;124561:220;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;126749:1427;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;106650:305;106752:4;106804:25;106789:40;;;:11;:40;;;;:105;;;;106861:33;106846:48;;;:11;:48;;;;106789:105;:158;;;;106911:36;106935:11;106911:23;:36::i;:::-;106789:158;106769:178;;106650:305;;;:::o;107481:91::-;107526:13;107559:5;107552:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107481:91;:::o;108653:158::-;108720:7;108740:22;108754:7;108740:13;:22::i;:::-;;108782:21;108795:7;108782:12;:21::i;:::-;108775:28;;108653:158;;;:::o;108472:115::-;108544:35;108553:2;108557:7;108566:12;:10;:12::i;:::-;108544:8;:35::i;:::-;108472:115;;:::o;125341:44::-;125383:2;125341:44;:::o;125464:30::-;;;;:::o;109322:588::-;109431:1;109417:16;;:2;:16;;;109413:89;;109487:1;109457:33;;;;;;;;;;;:::i;:::-;;;;;;;;109413:89;109723:21;109747:34;109755:2;109759:7;109768:12;:10;:12::i;:::-;109747:7;:34::i;:::-;109723:58;;109813:4;109796:21;;:13;:21;;;109792:111;;109862:4;109868:7;109877:13;109841:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;109792:111;109402:508;109322:588;;;:::o;125293:41::-;125330:4;125293:41;:::o;109981:134::-;110068:39;110085:4;110091:2;110095:7;110068:39;;;;;;;;;;;;:16;:39::i;:::-;109981:134;;;:::o;128452:110::-;123514:13;:11;:13::i;:::-;128544:10:::1;128528:13;:26;;;;;;:::i;:::-;;128452:110:::0;:::o;107294:120::-;107357:7;107384:22;107398:7;107384:13;:22::i;:::-;107377:29;;107294:120;;;:::o;125392:47::-;125428:11;125392:47;:::o;107019:213::-;107082:7;107123:1;107106:19;;:5;:19;;;107102:89;;107176:1;107149:30;;;;;;;;;;;:::i;:::-;;;;;;;;107102:89;107208:9;:16;107218:5;107208:16;;;;;;;;;;;;;;;;107201:23;;107019:213;;;:::o;124303:103::-;123514:13;:11;:13::i;:::-;124368:30:::1;124395:1;124368:18;:30::i;:::-;124303:103::o:0;123628:87::-;123674:7;123701:6;;;;;;;;;;;123694:13;;123628:87;:::o;107641:95::-;107688:13;107721:7;107714:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107641:95;:::o;108883:146::-;108969:52;108988:12;:10;:12::i;:::-;109002:8;109012;108969:18;:52::i;:::-;108883:146;;:::o;110186:236::-;110300:31;110313:4;110319:2;110323:7;110300:12;:31::i;:::-;110342:72;110376:12;:10;:12::i;:::-;110390:4;110396:2;110400:7;110409:4;110342:33;:72::i;:::-;110186:236;;;;:::o;128184:260::-;128257:13;128320:1;128291:31;;:17;128300:7;128291:8;:17::i;:::-;:31;;;128283:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;128392:13;128407:18;:7;:16;:18::i;:::-;128375:60;;;;;;;;;:::i;:::-;;;;;;;;;;;;;128361:75;;128184:260;;;:::o;125551:51::-;;;;;;;;;;;;;;;;;:::o;128652:212::-;123514:13;:11;:13::i;:::-;128768:4:::1;128739:34;;:17;128748:7;128739:8;:17::i;:::-;:34;;;128731:77;;;;;;;;;;;;:::i;:::-;;;;;;;;;128819:37;128837:4;128844:2;128848:7;128819:9;:37::i;:::-;128652:212:::0;;:::o;109100:155::-;109188:4;109212:18;:25;109231:5;109212:25;;;;;;;;;;;;;;;:35;109238:8;109212:35;;;;;;;;;;;;;;;;;;;;;;;;;109205:42;;109100:155;;;;:::o;124561:220::-;123514:13;:11;:13::i;:::-;124666:1:::1;124646:22;;:8;:22;;::::0;124642:93:::1;;124720:1;124692:31;;;;;;;;;;;:::i;:::-;;;;;;;;124642:93;124745:28;124764:8;124745:18;:28::i;:::-;124561:220:::0;:::o;126749:1427::-;123514:13;:11;:13::i;:::-;126908:19:::1;;:26;;126887:10;;:17;;:47;126879:81;;;;;;;;;;;;:::i;:::-;;;;;;;;;126999:1;126979:10;;:17;;:21;126971:56;;;;;;;;;;;;:::i;:::-;;;;;;;;;127045:9;127040:1129;127064:10;;:17;;127060:1;:21;127040:1129;;;127136:1;127111:27;;:10;;127122:1;127111:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;:27;;::::0;127103:65:::1;;;;;;;;;;;;:::i;:::-;;;;;;;;;125428:11;127191:19;;127211:1;127191:22;;;;;;;:::i;:::-;;;;;;;;:35;;127183:70;;;;;;;;;;;;:::i;:::-;;;;;;;;;127270:16;125428:11;127289:19;;127309:1;127289:22;;;;;;;:::i;:::-;;;;;;;;:34;;;;:::i;:::-;127270:53;;127371:16;:31;127388:10;;127399:1;127388:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;127371:31;;;;;;;;;;;;;;;;125383:2;127353:49;;;;:::i;:::-;127342:8;:60;127338:161;;;127452:16;:31;127469:10;;127480:1;127469:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;127452:31;;;;;;;;;;;;;;;;125383:2;127434:49;;;;:::i;:::-;127423:60;;127338:161;127531:1;127519:8;:13:::0;127515:27:::1;;127534:8;;;127515:27;125330:4;127575:8;127561:11;;:22;;;;:::i;:::-;:35;127557:171;;;127622:65;127637:11;;127622:65;;;;;;:::i;:::-;;;;;;;;127706:7;;;;127557:171;127749:9;127744:414;127768:8;127764:1;:12;127744:414;;;127802:15;127820:32;127838:10;;127849:1;127838:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;127820:17;:32::i;:::-;127802:50;;127893:4;127871:10;:19;127882:7;127871:19;;;;;;;;;;;;:26;;;;;;;;;;;;;;;;;;127916:11;;:13;;;;;;;;;:::i;:::-;;;;;;127948:16;:31;127965:10;;127976:1;127965:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;127948:31;;;;;;;;;;;;;;;;:33;;;;;;;;;:::i;:::-;;;;;;128000:29;128006:10;;128017:1;128006:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;128021:7;128000:5;:29::i;:::-;128114:7;128099:10;;128110:1;128099:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;128089:33;;;;;;;;;;;;127783:375;127778:3;;;;;:::i;:::-;;;;127744:414;;;;127088:1081;127040:1129;127083:3;;;;;:::i;:::-;;;;127040:1129;;;;123538:1;126749:1427:::0;;;;:::o;105248:148::-;105324:4;105363:25;105348:40;;;:11;:40;;;;105341:47;;105248:148;;;:::o;121704:247::-;121767:7;121787:13;121803:17;121812:7;121803:8;:17::i;:::-;121787:33;;121852:1;121835:19;;:5;:19;;;121831:90;;121901:7;121878:31;;;;;;;;;;;:::i;:::-;;;;;;;;121831:90;121938:5;121931:12;;;121704:247;;;:::o;111185:129::-;111255:7;111282:15;:24;111298:7;111282:24;;;;;;;;;;;;;;;;;;;;;111275:31;;111185:129;;;:::o;17169:98::-;17222:7;17249:10;17242:17;;17169:98;:::o;119936:122::-;120017:33;120026:2;120030:7;120039:4;120045;120017:8;:33::i;:::-;119936:122;;;:::o;114146:824::-;114232:7;114252:12;114267:17;114276:7;114267:8;:17::i;:::-;114252:32;;114363:1;114347:18;;:4;:18;;;114343:88;;114382:37;114399:4;114405;114411:7;114382:16;:37::i;:::-;114343:88;114494:1;114478:18;;:4;:18;;;114474:263;;114596:48;114613:1;114617:7;114634:1;114638:5;114596:8;:48::i;:::-;114709:1;114690:9;:15;114700:4;114690:15;;;;;;;;;;;;;;;;:20;;;;;;;;;;;114474:263;114767:1;114753:16;;:2;:16;;;114749:111;;114832:1;114815:9;:13;114825:2;114815:13;;;;;;;;;;;;;;;;:18;;;;;;;;;;;114749:111;114891:2;114872:7;:16;114880:7;114872:16;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;114930:7;114926:2;114911:27;;114920:4;114911:27;;;;;;;;;;;;114958:4;114951:11;;;114146:824;;;;;:::o;123793:166::-;123864:12;:10;:12::i;:::-;123853:23;;:7;:5;:7::i;:::-;:23;;;123849:103;;123927:12;:10;:12::i;:::-;123900:40;;;;;;;;;;;:::i;:::-;;;;;;;;123849:103;123793:166::o;124941:191::-;125015:16;125034:6;;;;;;;;;;;125015:25;;125060:8;125051:6;;:17;;;;;;;;;;;;;;;;;;125115:8;125084:40;;125105:8;125084:40;;;;;;;;;;;;125004:128;124941:191;:::o;121143:318::-;121271:1;121251:22;;:8;:22;;;121247:93;;121319:8;121297:31;;;;;;;;;;;:::i;:::-;;;;;;;;121247:93;121388:8;121350:18;:25;121369:5;121350:25;;;;;;;;;;;;;;;:35;121376:8;121350:35;;;;;;;;;;;;;;;;:46;;;;;;;;;;;;;;;;;;121434:8;121412:41;;121427:5;121412:41;;;121444:8;121412:41;;;;;;:::i;:::-;;;;;;;;121143:318;;;:::o;15519:948::-;15723:1;15706:2;:14;;;:18;15702:758;;;15761:2;15745:36;;;15782:8;15792:4;15798:7;15807:4;15745:67;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;15741:708;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16125:1;16108:6;:13;:18;16104:330;;16250:2;16214:39;;;;;;;;;;;:::i;:::-;;;;;;;;16104:330;16384:6;16378:13;16369:6;16365:2;16361:15;16354:38;15741:708;15870:41;;;15860:51;;;:6;:51;;;;15856:185;;16018:2;15982:39;;;;;;;;;;;:::i;:::-;;;;;;;;15856:185;15813:243;15702:758;15519:948;;;;;:::o;110947:117::-;111013:7;111040;:16;111048:7;111040:16;;;;;;;;;;;;;;;;;;;;;111033:23;;110947:117;;;:::o;88207:650::-;88263:13;88314:14;88351:1;88331:17;88342:5;88331:10;:17::i;:::-;:21;88314:38;;88367:20;88401:6;88390:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;88367:41;;88423:11;88520:6;88516:2;88512:15;88504:6;88500:28;88493:35;;88557:254;88564:4;88557:254;;;88589:5;;;;;;;;88695:10;88690:2;88683:5;88679:14;88674:32;88669:3;88661:46;88753:2;88744:11;;;;;;:::i;:::-;;;;;88787:1;88778:5;:10;88557:254;88774:21;88557:254;88832:6;88825:13;;;;;88207:650;;;:::o;117451:470::-;117551:1;117537:16;;:2;:16;;;117533:89;;117607:1;117577:33;;;;;;;;;;;:::i;:::-;;;;;;;;117533:89;117632:21;117656:32;117664:2;117668:7;117685:1;117656:7;:32::i;:::-;117632:56;;117728:1;117703:27;;:13;:27;;;117699:215;;117777:7;117754:31;;;;;;;;;;;:::i;:::-;;;;;;;;117699:215;117824:4;117807:21;;:13;:21;;;117803:111;;117873:4;117879:7;117888:13;117852:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;117803:111;117522:399;117451:470;;;:::o;125977:764::-;126037:7;125330:4;126065:11;;:24;126057:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;126123:15;126230;126268:12;126303:6;126332;;126361:11;;126395:10;126191:233;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;126163:276;;;;;;126141:309;;126123:327;;126461:6;;:8;;;;;;;;;:::i;:::-;;;;;;126480:10;126518:1;125330:4;126494:7;:20;;;;:::i;:::-;126493:26;;;;:::i;:::-;126480:39;;126532:182;126539:10;:14;126550:2;126539:14;;;;;;;;;;;;;;;;;;;;;126532:182;;;126615:7;126624:6;;126598:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;126588:44;;;;;;126580:53;;126570:63;;126648:6;;:8;;;;;;;;;:::i;:::-;;;;;;126701:1;125330:4;126677:7;:20;;;;:::i;:::-;126676:26;;;;:::i;:::-;126671:31;;126532:182;;;126731:2;126724:9;;;;125977:764;;;:::o;115306:335::-;115388:1;115374:16;;:2;:16;;;115370:89;;115444:1;115414:33;;;;;;;;;;;:::i;:::-;;;;;;;;115370:89;115469:21;115493:32;115501:2;115505:7;115522:1;115493:7;:32::i;:::-;115469:56;;115565:1;115540:27;;:13;:27;;;115536:98;;115619:1;115591:31;;;;;;;;;;;:::i;:::-;;;;;;;;115536:98;115359:282;115306:335;;:::o;120246:678::-;120408:9;:31;;;;120437:1;120421:18;;:4;:18;;;;120408:31;120404:471;;;120456:13;120472:22;120486:7;120472:13;:22::i;:::-;120456:38;;120641:1;120625:18;;:4;:18;;;;:35;;;;;120656:4;120647:13;;:5;:13;;;;120625:35;:69;;;;;120665:29;120682:5;120689:4;120665:16;:29::i;:::-;120664:30;120625:69;120621:144;;;120744:4;120722:27;;;;;;;;;;;:::i;:::-;;;;;;;;120621:144;120785:9;120781:83;;;120840:7;120836:2;120820:28;;120829:5;120820:28;;;;;;;;;;;;120781:83;120441:434;120404:471;120914:2;120887:15;:24;120903:7;120887:24;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;120246:678;;;;:::o;112353:376::-;112466:38;112480:5;112487:7;112496;112466:13;:38::i;:::-;112461:261;;112542:1;112525:19;;:5;:19;;;112521:190;;112595:7;112572:31;;;;;;;;;;;:::i;:::-;;;;;;;;112521:190;112678:7;112687;112651:44;;;;;;;;;;;;:::i;:::-;;;;;;;;112461:261;112353:376;;;:::o;81534:948::-;81587:7;81607:14;81624:1;81607:18;;81674:8;81665:5;:17;81661:106;;81712:8;81703:17;;;;;;:::i;:::-;;;;;81749:2;81739:12;;;;81661:106;81794:8;81785:5;:17;81781:106;;81832:8;81823:17;;;;;;:::i;:::-;;;;;81869:2;81859:12;;;;81781:106;81914:8;81905:5;:17;81901:106;;81952:8;81943:17;;;;;;:::i;:::-;;;;;81989:2;81979:12;;;;81901:106;82034:7;82025:5;:16;82021:103;;82071:7;82062:16;;;;;;:::i;:::-;;;;;82107:1;82097:11;;;;82021:103;82151:7;82142:5;:16;82138:103;;82188:7;82179:16;;;;;;:::i;:::-;;;;;82224:1;82214:11;;;;82138:103;82268:7;82259:5;:16;82255:103;;82305:7;82296:16;;;;;;:::i;:::-;;;;;82341:1;82331:11;;;;82255:103;82385:7;82376:5;:16;82372:68;;82423:1;82413:11;;;;82372:68;82468:6;82461:13;;;81534:948;;;:::o;111634:276::-;111737:4;111793:1;111774:21;;:7;:21;;;;:128;;;;;111822:7;111813:16;;:5;:16;;;:52;;;;111833:32;111850:5;111857:7;111833:16;:32::i;:::-;111813:52;:88;;;;111894:7;111869:32;;:21;111882:7;111869:12;:21::i;:::-;:32;;;111813:88;111774:128;111754:148;;111634:276;;;;;:::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:246::-;1879:1;1889:113;1903:6;1900:1;1897:13;1889:113;;;1988:1;1983:3;1979:11;1973:18;1969:1;1964:3;1960:11;1953:39;1925:2;1922:1;1918:10;1913:15;;1889:113;;;2036:1;2027:6;2022:3;2018:16;2011:27;1860:184;1798:246;;;:::o;2050:102::-;2091:6;2142:2;2138:7;2133:2;2126:5;2122:14;2118:28;2108:38;;2050:102;;;:::o;2158:377::-;2246:3;2274:39;2307:5;2274:39;:::i;:::-;2329:71;2393:6;2388:3;2329:71;:::i;:::-;2322:78;;2409:65;2467:6;2462:3;2455:4;2448:5;2444:16;2409:65;:::i;:::-;2499:29;2521:6;2499:29;:::i;:::-;2494:3;2490:39;2483:46;;2250:285;2158:377;;;;:::o;2541:313::-;2654:4;2692:2;2681:9;2677:18;2669:26;;2741:9;2735:4;2731:20;2727:1;2716:9;2712:17;2705:47;2769:78;2842:4;2833:6;2769:78;:::i;:::-;2761:86;;2541:313;;;;:::o;2860:77::-;2897:7;2926:5;2915:16;;2860:77;;;:::o;2943:122::-;3016:24;3034:5;3016:24;:::i;:::-;3009:5;3006:35;2996:63;;3055:1;3052;3045:12;2996:63;2943:122;:::o;3071:139::-;3117:5;3155:6;3142:20;3133:29;;3171:33;3198:5;3171:33;:::i;:::-;3071:139;;;;:::o;3216:329::-;3275:6;3324:2;3312:9;3303:7;3299:23;3295:32;3292:119;;;3330:79;;:::i;:::-;3292:119;3450:1;3475:53;3520:7;3511:6;3500:9;3496:22;3475:53;:::i;:::-;3465:63;;3421:117;3216:329;;;;:::o;3551:126::-;3588:7;3628:42;3621:5;3617:54;3606:65;;3551:126;;;:::o;3683:96::-;3720:7;3749:24;3767:5;3749:24;:::i;:::-;3738:35;;3683:96;;;:::o;3785:118::-;3872:24;3890:5;3872:24;:::i;:::-;3867:3;3860:37;3785:118;;:::o;3909:222::-;4002:4;4040:2;4029:9;4025:18;4017:26;;4053:71;4121:1;4110:9;4106:17;4097:6;4053:71;:::i;:::-;3909:222;;;;:::o;4137:122::-;4210:24;4228:5;4210:24;:::i;:::-;4203:5;4200:35;4190:63;;4249:1;4246;4239:12;4190:63;4137:122;:::o;4265:139::-;4311:5;4349:6;4336:20;4327:29;;4365:33;4392:5;4365:33;:::i;:::-;4265:139;;;;:::o;4410:474::-;4478:6;4486;4535:2;4523:9;4514:7;4510:23;4506:32;4503:119;;;4541:79;;:::i;:::-;4503:119;4661:1;4686:53;4731:7;4722:6;4711:9;4707:22;4686:53;:::i;:::-;4676:63;;4632:117;4788:2;4814:53;4859:7;4850:6;4839:9;4835:22;4814:53;:::i;:::-;4804:63;;4759:118;4410:474;;;;;:::o;4890:118::-;4977:24;4995:5;4977:24;:::i;:::-;4972:3;4965:37;4890:118;;:::o;5014:222::-;5107:4;5145:2;5134:9;5130:18;5122:26;;5158:71;5226:1;5215:9;5211:17;5202:6;5158:71;:::i;:::-;5014:222;;;;:::o;5242:619::-;5319:6;5327;5335;5384:2;5372:9;5363:7;5359:23;5355:32;5352:119;;;5390:79;;:::i;:::-;5352:119;5510:1;5535:53;5580:7;5571:6;5560:9;5556:22;5535:53;:::i;:::-;5525:63;;5481:117;5637:2;5663:53;5708:7;5699:6;5688:9;5684:22;5663:53;:::i;:::-;5653:63;;5608:118;5765:2;5791:53;5836:7;5827:6;5816:9;5812:22;5791:53;:::i;:::-;5781:63;;5736:118;5242:619;;;;;:::o;5867:117::-;5976:1;5973;5966:12;5990:117;6099:1;6096;6089:12;6113:180;6161:77;6158:1;6151:88;6258:4;6255:1;6248:15;6282:4;6279:1;6272:15;6299:281;6382:27;6404:4;6382:27;:::i;:::-;6374:6;6370:40;6512:6;6500:10;6497:22;6476:18;6464:10;6461:34;6458:62;6455:88;;;6523:18;;:::i;:::-;6455:88;6563:10;6559:2;6552:22;6342:238;6299:281;;:::o;6586:129::-;6620:6;6647:20;;:::i;:::-;6637:30;;6676:33;6704:4;6696:6;6676:33;:::i;:::-;6586:129;;;:::o;6721:308::-;6783:4;6873:18;6865:6;6862:30;6859:56;;;6895:18;;:::i;:::-;6859:56;6933:29;6955:6;6933:29;:::i;:::-;6925:37;;7017:4;7011;7007:15;6999:23;;6721:308;;;:::o;7035:146::-;7132:6;7127:3;7122;7109:30;7173:1;7164:6;7159:3;7155:16;7148:27;7035:146;;;:::o;7187:425::-;7265:5;7290:66;7306:49;7348:6;7306:49;:::i;:::-;7290:66;:::i;:::-;7281:75;;7379:6;7372:5;7365:21;7417:4;7410:5;7406:16;7455:3;7446:6;7441:3;7437:16;7434:25;7431:112;;;7462:79;;:::i;:::-;7431:112;7552:54;7599:6;7594:3;7589;7552:54;:::i;:::-;7271:341;7187:425;;;;;:::o;7632:340::-;7688:5;7737:3;7730:4;7722:6;7718:17;7714:27;7704:122;;7745:79;;:::i;:::-;7704:122;7862:6;7849:20;7887:79;7962:3;7954:6;7947:4;7939:6;7935:17;7887:79;:::i;:::-;7878:88;;7694:278;7632:340;;;;:::o;7978:509::-;8047:6;8096:2;8084:9;8075:7;8071:23;8067:32;8064:119;;;8102:79;;:::i;:::-;8064:119;8250:1;8239:9;8235:17;8222:31;8280:18;8272:6;8269:30;8266:117;;;8302:79;;:::i;:::-;8266:117;8407:63;8462:7;8453:6;8442:9;8438:22;8407:63;:::i;:::-;8397:73;;8193:287;7978:509;;;;:::o;8493:329::-;8552:6;8601:2;8589:9;8580:7;8576:23;8572:32;8569:119;;;8607:79;;:::i;:::-;8569:119;8727:1;8752:53;8797:7;8788:6;8777:9;8773:22;8752:53;:::i;:::-;8742:63;;8698:117;8493:329;;;;:::o;8828:116::-;8898:21;8913:5;8898:21;:::i;:::-;8891:5;8888:32;8878:60;;8934:1;8931;8924:12;8878:60;8828:116;:::o;8950:133::-;8993:5;9031:6;9018:20;9009:29;;9047:30;9071:5;9047:30;:::i;:::-;8950:133;;;;:::o;9089:468::-;9154:6;9162;9211:2;9199:9;9190:7;9186:23;9182:32;9179:119;;;9217:79;;:::i;:::-;9179:119;9337:1;9362:53;9407:7;9398:6;9387:9;9383:22;9362:53;:::i;:::-;9352:63;;9308:117;9464:2;9490:50;9532:7;9523:6;9512:9;9508:22;9490:50;:::i;:::-;9480:60;;9435:115;9089:468;;;;;:::o;9563:307::-;9624:4;9714:18;9706:6;9703:30;9700:56;;;9736:18;;:::i;:::-;9700:56;9774:29;9796:6;9774:29;:::i;:::-;9766:37;;9858:4;9852;9848:15;9840:23;;9563:307;;;:::o;9876:423::-;9953:5;9978:65;9994:48;10035:6;9994:48;:::i;:::-;9978:65;:::i;:::-;9969:74;;10066:6;10059:5;10052:21;10104:4;10097:5;10093:16;10142:3;10133:6;10128:3;10124:16;10121:25;10118:112;;;10149:79;;:::i;:::-;10118:112;10239:54;10286:6;10281:3;10276;10239:54;:::i;:::-;9959:340;9876:423;;;;;:::o;10318:338::-;10373:5;10422:3;10415:4;10407:6;10403:17;10399:27;10389:122;;10430:79;;:::i;:::-;10389:122;10547:6;10534:20;10572:78;10646:3;10638:6;10631:4;10623:6;10619:17;10572:78;:::i;:::-;10563:87;;10379:277;10318:338;;;;:::o;10662:943::-;10757:6;10765;10773;10781;10830:3;10818:9;10809:7;10805:23;10801:33;10798:120;;;10837:79;;:::i;:::-;10798:120;10957:1;10982:53;11027:7;11018:6;11007:9;11003:22;10982:53;:::i;:::-;10972:63;;10928:117;11084:2;11110:53;11155:7;11146:6;11135:9;11131:22;11110:53;:::i;:::-;11100:63;;11055:118;11212:2;11238:53;11283:7;11274:6;11263:9;11259:22;11238:53;:::i;:::-;11228:63;;11183:118;11368:2;11357:9;11353:18;11340:32;11399:18;11391:6;11388:30;11385:117;;;11421:79;;:::i;:::-;11385:117;11526:62;11580:7;11571:6;11560:9;11556:22;11526:62;:::i;:::-;11516:72;;11311:287;10662:943;;;;;;;:::o;11611:474::-;11679:6;11687;11736:2;11724:9;11715:7;11711:23;11707:32;11704:119;;;11742:79;;:::i;:::-;11704:119;11862:1;11887:53;11932:7;11923:6;11912:9;11908:22;11887:53;:::i;:::-;11877:63;;11833:117;11989:2;12015:53;12060:7;12051:6;12040:9;12036:22;12015:53;:::i;:::-;12005:63;;11960:118;11611:474;;;;;:::o;12091:::-;12159:6;12167;12216:2;12204:9;12195:7;12191:23;12187:32;12184:119;;;12222:79;;:::i;:::-;12184:119;12342:1;12367:53;12412:7;12403:6;12392:9;12388:22;12367:53;:::i;:::-;12357:63;;12313:117;12469:2;12495:53;12540:7;12531:6;12520:9;12516:22;12495:53;:::i;:::-;12485:63;;12440:118;12091:474;;;;;:::o;12571:117::-;12680:1;12677;12670:12;12694:117;12803:1;12800;12793:12;12834:568;12907:8;12917:6;12967:3;12960:4;12952:6;12948:17;12944:27;12934:122;;12975:79;;:::i;:::-;12934:122;13088:6;13075:20;13065:30;;13118:18;13110:6;13107:30;13104:117;;;13140:79;;:::i;:::-;13104:117;13254:4;13246:6;13242:17;13230:29;;13308:3;13300:4;13292:6;13288:17;13278:8;13274:32;13271:41;13268:128;;;13315:79;;:::i;:::-;13268:128;12834:568;;;;;:::o;13425:::-;13498:8;13508:6;13558:3;13551:4;13543:6;13539:17;13535:27;13525:122;;13566:79;;:::i;:::-;13525:122;13679:6;13666:20;13656:30;;13709:18;13701:6;13698:30;13695:117;;;13731:79;;:::i;:::-;13695:117;13845:4;13837:6;13833:17;13821:29;;13899:3;13891:4;13883:6;13879:17;13869:8;13865:32;13862:41;13859:128;;;13906:79;;:::i;:::-;13859:128;13425:568;;;;;:::o;13999:934::-;14121:6;14129;14137;14145;14194:2;14182:9;14173:7;14169:23;14165:32;14162:119;;;14200:79;;:::i;:::-;14162:119;14348:1;14337:9;14333:17;14320:31;14378:18;14370:6;14367:30;14364:117;;;14400:79;;:::i;:::-;14364:117;14513:80;14585:7;14576:6;14565:9;14561:22;14513:80;:::i;:::-;14495:98;;;;14291:312;14670:2;14659:9;14655:18;14642:32;14701:18;14693:6;14690:30;14687:117;;;14723:79;;:::i;:::-;14687:117;14836:80;14908:7;14899:6;14888:9;14884:22;14836:80;:::i;:::-;14818:98;;;;14613:313;13999:934;;;;;;;:::o;14939:180::-;14987:77;14984:1;14977:88;15084:4;15081:1;15074:15;15108:4;15105:1;15098:15;15125:320;15169:6;15206:1;15200:4;15196:12;15186:22;;15253:1;15247:4;15243:12;15274:18;15264:81;;15330:4;15322:6;15318:17;15308:27;;15264:81;15392:2;15384:6;15381:14;15361:18;15358:38;15355:84;;15411:18;;:::i;:::-;15355:84;15176:269;15125:320;;;:::o;15451:442::-;15600:4;15638:2;15627:9;15623:18;15615:26;;15651:71;15719:1;15708:9;15704:17;15695:6;15651:71;:::i;:::-;15732:72;15800:2;15789:9;15785:18;15776:6;15732:72;:::i;:::-;15814;15882:2;15871:9;15867:18;15858:6;15814:72;:::i;:::-;15451:442;;;;;;:::o;15899:141::-;15948:4;15971:3;15963:11;;15994:3;15991:1;15984:14;16028:4;16025:1;16015:18;16007:26;;15899:141;;;:::o;16046:93::-;16083:6;16130:2;16125;16118:5;16114:14;16110:23;16100:33;;16046:93;;;:::o;16145:107::-;16189:8;16239:5;16233:4;16229:16;16208:37;;16145:107;;;;:::o;16258:393::-;16327:6;16377:1;16365:10;16361:18;16400:97;16430:66;16419:9;16400:97;:::i;:::-;16518:39;16548:8;16537:9;16518:39;:::i;:::-;16506:51;;16590:4;16586:9;16579:5;16575:21;16566:30;;16639:4;16629:8;16625:19;16618:5;16615:30;16605:40;;16334:317;;16258:393;;;;;:::o;16657:60::-;16685:3;16706:5;16699:12;;16657:60;;;:::o;16723:142::-;16773:9;16806:53;16824:34;16833:24;16851:5;16833:24;:::i;:::-;16824:34;:::i;:::-;16806:53;:::i;:::-;16793:66;;16723:142;;;:::o;16871:75::-;16914:3;16935:5;16928:12;;16871:75;;;:::o;16952:269::-;17062:39;17093:7;17062:39;:::i;:::-;17123:91;17172:41;17196:16;17172:41;:::i;:::-;17164:6;17157:4;17151:11;17123:91;:::i;:::-;17117:4;17110:105;17028:193;16952:269;;;:::o;17227:73::-;17272:3;17227:73;:::o;17306:189::-;17383:32;;:::i;:::-;17424:65;17482:6;17474;17468:4;17424:65;:::i;:::-;17359:136;17306:189;;:::o;17501:186::-;17561:120;17578:3;17571:5;17568:14;17561:120;;;17632:39;17669:1;17662:5;17632:39;:::i;:::-;17605:1;17598:5;17594:13;17585:22;;17561:120;;;17501:186;;:::o;17693:543::-;17794:2;17789:3;17786:11;17783:446;;;17828:38;17860:5;17828:38;:::i;:::-;17912:29;17930:10;17912:29;:::i;:::-;17902:8;17898:44;18095:2;18083:10;18080:18;18077:49;;;18116:8;18101:23;;18077:49;18139:80;18195:22;18213:3;18195:22;:::i;:::-;18185:8;18181:37;18168:11;18139:80;:::i;:::-;17798:431;;17783:446;17693:543;;;:::o;18242:117::-;18296:8;18346:5;18340:4;18336:16;18315:37;;18242:117;;;;:::o;18365:169::-;18409:6;18442:51;18490:1;18486:6;18478:5;18475:1;18471:13;18442:51;:::i;:::-;18438:56;18523:4;18517;18513:15;18503:25;;18416:118;18365:169;;;;:::o;18539:295::-;18615:4;18761:29;18786:3;18780:4;18761:29;:::i;:::-;18753:37;;18823:3;18820:1;18816:11;18810:4;18807:21;18799:29;;18539:295;;;;:::o;18839:1395::-;18956:37;18989:3;18956:37;:::i;:::-;19058:18;19050:6;19047:30;19044:56;;;19080:18;;:::i;:::-;19044:56;19124:38;19156:4;19150:11;19124:38;:::i;:::-;19209:67;19269:6;19261;19255:4;19209:67;:::i;:::-;19303:1;19327:4;19314:17;;19359:2;19351:6;19348:14;19376:1;19371:618;;;;20033:1;20050:6;20047:77;;;20099:9;20094:3;20090:19;20084:26;20075:35;;20047:77;20150:67;20210:6;20203:5;20150:67;:::i;:::-;20144:4;20137:81;20006:222;19341:887;;19371:618;19423:4;19419:9;19411:6;19407:22;19457:37;19489:4;19457:37;:::i;:::-;19516:1;19530:208;19544:7;19541:1;19538:14;19530:208;;;19623:9;19618:3;19614:19;19608:26;19600:6;19593:42;19674:1;19666:6;19662:14;19652:24;;19721:2;19710:9;19706:18;19693:31;;19567:4;19564:1;19560:12;19555:17;;19530:208;;;19766:6;19757:7;19754:19;19751:179;;;19824:9;19819:3;19815:19;19809:26;19867:48;19909:4;19901:6;19897:17;19886:9;19867:48;:::i;:::-;19859:6;19852:64;19774:156;19751:179;19976:1;19972;19964:6;19960:14;19956:22;19950:4;19943:36;19378:611;;;19341:887;;18931:1303;;;18839:1395;;:::o;20240:173::-;20380:25;20376:1;20368:6;20364:14;20357:49;20240:173;:::o;20419:366::-;20561:3;20582:67;20646:2;20641:3;20582:67;:::i;:::-;20575:74;;20658:93;20747:3;20658:93;:::i;:::-;20776:2;20771:3;20767:12;20760:19;;20419:366;;;:::o;20791:419::-;20957:4;20995:2;20984:9;20980:18;20972:26;;21044:9;21038:4;21034:20;21030:1;21019:9;21015:17;21008:47;21072:131;21198:4;21072:131;:::i;:::-;21064:139;;20791:419;;;:::o;21216:148::-;21318:11;21355:3;21340:18;;21216:148;;;;:::o;21394:874::-;21497:3;21534:5;21528:12;21563:36;21589:9;21563:36;:::i;:::-;21615:89;21697:6;21692:3;21615:89;:::i;:::-;21608:96;;21735:1;21724:9;21720:17;21751:1;21746:166;;;;21926:1;21921:341;;;;21713:549;;21746:166;21830:4;21826:9;21815;21811:25;21806:3;21799:38;21892:6;21885:14;21878:22;21870:6;21866:35;21861:3;21857:45;21850:52;;21746:166;;21921:341;21988:38;22020:5;21988:38;:::i;:::-;22048:1;22062:154;22076:6;22073:1;22070:13;22062:154;;;22150:7;22144:14;22140:1;22135:3;22131:11;22124:35;22200:1;22191:7;22187:15;22176:26;;22098:4;22095:1;22091:12;22086:17;;22062:154;;;22245:6;22240:3;22236:16;22229:23;;21928:334;;21713:549;;21501:767;;21394:874;;;;:::o;22274:390::-;22380:3;22408:39;22441:5;22408:39;:::i;:::-;22463:89;22545:6;22540:3;22463:89;:::i;:::-;22456:96;;22561:65;22619:6;22614:3;22607:4;22600:5;22596:16;22561:65;:::i;:::-;22651:6;22646:3;22642:16;22635:23;;22384:280;22274:390;;;;:::o;22670:155::-;22810:7;22806:1;22798:6;22794:14;22787:31;22670:155;:::o;22831:400::-;22991:3;23012:84;23094:1;23089:3;23012:84;:::i;:::-;23005:91;;23105:93;23194:3;23105:93;:::i;:::-;23223:1;23218:3;23214:11;23207:18;;22831:400;;;:::o;23237:695::-;23515:3;23537:92;23625:3;23616:6;23537:92;:::i;:::-;23530:99;;23646:95;23737:3;23728:6;23646:95;:::i;:::-;23639:102;;23758:148;23902:3;23758:148;:::i;:::-;23751:155;;23923:3;23916:10;;23237:695;;;;;:::o;23938:180::-;24078:32;24074:1;24066:6;24062:14;24055:56;23938:180;:::o;24124:366::-;24266:3;24287:67;24351:2;24346:3;24287:67;:::i;:::-;24280:74;;24363:93;24452:3;24363:93;:::i;:::-;24481:2;24476:3;24472:12;24465:19;;24124:366;;;:::o;24496:419::-;24662:4;24700:2;24689:9;24685:18;24677:26;;24749:9;24743:4;24739:20;24735:1;24724:9;24720:17;24713:47;24777:131;24903:4;24777:131;:::i;:::-;24769:139;;24496:419;;;:::o;24921:171::-;25061:23;25057:1;25049:6;25045:14;25038:47;24921:171;:::o;25098:366::-;25240:3;25261:67;25325:2;25320:3;25261:67;:::i;:::-;25254:74;;25337:93;25426:3;25337:93;:::i;:::-;25455:2;25450:3;25446:12;25439:19;;25098:366;;;:::o;25470:419::-;25636:4;25674:2;25663:9;25659:18;25651:26;;25723:9;25717:4;25713:20;25709:1;25698:9;25694:17;25687:47;25751:131;25877:4;25751:131;:::i;:::-;25743:139;;25470:419;;;:::o;25895:172::-;26035:24;26031:1;26023:6;26019:14;26012:48;25895:172;:::o;26073:366::-;26215:3;26236:67;26300:2;26295:3;26236:67;:::i;:::-;26229:74;;26312:93;26401:3;26312:93;:::i;:::-;26430:2;26425:3;26421:12;26414:19;;26073:366;;;:::o;26445:419::-;26611:4;26649:2;26638:9;26634:18;26626:26;;26698:9;26692:4;26688:20;26684:1;26673:9;26669:17;26662:47;26726:131;26852:4;26726:131;:::i;:::-;26718:139;;26445:419;;;:::o;26870:180::-;26918:77;26915:1;26908:88;27015:4;27012:1;27005:15;27039:4;27036:1;27029:15;27056:175;27196:27;27192:1;27184:6;27180:14;27173:51;27056:175;:::o;27237:366::-;27379:3;27400:67;27464:2;27459:3;27400:67;:::i;:::-;27393:74;;27476:93;27565:3;27476:93;:::i;:::-;27594:2;27589:3;27585:12;27578:19;;27237:366;;;:::o;27609:419::-;27775:4;27813:2;27802:9;27798:18;27790:26;;27862:9;27856:4;27852:20;27848:1;27837:9;27833:17;27826:47;27890:131;28016:4;27890:131;:::i;:::-;27882:139;;27609:419;;;:::o;28034:172::-;28174:24;28170:1;28162:6;28158:14;28151:48;28034:172;:::o;28212:366::-;28354:3;28375:67;28439:2;28434:3;28375:67;:::i;:::-;28368:74;;28451:93;28540:3;28451:93;:::i;:::-;28569:2;28564:3;28560:12;28553:19;;28212:366;;;:::o;28584:419::-;28750:4;28788:2;28777:9;28773:18;28765:26;;28837:9;28831:4;28827:20;28823:1;28812:9;28808:17;28801:47;28865:131;28991:4;28865:131;:::i;:::-;28857:139;;28584:419;;;:::o;29009:180::-;29057:77;29054:1;29047:88;29154:4;29151:1;29144:15;29178:4;29175:1;29168:15;29195:180;29243:77;29240:1;29233:88;29340:4;29337:1;29330:15;29364:4;29361:1;29354:15;29381:185;29421:1;29438:20;29456:1;29438:20;:::i;:::-;29433:25;;29472:20;29490:1;29472:20;:::i;:::-;29467:25;;29511:1;29501:35;;29516:18;;:::i;:::-;29501:35;29558:1;29555;29551:9;29546:14;;29381:185;;;;:::o;29572:194::-;29612:4;29632:20;29650:1;29632:20;:::i;:::-;29627:25;;29666:20;29684:1;29666:20;:::i;:::-;29661:25;;29710:1;29707;29703:9;29695:17;;29734:1;29728:4;29725:11;29722:37;;;29739:18;;:::i;:::-;29722:37;29572:194;;;;:::o;29772:191::-;29812:3;29831:20;29849:1;29831:20;:::i;:::-;29826:25;;29865:20;29883:1;29865:20;:::i;:::-;29860:25;;29908:1;29905;29901:9;29894:16;;29929:3;29926:1;29923:10;29920:36;;;29936:18;;:::i;:::-;29920:36;29772:191;;;;:::o;29969:221::-;30109:34;30105:1;30097:6;30093:14;30086:58;30178:4;30173:2;30165:6;30161:15;30154:29;29969:221;:::o;30196:366::-;30338:3;30359:67;30423:2;30418:3;30359:67;:::i;:::-;30352:74;;30435:93;30524:3;30435:93;:::i;:::-;30553:2;30548:3;30544:12;30537:19;;30196:366;;;:::o;30568:529::-;30762:4;30800:2;30789:9;30785:18;30777:26;;30813:71;30881:1;30870:9;30866:17;30857:6;30813:71;:::i;:::-;30931:9;30925:4;30921:20;30916:2;30905:9;30901:18;30894:48;30959:131;31085:4;30959:131;:::i;:::-;30951:139;;30568:529;;;;:::o;31103:233::-;31142:3;31165:24;31183:5;31165:24;:::i;:::-;31156:33;;31211:66;31204:5;31201:77;31198:103;;31281:18;;:::i;:::-;31198:103;31328:1;31321:5;31317:13;31310:20;;31103:233;;;:::o;31342:98::-;31393:6;31427:5;31421:12;31411:22;;31342:98;;;:::o;31446:168::-;31529:11;31563:6;31558:3;31551:19;31603:4;31598:3;31594:14;31579:29;;31446:168;;;;:::o;31620:373::-;31706:3;31734:38;31766:5;31734:38;:::i;:::-;31788:70;31851:6;31846:3;31788:70;:::i;:::-;31781:77;;31867:65;31925:6;31920:3;31913:4;31906:5;31902:16;31867:65;:::i;:::-;31957:29;31979:6;31957:29;:::i;:::-;31952:3;31948:39;31941:46;;31710:283;31620:373;;;;:::o;31999:640::-;32194:4;32232:3;32221:9;32217:19;32209:27;;32246:71;32314:1;32303:9;32299:17;32290:6;32246:71;:::i;:::-;32327:72;32395:2;32384:9;32380:18;32371:6;32327:72;:::i;:::-;32409;32477:2;32466:9;32462:18;32453:6;32409:72;:::i;:::-;32528:9;32522:4;32518:20;32513:2;32502:9;32498:18;32491:48;32556:76;32627:4;32618:6;32556:76;:::i;:::-;32548:84;;31999:640;;;;;;;:::o;32645:141::-;32701:5;32732:6;32726:13;32717:22;;32748:32;32774:5;32748:32;:::i;:::-;32645:141;;;;:::o;32792:349::-;32861:6;32910:2;32898:9;32889:7;32885:23;32881:32;32878:119;;;32916:79;;:::i;:::-;32878:119;33036:1;33061:63;33116:7;33107:6;33096:9;33092:22;33061:63;:::i;:::-;33051:73;;33007:127;32792:349;;;;:::o;33147:168::-;33287:20;33283:1;33275:6;33271:14;33264:44;33147:168;:::o;33321:366::-;33463:3;33484:67;33548:2;33543:3;33484:67;:::i;:::-;33477:74;;33560:93;33649:3;33560:93;:::i;:::-;33678:2;33673:3;33669:12;33662:19;;33321:366;;;:::o;33693:419::-;33859:4;33897:2;33886:9;33882:18;33874:26;;33946:9;33940:4;33936:20;33932:1;33921:9;33917:17;33910:47;33974:131;34100:4;33974:131;:::i;:::-;33966:139;;33693:419;;;:::o;34118:79::-;34157:7;34186:5;34175:16;;34118:79;;;:::o;34203:157::-;34308:45;34328:24;34346:5;34328:24;:::i;:::-;34308:45;:::i;:::-;34303:3;34296:58;34203:157;;:::o;34366:94::-;34399:8;34447:5;34443:2;34439:14;34418:35;;34366:94;;;:::o;34466:::-;34505:7;34534:20;34548:5;34534:20;:::i;:::-;34523:31;;34466:94;;;:::o;34566:100::-;34605:7;34634:26;34654:5;34634:26;:::i;:::-;34623:37;;34566:100;;;:::o;34672:157::-;34777:45;34797:24;34815:5;34797:24;:::i;:::-;34777:45;:::i;:::-;34772:3;34765:58;34672:157;;:::o;34835:961::-;35087:3;35102:75;35173:3;35164:6;35102:75;:::i;:::-;35202:2;35197:3;35193:12;35186:19;;35215:75;35286:3;35277:6;35215:75;:::i;:::-;35315:2;35310:3;35306:12;35299:19;;35328:75;35399:3;35390:6;35328:75;:::i;:::-;35428:2;35423:3;35419:12;35412:19;;35441:75;35512:3;35503:6;35441:75;:::i;:::-;35541:2;35536:3;35532:12;35525:19;;35554:75;35625:3;35616:6;35554:75;:::i;:::-;35654:2;35649:3;35645:12;35638:19;;35667:75;35738:3;35729:6;35667:75;:::i;:::-;35767:2;35762:3;35758:12;35751:19;;35787:3;35780:10;;34835:961;;;;;;;;;:::o;35802:176::-;35834:1;35851:20;35869:1;35851:20;:::i;:::-;35846:25;;35885:20;35903:1;35885:20;:::i;:::-;35880:25;;35924:1;35914:35;;35929:18;;:::i;:::-;35914:35;35970:1;35967;35963:9;35958:14;;35802:176;;;;:::o;35984:397::-;36124:3;36139:75;36210:3;36201:6;36139:75;:::i;:::-;36239:2;36234:3;36230:12;36223:19;;36252:75;36323:3;36314:6;36252:75;:::i;:::-;36352:2;36347:3;36343:12;36336:19;;36372:3;36365:10;;35984:397;;;;;:::o;36387:332::-;36508:4;36546:2;36535:9;36531:18;36523:26;;36559:71;36627:1;36616:9;36612:17;36603:6;36559:71;:::i;:::-;36640:72;36708:2;36697:9;36693:18;36684:6;36640:72;:::i;:::-;36387:332;;;;;:::o
Swarm Source
ipfs://8374f8073ead4ae203a8a582bbd1b0816e09b4615958a44c3692b5cc0406055c
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.