Overview
ETH Balance
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
YouhodlerToken
Compiler Version
v0.8.27+commit.40a35a09
Contract Source Code (Solidity)
/** *Submitted for verification at lineascan.build/ on 2024-12-05 */ // Sources flattened with hardhat v2.22.15 https://hardhat.org // SPDX-License-Identifier: MIT // File @openzeppelin/contracts-upgradeable/proxy/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } } // File @openzeppelin/contracts-upgradeable/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File @openzeppelin/contracts-upgradeable/access/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File @openzeppelin/contracts/interfaces/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); } // File @openzeppelin/contracts/token/ERC20/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; /** * @dev Interface for the optional metadata functions from the ERC-20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File @openzeppelin/contracts-upgradeable/token/ERC20/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC-20 * applications. */ abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 struct ERC20Storage { mapping(address account => uint256) _balances; mapping(address account => mapping(address spender => uint256)) _allowances; uint256 _totalSupply; string _name; string _symbol; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; function _getERC20Storage() private pure returns (ERC20Storage storage $) { assembly { $.slot := ERC20StorageLocation } } /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { ERC20Storage storage $ = _getERC20Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows $._totalSupply += value; } else { uint256 fromBalance = $._balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. $._balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. $._totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. $._balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * * ```solidity * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } $._allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } } // File @openzeppelin/contracts-upgradeable/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.20; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { function __ERC20Burnable_init() internal onlyInitializing { } function __ERC20Burnable_init_unchained() internal onlyInitializing { } /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } } // File @openzeppelin/contracts/interfaces/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) pragma solidity ^0.8.20; /** * @dev Helper library for emitting standardized panic codes. * * ```solidity * contract Example { * using Panic for uint256; * * // Use any of the declared internal constants * function foo() { Panic.GENERIC.panic(); } * * // Alternatively * function foo() { Panic.panic(Panic.GENERIC); } * } * ``` * * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * * _Available since v5.1._ */ // slither-disable-next-line unused-state library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2²⁵⁶ + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @dev Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Variant of {modExp} that supports inputs of arbitrary length. */ function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { (bool success, bytes memory result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Variant of {tryModExp} that supports inputs of arbitrary length. */ function tryModExp( bytes memory b, bytes memory e, bytes memory m ) internal view returns (bool success, bytes memory result) { if (_zeroBytes(m)) return (false, new bytes(0)); uint256 mLen = m.length; // Encode call args in result and move the free memory pointer result = abi.encodePacked(b.length, e.length, mLen, b, e, m); assembly ("memory-safe") { let dataPtr := add(result, 0x20) // Write result on top of args to avoid allocating extra memory. success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) // Overwrite the length. // result.length > returndatasize() is guaranteed because returndatasize() == m.length mstore(result, mLen) // Set the memory pointer after the returned data. mstore(0x40, add(dataPtr, mLen)) } } /** * @dev Returns whether the provided byte array is zero. */ function _zeroBytes(bytes memory byteArray) private pure returns (bool) { for (uint256 i = 0; i < byteArray.length; ++i) { if (byteArray[i] != 0) { return false; } } return true; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 1); } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 1); } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Strings.sol) pragma solidity ^0.8.20; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; assembly ("memory-safe") { ptr := add(buffer, add(32, length)) } while (true) { ptr--; assembly ("memory-safe") { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal * representation, according to EIP-55. */ function toChecksumHexString(address addr) internal pure returns (string memory) { bytes memory buffer = bytes(toHexString(addr)); // hash the hex part of buffer (skip length + 2 bytes, length 40) uint256 hashValue; assembly ("memory-safe") { hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) } for (uint256 i = 41; i > 1; --i) { // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { // case shift by xoring with 0x20 buffer[i] ^= 0x20; } hashValue >>= 4; } return string(buffer); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { assembly ("memory-safe") { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { assembly ("memory-safe") { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } } // File @openzeppelin/contracts-upgradeable/utils/cryptography/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. */ abstract contract EIP712Upgradeable is Initializable, IERC5267 { bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /// @custom:storage-location erc7201:openzeppelin.storage.EIP712 struct EIP712Storage { /// @custom:oz-renamed-from _HASHED_NAME bytes32 _hashedName; /// @custom:oz-renamed-from _HASHED_VERSION bytes32 _hashedVersion; string _name; string _version; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.EIP712")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100; function _getEIP712Storage() private pure returns (EIP712Storage storage $) { assembly { $.slot := EIP712StorageLocation } } /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { EIP712Storage storage $ = _getEIP712Storage(); $._name = name; $._version = version; // Reset prior values in storage if upgrading $._hashedName = 0; $._hashedVersion = 0; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(); } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { EIP712Storage storage $ = _getEIP712Storage(); // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized // and the EIP712 domain is not reliable, as it will be missing name and version. require($._hashedName == 0 && $._hashedVersion == 0, "EIP712: Uninitialized"); return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Name() internal view virtual returns (string memory) { EIP712Storage storage $ = _getEIP712Storage(); return $._name; } /** * @dev The version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Version() internal view virtual returns (string memory) { EIP712Storage storage $ = _getEIP712Storage(); return $._version; } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead. */ function _EIP712NameHash() internal view returns (bytes32) { EIP712Storage storage $ = _getEIP712Storage(); string memory name = _EIP712Name(); if (bytes(name).length > 0) { return keccak256(bytes(name)); } else { // If the name is empty, the contract may have been upgraded without initializing the new storage. // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design. bytes32 hashedName = $._hashedName; if (hashedName != 0) { return hashedName; } else { return keccak256(""); } } } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead. */ function _EIP712VersionHash() internal view returns (bytes32) { EIP712Storage storage $ = _getEIP712Storage(); string memory version = _EIP712Version(); if (bytes(version).length > 0) { return keccak256(bytes(version)); } else { // If the version is empty, the contract may have been upgraded without initializing the new storage. // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design. bytes32 hashedVersion = $._hashedVersion; if (hashedVersion != 0) { return hashedVersion; } else { return keccak256(""); } } } } // File @openzeppelin/contracts-upgradeable/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract NoncesUpgradeable is Initializable { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); /// @custom:storage-location erc7201:openzeppelin.storage.Nonces struct NoncesStorage { mapping(address account => uint256) _nonces; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Nonces")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00; function _getNoncesStorage() private pure returns (NoncesStorage storage $) { assembly { $.slot := NoncesStorageLocation } } function __Nonces_init() internal onlyInitializing { } function __Nonces_init_unchained() internal onlyInitializing { } /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { NoncesStorage storage $ = _getNoncesStorage(); return $._nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { NoncesStorage storage $ = _getNoncesStorage(); // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return $._nonces[owner]++; } } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } } } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // File @openzeppelin/contracts/utils/cryptography/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover( bytes32 hash, bytes memory signature ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly ("memory-safe") { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures] */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } } // File @openzeppelin/contracts-upgradeable/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable { bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Permit deadline has expired. */ error ERC2612ExpiredSignature(uint256 deadline); /** * @dev Mismatched signature. */ error ERC2612InvalidSigner(address signer, address owner); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC-20 token name. */ function __ERC20Permit_init(string memory name) internal onlyInitializing { __EIP712_init_unchained(name, "1"); } function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} /** * @inheritdoc IERC20Permit */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > deadline) { revert ERC2612ExpiredSignature(deadline); } bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); if (signer != owner) { revert ERC2612InvalidSigner(signer, owner); } _approve(owner, spender, value); } /** * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) { return super.nonces(owner); } /** * @inheritdoc IERC20Permit */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); } } // File contracts/YouHodlerToken.sol // Original license: SPDX_License_Identifier: MIT pragma solidity ^0.8.0; contract YouhodlerToken is Initializable, ERC20Upgradeable, ERC20PermitUpgradeable, ERC20BurnableUpgradeable, OwnableUpgradeable { uint256 public constant MAX_SUPPLY = 1_000_000_000 * 10 ** 18; function initialize(address initialOwner) public initializer { __ERC20_init("Youhodler Token", "YHDL"); __ERC20Burnable_init(); __ERC20Permit_init("Youhodler Token"); __Ownable_init(initialOwner); } function mint(address to, uint256 amount) public onlyOwner { require(totalSupply() + amount <= MAX_SUPPLY, "YouhodlerToken: Max supply exceeded"); _mint(to, amount); } // Функция burn унаследована от ERC20BurnableUpgradeable }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","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":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","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":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015600f57600080fd5b50612ac68061001f6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063715018a6116100b857806395d89b411161007c57806395d89b4114610332578063a9059cbb14610350578063c4d66de814610380578063d505accf1461039c578063dd62ed3e146103b8578063f2fde38b146103e857610137565b8063715018a61461029a57806379cc6790146102a45780637ecebe00146102c057806384b0196e146102f05780638da5cb5b1461031457610137565b806332cb6b0c116100ff57806332cb6b0c146101f65780633644e5151461021457806340c10f191461023257806342966c681461024e57806370a082311461026a57610137565b806306fdde031461013c578063095ea7b31461015a57806318160ddd1461018a57806323b872dd146101a8578063313ce567146101d8575b600080fd5b610144610404565b6040516101519190611edc565b60405180910390f35b610174600480360381019061016f9190611f97565b6104a5565b6040516101819190611ff2565b60405180910390f35b6101926104c8565b60405161019f919061201c565b60405180910390f35b6101c260048036038101906101bd9190612037565b6104e0565b6040516101cf9190611ff2565b60405180910390f35b6101e061050f565b6040516101ed91906120a6565b60405180910390f35b6101fe610518565b60405161020b919061201c565b60405180910390f35b61021c610528565b60405161022991906120da565b60405180910390f35b61024c60048036038101906102479190611f97565b610537565b005b610268600480360381019061026391906120f5565b6105ae565b005b610284600480360381019061027f9190612122565b6105c2565b604051610291919061201c565b60405180910390f35b6102a2610619565b005b6102be60048036038101906102b99190611f97565b61062d565b005b6102da60048036038101906102d59190612122565b61064d565b6040516102e7919061201c565b60405180910390f35b6102f861065f565b60405161030b9796959493929190612257565b60405180910390f35b61031c610771565b60405161032991906122db565b60405180910390f35b61033a6107a9565b6040516103479190611edc565b60405180910390f35b61036a60048036038101906103659190611f97565b61084a565b6040516103779190611ff2565b60405180910390f35b61039a60048036038101906103959190612122565b61086d565b005b6103b660048036038101906103b1919061234e565b610ab6565b005b6103d260048036038101906103cd91906123f0565b610bfe565b6040516103df919061201c565b60405180910390f35b61040260048036038101906103fd9190612122565b610c93565b005b60606000610410610d19565b90508060030180546104219061245f565b80601f016020809104026020016040519081016040528092919081815260200182805461044d9061245f565b801561049a5780601f1061046f5761010080835404028352916020019161049a565b820191906000526020600020905b81548152906001019060200180831161047d57829003601f168201915b505050505091505090565b6000806104b0610d41565b90506104bd818585610d49565b600191505092915050565b6000806104d3610d19565b9050806002015491505090565b6000806104eb610d41565b90506104f8858285610d5b565b610503858585610def565b60019150509392505050565b60006012905090565b6b033b2e3c9fd0803ce800000081565b6000610532610ee3565b905090565b61053f610ef2565b6b033b2e3c9fd0803ce8000000816105556104c8565b61055f91906124bf565b11156105a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059790612565565b60405180910390fd5b6105aa8282610f79565b5050565b6105bf6105b9610d41565b82610ffb565b50565b6000806105cd610d19565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915050919050565b610621610ef2565b61062b600061107d565b565b61063f82610639610d41565b83610d5b565b6106498282610ffb565b5050565b600061065882611154565b9050919050565b60006060806000806000606060006106756111ab565b90506000801b816000015414801561069357506000801b8160010154145b6106d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c9906125d1565b60405180910390fd5b6106da6111d3565b6106e2611274565b46306000801b600067ffffffffffffffff811115610703576107026125f1565b5b6040519080825280602002602001820160405280156107315781602001602082028036833780820191505090505b507f0f0000000000000000000000000000000000000000000000000000000000000095949392919097509750975097509750975097505090919293949596565b60008061077c611315565b90508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b606060006107b5610d19565b90508060040180546107c69061245f565b80601f01602080910402602001604051908101604052809291908181526020018280546107f29061245f565b801561083f5780601f106108145761010080835404028352916020019161083f565b820191906000526020600020905b81548152906001019060200180831161082257829003601f168201915b505050505091505090565b600080610855610d41565b9050610862818585610def565b600191505092915050565b600061087761133d565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff161480156108c55750825b9050600060018367ffffffffffffffff161480156108fa575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610908575080155b1561093f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550831561098f5760018560000160086101000a81548160ff0219169083151502179055505b610a036040518060400160405280600f81526020017f596f75686f646c657220546f6b656e00000000000000000000000000000000008152506040518060400160405280600481526020017f5948444c00000000000000000000000000000000000000000000000000000000815250611365565b610a0b61137b565b610a496040518060400160405280600f81526020017f596f75686f646c657220546f6b656e0000000000000000000000000000000000815250611385565b610a52866113cf565b8315610aae5760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26001604051610aa59190612679565b60405180910390a15b505050505050565b83421115610afb57836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610af2919061201c565b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b2a8c6113e3565b89604051602001610b4096959493929190612694565b6040516020818303038152906040528051906020012090506000610b6382611448565b90506000610b7382878787611462565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610be757808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610bde9291906126f5565b60405180910390fd5b610bf28a8a8a610d49565b50505050505050505050565b600080610c09610d19565b90508060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491505092915050565b610c9b610ef2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d0d5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d0491906122db565b60405180910390fd5b610d168161107d565b50565b60007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00905090565b600033905090565b610d568383836001611492565b505050565b6000610d678484610bfe565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610de95781811015610dd9578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610dd09392919061271e565b60405180910390fd5b610de884848484036000611492565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e615760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610e5891906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ed35760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610eca91906122db565b60405180910390fd5b610ede838383611678565b505050565b6000610eed6118b7565b905090565b610efa610d41565b73ffffffffffffffffffffffffffffffffffffffff16610f18610771565b73ffffffffffffffffffffffffffffffffffffffff1614610f7757610f3b610d41565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610f6e91906122db565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610feb5760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610fe291906122db565b60405180910390fd5b610ff760008383611678565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361106d5760006040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260040161106491906122db565b60405180910390fd5b61107982600083611678565b5050565b6000611087611315565b905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60008061115f61191b565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915050919050565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100905090565b606060006111df6111ab565b90508060020180546111f09061245f565b80601f016020809104026020016040519081016040528092919081815260200182805461121c9061245f565b80156112695780601f1061123e57610100808354040283529160200191611269565b820191906000526020600020905b81548152906001019060200180831161124c57829003601f168201915b505050505091505090565b606060006112806111ab565b90508060030180546112919061245f565b80601f01602080910402602001604051908101604052809291908181526020018280546112bd9061245f565b801561130a5780601f106112df5761010080835404028352916020019161130a565b820191906000526020600020905b8154815290600101906020018083116112ed57829003601f168201915b505050505091505090565b60007f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b61136d611943565b6113778282611983565b5050565b611383611943565b565b61138d611943565b6113cc816040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506119c0565b50565b6113d7611943565b6113e081611a15565b50565b6000806113ee61191b565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055915050919050565b600061145b611455610ee3565b83611a9b565b9050919050565b60008060008061147488888888611adc565b9250925092506114848282611bd0565b829350505050949350505050565b600061149c610d19565b9050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115105760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161150791906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036115825760006040517f94280d6200000000000000000000000000000000000000000000000000000000815260040161157991906122db565b60405180910390fd5b828160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508115611671578373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051611668919061201c565b60405180910390a35b5050505050565b6000611682610d19565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036116d857818160020160008282546116cc91906124bf565b925050819055506117b1565b60008160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611767578481846040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161175e9392919061271e565b60405180910390fd5b8281038260000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036117fc5781816002016000828254039250508190555061184c565b818160000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118a9919061201c565b60405180910390a350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6118e2611d34565b6118ea611db0565b4630604051602001611900959493929190612755565b60405160208183030381529060405280519060200120905090565b60007f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00905090565b61194b611e2c565b611981576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61198b611943565b6000611995610d19565b9050828160030190816119a8919061294a565b50818160040190816119ba919061294a565b50505050565b6119c8611943565b60006119d26111ab565b9050828160020190816119e5919061294a565b50818160030190816119f7919061294a565b506000801b81600001819055506000801b8160010181905550505050565b611a1d611943565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8f5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611a8691906122db565b60405180910390fd5b611a988161107d565b50565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611b1c576000600385925092509250611bc6565b600060018888888860405160008152602001604052604051611b419493929190612a1c565b6020604051602081039080840390855afa158015611b63573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611bb757600060016000801b93509350935050611bc6565b8060008060001b935093509350505b9450945094915050565b60006003811115611be457611be3612a61565b5b826003811115611bf757611bf6612a61565b5b0315611d305760016003811115611c1157611c10612a61565b5b826003811115611c2457611c23612a61565b5b03611c5b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611c6f57611c6e612a61565b5b826003811115611c8257611c81612a61565b5b03611cc7578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611cbe919061201c565b60405180910390fd5b600380811115611cda57611cd9612a61565b5b826003811115611ced57611cec612a61565b5b03611d2f57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611d2691906120da565b60405180910390fd5b5b5050565b600080611d3f6111ab565b90506000611d4b6111d3565b9050600081511115611d6857808051906020012092505050611dad565b6000826000015490506000801b8114611d8657809350505050611dad565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47093505050505b90565b600080611dbb6111ab565b90506000611dc7611274565b9050600081511115611de457808051906020012092505050611e29565b6000826001015490506000801b8114611e0257809350505050611e29565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47093505050505b90565b6000611e3661133d565b60000160089054906101000a900460ff16905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e86578082015181840152602081019050611e6b565b60008484015250505050565b6000601f19601f8301169050919050565b6000611eae82611e4c565b611eb88185611e57565b9350611ec8818560208601611e68565b611ed181611e92565b840191505092915050565b60006020820190508181036000830152611ef68184611ea3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f2e82611f03565b9050919050565b611f3e81611f23565b8114611f4957600080fd5b50565b600081359050611f5b81611f35565b92915050565b6000819050919050565b611f7481611f61565b8114611f7f57600080fd5b50565b600081359050611f9181611f6b565b92915050565b60008060408385031215611fae57611fad611efe565b5b6000611fbc85828601611f4c565b9250506020611fcd85828601611f82565b9150509250929050565b60008115159050919050565b611fec81611fd7565b82525050565b60006020820190506120076000830184611fe3565b92915050565b61201681611f61565b82525050565b6000602082019050612031600083018461200d565b92915050565b6000806000606084860312156120505761204f611efe565b5b600061205e86828701611f4c565b935050602061206f86828701611f4c565b925050604061208086828701611f82565b9150509250925092565b600060ff82169050919050565b6120a08161208a565b82525050565b60006020820190506120bb6000830184612097565b92915050565b6000819050919050565b6120d4816120c1565b82525050565b60006020820190506120ef60008301846120cb565b92915050565b60006020828403121561210b5761210a611efe565b5b600061211984828501611f82565b91505092915050565b60006020828403121561213857612137611efe565b5b600061214684828501611f4c565b91505092915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6121848161214f565b82525050565b61219381611f23565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6121ce81611f61565b82525050565b60006121e083836121c5565b60208301905092915050565b6000602082019050919050565b600061220482612199565b61220e81856121a4565b9350612219836121b5565b8060005b8381101561224a57815161223188826121d4565b975061223c836121ec565b92505060018101905061221d565b5085935050505092915050565b600060e08201905061226c600083018a61217b565b818103602083015261227e8189611ea3565b905081810360408301526122928188611ea3565b90506122a1606083018761200d565b6122ae608083018661218a565b6122bb60a08301856120cb565b81810360c08301526122cd81846121f9565b905098975050505050505050565b60006020820190506122f0600083018461218a565b92915050565b6122ff8161208a565b811461230a57600080fd5b50565b60008135905061231c816122f6565b92915050565b61232b816120c1565b811461233657600080fd5b50565b60008135905061234881612322565b92915050565b600080600080600080600060e0888a03121561236d5761236c611efe565b5b600061237b8a828b01611f4c565b975050602061238c8a828b01611f4c565b965050604061239d8a828b01611f82565b95505060606123ae8a828b01611f82565b94505060806123bf8a828b0161230d565b93505060a06123d08a828b01612339565b92505060c06123e18a828b01612339565b91505092959891949750929550565b6000806040838503121561240757612406611efe565b5b600061241585828601611f4c565b925050602061242685828601611f4c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061247757607f821691505b60208210810361248a57612489612430565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006124ca82611f61565b91506124d583611f61565b92508282019050808211156124ed576124ec612490565b5b92915050565b7f596f75686f646c6572546f6b656e3a204d617820737570706c7920657863656560008201527f6465640000000000000000000000000000000000000000000000000000000000602082015250565b600061254f602383611e57565b915061255a826124f3565b604082019050919050565b6000602082019050818103600083015261257e81612542565b9050919050565b7f4549503731323a20556e696e697469616c697a65640000000000000000000000600082015250565b60006125bb601583611e57565b91506125c682612585565b602082019050919050565b600060208201905081810360008301526125ea816125ae565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000819050919050565b600067ffffffffffffffff82169050919050565b6000819050919050565b600061266361265e61265984612620565b61263e565b61262a565b9050919050565b61267381612648565b82525050565b600060208201905061268e600083018461266a565b92915050565b600060c0820190506126a960008301896120cb565b6126b6602083018861218a565b6126c3604083018761218a565b6126d0606083018661200d565b6126dd608083018561200d565b6126ea60a083018461200d565b979650505050505050565b600060408201905061270a600083018561218a565b612717602083018461218a565b9392505050565b6000606082019050612733600083018661218a565b612740602083018561200d565b61274d604083018461200d565b949350505050565b600060a08201905061276a60008301886120cb565b61277760208301876120cb565b61278460408301866120cb565b612791606083018561200d565b61279e608083018461218a565b9695505050505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261280a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826127cd565b61281486836127cd565b95508019841693508086168417925050509392505050565b600061284761284261283d84611f61565b61263e565b611f61565b9050919050565b6000819050919050565b6128618361282c565b61287561286d8261284e565b8484546127da565b825550505050565b600090565b61288a61287d565b612895818484612858565b505050565b5b818110156128b9576128ae600082612882565b60018101905061289b565b5050565b601f8211156128fe576128cf816127a8565b6128d8846127bd565b810160208510156128e7578190505b6128fb6128f3856127bd565b83018261289a565b50505b505050565b600082821c905092915050565b600061292160001984600802612903565b1980831691505092915050565b600061293a8383612910565b9150826002028217905092915050565b61295382611e4c565b67ffffffffffffffff81111561296c5761296b6125f1565b5b612976825461245f565b6129818282856128bd565b600060209050601f8311600181146129b457600084156129a2578287015190505b6129ac858261292e565b865550612a14565b601f1984166129c2866127a8565b60005b828110156129ea578489015182556001820191506020850194506020810190506129c5565b86831015612a075784890151612a03601f891682612910565b8355505b6001600288020188555050505b505050505050565b6000608082019050612a3160008301876120cb565b612a3e6020830186612097565b612a4b60408301856120cb565b612a5860608301846120cb565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea26469706673582212205603e6e5545c6907975851469dfeab6db486d2773cbf1da4f0495525196bfb5864736f6c634300081b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c8063715018a6116100b857806395d89b411161007c57806395d89b4114610332578063a9059cbb14610350578063c4d66de814610380578063d505accf1461039c578063dd62ed3e146103b8578063f2fde38b146103e857610137565b8063715018a61461029a57806379cc6790146102a45780637ecebe00146102c057806384b0196e146102f05780638da5cb5b1461031457610137565b806332cb6b0c116100ff57806332cb6b0c146101f65780633644e5151461021457806340c10f191461023257806342966c681461024e57806370a082311461026a57610137565b806306fdde031461013c578063095ea7b31461015a57806318160ddd1461018a57806323b872dd146101a8578063313ce567146101d8575b600080fd5b610144610404565b6040516101519190611edc565b60405180910390f35b610174600480360381019061016f9190611f97565b6104a5565b6040516101819190611ff2565b60405180910390f35b6101926104c8565b60405161019f919061201c565b60405180910390f35b6101c260048036038101906101bd9190612037565b6104e0565b6040516101cf9190611ff2565b60405180910390f35b6101e061050f565b6040516101ed91906120a6565b60405180910390f35b6101fe610518565b60405161020b919061201c565b60405180910390f35b61021c610528565b60405161022991906120da565b60405180910390f35b61024c60048036038101906102479190611f97565b610537565b005b610268600480360381019061026391906120f5565b6105ae565b005b610284600480360381019061027f9190612122565b6105c2565b604051610291919061201c565b60405180910390f35b6102a2610619565b005b6102be60048036038101906102b99190611f97565b61062d565b005b6102da60048036038101906102d59190612122565b61064d565b6040516102e7919061201c565b60405180910390f35b6102f861065f565b60405161030b9796959493929190612257565b60405180910390f35b61031c610771565b60405161032991906122db565b60405180910390f35b61033a6107a9565b6040516103479190611edc565b60405180910390f35b61036a60048036038101906103659190611f97565b61084a565b6040516103779190611ff2565b60405180910390f35b61039a60048036038101906103959190612122565b61086d565b005b6103b660048036038101906103b1919061234e565b610ab6565b005b6103d260048036038101906103cd91906123f0565b610bfe565b6040516103df919061201c565b60405180910390f35b61040260048036038101906103fd9190612122565b610c93565b005b60606000610410610d19565b90508060030180546104219061245f565b80601f016020809104026020016040519081016040528092919081815260200182805461044d9061245f565b801561049a5780601f1061046f5761010080835404028352916020019161049a565b820191906000526020600020905b81548152906001019060200180831161047d57829003601f168201915b505050505091505090565b6000806104b0610d41565b90506104bd818585610d49565b600191505092915050565b6000806104d3610d19565b9050806002015491505090565b6000806104eb610d41565b90506104f8858285610d5b565b610503858585610def565b60019150509392505050565b60006012905090565b6b033b2e3c9fd0803ce800000081565b6000610532610ee3565b905090565b61053f610ef2565b6b033b2e3c9fd0803ce8000000816105556104c8565b61055f91906124bf565b11156105a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059790612565565b60405180910390fd5b6105aa8282610f79565b5050565b6105bf6105b9610d41565b82610ffb565b50565b6000806105cd610d19565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915050919050565b610621610ef2565b61062b600061107d565b565b61063f82610639610d41565b83610d5b565b6106498282610ffb565b5050565b600061065882611154565b9050919050565b60006060806000806000606060006106756111ab565b90506000801b816000015414801561069357506000801b8160010154145b6106d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c9906125d1565b60405180910390fd5b6106da6111d3565b6106e2611274565b46306000801b600067ffffffffffffffff811115610703576107026125f1565b5b6040519080825280602002602001820160405280156107315781602001602082028036833780820191505090505b507f0f0000000000000000000000000000000000000000000000000000000000000095949392919097509750975097509750975097505090919293949596565b60008061077c611315565b90508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b606060006107b5610d19565b90508060040180546107c69061245f565b80601f01602080910402602001604051908101604052809291908181526020018280546107f29061245f565b801561083f5780601f106108145761010080835404028352916020019161083f565b820191906000526020600020905b81548152906001019060200180831161082257829003601f168201915b505050505091505090565b600080610855610d41565b9050610862818585610def565b600191505092915050565b600061087761133d565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff161480156108c55750825b9050600060018367ffffffffffffffff161480156108fa575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610908575080155b1561093f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550831561098f5760018560000160086101000a81548160ff0219169083151502179055505b610a036040518060400160405280600f81526020017f596f75686f646c657220546f6b656e00000000000000000000000000000000008152506040518060400160405280600481526020017f5948444c00000000000000000000000000000000000000000000000000000000815250611365565b610a0b61137b565b610a496040518060400160405280600f81526020017f596f75686f646c657220546f6b656e0000000000000000000000000000000000815250611385565b610a52866113cf565b8315610aae5760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26001604051610aa59190612679565b60405180910390a15b505050505050565b83421115610afb57836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610af2919061201c565b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b2a8c6113e3565b89604051602001610b4096959493929190612694565b6040516020818303038152906040528051906020012090506000610b6382611448565b90506000610b7382878787611462565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610be757808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610bde9291906126f5565b60405180910390fd5b610bf28a8a8a610d49565b50505050505050505050565b600080610c09610d19565b90508060010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491505092915050565b610c9b610ef2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d0d5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d0491906122db565b60405180910390fd5b610d168161107d565b50565b60007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00905090565b600033905090565b610d568383836001611492565b505050565b6000610d678484610bfe565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610de95781811015610dd9578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610dd09392919061271e565b60405180910390fd5b610de884848484036000611492565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e615760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610e5891906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ed35760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610eca91906122db565b60405180910390fd5b610ede838383611678565b505050565b6000610eed6118b7565b905090565b610efa610d41565b73ffffffffffffffffffffffffffffffffffffffff16610f18610771565b73ffffffffffffffffffffffffffffffffffffffff1614610f7757610f3b610d41565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610f6e91906122db565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610feb5760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610fe291906122db565b60405180910390fd5b610ff760008383611678565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361106d5760006040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260040161106491906122db565b60405180910390fd5b61107982600083611678565b5050565b6000611087611315565b905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60008061115f61191b565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915050919050565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100905090565b606060006111df6111ab565b90508060020180546111f09061245f565b80601f016020809104026020016040519081016040528092919081815260200182805461121c9061245f565b80156112695780601f1061123e57610100808354040283529160200191611269565b820191906000526020600020905b81548152906001019060200180831161124c57829003601f168201915b505050505091505090565b606060006112806111ab565b90508060030180546112919061245f565b80601f01602080910402602001604051908101604052809291908181526020018280546112bd9061245f565b801561130a5780601f106112df5761010080835404028352916020019161130a565b820191906000526020600020905b8154815290600101906020018083116112ed57829003601f168201915b505050505091505090565b60007f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b61136d611943565b6113778282611983565b5050565b611383611943565b565b61138d611943565b6113cc816040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506119c0565b50565b6113d7611943565b6113e081611a15565b50565b6000806113ee61191b565b90508060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055915050919050565b600061145b611455610ee3565b83611a9b565b9050919050565b60008060008061147488888888611adc565b9250925092506114848282611bd0565b829350505050949350505050565b600061149c610d19565b9050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115105760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161150791906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036115825760006040517f94280d6200000000000000000000000000000000000000000000000000000000815260040161157991906122db565b60405180910390fd5b828160010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508115611671578373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051611668919061201c565b60405180910390a35b5050505050565b6000611682610d19565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036116d857818160020160008282546116cc91906124bf565b925050819055506117b1565b60008160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611767578481846040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161175e9392919061271e565b60405180910390fd5b8281038260000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036117fc5781816002016000828254039250508190555061184c565b818160000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118a9919061201c565b60405180910390a350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6118e2611d34565b6118ea611db0565b4630604051602001611900959493929190612755565b60405160208183030381529060405280519060200120905090565b60007f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00905090565b61194b611e2c565b611981576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61198b611943565b6000611995610d19565b9050828160030190816119a8919061294a565b50818160040190816119ba919061294a565b50505050565b6119c8611943565b60006119d26111ab565b9050828160020190816119e5919061294a565b50818160030190816119f7919061294a565b506000801b81600001819055506000801b8160010181905550505050565b611a1d611943565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8f5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611a8691906122db565b60405180910390fd5b611a988161107d565b50565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611b1c576000600385925092509250611bc6565b600060018888888860405160008152602001604052604051611b419493929190612a1c565b6020604051602081039080840390855afa158015611b63573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611bb757600060016000801b93509350935050611bc6565b8060008060001b935093509350505b9450945094915050565b60006003811115611be457611be3612a61565b5b826003811115611bf757611bf6612a61565b5b0315611d305760016003811115611c1157611c10612a61565b5b826003811115611c2457611c23612a61565b5b03611c5b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611c6f57611c6e612a61565b5b826003811115611c8257611c81612a61565b5b03611cc7578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611cbe919061201c565b60405180910390fd5b600380811115611cda57611cd9612a61565b5b826003811115611ced57611cec612a61565b5b03611d2f57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611d2691906120da565b60405180910390fd5b5b5050565b600080611d3f6111ab565b90506000611d4b6111d3565b9050600081511115611d6857808051906020012092505050611dad565b6000826000015490506000801b8114611d8657809350505050611dad565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47093505050505b90565b600080611dbb6111ab565b90506000611dc7611274565b9050600081511115611de457808051906020012092505050611e29565b6000826001015490506000801b8114611e0257809350505050611e29565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47093505050505b90565b6000611e3661133d565b60000160089054906101000a900460ff16905090565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e86578082015181840152602081019050611e6b565b60008484015250505050565b6000601f19601f8301169050919050565b6000611eae82611e4c565b611eb88185611e57565b9350611ec8818560208601611e68565b611ed181611e92565b840191505092915050565b60006020820190508181036000830152611ef68184611ea3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f2e82611f03565b9050919050565b611f3e81611f23565b8114611f4957600080fd5b50565b600081359050611f5b81611f35565b92915050565b6000819050919050565b611f7481611f61565b8114611f7f57600080fd5b50565b600081359050611f9181611f6b565b92915050565b60008060408385031215611fae57611fad611efe565b5b6000611fbc85828601611f4c565b9250506020611fcd85828601611f82565b9150509250929050565b60008115159050919050565b611fec81611fd7565b82525050565b60006020820190506120076000830184611fe3565b92915050565b61201681611f61565b82525050565b6000602082019050612031600083018461200d565b92915050565b6000806000606084860312156120505761204f611efe565b5b600061205e86828701611f4c565b935050602061206f86828701611f4c565b925050604061208086828701611f82565b9150509250925092565b600060ff82169050919050565b6120a08161208a565b82525050565b60006020820190506120bb6000830184612097565b92915050565b6000819050919050565b6120d4816120c1565b82525050565b60006020820190506120ef60008301846120cb565b92915050565b60006020828403121561210b5761210a611efe565b5b600061211984828501611f82565b91505092915050565b60006020828403121561213857612137611efe565b5b600061214684828501611f4c565b91505092915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6121848161214f565b82525050565b61219381611f23565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6121ce81611f61565b82525050565b60006121e083836121c5565b60208301905092915050565b6000602082019050919050565b600061220482612199565b61220e81856121a4565b9350612219836121b5565b8060005b8381101561224a57815161223188826121d4565b975061223c836121ec565b92505060018101905061221d565b5085935050505092915050565b600060e08201905061226c600083018a61217b565b818103602083015261227e8189611ea3565b905081810360408301526122928188611ea3565b90506122a1606083018761200d565b6122ae608083018661218a565b6122bb60a08301856120cb565b81810360c08301526122cd81846121f9565b905098975050505050505050565b60006020820190506122f0600083018461218a565b92915050565b6122ff8161208a565b811461230a57600080fd5b50565b60008135905061231c816122f6565b92915050565b61232b816120c1565b811461233657600080fd5b50565b60008135905061234881612322565b92915050565b600080600080600080600060e0888a03121561236d5761236c611efe565b5b600061237b8a828b01611f4c565b975050602061238c8a828b01611f4c565b965050604061239d8a828b01611f82565b95505060606123ae8a828b01611f82565b94505060806123bf8a828b0161230d565b93505060a06123d08a828b01612339565b92505060c06123e18a828b01612339565b91505092959891949750929550565b6000806040838503121561240757612406611efe565b5b600061241585828601611f4c565b925050602061242685828601611f4c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061247757607f821691505b60208210810361248a57612489612430565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006124ca82611f61565b91506124d583611f61565b92508282019050808211156124ed576124ec612490565b5b92915050565b7f596f75686f646c6572546f6b656e3a204d617820737570706c7920657863656560008201527f6465640000000000000000000000000000000000000000000000000000000000602082015250565b600061254f602383611e57565b915061255a826124f3565b604082019050919050565b6000602082019050818103600083015261257e81612542565b9050919050565b7f4549503731323a20556e696e697469616c697a65640000000000000000000000600082015250565b60006125bb601583611e57565b91506125c682612585565b602082019050919050565b600060208201905081810360008301526125ea816125ae565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000819050919050565b600067ffffffffffffffff82169050919050565b6000819050919050565b600061266361265e61265984612620565b61263e565b61262a565b9050919050565b61267381612648565b82525050565b600060208201905061268e600083018461266a565b92915050565b600060c0820190506126a960008301896120cb565b6126b6602083018861218a565b6126c3604083018761218a565b6126d0606083018661200d565b6126dd608083018561200d565b6126ea60a083018461200d565b979650505050505050565b600060408201905061270a600083018561218a565b612717602083018461218a565b9392505050565b6000606082019050612733600083018661218a565b612740602083018561200d565b61274d604083018461200d565b949350505050565b600060a08201905061276a60008301886120cb565b61277760208301876120cb565b61278460408301866120cb565b612791606083018561200d565b61279e608083018461218a565b9695505050505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261280a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826127cd565b61281486836127cd565b95508019841693508086168417925050509392505050565b600061284761284261283d84611f61565b61263e565b611f61565b9050919050565b6000819050919050565b6128618361282c565b61287561286d8261284e565b8484546127da565b825550505050565b600090565b61288a61287d565b612895818484612858565b505050565b5b818110156128b9576128ae600082612882565b60018101905061289b565b5050565b601f8211156128fe576128cf816127a8565b6128d8846127bd565b810160208510156128e7578190505b6128fb6128f3856127bd565b83018261289a565b50505b505050565b600082821c905092915050565b600061292160001984600802612903565b1980831691505092915050565b600061293a8383612910565b9150826002028217905092915050565b61295382611e4c565b67ffffffffffffffff81111561296c5761296b6125f1565b5b612976825461245f565b6129818282856128bd565b600060209050601f8311600181146129b457600084156129a2578287015190505b6129ac858261292e565b865550612a14565b601f1984166129c2866127a8565b60005b828110156129ea578489015182556001820191506020850194506020810190506129c5565b86831015612a075784890151612a03601f891682612910565b8355505b6001600288020188555050505b505050505050565b6000608082019050612a3160008301876120cb565b612a3e6020830186612097565b612a4b60408301856120cb565b612a5860608301846120cb565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea26469706673582212205603e6e5545c6907975851469dfeab6db486d2773cbf1da4f0495525196bfb5864736f6c634300081b0033
Deployed Bytecode Sourcemap
144143:731:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27744:147;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;30317:190;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;28958:155;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;31117:249;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;28809:84;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;144279:61;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;143894:114;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;144596:190;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;38401:89;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;29176:174;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;13829:103;;;:::i;:::-;;38819:161;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;143625:156;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;122920:931;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;13094:147;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;28010:151;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;29555:182;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;144349:239;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;142871:695;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;29800:198;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;14087:220;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;27744:147;27789:13;27815:22;27840:18;:16;:18::i;:::-;27815:43;;27876:1;:7;;27869:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27744:147;:::o;30317:190::-;30390:4;30407:13;30423:12;:10;:12::i;:::-;30407:28;;30446:31;30455:5;30462:7;30471:5;30446:8;:31::i;:::-;30495:4;30488:11;;;30317:190;;;;:::o;28958:155::-;29010:7;29030:22;29055:18;:16;:18::i;:::-;29030:43;;29091:1;:14;;;29084:21;;;28958:155;:::o;31117:249::-;31204:4;31221:15;31239:12;:10;:12::i;:::-;31221:30;;31262:37;31278:4;31284:7;31293:5;31262:15;:37::i;:::-;31310:26;31320:4;31326:2;31330:5;31310:9;:26::i;:::-;31354:4;31347:11;;;31117:249;;;;;:::o;28809:84::-;28858:5;28883:2;28876:9;;28809:84;:::o;144279:61::-;144316:24;144279:61;:::o;143894:114::-;143953:7;143980:20;:18;:20::i;:::-;143973:27;;143894:114;:::o;144596:190::-;12980:13;:11;:13::i;:::-;144316:24:::1;144690:6;144674:13;:11;:13::i;:::-;:22;;;;:::i;:::-;:36;;144666:84;;;;;;;;;;;;:::i;:::-;;;;;;;;;144761:17;144767:2;144771:6;144761:5;:17::i;:::-;144596:190:::0;;:::o;38401:89::-;38456:26;38462:12;:10;:12::i;:::-;38476:5;38456;:26::i;:::-;38401:89;:::o;29176:174::-;29241:7;29261:22;29286:18;:16;:18::i;:::-;29261:43;;29322:1;:11;;:20;29334:7;29322:20;;;;;;;;;;;;;;;;29315:27;;;29176:174;;;:::o;13829:103::-;12980:13;:11;:13::i;:::-;13894:30:::1;13921:1;13894:18;:30::i;:::-;13829:103::o:0;38819:161::-;38895:45;38911:7;38920:12;:10;:12::i;:::-;38934:5;38895:15;:45::i;:::-;38951:21;38957:7;38966:5;38951;:21::i;:::-;38819:161;;:::o;143625:156::-;143727:7;143754:19;143767:5;143754:12;:19::i;:::-;143747:26;;143625:156;;;:::o;122920:931::-;123023:13;123051:18;123084:21;123120:15;123150:25;123190:12;123217:27;123272:23;123298:19;:17;:19::i;:::-;123272:45;;123558:1;123541:18;;:1;:13;;;:18;:43;;;;;123583:1;123563:21;;:1;:16;;;:21;123541:43;123533:77;;;;;;;;;;;;:::i;:::-;;;;;;;;;123676:13;:11;:13::i;:::-;123704:16;:14;:16::i;:::-;123735:13;123771:4;123799:1;123791:10;;123830:1;123816:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123623:220;;;;;;;;;;;;;;;;;;;;;;122920:931;;;;;;;:::o;13094:147::-;13140:7;13160:24;13187:20;:18;:20::i;:::-;13160:47;;13225:1;:8;;;;;;;;;;;;13218:15;;;13094:147;:::o;28010:151::-;28057:13;28083:22;28108:18;:16;:18::i;:::-;28083:43;;28144:1;:9;;28137:16;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28010:151;:::o;29555:182::-;29624:4;29641:13;29657:12;:10;:12::i;:::-;29641:28;;29680:27;29690:5;29697:2;29701:5;29680:9;:27::i;:::-;29725:4;29718:11;;;29555:182;;;;:::o;144349:239::-;4466:30;4499:26;:24;:26::i;:::-;4466:59;;4590:19;4613:1;:15;;;;;;;;;;;;4612:16;4590:38;;4639:18;4660:1;:14;;;;;;;;;;;;4639:35;;5025:17;5060:1;5045:11;:16;;;:34;;;;;5065:14;5045:34;5025:54;;5090:17;5125:1;5110:11;:16;;;:50;;;;;5159:1;5138:4;5130:25;;;:30;5110:50;5090:70;;5178:12;5177:13;:30;;;;;5195:12;5194:13;5177:30;5173:93;;;5231:23;;;;;;;;;;;;;;5173:93;5293:1;5276;:14;;;:18;;;;;;;;;;;;;;;;;;5309:14;5305:69;;;5358:4;5340:1;:15;;;:22;;;;;;;;;;;;;;;;;;5305:69;144421:39:::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;::::0;:12:::1;:39::i;:::-;144471:22;:20;:22::i;:::-;144504:37;;;;;;;;;;;;;;;;;::::0;:18:::1;:37::i;:::-;144552:28;144567:12;144552:14;:28::i;:::-;5400:14:::0;5396:104;;;5449:5;5431:1;:15;;;:23;;;;;;;;;;;;;;;;;;5474:14;5486:1;5474:14;;;;;;:::i;:::-;;;;;;;;5396:104;4398:1109;;;;;144349:239;:::o;142871:695::-;143101:8;143083:15;:26;143079:99;;;143157:8;143133:33;;;;;;;;;;;:::i;:::-;;;;;;;;143079:99;143190:18;142026:95;143249:5;143256:7;143265:5;143272:16;143282:5;143272:9;:16::i;:::-;143290:8;143221:78;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;143211:89;;;;;;143190:110;;143313:12;143328:28;143345:10;143328:16;:28::i;:::-;143313:43;;143369:14;143386:28;143400:4;143406:1;143409;143412;143386:13;:28::i;:::-;143369:45;;143439:5;143429:15;;:6;:15;;;143425:90;;143489:6;143497:5;143468:35;;;;;;;;;;;;:::i;:::-;;;;;;;;143425:90;143527:31;143536:5;143543:7;143552:5;143527:8;:31::i;:::-;143068:498;;;142871:695;;;;;;;:::o;29800:198::-;29880:7;29900:22;29925:18;:16;:18::i;:::-;29900:43;;29961:1;:13;;:20;29975:5;29961:20;;;;;;;;;;;;;;;:29;29982:7;29961:29;;;;;;;;;;;;;;;;29954:36;;;29800:198;;;;:::o;14087:220::-;12980:13;:11;:13::i;:::-;14192:1:::1;14172:22;;:8;:22;;::::0;14168:93:::1;;14246:1;14218:31;;;;;;;;;;;:::i;:::-;;;;;;;;14168:93;14271:28;14290:8;14271:18;:28::i;:::-;14087:220:::0;:::o;26950:157::-;27000:22;27069:20;27059:30;;26950:157;:::o;10290:98::-;10343:7;10370:10;10363:17;;10290:98;:::o;35240:130::-;35325:37;35334:5;35341:7;35350:5;35357:4;35325:8;:37::i;:::-;35240:130;;;:::o;37028:487::-;37128:24;37155:25;37165:5;37172:7;37155:9;:25::i;:::-;37128:52;;37215:17;37195:16;:37;37191:317;;37272:5;37253:16;:24;37249:132;;;37332:7;37341:16;37359:5;37305:60;;;;;;;;;;;;;:::i;:::-;;;;;;;;37249:132;37424:57;37433:5;37440:7;37468:5;37449:16;:24;37475:5;37424:8;:57::i;:::-;37191:317;37117:398;37028:487;;;:::o;31751:308::-;31851:1;31835:18;;:4;:18;;;31831:88;;31904:1;31877:30;;;;;;;;;;;:::i;:::-;;;;;;;;31831:88;31947:1;31933:16;;:2;:16;;;31929:88;;32002:1;31973:32;;;;;;;;;;;:::i;:::-;;;;;;;;31929:88;32027:24;32035:4;32041:2;32045:5;32027:7;:24::i;:::-;31751:308;;;:::o;121732:111::-;121785:7;121812:23;:21;:23::i;:::-;121805:30;;121732:111;:::o;13319:166::-;13390:12;:10;:12::i;:::-;13379:23;;:7;:5;:7::i;:::-;:23;;;13375:103;;13453:12;:10;:12::i;:::-;13426:40;;;;;;;;;;;:::i;:::-;;;;;;;;13375:103;13319:166::o;33935:213::-;34025:1;34006:21;;:7;:21;;;34002:93;;34080:1;34051:32;;;;;;;;;;;:::i;:::-;;;;;;;;34002:93;34105:35;34121:1;34125:7;34134:5;34105:7;:35::i;:::-;33935:213;;:::o;34476:211::-;34566:1;34547:21;;:7;:21;;;34543:91;;34619:1;34592:30;;;;;;;;;;;:::i;:::-;;;;;;;;34543:91;34644:35;34652:7;34669:1;34673:5;34644:7;:35::i;:::-;34476:211;;:::o;14467:253::-;14541:24;14568:20;:18;:20::i;:::-;14541:47;;14599:16;14618:1;:8;;;;;;;;;;;;14599:27;;14648:8;14637:1;:8;;;:19;;;;;;;;;;;;;;;;;;14703:8;14672:40;;14693:8;14672:40;;;;;;;;;;;;14530:190;;14467:253;:::o;127869:167::-;127929:7;127949:23;127975:19;:17;:19::i;:::-;127949:45;;128012:1;:9;;:16;128022:5;128012:16;;;;;;;;;;;;;;;;128005:23;;;127869:167;;;:::o;120402:160::-;120453:23;120523:21;120513:31;;120402:160;:::o;124083:158::-;124137:13;124163:23;124189:19;:17;:19::i;:::-;124163:45;;124226:1;:7;;124219:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124083:158;:::o;124476:164::-;124533:13;124559:23;124585:19;:17;:19::i;:::-;124559:45;;124622:1;:10;;124615:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124476:164;:::o;11802:163::-;11854:24;11925:22;11915:32;;11802:163;:::o;9162:174::-;9220:30;9297:21;9287:31;;9162:174;:::o;27297:149::-;7304:20;:18;:20::i;:::-;27400:38:::1;27423:5;27430:7;27400:22;:38::i;:::-;27297:149:::0;;:::o;38126:66::-;7304:20;:18;:20::i;:::-;38126:66::o;142596:127::-;7304:20;:18;:20::i;:::-;142681:34:::1;142705:4;142681:34;;;;;;;;;;;;;;;;::::0;:23:::1;:34::i;:::-;142596:127:::0;:::o;12478:129::-;7304:20;:18;:20::i;:::-;12561:38:::1;12586:12;12561:24;:38::i;:::-;12478:129:::0;:::o;128157:460::-;128217:7;128237:23;128263:19;:17;:19::i;:::-;128237:45;;128580:1;:9;;:16;128590:5;128580:16;;;;;;;;;;;;;;;;:18;;;;;;;;;;;;128573:25;;;128157:460;;;:::o;122686:178::-;122763:7;122790:66;122823:20;:18;:20::i;:::-;122845:10;122790:32;:66::i;:::-;122783:73;;122686:178;;;:::o;140103:264::-;140188:7;140209:17;140228:18;140248:16;140268:25;140279:4;140285:1;140288;140291;140268:10;:25::i;:::-;140208:85;;;;;;140304:28;140316:5;140323:8;140304:11;:28::i;:::-;140350:9;140343:16;;;;;140103:264;;;;;;:::o;36237:499::-;36346:22;36371:18;:16;:18::i;:::-;36346:43;;36421:1;36404:19;;:5;:19;;;36400:91;;36476:1;36447:32;;;;;;;;;;;:::i;:::-;;;;;;;;36400:91;36524:1;36505:21;;:7;:21;;;36501:92;;36578:1;36550:31;;;;;;;;;;;:::i;:::-;;;;;;;;36501:92;36635:5;36603:1;:13;;:20;36617:5;36603:20;;;;;;;;;;;;;;;:29;36624:7;36603:29;;;;;;;;;;;;;;;:37;;;;36655:9;36651:78;;;36702:7;36686:31;;36695:5;36686:31;;;36711:5;36686:31;;;;;;:::i;:::-;;;;;;;;36651:78;36335:401;36237:499;;;;:::o;32383:1199::-;32469:22;32494:18;:16;:18::i;:::-;32469:43;;32543:1;32527:18;;:4;:18;;;32523:558;;32683:5;32665:1;:14;;;:23;;;;;;;:::i;:::-;;;;;;;;32523:558;;;32721:19;32743:1;:11;;:17;32755:4;32743:17;;;;;;;;;;;;;;;;32721:39;;32793:5;32779:11;:19;32775:117;;;32851:4;32857:11;32870:5;32826:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;32775:117;33049:5;33035:11;:19;33015:1;:11;;:17;33027:4;33015:17;;;;;;;;;;;;;;;:39;;;;32706:375;32523:558;33111:1;33097:16;;:2;:16;;;33093:439;;33281:5;33263:1;:14;;;:23;;;;;;;;;;;33093:439;;;33500:5;33481:1;:11;;:15;33493:2;33481:15;;;;;;;;;;;;;;;;:24;;;;;;;;;;;33093:439;33564:2;33549:25;;33558:4;33549:25;;;33568:5;33549:25;;;;;;:::i;:::-;;;;;;;;32458:1124;32383:1199;;;:::o;121851:193::-;121906:7;119739:95;121965:17;:15;:17::i;:::-;121984:20;:18;:20::i;:::-;122006:13;122029:4;121943:92;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;121933:103;;;;;;121926:110;;121851:193;:::o;127482:160::-;127533:23;127603:21;127593:31;;127482:160;:::o;7464:145::-;7532:17;:15;:17::i;:::-;7527:75;;7573:17;;;;;;;;;;;;;;7527:75;7464:145::o;27454:220::-;7304:20;:18;:20::i;:::-;27567:22:::1;27592:18;:16;:18::i;:::-;27567:43;;27631:5;27621:1;:7;;:15;;;;;;:::i;:::-;;27659:7;27647:1;:9;;:19;;;;;;:::i;:::-;;27556:118;27454:220:::0;;:::o;121303:338::-;7304:20;:18;:20::i;:::-;121416:23:::1;121442:19;:17;:19::i;:::-;121416:45;;121482:4;121472:1;:7;;:14;;;;;;:::i;:::-;;121510:7;121497:1;:10;;:20;;;;;;:::i;:::-;;121601:1;121585:17:::0;::::1;:1;:13;;:17;;;;121632:1;121613:20:::0;::::1;:1;:16;;:20;;;;121405:236;121303:338:::0;;:::o;12615:240::-;7304:20;:18;:20::i;:::-;12736:1:::1;12712:26;;:12;:26;;::::0;12708:97:::1;;12790:1;12762:31;;;;;;;;;;;:::i;:::-;;;;;;;;12708:97;12815:32;12834:12;12815:18;:32::i;:::-;12615:240:::0;:::o;117369:382::-;117462:14;117546:4;117540:11;117577:10;117572:3;117565:23;117625:15;117618:4;117613:3;117609:14;117602:39;117678:10;117671:4;117666:3;117662:14;117655:34;117728:4;117723:3;117713:20;117703:30;;117514:230;117369:382;;;;:::o;138387:1577::-;138518:17;138537:16;138555:14;139482:66;139477:1;139469:10;;:79;139465:166;;;139581:1;139585:30;139617:1;139565:54;;;;;;;;139465:166;139728:14;139745:24;139755:4;139761:1;139764;139767;139745:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139728:41;;139802:1;139784:20;;:6;:20;;;139780:115;;139837:1;139841:29;139880:1;139872:10;;139821:62;;;;;;;;;139780:115;139915:6;139923:20;139953:1;139945:10;;139907:49;;;;;;;138387:1577;;;;;;;;;:::o;140505:542::-;140601:20;140592:29;;;;;;;;:::i;:::-;;:5;:29;;;;;;;;:::i;:::-;;;140588:452;140638:7;140588:452;140699:29;140690:38;;;;;;;;:::i;:::-;;:5;:38;;;;;;;;:::i;:::-;;;140686:354;;140752:23;;;;;;;;;;;;;;140686:354;140806:35;140797:44;;;;;;;;:::i;:::-;;:5;:44;;;;;;;;:::i;:::-;;;140793:247;;140901:8;140893:17;;140865:46;;;;;;;;;;;:::i;:::-;;;;;;;;140793:247;140942:30;140933:39;;;;;;;;:::i;:::-;;:5;:39;;;;;;;;:::i;:::-;;;140929:111;;141019:8;140996:32;;;;;;;;;;;:::i;:::-;;;;;;;;140929:111;140505:542;;;:::o;124862:702::-;124912:7;124932:23;124958:19;:17;:19::i;:::-;124932:45;;124988:18;125009:13;:11;:13::i;:::-;124988:34;;125058:1;125043:4;125037:18;:22;125033:524;;;125099:4;125083:22;;;;;;125076:29;;;;;;125033:524;125363:18;125384:1;:13;;;125363:34;;125430:1;125416:15;;:10;:15;125412:134;;125459:10;125452:17;;;;;;;125412:134;125517:13;125510:20;;;;;124862:702;;:::o;125792:738::-;125845:7;125865:23;125891:19;:17;:19::i;:::-;125865:45;;125921:21;125945:16;:14;:16::i;:::-;125921:40;;126000:1;125982:7;125976:21;:25;125972:551;;;126041:7;126025:25;;;;;;126018:32;;;;;;125972:551;126317:21;126341:1;:16;;;126317:40;;126393:1;126376:18;;:13;:18;126372:140;;126422:13;126415:20;;;;;;;126372:140;126483:13;126476:20;;;;;125792:738;;:::o;8904:122::-;8954:4;8978:26;:24;:26::i;:::-;:40;;;;;;;;;;;;8971:47;;8904:122;:::o;7:99:1:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:248::-;369:1;379:113;393:6;390:1;387:13;379:113;;;478:1;473:3;469:11;463:18;459:1;454:3;450:11;443:39;415:2;412:1;408:10;403:15;;379:113;;;526:1;517:6;512:3;508:16;501:27;349:186;287:248;;;:::o;541:102::-;582:6;633:2;629:7;624:2;617:5;613:14;609:28;599:38;;541:102;;;:::o;649:377::-;737:3;765:39;798:5;765:39;:::i;:::-;820:71;884:6;879:3;820:71;:::i;:::-;813:78;;900:65;958:6;953:3;946:4;939:5;935:16;900:65;:::i;:::-;990:29;1012:6;990:29;:::i;:::-;985:3;981:39;974:46;;741:285;649:377;;;;:::o;1032:313::-;1145:4;1183:2;1172:9;1168:18;1160:26;;1232:9;1226:4;1222:20;1218:1;1207:9;1203:17;1196:47;1260:78;1333:4;1324:6;1260:78;:::i;:::-;1252:86;;1032:313;;;;:::o;1432:117::-;1541:1;1538;1531:12;1678:126;1715:7;1755:42;1748:5;1744:54;1733:65;;1678:126;;;:::o;1810:96::-;1847:7;1876:24;1894:5;1876:24;:::i;:::-;1865:35;;1810:96;;;:::o;1912:122::-;1985:24;2003:5;1985:24;:::i;:::-;1978:5;1975:35;1965:63;;2024:1;2021;2014:12;1965:63;1912:122;:::o;2040:139::-;2086:5;2124:6;2111:20;2102:29;;2140:33;2167:5;2140:33;:::i;:::-;2040:139;;;;:::o;2185:77::-;2222:7;2251:5;2240:16;;2185:77;;;:::o;2268:122::-;2341:24;2359:5;2341:24;:::i;:::-;2334:5;2331:35;2321:63;;2380:1;2377;2370:12;2321:63;2268:122;:::o;2396:139::-;2442:5;2480:6;2467:20;2458:29;;2496:33;2523:5;2496:33;:::i;:::-;2396:139;;;;:::o;2541:474::-;2609:6;2617;2666:2;2654:9;2645:7;2641:23;2637:32;2634:119;;;2672:79;;:::i;:::-;2634:119;2792:1;2817:53;2862:7;2853:6;2842:9;2838:22;2817:53;:::i;:::-;2807:63;;2763:117;2919:2;2945:53;2990:7;2981:6;2970:9;2966:22;2945:53;:::i;:::-;2935:63;;2890:118;2541:474;;;;;:::o;3021:90::-;3055:7;3098:5;3091:13;3084:21;3073:32;;3021:90;;;:::o;3117:109::-;3198:21;3213:5;3198:21;:::i;:::-;3193:3;3186:34;3117:109;;:::o;3232:210::-;3319:4;3357:2;3346:9;3342:18;3334:26;;3370:65;3432:1;3421:9;3417:17;3408:6;3370:65;:::i;:::-;3232:210;;;;:::o;3448:118::-;3535:24;3553:5;3535:24;:::i;:::-;3530:3;3523:37;3448:118;;:::o;3572:222::-;3665:4;3703:2;3692:9;3688:18;3680:26;;3716:71;3784:1;3773:9;3769:17;3760:6;3716:71;:::i;:::-;3572:222;;;;:::o;3800:619::-;3877:6;3885;3893;3942:2;3930:9;3921:7;3917:23;3913:32;3910:119;;;3948:79;;:::i;:::-;3910:119;4068:1;4093:53;4138:7;4129:6;4118:9;4114:22;4093:53;:::i;:::-;4083:63;;4039:117;4195:2;4221:53;4266:7;4257:6;4246:9;4242:22;4221:53;:::i;:::-;4211:63;;4166:118;4323:2;4349:53;4394:7;4385:6;4374:9;4370:22;4349:53;:::i;:::-;4339:63;;4294:118;3800:619;;;;;:::o;4425:86::-;4460:7;4500:4;4493:5;4489:16;4478:27;;4425:86;;;:::o;4517:112::-;4600:22;4616:5;4600:22;:::i;:::-;4595:3;4588:35;4517:112;;:::o;4635:214::-;4724:4;4762:2;4751:9;4747:18;4739:26;;4775:67;4839:1;4828:9;4824:17;4815:6;4775:67;:::i;:::-;4635:214;;;;:::o;4855:77::-;4892:7;4921:5;4910:16;;4855:77;;;:::o;4938:118::-;5025:24;5043:5;5025:24;:::i;:::-;5020:3;5013:37;4938:118;;:::o;5062:222::-;5155:4;5193:2;5182:9;5178:18;5170:26;;5206:71;5274:1;5263:9;5259:17;5250:6;5206:71;:::i;:::-;5062:222;;;;:::o;5290:329::-;5349:6;5398:2;5386:9;5377:7;5373:23;5369:32;5366:119;;;5404:79;;:::i;:::-;5366:119;5524:1;5549:53;5594:7;5585:6;5574:9;5570:22;5549:53;:::i;:::-;5539:63;;5495:117;5290:329;;;;:::o;5625:::-;5684:6;5733:2;5721:9;5712:7;5708:23;5704:32;5701:119;;;5739:79;;:::i;:::-;5701:119;5859:1;5884:53;5929:7;5920:6;5909:9;5905:22;5884:53;:::i;:::-;5874:63;;5830:117;5625:329;;;;:::o;5960:149::-;5996:7;6036:66;6029:5;6025:78;6014:89;;5960:149;;;:::o;6115:115::-;6200:23;6217:5;6200:23;:::i;:::-;6195:3;6188:36;6115:115;;:::o;6236:118::-;6323:24;6341:5;6323:24;:::i;:::-;6318:3;6311:37;6236:118;;:::o;6360:114::-;6427:6;6461:5;6455:12;6445:22;;6360:114;;;:::o;6480:184::-;6579:11;6613:6;6608:3;6601:19;6653:4;6648:3;6644:14;6629:29;;6480:184;;;;:::o;6670:132::-;6737:4;6760:3;6752:11;;6790:4;6785:3;6781:14;6773:22;;6670:132;;;:::o;6808:108::-;6885:24;6903:5;6885:24;:::i;:::-;6880:3;6873:37;6808:108;;:::o;6922:179::-;6991:10;7012:46;7054:3;7046:6;7012:46;:::i;:::-;7090:4;7085:3;7081:14;7067:28;;6922:179;;;;:::o;7107:113::-;7177:4;7209;7204:3;7200:14;7192:22;;7107:113;;;:::o;7256:732::-;7375:3;7404:54;7452:5;7404:54;:::i;:::-;7474:86;7553:6;7548:3;7474:86;:::i;:::-;7467:93;;7584:56;7634:5;7584:56;:::i;:::-;7663:7;7694:1;7679:284;7704:6;7701:1;7698:13;7679:284;;;7780:6;7774:13;7807:63;7866:3;7851:13;7807:63;:::i;:::-;7800:70;;7893:60;7946:6;7893:60;:::i;:::-;7883:70;;7739:224;7726:1;7723;7719:9;7714:14;;7679:284;;;7683:14;7979:3;7972:10;;7380:608;;;7256:732;;;;:::o;7994:1215::-;8343:4;8381:3;8370:9;8366:19;8358:27;;8395:69;8461:1;8450:9;8446:17;8437:6;8395:69;:::i;:::-;8511:9;8505:4;8501:20;8496:2;8485:9;8481:18;8474:48;8539:78;8612:4;8603:6;8539:78;:::i;:::-;8531:86;;8664:9;8658:4;8654:20;8649:2;8638:9;8634:18;8627:48;8692:78;8765:4;8756:6;8692:78;:::i;:::-;8684:86;;8780:72;8848:2;8837:9;8833:18;8824:6;8780:72;:::i;:::-;8862:73;8930:3;8919:9;8915:19;8906:6;8862:73;:::i;:::-;8945;9013:3;9002:9;8998:19;8989:6;8945:73;:::i;:::-;9066:9;9060:4;9056:20;9050:3;9039:9;9035:19;9028:49;9094:108;9197:4;9188:6;9094:108;:::i;:::-;9086:116;;7994:1215;;;;;;;;;;:::o;9215:222::-;9308:4;9346:2;9335:9;9331:18;9323:26;;9359:71;9427:1;9416:9;9412:17;9403:6;9359:71;:::i;:::-;9215:222;;;;:::o;9443:118::-;9514:22;9530:5;9514:22;:::i;:::-;9507:5;9504:33;9494:61;;9551:1;9548;9541:12;9494:61;9443:118;:::o;9567:135::-;9611:5;9649:6;9636:20;9627:29;;9665:31;9690:5;9665:31;:::i;:::-;9567:135;;;;:::o;9708:122::-;9781:24;9799:5;9781:24;:::i;:::-;9774:5;9771:35;9761:63;;9820:1;9817;9810:12;9761:63;9708:122;:::o;9836:139::-;9882:5;9920:6;9907:20;9898:29;;9936:33;9963:5;9936:33;:::i;:::-;9836:139;;;;:::o;9981:1199::-;10092:6;10100;10108;10116;10124;10132;10140;10189:3;10177:9;10168:7;10164:23;10160:33;10157:120;;;10196:79;;:::i;:::-;10157:120;10316:1;10341:53;10386:7;10377:6;10366:9;10362:22;10341:53;:::i;:::-;10331:63;;10287:117;10443:2;10469:53;10514:7;10505:6;10494:9;10490:22;10469:53;:::i;:::-;10459:63;;10414:118;10571:2;10597:53;10642:7;10633:6;10622:9;10618:22;10597:53;:::i;:::-;10587:63;;10542:118;10699:2;10725:53;10770:7;10761:6;10750:9;10746:22;10725:53;:::i;:::-;10715:63;;10670:118;10827:3;10854:51;10897:7;10888:6;10877:9;10873:22;10854:51;:::i;:::-;10844:61;;10798:117;10954:3;10981:53;11026:7;11017:6;11006:9;11002:22;10981:53;:::i;:::-;10971:63;;10925:119;11083:3;11110:53;11155:7;11146:6;11135:9;11131:22;11110:53;:::i;:::-;11100:63;;11054:119;9981:1199;;;;;;;;;;:::o;11186:474::-;11254:6;11262;11311:2;11299:9;11290:7;11286:23;11282:32;11279:119;;;11317:79;;:::i;:::-;11279:119;11437:1;11462:53;11507:7;11498:6;11487:9;11483:22;11462:53;:::i;:::-;11452:63;;11408:117;11564:2;11590:53;11635:7;11626:6;11615:9;11611:22;11590:53;:::i;:::-;11580:63;;11535:118;11186:474;;;;;:::o;11666:180::-;11714:77;11711:1;11704:88;11811:4;11808:1;11801:15;11835:4;11832:1;11825:15;11852:320;11896:6;11933:1;11927:4;11923:12;11913:22;;11980:1;11974:4;11970:12;12001:18;11991:81;;12057:4;12049:6;12045:17;12035:27;;11991:81;12119:2;12111:6;12108:14;12088:18;12085:38;12082:84;;12138:18;;:::i;:::-;12082:84;11903:269;11852:320;;;:::o;12178:180::-;12226:77;12223:1;12216:88;12323:4;12320:1;12313:15;12347:4;12344:1;12337:15;12364:191;12404:3;12423:20;12441:1;12423:20;:::i;:::-;12418:25;;12457:20;12475:1;12457:20;:::i;:::-;12452:25;;12500:1;12497;12493:9;12486:16;;12521:3;12518:1;12515:10;12512:36;;;12528:18;;:::i;:::-;12512:36;12364:191;;;;:::o;12561:222::-;12701:34;12697:1;12689:6;12685:14;12678:58;12770:5;12765:2;12757:6;12753:15;12746:30;12561:222;:::o;12789:366::-;12931:3;12952:67;13016:2;13011:3;12952:67;:::i;:::-;12945:74;;13028:93;13117:3;13028:93;:::i;:::-;13146:2;13141:3;13137:12;13130:19;;12789:366;;;:::o;13161:419::-;13327:4;13365:2;13354:9;13350:18;13342:26;;13414:9;13408:4;13404:20;13400:1;13389:9;13385:17;13378:47;13442:131;13568:4;13442:131;:::i;:::-;13434:139;;13161:419;;;:::o;13586:171::-;13726:23;13722:1;13714:6;13710:14;13703:47;13586:171;:::o;13763:366::-;13905:3;13926:67;13990:2;13985:3;13926:67;:::i;:::-;13919:74;;14002:93;14091:3;14002:93;:::i;:::-;14120:2;14115:3;14111:12;14104:19;;13763:366;;;:::o;14135:419::-;14301:4;14339:2;14328:9;14324:18;14316:26;;14388:9;14382:4;14378:20;14374:1;14363:9;14359:17;14352:47;14416:131;14542:4;14416:131;:::i;:::-;14408:139;;14135:419;;;:::o;14560:180::-;14608:77;14605:1;14598:88;14705:4;14702:1;14695:15;14729:4;14726:1;14719:15;14746:85;14791:7;14820:5;14809:16;;14746:85;;;:::o;14837:101::-;14873:7;14913:18;14906:5;14902:30;14891:41;;14837:101;;;:::o;14944:60::-;14972:3;14993:5;14986:12;;14944:60;;;:::o;15010:156::-;15067:9;15100:60;15117:42;15126:32;15152:5;15126:32;:::i;:::-;15117:42;:::i;:::-;15100:60;:::i;:::-;15087:73;;15010:156;;;:::o;15172:145::-;15266:44;15304:5;15266:44;:::i;:::-;15261:3;15254:57;15172:145;;:::o;15323:236::-;15423:4;15461:2;15450:9;15446:18;15438:26;;15474:78;15549:1;15538:9;15534:17;15525:6;15474:78;:::i;:::-;15323:236;;;;:::o;15565:775::-;15798:4;15836:3;15825:9;15821:19;15813:27;;15850:71;15918:1;15907:9;15903:17;15894:6;15850:71;:::i;:::-;15931:72;15999:2;15988:9;15984:18;15975:6;15931:72;:::i;:::-;16013;16081:2;16070:9;16066:18;16057:6;16013:72;:::i;:::-;16095;16163:2;16152:9;16148:18;16139:6;16095:72;:::i;:::-;16177:73;16245:3;16234:9;16230:19;16221:6;16177:73;:::i;:::-;16260;16328:3;16317:9;16313:19;16304:6;16260:73;:::i;:::-;15565:775;;;;;;;;;:::o;16346:332::-;16467:4;16505:2;16494:9;16490:18;16482:26;;16518:71;16586:1;16575:9;16571:17;16562:6;16518:71;:::i;:::-;16599:72;16667:2;16656:9;16652:18;16643:6;16599:72;:::i;:::-;16346:332;;;;;:::o;16684:442::-;16833:4;16871:2;16860:9;16856:18;16848:26;;16884:71;16952:1;16941:9;16937:17;16928:6;16884:71;:::i;:::-;16965:72;17033:2;17022:9;17018:18;17009:6;16965:72;:::i;:::-;17047;17115:2;17104:9;17100:18;17091:6;17047:72;:::i;:::-;16684:442;;;;;;:::o;17132:664::-;17337:4;17375:3;17364:9;17360:19;17352:27;;17389:71;17457:1;17446:9;17442:17;17433:6;17389:71;:::i;:::-;17470:72;17538:2;17527:9;17523:18;17514:6;17470:72;:::i;:::-;17552;17620:2;17609:9;17605:18;17596:6;17552:72;:::i;:::-;17634;17702:2;17691:9;17687:18;17678:6;17634:72;:::i;:::-;17716:73;17784:3;17773:9;17769:19;17760:6;17716:73;:::i;:::-;17132:664;;;;;;;;:::o;17802:141::-;17851:4;17874:3;17866:11;;17897:3;17894:1;17887:14;17931:4;17928:1;17918:18;17910:26;;17802:141;;;:::o;17949:93::-;17986:6;18033:2;18028;18021:5;18017:14;18013:23;18003:33;;17949:93;;;:::o;18048:107::-;18092:8;18142:5;18136:4;18132:16;18111:37;;18048:107;;;;:::o;18161:393::-;18230:6;18280:1;18268:10;18264:18;18303:97;18333:66;18322:9;18303:97;:::i;:::-;18421:39;18451:8;18440:9;18421:39;:::i;:::-;18409:51;;18493:4;18489:9;18482:5;18478:21;18469:30;;18542:4;18532:8;18528:19;18521:5;18518:30;18508:40;;18237:317;;18161:393;;;;;:::o;18560:142::-;18610:9;18643:53;18661:34;18670:24;18688:5;18670:24;:::i;:::-;18661:34;:::i;:::-;18643:53;:::i;:::-;18630:66;;18560:142;;;:::o;18708:75::-;18751:3;18772:5;18765:12;;18708:75;;;:::o;18789:269::-;18899:39;18930:7;18899:39;:::i;:::-;18960:91;19009:41;19033:16;19009:41;:::i;:::-;19001:6;18994:4;18988:11;18960:91;:::i;:::-;18954:4;18947:105;18865:193;18789:269;;;:::o;19064:73::-;19109:3;19064:73;:::o;19143:189::-;19220:32;;:::i;:::-;19261:65;19319:6;19311;19305:4;19261:65;:::i;:::-;19196:136;19143:189;;:::o;19338:186::-;19398:120;19415:3;19408:5;19405:14;19398:120;;;19469:39;19506:1;19499:5;19469:39;:::i;:::-;19442:1;19435:5;19431:13;19422:22;;19398:120;;;19338:186;;:::o;19530:543::-;19631:2;19626:3;19623:11;19620:446;;;19665:38;19697:5;19665:38;:::i;:::-;19749:29;19767:10;19749:29;:::i;:::-;19739:8;19735:44;19932:2;19920:10;19917:18;19914:49;;;19953:8;19938:23;;19914:49;19976:80;20032:22;20050:3;20032:22;:::i;:::-;20022:8;20018:37;20005:11;19976:80;:::i;:::-;19635:431;;19620:446;19530:543;;;:::o;20079:117::-;20133:8;20183:5;20177:4;20173:16;20152:37;;20079:117;;;;:::o;20202:169::-;20246:6;20279:51;20327:1;20323:6;20315:5;20312:1;20308:13;20279:51;:::i;:::-;20275:56;20360:4;20354;20350:15;20340:25;;20253:118;20202:169;;;;:::o;20376:295::-;20452:4;20598:29;20623:3;20617:4;20598:29;:::i;:::-;20590:37;;20660:3;20657:1;20653:11;20647:4;20644:21;20636:29;;20376:295;;;;:::o;20676:1395::-;20793:37;20826:3;20793:37;:::i;:::-;20895:18;20887:6;20884:30;20881:56;;;20917:18;;:::i;:::-;20881:56;20961:38;20993:4;20987:11;20961:38;:::i;:::-;21046:67;21106:6;21098;21092:4;21046:67;:::i;:::-;21140:1;21164:4;21151:17;;21196:2;21188:6;21185:14;21213:1;21208:618;;;;21870:1;21887:6;21884:77;;;21936:9;21931:3;21927:19;21921:26;21912:35;;21884:77;21987:67;22047:6;22040:5;21987:67;:::i;:::-;21981:4;21974:81;21843:222;21178:887;;21208:618;21260:4;21256:9;21248:6;21244:22;21294:37;21326:4;21294:37;:::i;:::-;21353:1;21367:208;21381:7;21378:1;21375:14;21367:208;;;21460:9;21455:3;21451:19;21445:26;21437:6;21430:42;21511:1;21503:6;21499:14;21489:24;;21558:2;21547:9;21543:18;21530:31;;21404:4;21401:1;21397:12;21392:17;;21367:208;;;21603:6;21594:7;21591:19;21588:179;;;21661:9;21656:3;21652:19;21646:26;21704:48;21746:4;21738:6;21734:17;21723:9;21704:48;:::i;:::-;21696:6;21689:64;21611:156;21588:179;21813:1;21809;21801:6;21797:14;21793:22;21787:4;21780:36;21215:611;;;21178:887;;20768:1303;;;20676:1395;;:::o;22077:545::-;22250:4;22288:3;22277:9;22273:19;22265:27;;22302:71;22370:1;22359:9;22355:17;22346:6;22302:71;:::i;:::-;22383:68;22447:2;22436:9;22432:18;22423:6;22383:68;:::i;:::-;22461:72;22529:2;22518:9;22514:18;22505:6;22461:72;:::i;:::-;22543;22611:2;22600:9;22596:18;22587:6;22543:72;:::i;:::-;22077:545;;;;;;;:::o;22628:180::-;22676:77;22673:1;22666:88;22773:4;22770:1;22763:15;22797:4;22794:1;22787:15
Swarm Source
ipfs://5603e6e5545c6907975851469dfeab6db486d2773cbf1da4f0495525196bfb58
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.