Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 19 from a total of 19 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 21614946 | 32 days ago | IN | 0 ETH | 0.00037842 | ||||
Approve | 21613950 | 32 days ago | IN | 0 ETH | 0.00018578 | ||||
Approve | 21613862 | 32 days ago | IN | 0 ETH | 0.00023944 | ||||
Approve | 21613854 | 32 days ago | IN | 0 ETH | 0.00015391 | ||||
Approve | 21613771 | 32 days ago | IN | 0 ETH | 0.00037682 | ||||
Approve | 21613771 | 32 days ago | IN | 0 ETH | 0.00037682 | ||||
Approve | 21613767 | 32 days ago | IN | 0 ETH | 0.00022881 | ||||
Approve | 21613743 | 32 days ago | IN | 0 ETH | 0.00017038 | ||||
Approve | 21613735 | 32 days ago | IN | 0 ETH | 0.00022588 | ||||
Approve | 21613678 | 32 days ago | IN | 0 ETH | 0.00018004 | ||||
Approve | 21613677 | 32 days ago | IN | 0 ETH | 0.00022379 | ||||
Approve | 21613613 | 33 days ago | IN | 0 ETH | 0.00024037 | ||||
Approve | 21613608 | 33 days ago | IN | 0 ETH | 0.00020103 | ||||
Transfer | 21601822 | 34 days ago | IN | 0 ETH | 0.00013702 | ||||
Approve | 21444525 | 56 days ago | IN | 0 ETH | 0.00213345 | ||||
Transfer | 21443972 | 56 days ago | IN | 0 ETH | 0.00170191 | ||||
Approve | 21443909 | 56 days ago | IN | 0 ETH | 0.0017024 | ||||
Transfer | 21443884 | 56 days ago | IN | 0 ETH | 0.0019905 | ||||
Set Raffle Addre... | 21443616 | 56 days ago | IN | 0 ETH | 0.00161349 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CrazyyFrogCoin
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-12-20 */ // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // 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/IERC20Metadata.sol // 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/utils/Context.sol // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol // 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 ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { 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) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { 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) { 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 { 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 { 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/token/ERC20/extensions/ERC20Burnable.sol // 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 ERC20Burnable is Context, ERC20 { /** * @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/token/ERC20/extensions/IERC20Permit.sol // 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/ECDSA.sol // 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/utils/Panic.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) pragma solidity ^0.8.20; /** * @dev Helper library for emitting standardized panic codes. * * ```solidity * contract Example { * using Panic for uint256; * * // Use any of the declared internal constants * function foo() { Panic.GENERIC.panic(); } * * // Alternatively * function foo() { Panic.panic(Panic.GENERIC); } * } * ``` * * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * * _Available since v5.1._ */ // slither-disable-next-line unused-state library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } } // File: @openzeppelin/contracts/utils/math/SafeCast.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } } // File: @openzeppelin/contracts/utils/math/Math.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2²⁵⁶ + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @dev Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Variant of {modExp} that supports inputs of arbitrary length. */ function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { (bool success, bytes memory result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Variant of {tryModExp} that supports inputs of arbitrary length. */ function tryModExp( bytes memory b, bytes memory e, bytes memory m ) internal view returns (bool success, bytes memory result) { if (_zeroBytes(m)) return (false, new bytes(0)); uint256 mLen = m.length; // Encode call args in result and move the free memory pointer result = abi.encodePacked(b.length, e.length, mLen, b, e, m); assembly ("memory-safe") { let dataPtr := add(result, 0x20) // Write result on top of args to avoid allocating extra memory. success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) // Overwrite the length. // result.length > returndatasize() is guaranteed because returndatasize() == m.length mstore(result, mLen) // Set the memory pointer after the returned data. mstore(0x40, add(dataPtr, mLen)) } } /** * @dev Returns whether the provided byte array is zero. */ function _zeroBytes(bytes memory byteArray) private pure returns (bool) { for (uint256 i = 0; i < byteArray.length; ++i) { if (byteArray[i] != 0) { return false; } } return true; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 1); } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 1); } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } } // File: @openzeppelin/contracts/utils/math/SignedMath.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v5.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/MessageHashUtils.sol // 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/utils/StorageSlot.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC-1967 implementation slot: * ```solidity * contract ERC1967 { * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * TIP: Consider using this library along with {SlotDerivation}. */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct Int256Slot { int256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Int256Slot` with member `value` located at `slot`. */ function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } /** * @dev Returns a `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } } // File: @openzeppelin/contracts/utils/ShortStrings.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); assembly ("memory-safe") { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } } // File: @openzeppelin/contracts/interfaces/IERC5267.sol // 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/cryptography/EIP712.sol // 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. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @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]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, 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 ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } } // File: @openzeppelin/contracts/utils/Nonces.sol // 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 Nonces { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); mapping(address account => uint256) private _nonces; /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { // 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/ERC20Permit.sol // 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 ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { 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. */ constructor(string memory name) EIP712(name, "1") {} /** * @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, Nonces) 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: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } // File: CrazyyFrogCoin.sol pragma solidity ^0.8.22; interface IBurnRaffle { function registerParticipant(address participant, uint256 amount) external; } /** * @title CrazyyFrogCoin * @dev ERC20 token with automatic raffle participation via _update hook. * Now allows deploying without specifying a non-zero burnRaffleAddress. * The owner can set it after deployment. */ contract CrazyyFrogCoin is ERC20, ERC20Burnable, ERC20Permit, Ownable, ReentrancyGuard { address public burnRaffleAddress; uint256 public minBurnAmount; bool public hookEnabled = true; bool public hookDisabledPermanently = false; event MinBurnAmountUpdated(uint256 newMinBurnAmount); event HookDisabled(); event HookEnabled(); constructor( address initialOwner, uint256 initialSupply, address _burnRaffleAddress, uint256 _minBurnAmount ) ERC20("CrazyyFrogCoin", "CFC") ERC20Permit("CrazyyFrogCoin") Ownable(initialOwner) { require(initialSupply > 0, "Initial supply must be greater than zero"); // Allowing _burnRaffleAddress to be address(0) _mint(initialOwner, initialSupply * 10 ** decimals()); burnRaffleAddress = _burnRaffleAddress; minBurnAmount = _minBurnAmount; } function setRaffleAddress(address _burnRaffleAddress) public onlyOwner { // Owner can set or update the raffle address after deployment require(_burnRaffleAddress != address(0), "Invalid raffle address"); burnRaffleAddress = _burnRaffleAddress; } function setMinBurnAmount(uint256 _minBurnAmount) public onlyOwner { require(_minBurnAmount > 0, "Minimum burn amount must be greater than zero"); minBurnAmount = _minBurnAmount; emit MinBurnAmountUpdated(_minBurnAmount); } function disableHook() public onlyOwner { require(!hookDisabledPermanently, "Hook has already been permanently disabled"); hookEnabled = false; hookDisabledPermanently = true; emit HookDisabled(); } function enableHook() public onlyOwner { require(!hookDisabledPermanently, "Hook permanently disabled"); hookEnabled = true; emit HookEnabled(); } function _update(address from, address to, uint256 value) internal virtual override { super._update(from, to, value); if (hookEnabled && to == burnRaffleAddress && value >= minBurnAmount && burnRaffleAddress != address(0)) { IBurnRaffle raffle = IBurnRaffle(burnRaffleAddress); (bool success, ) = address(raffle).call( abi.encodeWithSignature("registerParticipant(address,uint256)", from, value) ); if (!success) { revert("Raffle participation failed"); } } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"address","name":"_burnRaffleAddress","type":"address"},{"internalType":"uint256","name":"_minBurnAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","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":[],"name":"HookDisabled","type":"event"},{"anonymous":false,"inputs":[],"name":"HookEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinBurnAmount","type":"uint256"}],"name":"MinBurnAmountUpdated","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":[{"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":"burnRaffleAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableHook","outputs":[],"stateMutability":"nonpayable","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":[],"name":"enableHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hookDisabledPermanently","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hookEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBurnAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"_minBurnAmount","type":"uint256"}],"name":"setMinBurnAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burnRaffleAddress","type":"address"}],"name":"setRaffleAddress","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
6101606040526001600c5f6101000a81548160ff0219169083151502179055505f600c60016101000a81548160ff021916908315150217905550348015610044575f5ffd5b50604051613c43380380613c4383398181016040528101906100669190610ab2565b836040518060400160405280600e81526020017f4372617a797946726f67436f696e000000000000000000000000000000000000815250806040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506040518060400160405280600e81526020017f4372617a797946726f67436f696e0000000000000000000000000000000000008152506040518060400160405280600381526020017f4346430000000000000000000000000000000000000000000000000000000000815250816003908161014f9190610d4a565b50806004908161015f9190610d4a565b50505061017660058361035b60201b90919060201c565b610120818152505061019260068261035b60201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a081815250506101cf6103a860201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361027d575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016102749190610e28565b60405180910390fd5b61028c8161040260201b60201c565b5060016009819055505f83116102d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ce90610ec1565b60405180910390fd5b61030b846102e96104c560201b60201c565b600a6102f59190611047565b856103009190611091565b6104cd60201b60201c565b81600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600b81905550505050506113b3565b5f60208351101561037c576103758361055260201b60201c565b90506103a2565b8261038c836105b760201b60201c565b5f01908161039a9190610d4a565b5060ff5f1b90505b92915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016103e79594939291906110f9565b60405160208183030381529060405280519060200120905090565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f6012905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361053d575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016105349190610e28565b60405180910390fd5b61054e5f83836105c060201b60201c565b5050565b5f5f829050601f8151111561059e57826040517f305a27a900000000000000000000000000000000000000000000000000000000815260040161059591906111a0565b60405180910390fd5b8051816105aa906111ed565b5f1c175f1b915050919050565b5f819050919050565b6105d183838361080860201b60201c565b600c5f9054906101000a900460ff1680156106385750600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156106465750600b548110155b801561069f57505f73ffffffffffffffffffffffffffffffffffffffff16600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610803575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f8173ffffffffffffffffffffffffffffffffffffffff1685846040516024016106f4929190611253565b6040516020818303038152906040527f4302e564000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161077e91906112b4565b5f604051808303815f865af19150503d805f81146107b7576040519150601f19603f3d011682016040523d82523d5f602084013e6107bc565b606091505b5050905080610800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f790611314565b60405180910390fd5b50505b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610858578060025f82825461084c9190611332565b92505081905550610926565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156108e1578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016108d893929190611365565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361096d578060025f82825403925050819055506109b7565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610a14919061139a565b60405180910390a3505050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a4e82610a25565b9050919050565b610a5e81610a44565b8114610a68575f5ffd5b50565b5f81519050610a7981610a55565b92915050565b5f819050919050565b610a9181610a7f565b8114610a9b575f5ffd5b50565b5f81519050610aac81610a88565b92915050565b5f5f5f5f60808587031215610aca57610ac9610a21565b5b5f610ad787828801610a6b565b9450506020610ae887828801610a9e565b9350506040610af987828801610a6b565b9250506060610b0a87828801610a9e565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610b9157607f821691505b602082108103610ba457610ba3610b4d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610c067fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610bcb565b610c108683610bcb565b95508019841693508086168417925050509392505050565b5f819050919050565b5f610c4b610c46610c4184610a7f565b610c28565b610a7f565b9050919050565b5f819050919050565b610c6483610c31565b610c78610c7082610c52565b848454610bd7565b825550505050565b5f5f905090565b610c8f610c80565b610c9a818484610c5b565b505050565b5b81811015610cbd57610cb25f82610c87565b600181019050610ca0565b5050565b601f821115610d0257610cd381610baa565b610cdc84610bbc565b81016020851015610ceb578190505b610cff610cf785610bbc565b830182610c9f565b50505b505050565b5f82821c905092915050565b5f610d225f1984600802610d07565b1980831691505092915050565b5f610d3a8383610d13565b9150826002028217905092915050565b610d5382610b16565b67ffffffffffffffff811115610d6c57610d6b610b20565b5b610d768254610b7a565b610d81828285610cc1565b5f60209050601f831160018114610db2575f8415610da0578287015190505b610daa8582610d2f565b865550610e11565b601f198416610dc086610baa565b5f5b82811015610de757848901518255600182019150602085019450602081019050610dc2565b86831015610e045784890151610e00601f891682610d13565b8355505b6001600288020188555050505b505050505050565b610e2281610a44565b82525050565b5f602082019050610e3b5f830184610e19565b92915050565b5f82825260208201905092915050565b7f496e697469616c20737570706c79206d757374206265206772656174657220745f8201527f68616e207a65726f000000000000000000000000000000000000000000000000602082015250565b5f610eab602883610e41565b9150610eb682610e51565b604082019050919050565b5f6020820190508181035f830152610ed881610e9f565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f5f8291508390505b6001851115610f6157808604811115610f3d57610f3c610edf565b5b6001851615610f4c5780820291505b8081029050610f5a85610f0c565b9450610f21565b94509492505050565b5f82610f795760019050611034565b81610f86575f9050611034565b8160018114610f9c5760028114610fa657610fd5565b6001915050611034565b60ff841115610fb857610fb7610edf565b5b8360020a915084821115610fcf57610fce610edf565b5b50611034565b5060208310610133831016604e8410600b841016171561100a5782820a90508381111561100557611004610edf565b5b611034565b6110178484846001610f18565b9250905081840481111561102e5761102d610edf565b5b81810290505b9392505050565b5f60ff82169050919050565b5f61105182610a7f565b915061105c8361103b565b92506110897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f6a565b905092915050565b5f61109b82610a7f565b91506110a683610a7f565b92508282026110b481610a7f565b915082820484148315176110cb576110ca610edf565b5b5092915050565b5f819050919050565b6110e4816110d2565b82525050565b6110f381610a7f565b82525050565b5f60a08201905061110c5f8301886110db565b61111960208301876110db565b61112660408301866110db565b61113360608301856110ea565b6111406080830184610e19565b9695505050505050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61117282610b16565b61117c8185610e41565b935061118c81856020860161114a565b61119581611158565b840191505092915050565b5f6020820190508181035f8301526111b88184611168565b905092915050565b5f81519050919050565b5f819050602082019050919050565b5f6111e482516110d2565b80915050919050565b5f6111f7826111c0565b82611201846111ca565b905061120c816111d9565b9250602082101561124c576112477fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802610bcb565b831692505b5050919050565b5f6040820190506112665f830185610e19565b61127360208301846110ea565b9392505050565b5f81905092915050565b5f61128e826111c0565b611298818561127a565b93506112a881856020860161114a565b80840191505092915050565b5f6112bf8284611284565b915081905092915050565b7f526166666c652070617274696369706174696f6e206661696c656400000000005f82015250565b5f6112fe601b83610e41565b9150611309826112ca565b602082019050919050565b5f6020820190508181035f83015261132b816112f2565b9050919050565b5f61133c82610a7f565b915061134783610a7f565b925082820190508082111561135f5761135e610edf565b5b92915050565b5f6060820190506113785f830186610e19565b61138560208301856110ea565b61139260408301846110ea565b949350505050565b5f6020820190506113ad5f8301846110ea565b92915050565b60805160a05160c05160e05161010051610120516101405161283f6114045f395f6111be01525f61118301525f6116e001525f6116bf01525f610f3f01525f610f9501525f610fbe015261283f5ff3fe608060405234801561000f575f5ffd5b506004361061018c575f3560e01c80637ecebe00116100dc5780639ab8e6d211610095578063d505accf1161006f578063d505accf14610440578063dd62ed3e1461045c578063f128f4b11461048c578063f2fde38b146104aa5761018c565b80639ab8e6d2146103ea578063a9059cbb14610406578063ba84e217146104365761018c565b80637ecebe0014610320578063839975bb1461035057806384b0196e1461036e5780638da5cb5b1461039257806395d89b41146103b057806397709ce7146103ce5761018c565b80633644e51511610149578063448e143911610123578063448e1439146102ac57806370a08231146102ca578063715018a6146102fa57806379cc6790146103045761018c565b80633644e5151461025457806342966c681461027257806342cc38401461028e5761018c565b806306fdde0314610190578063095ea7b3146101ae57806317a69da4146101de57806318160ddd146101e857806323b872dd14610206578063313ce56714610236575b5f5ffd5b6101986104c6565b6040516101a59190611daf565b60405180910390f35b6101c860048036038101906101c39190611e60565b610556565b6040516101d59190611eb8565b60405180910390f35b6101e6610578565b005b6101f0610632565b6040516101fd9190611ee0565b60405180910390f35b610220600480360381019061021b9190611ef9565b61063b565b60405161022d9190611eb8565b60405180910390f35b61023e610669565b60405161024b9190611f64565b60405180910390f35b61025c610671565b6040516102699190611f95565b60405180910390f35b61028c60048036038101906102879190611fae565b61067f565b005b610296610693565b6040516102a39190611fe8565b60405180910390f35b6102b46106b8565b6040516102c19190611eb8565b60405180910390f35b6102e460048036038101906102df9190612001565b6106cb565b6040516102f19190611ee0565b60405180910390f35b610302610710565b005b61031e60048036038101906103199190611e60565b610723565b005b61033a60048036038101906103359190612001565b610743565b6040516103479190611ee0565b60405180910390f35b610358610754565b6040516103659190611ee0565b60405180910390f35b61037661075a565b604051610389979695949392919061211d565b60405180910390f35b61039a6107ff565b6040516103a79190611fe8565b60405180910390f35b6103b8610827565b6040516103c59190611daf565b60405180910390f35b6103e860048036038101906103e39190612001565b6108b7565b005b61040460048036038101906103ff9190611fae565b610970565b005b610420600480360381019061041b9190611e60565b6109fb565b60405161042d9190611eb8565b60405180910390f35b61043e610a1d565b005b61045a600480360381019061045591906121f3565b610abd565b005b61047660048036038101906104719190612290565b610c02565b6040516104839190611ee0565b60405180910390f35b610494610c84565b6040516104a19190611eb8565b60405180910390f35b6104c460048036038101906104bf9190612001565b610c96565b005b6060600380546104d5906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610501906122fb565b801561054c5780601f106105235761010080835404028352916020019161054c565b820191905f5260205f20905b81548152906001019060200180831161052f57829003601f168201915b5050505050905090565b5f5f610560610d1a565b905061056d818585610d21565b600191505092915050565b610580610d33565b600c60019054906101000a900460ff16156105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c79061239b565b60405180910390fd5b5f600c5f6101000a81548160ff0219169083151502179055506001600c60016101000a81548160ff0219169083151502179055507f4be5ee7c6a0a76b9209bebdd61b374e76803cfaa8e72886ee892b8dc972423f360405160405180910390a1565b5f600254905090565b5f5f610645610d1a565b9050610652858285610dba565b61065d858585610e4c565b60019150509392505050565b5f6012905090565b5f61067a610f3c565b905090565b61069061068a610d1a565b82610ff2565b50565b600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60019054906101000a900460ff1681565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610718610d33565b6107215f611071565b565b6107358261072f610d1a565b83610dba565b61073f8282610ff2565b5050565b5f61074d82611134565b9050919050565b600b5481565b5f6060805f5f5f606061076b61117a565b6107736111b5565b46305f5f1b5f67ffffffffffffffff811115610792576107916123b9565b5b6040519080825280602002602001820160405280156107c05781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610836906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610862906122fb565b80156108ad5780601f10610884576101008083540402835291602001916108ad565b820191905f5260205f20905b81548152906001019060200180831161089057829003601f168201915b5050505050905090565b6108bf610d33565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361092d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092490612430565b60405180910390fd5b80600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610978610d33565b5f81116109ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b1906124be565b60405180910390fd5b80600b819055507ff20c987ec965f601cf6dfb8d57644b3cfff2637ee29bc07b4f104d4040bba7f2816040516109f09190611ee0565b60405180910390a150565b5f5f610a05610d1a565b9050610a12818585610e4c565b600191505092915050565b610a25610d33565b600c60019054906101000a900460ff1615610a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6c90612526565b60405180910390fd5b6001600c5f6101000a81548160ff0219169083151502179055507fb9b601a486b7f77f42d98965cc2f55b4ccaa886d71852b716faa78033b5bc93c60405160405180910390a1565b83421115610b0257836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610af99190611ee0565b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b308c6111f0565b89604051602001610b4696959493929190612544565b6040516020818303038152906040528051906020012090505f610b6882611243565b90505f610b778287878761125c565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610beb57808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610be29291906125a3565b60405180910390fd5b610bf68a8a8a610d21565b50505050505050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b600c5f9054906101000a900460ff1681565b610c9e610d33565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d0e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d059190611fe8565b60405180910390fd5b610d1781611071565b50565b5f33905090565b610d2e838383600161128a565b505050565b610d3b610d1a565b73ffffffffffffffffffffffffffffffffffffffff16610d596107ff565b73ffffffffffffffffffffffffffffffffffffffff1614610db857610d7c610d1a565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610daf9190611fe8565b60405180910390fd5b565b5f610dc58484610c02565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e465781811015610e37578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610e2e939291906125ca565b60405180910390fd5b610e4584848484035f61128a565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ebc575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610eb39190611fe8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f2c575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610f239190611fe8565b60405180910390fd5b610f37838383611459565b505050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610fb757507f000000000000000000000000000000000000000000000000000000000000000046145b15610fe4577f00000000000000000000000000000000000000000000000000000000000000009050610fef565b610fec61169b565b90505b90565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611062575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016110599190611fe8565b60405180910390fd5b61106d825f83611459565b5050565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b60606111b060057f000000000000000000000000000000000000000000000000000000000000000061173090919063ffffffff16565b905090565b60606111eb60067f000000000000000000000000000000000000000000000000000000000000000061173090919063ffffffff16565b905090565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050559050919050565b5f61125561124f610f3c565b836117dd565b9050919050565b5f5f5f5f61126c8888888861181d565b92509250925061127c8282611904565b829350505050949350505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112fa575f6040517fe602df050000000000000000000000000000000000000000000000000000000081526004016112f19190611fe8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361136a575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016113619190611fe8565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015611453578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161144a9190611ee0565b60405180910390a35b50505050565b611464838383611a66565b600c5f9054906101000a900460ff1680156114cb5750600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156114d95750600b548110155b801561153257505f73ffffffffffffffffffffffffffffffffffffffff16600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611696575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f8173ffffffffffffffffffffffffffffffffffffffff1685846040516024016115879291906125ff565b6040516020818303038152906040527f4302e564000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611611919061266a565b5f604051808303815f865af19150503d805f811461164a576040519150601f19603f3d011682016040523d82523d5f602084013e61164f565b606091505b5050905080611693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168a906126ca565b60405180910390fd5b50505b505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000046306040516020016117159594939291906126e8565b60405160208183030381529060405280519060200120905090565b606060ff5f1b831461174c5761174583611c7f565b90506117d7565b818054611758906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054611784906122fb565b80156117cf5780601f106117a6576101008083540402835291602001916117cf565b820191905f5260205f20905b8154815290600101906020018083116117b257829003601f168201915b505050505090505b92915050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115611859575f6003859250925092506118fa565b5f6001888888886040515f815260200160405260405161187c9493929190612739565b6020604051602081039080840390855afa15801561189c573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118ed575f60015f5f1b935093509350506118fa565b805f5f5f1b935093509350505b9450945094915050565b5f60038111156119175761191661277c565b5b82600381111561192a5761192961277c565b5b0315611a6257600160038111156119445761194361277c565b5b8260038111156119575761195661277c565b5b0361198e576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260038111156119a2576119a161277c565b5b8260038111156119b5576119b461277c565b5b036119f957805f1c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016119f09190611ee0565b60405180910390fd5b600380811115611a0c57611a0b61277c565b5b826003811115611a1f57611a1e61277c565b5b03611a6157806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611a589190611f95565b60405180910390fd5b5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611ab6578060025f828254611aaa91906127d6565b92505081905550611b84565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611b3f578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401611b36939291906125ca565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611bcb578060025f8282540392505081905550611c15565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611c729190611ee0565b60405180910390a3505050565b60605f611c8b83611cf1565b90505f602067ffffffffffffffff811115611ca957611ca86123b9565b5b6040519080825280601f01601f191660200182016040528015611cdb5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f5f60ff835f1c169050601f811115611d36576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611d8182611d3f565b611d8b8185611d49565b9350611d9b818560208601611d59565b611da481611d67565b840191505092915050565b5f6020820190508181035f830152611dc78184611d77565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611dfc82611dd3565b9050919050565b611e0c81611df2565b8114611e16575f5ffd5b50565b5f81359050611e2781611e03565b92915050565b5f819050919050565b611e3f81611e2d565b8114611e49575f5ffd5b50565b5f81359050611e5a81611e36565b92915050565b5f5f60408385031215611e7657611e75611dcf565b5b5f611e8385828601611e19565b9250506020611e9485828601611e4c565b9150509250929050565b5f8115159050919050565b611eb281611e9e565b82525050565b5f602082019050611ecb5f830184611ea9565b92915050565b611eda81611e2d565b82525050565b5f602082019050611ef35f830184611ed1565b92915050565b5f5f5f60608486031215611f1057611f0f611dcf565b5b5f611f1d86828701611e19565b9350506020611f2e86828701611e19565b9250506040611f3f86828701611e4c565b9150509250925092565b5f60ff82169050919050565b611f5e81611f49565b82525050565b5f602082019050611f775f830184611f55565b92915050565b5f819050919050565b611f8f81611f7d565b82525050565b5f602082019050611fa85f830184611f86565b92915050565b5f60208284031215611fc357611fc2611dcf565b5b5f611fd084828501611e4c565b91505092915050565b611fe281611df2565b82525050565b5f602082019050611ffb5f830184611fd9565b92915050565b5f6020828403121561201657612015611dcf565b5b5f61202384828501611e19565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6120608161202c565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61209881611e2d565b82525050565b5f6120a9838361208f565b60208301905092915050565b5f602082019050919050565b5f6120cb82612066565b6120d58185612070565b93506120e083612080565b805f5b838110156121105781516120f7888261209e565b9750612102836120b5565b9250506001810190506120e3565b5085935050505092915050565b5f60e0820190506121305f83018a612057565b81810360208301526121428189611d77565b905081810360408301526121568188611d77565b90506121656060830187611ed1565b6121726080830186611fd9565b61217f60a0830185611f86565b81810360c083015261219181846120c1565b905098975050505050505050565b6121a881611f49565b81146121b2575f5ffd5b50565b5f813590506121c38161219f565b92915050565b6121d281611f7d565b81146121dc575f5ffd5b50565b5f813590506121ed816121c9565b92915050565b5f5f5f5f5f5f5f60e0888a03121561220e5761220d611dcf565b5b5f61221b8a828b01611e19565b975050602061222c8a828b01611e19565b965050604061223d8a828b01611e4c565b955050606061224e8a828b01611e4c565b945050608061225f8a828b016121b5565b93505060a06122708a828b016121df565b92505060c06122818a828b016121df565b91505092959891949750929550565b5f5f604083850312156122a6576122a5611dcf565b5b5f6122b385828601611e19565b92505060206122c485828601611e19565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061231257607f821691505b602082108103612325576123246122ce565b5b50919050565b7f486f6f6b2068617320616c7265616479206265656e207065726d616e656e746c5f8201527f792064697361626c656400000000000000000000000000000000000000000000602082015250565b5f612385602a83611d49565b91506123908261232b565b604082019050919050565b5f6020820190508181035f8301526123b281612379565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f496e76616c696420726166666c652061646472657373000000000000000000005f82015250565b5f61241a601683611d49565b9150612425826123e6565b602082019050919050565b5f6020820190508181035f8301526124478161240e565b9050919050565b7f4d696e696d756d206275726e20616d6f756e74206d75737420626520677265615f8201527f746572207468616e207a65726f00000000000000000000000000000000000000602082015250565b5f6124a8602d83611d49565b91506124b38261244e565b604082019050919050565b5f6020820190508181035f8301526124d58161249c565b9050919050565b7f486f6f6b207065726d616e656e746c792064697361626c6564000000000000005f82015250565b5f612510601983611d49565b915061251b826124dc565b602082019050919050565b5f6020820190508181035f83015261253d81612504565b9050919050565b5f60c0820190506125575f830189611f86565b6125646020830188611fd9565b6125716040830187611fd9565b61257e6060830186611ed1565b61258b6080830185611ed1565b61259860a0830184611ed1565b979650505050505050565b5f6040820190506125b65f830185611fd9565b6125c36020830184611fd9565b9392505050565b5f6060820190506125dd5f830186611fd9565b6125ea6020830185611ed1565b6125f76040830184611ed1565b949350505050565b5f6040820190506126125f830185611fd9565b61261f6020830184611ed1565b9392505050565b5f81519050919050565b5f81905092915050565b5f61264482612626565b61264e8185612630565b935061265e818560208601611d59565b80840191505092915050565b5f612675828461263a565b915081905092915050565b7f526166666c652070617274696369706174696f6e206661696c656400000000005f82015250565b5f6126b4601b83611d49565b91506126bf82612680565b602082019050919050565b5f6020820190508181035f8301526126e1816126a8565b9050919050565b5f60a0820190506126fb5f830188611f86565b6127086020830187611f86565b6127156040830186611f86565b6127226060830185611ed1565b61272f6080830184611fd9565b9695505050505050565b5f60808201905061274c5f830187611f86565b6127596020830186611f55565b6127666040830185611f86565b6127736060830184611f86565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6127e082611e2d565b91506127eb83611e2d565b9250828201905080821115612803576128026127a9565b5b9291505056fea264697066735822122030282c7555911fcb4d966e1f3964253cfc35e3870ea9a3d3aa0d18b094be00eb64736f6c634300081c0033000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a3300000000000000000000000000000000000000000000000000000019debd01c7000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a330000000000000000000000000000000000000000000000000000000000000457
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061018c575f3560e01c80637ecebe00116100dc5780639ab8e6d211610095578063d505accf1161006f578063d505accf14610440578063dd62ed3e1461045c578063f128f4b11461048c578063f2fde38b146104aa5761018c565b80639ab8e6d2146103ea578063a9059cbb14610406578063ba84e217146104365761018c565b80637ecebe0014610320578063839975bb1461035057806384b0196e1461036e5780638da5cb5b1461039257806395d89b41146103b057806397709ce7146103ce5761018c565b80633644e51511610149578063448e143911610123578063448e1439146102ac57806370a08231146102ca578063715018a6146102fa57806379cc6790146103045761018c565b80633644e5151461025457806342966c681461027257806342cc38401461028e5761018c565b806306fdde0314610190578063095ea7b3146101ae57806317a69da4146101de57806318160ddd146101e857806323b872dd14610206578063313ce56714610236575b5f5ffd5b6101986104c6565b6040516101a59190611daf565b60405180910390f35b6101c860048036038101906101c39190611e60565b610556565b6040516101d59190611eb8565b60405180910390f35b6101e6610578565b005b6101f0610632565b6040516101fd9190611ee0565b60405180910390f35b610220600480360381019061021b9190611ef9565b61063b565b60405161022d9190611eb8565b60405180910390f35b61023e610669565b60405161024b9190611f64565b60405180910390f35b61025c610671565b6040516102699190611f95565b60405180910390f35b61028c60048036038101906102879190611fae565b61067f565b005b610296610693565b6040516102a39190611fe8565b60405180910390f35b6102b46106b8565b6040516102c19190611eb8565b60405180910390f35b6102e460048036038101906102df9190612001565b6106cb565b6040516102f19190611ee0565b60405180910390f35b610302610710565b005b61031e60048036038101906103199190611e60565b610723565b005b61033a60048036038101906103359190612001565b610743565b6040516103479190611ee0565b60405180910390f35b610358610754565b6040516103659190611ee0565b60405180910390f35b61037661075a565b604051610389979695949392919061211d565b60405180910390f35b61039a6107ff565b6040516103a79190611fe8565b60405180910390f35b6103b8610827565b6040516103c59190611daf565b60405180910390f35b6103e860048036038101906103e39190612001565b6108b7565b005b61040460048036038101906103ff9190611fae565b610970565b005b610420600480360381019061041b9190611e60565b6109fb565b60405161042d9190611eb8565b60405180910390f35b61043e610a1d565b005b61045a600480360381019061045591906121f3565b610abd565b005b61047660048036038101906104719190612290565b610c02565b6040516104839190611ee0565b60405180910390f35b610494610c84565b6040516104a19190611eb8565b60405180910390f35b6104c460048036038101906104bf9190612001565b610c96565b005b6060600380546104d5906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610501906122fb565b801561054c5780601f106105235761010080835404028352916020019161054c565b820191905f5260205f20905b81548152906001019060200180831161052f57829003601f168201915b5050505050905090565b5f5f610560610d1a565b905061056d818585610d21565b600191505092915050565b610580610d33565b600c60019054906101000a900460ff16156105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c79061239b565b60405180910390fd5b5f600c5f6101000a81548160ff0219169083151502179055506001600c60016101000a81548160ff0219169083151502179055507f4be5ee7c6a0a76b9209bebdd61b374e76803cfaa8e72886ee892b8dc972423f360405160405180910390a1565b5f600254905090565b5f5f610645610d1a565b9050610652858285610dba565b61065d858585610e4c565b60019150509392505050565b5f6012905090565b5f61067a610f3c565b905090565b61069061068a610d1a565b82610ff2565b50565b600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60019054906101000a900460ff1681565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610718610d33565b6107215f611071565b565b6107358261072f610d1a565b83610dba565b61073f8282610ff2565b5050565b5f61074d82611134565b9050919050565b600b5481565b5f6060805f5f5f606061076b61117a565b6107736111b5565b46305f5f1b5f67ffffffffffffffff811115610792576107916123b9565b5b6040519080825280602002602001820160405280156107c05781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610836906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610862906122fb565b80156108ad5780601f10610884576101008083540402835291602001916108ad565b820191905f5260205f20905b81548152906001019060200180831161089057829003601f168201915b5050505050905090565b6108bf610d33565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361092d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092490612430565b60405180910390fd5b80600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610978610d33565b5f81116109ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b1906124be565b60405180910390fd5b80600b819055507ff20c987ec965f601cf6dfb8d57644b3cfff2637ee29bc07b4f104d4040bba7f2816040516109f09190611ee0565b60405180910390a150565b5f5f610a05610d1a565b9050610a12818585610e4c565b600191505092915050565b610a25610d33565b600c60019054906101000a900460ff1615610a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6c90612526565b60405180910390fd5b6001600c5f6101000a81548160ff0219169083151502179055507fb9b601a486b7f77f42d98965cc2f55b4ccaa886d71852b716faa78033b5bc93c60405160405180910390a1565b83421115610b0257836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610af99190611ee0565b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b308c6111f0565b89604051602001610b4696959493929190612544565b6040516020818303038152906040528051906020012090505f610b6882611243565b90505f610b778287878761125c565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610beb57808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610be29291906125a3565b60405180910390fd5b610bf68a8a8a610d21565b50505050505050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b600c5f9054906101000a900460ff1681565b610c9e610d33565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d0e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d059190611fe8565b60405180910390fd5b610d1781611071565b50565b5f33905090565b610d2e838383600161128a565b505050565b610d3b610d1a565b73ffffffffffffffffffffffffffffffffffffffff16610d596107ff565b73ffffffffffffffffffffffffffffffffffffffff1614610db857610d7c610d1a565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610daf9190611fe8565b60405180910390fd5b565b5f610dc58484610c02565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e465781811015610e37578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610e2e939291906125ca565b60405180910390fd5b610e4584848484035f61128a565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ebc575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610eb39190611fe8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f2c575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610f239190611fe8565b60405180910390fd5b610f37838383611459565b505050565b5f7f000000000000000000000000c76d496182b8b01570a6b96cc119bd9d32a336bf73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610fb757507f000000000000000000000000000000000000000000000000000000000000000146145b15610fe4577f8c772600db548306f41c57ca87c9818d3ce6098fdc17dec78a0cd1125bb4aedd9050610fef565b610fec61169b565b90505b90565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611062575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016110599190611fe8565b60405180910390fd5b61106d825f83611459565b5050565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b60606111b060057f4372617a797946726f67436f696e00000000000000000000000000000000000e61173090919063ffffffff16565b905090565b60606111eb60067f310000000000000000000000000000000000000000000000000000000000000161173090919063ffffffff16565b905090565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050559050919050565b5f61125561124f610f3c565b836117dd565b9050919050565b5f5f5f5f61126c8888888861181d565b92509250925061127c8282611904565b829350505050949350505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112fa575f6040517fe602df050000000000000000000000000000000000000000000000000000000081526004016112f19190611fe8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361136a575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016113619190611fe8565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015611453578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161144a9190611ee0565b60405180910390a35b50505050565b611464838383611a66565b600c5f9054906101000a900460ff1680156114cb5750600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156114d95750600b548110155b801561153257505f73ffffffffffffffffffffffffffffffffffffffff16600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611696575f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f8173ffffffffffffffffffffffffffffffffffffffff1685846040516024016115879291906125ff565b6040516020818303038152906040527f4302e564000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611611919061266a565b5f604051808303815f865af19150503d805f811461164a576040519150601f19603f3d011682016040523d82523d5f602084013e61164f565b606091505b5050905080611693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168a906126ca565b60405180910390fd5b50505b505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7facb188f5e22bcde54097f2a2fb27e573090877e2581f27d26a9140dc3d074e6b7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016117159594939291906126e8565b60405160208183030381529060405280519060200120905090565b606060ff5f1b831461174c5761174583611c7f565b90506117d7565b818054611758906122fb565b80601f0160208091040260200160405190810160405280929190818152602001828054611784906122fb565b80156117cf5780601f106117a6576101008083540402835291602001916117cf565b820191905f5260205f20905b8154815290600101906020018083116117b257829003601f168201915b505050505090505b92915050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115611859575f6003859250925092506118fa565b5f6001888888886040515f815260200160405260405161187c9493929190612739565b6020604051602081039080840390855afa15801561189c573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118ed575f60015f5f1b935093509350506118fa565b805f5f5f1b935093509350505b9450945094915050565b5f60038111156119175761191661277c565b5b82600381111561192a5761192961277c565b5b0315611a6257600160038111156119445761194361277c565b5b8260038111156119575761195661277c565b5b0361198e576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260038111156119a2576119a161277c565b5b8260038111156119b5576119b461277c565b5b036119f957805f1c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016119f09190611ee0565b60405180910390fd5b600380811115611a0c57611a0b61277c565b5b826003811115611a1f57611a1e61277c565b5b03611a6157806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611a589190611f95565b60405180910390fd5b5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611ab6578060025f828254611aaa91906127d6565b92505081905550611b84565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611b3f578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401611b36939291906125ca565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611bcb578060025f8282540392505081905550611c15565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611c729190611ee0565b60405180910390a3505050565b60605f611c8b83611cf1565b90505f602067ffffffffffffffff811115611ca957611ca86123b9565b5b6040519080825280601f01601f191660200182016040528015611cdb5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f5f60ff835f1c169050601f811115611d36576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611d8182611d3f565b611d8b8185611d49565b9350611d9b818560208601611d59565b611da481611d67565b840191505092915050565b5f6020820190508181035f830152611dc78184611d77565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611dfc82611dd3565b9050919050565b611e0c81611df2565b8114611e16575f5ffd5b50565b5f81359050611e2781611e03565b92915050565b5f819050919050565b611e3f81611e2d565b8114611e49575f5ffd5b50565b5f81359050611e5a81611e36565b92915050565b5f5f60408385031215611e7657611e75611dcf565b5b5f611e8385828601611e19565b9250506020611e9485828601611e4c565b9150509250929050565b5f8115159050919050565b611eb281611e9e565b82525050565b5f602082019050611ecb5f830184611ea9565b92915050565b611eda81611e2d565b82525050565b5f602082019050611ef35f830184611ed1565b92915050565b5f5f5f60608486031215611f1057611f0f611dcf565b5b5f611f1d86828701611e19565b9350506020611f2e86828701611e19565b9250506040611f3f86828701611e4c565b9150509250925092565b5f60ff82169050919050565b611f5e81611f49565b82525050565b5f602082019050611f775f830184611f55565b92915050565b5f819050919050565b611f8f81611f7d565b82525050565b5f602082019050611fa85f830184611f86565b92915050565b5f60208284031215611fc357611fc2611dcf565b5b5f611fd084828501611e4c565b91505092915050565b611fe281611df2565b82525050565b5f602082019050611ffb5f830184611fd9565b92915050565b5f6020828403121561201657612015611dcf565b5b5f61202384828501611e19565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6120608161202c565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61209881611e2d565b82525050565b5f6120a9838361208f565b60208301905092915050565b5f602082019050919050565b5f6120cb82612066565b6120d58185612070565b93506120e083612080565b805f5b838110156121105781516120f7888261209e565b9750612102836120b5565b9250506001810190506120e3565b5085935050505092915050565b5f60e0820190506121305f83018a612057565b81810360208301526121428189611d77565b905081810360408301526121568188611d77565b90506121656060830187611ed1565b6121726080830186611fd9565b61217f60a0830185611f86565b81810360c083015261219181846120c1565b905098975050505050505050565b6121a881611f49565b81146121b2575f5ffd5b50565b5f813590506121c38161219f565b92915050565b6121d281611f7d565b81146121dc575f5ffd5b50565b5f813590506121ed816121c9565b92915050565b5f5f5f5f5f5f5f60e0888a03121561220e5761220d611dcf565b5b5f61221b8a828b01611e19565b975050602061222c8a828b01611e19565b965050604061223d8a828b01611e4c565b955050606061224e8a828b01611e4c565b945050608061225f8a828b016121b5565b93505060a06122708a828b016121df565b92505060c06122818a828b016121df565b91505092959891949750929550565b5f5f604083850312156122a6576122a5611dcf565b5b5f6122b385828601611e19565b92505060206122c485828601611e19565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061231257607f821691505b602082108103612325576123246122ce565b5b50919050565b7f486f6f6b2068617320616c7265616479206265656e207065726d616e656e746c5f8201527f792064697361626c656400000000000000000000000000000000000000000000602082015250565b5f612385602a83611d49565b91506123908261232b565b604082019050919050565b5f6020820190508181035f8301526123b281612379565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f496e76616c696420726166666c652061646472657373000000000000000000005f82015250565b5f61241a601683611d49565b9150612425826123e6565b602082019050919050565b5f6020820190508181035f8301526124478161240e565b9050919050565b7f4d696e696d756d206275726e20616d6f756e74206d75737420626520677265615f8201527f746572207468616e207a65726f00000000000000000000000000000000000000602082015250565b5f6124a8602d83611d49565b91506124b38261244e565b604082019050919050565b5f6020820190508181035f8301526124d58161249c565b9050919050565b7f486f6f6b207065726d616e656e746c792064697361626c6564000000000000005f82015250565b5f612510601983611d49565b915061251b826124dc565b602082019050919050565b5f6020820190508181035f83015261253d81612504565b9050919050565b5f60c0820190506125575f830189611f86565b6125646020830188611fd9565b6125716040830187611fd9565b61257e6060830186611ed1565b61258b6080830185611ed1565b61259860a0830184611ed1565b979650505050505050565b5f6040820190506125b65f830185611fd9565b6125c36020830184611fd9565b9392505050565b5f6060820190506125dd5f830186611fd9565b6125ea6020830185611ed1565b6125f76040830184611ed1565b949350505050565b5f6040820190506126125f830185611fd9565b61261f6020830184611ed1565b9392505050565b5f81519050919050565b5f81905092915050565b5f61264482612626565b61264e8185612630565b935061265e818560208601611d59565b80840191505092915050565b5f612675828461263a565b915081905092915050565b7f526166666c652070617274696369706174696f6e206661696c656400000000005f82015250565b5f6126b4601b83611d49565b91506126bf82612680565b602082019050919050565b5f6020820190508181035f8301526126e1816126a8565b9050919050565b5f60a0820190506126fb5f830188611f86565b6127086020830187611f86565b6127156040830186611f86565b6127226060830185611ed1565b61272f6080830184611fd9565b9695505050505050565b5f60808201905061274c5f830187611f86565b6127596020830186611f55565b6127666040830185611f86565b6127736060830184611f86565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6127e082611e2d565b91506127eb83611e2d565b9250828201905080821115612803576128026127a9565b5b9291505056fea264697066735822122030282c7555911fcb4d966e1f3964253cfc35e3870ea9a3d3aa0d18b094be00eb64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a3300000000000000000000000000000000000000000000000000000019debd01c7000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a330000000000000000000000000000000000000000000000000000000000000457
-----Decoded View---------------
Arg [0] : initialOwner (address): 0xB92BB99C271883146acdc494e4443c44285A2A33
Arg [1] : initialSupply (uint256): 111111111111
Arg [2] : _burnRaffleAddress (address): 0xB92BB99C271883146acdc494e4443c44285A2A33
Arg [3] : _minBurnAmount (uint256): 1111
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a33
Arg [1] : 00000000000000000000000000000000000000000000000000000019debd01c7
Arg [2] : 000000000000000000000000b92bb99c271883146acdc494e4443c44285a2a33
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000457
Deployed Bytecode Sourcemap
140372:2524:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13038:91;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15331:190;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;141868:239;;;:::i;:::-;;14140:99;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16131:249;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;13991:84;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;133409:114;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23011:89;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;140466:32;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;140577:43;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;14302:118;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;135875:103;;;:::i;:::-;;23429:161;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;133151:145;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;140505:28;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;127807:580;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;135200:87;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;13248:95;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;141319:278;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;141605:255;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;14625:182;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;142115:178;;;:::i;:::-;;132397:695;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;14870:142;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;140540:30;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;136133:220;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;13038:91;13083:13;13116:5;13109:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13038:91;:::o;15331:190::-;15404:4;15421:13;15437:12;:10;:12::i;:::-;15421:28;;15460:31;15469:5;15476:7;15485:5;15460:8;:31::i;:::-;15509:4;15502:11;;;15331:190;;;;:::o;141868:239::-;135086:13;:11;:13::i;:::-;141928:23:::1;;;;;;;;;;;141927:24;141919:79;;;;;;;;;;;;:::i;:::-;;;;;;;;;142023:5;142009:11;;:19;;;;;;;;;;;;;;;;;;142065:4;142039:23;;:30;;;;;;;;;;;;;;;;;;142085:14;;;;;;;;;;141868:239::o:0;14140:99::-;14192:7;14219:12;;14212:19;;14140:99;:::o;16131:249::-;16218:4;16235:15;16253:12;:10;:12::i;:::-;16235:30;;16276:37;16292:4;16298:7;16307:5;16276:15;:37::i;:::-;16324:26;16334:4;16340:2;16344:5;16324:9;:26::i;:::-;16368:4;16361:11;;;16131:249;;;;;:::o;13991:84::-;14040:5;14065:2;14058:9;;13991:84;:::o;133409:114::-;133468:7;133495:20;:18;:20::i;:::-;133488:27;;133409:114;:::o;23011:89::-;23066:26;23072:12;:10;:12::i;:::-;23086:5;23066;:26::i;:::-;23011:89;:::o;140466:32::-;;;;;;;;;;;;;:::o;140577:43::-;;;;;;;;;;;;;:::o;14302:118::-;14367:7;14394:9;:18;14404:7;14394:18;;;;;;;;;;;;;;;;14387:25;;14302:118;;;:::o;135875:103::-;135086:13;:11;:13::i;:::-;135940:30:::1;135967:1;135940:18;:30::i;:::-;135875:103::o:0;23429:161::-;23505:45;23521:7;23530:12;:10;:12::i;:::-;23544:5;23505:15;:45::i;:::-;23561:21;23567:7;23576:5;23561;:21::i;:::-;23429:161;;:::o;133151:145::-;133242:7;133269:19;133282:5;133269:12;:19::i;:::-;133262:26;;133151:145;;;:::o;140505:28::-;;;;:::o;127807:580::-;127910:13;127938:18;127971:21;128007:15;128037:25;128077:12;128104:27;128212:13;:11;:13::i;:::-;128240:16;:14;:16::i;:::-;128271:13;128307:4;128335:1;128327:10;;128366:1;128352:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128159:220;;;;;;;;;;;;;;;;;;;;;127807:580;;;;;;;:::o;135200:87::-;135246:7;135273:6;;;;;;;;;;;135266:13;;135200:87;:::o;13248:95::-;13295:13;13328:7;13321:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13248:95;:::o;141319:278::-;135086:13;:11;:13::i;:::-;141511:1:::1;141481:32;;:18;:32;;::::0;141473:67:::1;;;;;;;;;;;;:::i;:::-;;;;;;;;;141571:18;141551:17;;:38;;;;;;;;;;;;;;;;;;141319:278:::0;:::o;141605:255::-;135086:13;:11;:13::i;:::-;141708:1:::1;141691:14;:18;141683:76;;;;;;;;;;;;:::i;:::-;;;;;;;;;141786:14;141770:13;:30;;;;141816:36;141837:14;141816:36;;;;;;:::i;:::-;;;;;;;;141605:255:::0;:::o;14625:182::-;14694:4;14711:13;14727:12;:10;:12::i;:::-;14711:28;;14750:27;14760:5;14767:2;14771:5;14750:9;:27::i;:::-;14795:4;14788:11;;;14625:182;;;;:::o;142115:178::-;135086:13;:11;:13::i;:::-;142174:23:::1;;;;;;;;;;;142173:24;142165:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;142252:4;142238:11;;:18;;;;;;;;;;;;;;;;;;142272:13;;;;;;;;;;142115:178::o:0;132397:695::-;132627:8;132609:15;:26;132605:99;;;132683:8;132659:33;;;;;;;;;;;:::i;:::-;;;;;;;;132605:99;132716:18;131716:95;132775:5;132782:7;132791:5;132798:16;132808:5;132798:9;:16::i;:::-;132816:8;132747:78;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;132737:89;;;;;;132716:110;;132839:12;132854:28;132871:10;132854:16;:28::i;:::-;132839:43;;132895:14;132912:28;132926:4;132932:1;132935;132938;132912:13;:28::i;:::-;132895:45;;132965:5;132955:15;;:6;:15;;;132951:90;;133015:6;133023:5;132994:35;;;;;;;;;;;;:::i;:::-;;;;;;;;132951:90;133053:31;133062:5;133069:7;133078:5;133053:8;:31::i;:::-;132594:498;;;132397:695;;;;;;;:::o;14870:142::-;14950:7;14977:11;:18;14989:5;14977:18;;;;;;;;;;;;;;;:27;14996:7;14977:27;;;;;;;;;;;;;;;;14970:34;;14870:142;;;;:::o;140540:30::-;;;;;;;;;;;;;:::o;136133:220::-;135086:13;:11;:13::i;:::-;136238:1:::1;136218:22;;:8;:22;;::::0;136214:93:::1;;136292:1;136264:31;;;;;;;;;;;:::i;:::-;;;;;;;;136214:93;136317:28;136336:8;136317:18;:28::i;:::-;136133:220:::0;:::o;4337:98::-;4390:7;4417:10;4410:17;;4337:98;:::o;20190:130::-;20275:37;20284:5;20291:7;20300:5;20307:4;20275:8;:37::i;:::-;20190:130;;;:::o;135365:166::-;135436:12;:10;:12::i;:::-;135425:23;;:7;:5;:7::i;:::-;:23;;;135421:103;;135499:12;:10;:12::i;:::-;135472:40;;;;;;;;;;;:::i;:::-;;;;;;;;135421:103;135365:166::o;21922:487::-;22022:24;22049:25;22059:5;22066:7;22049:9;:25::i;:::-;22022:52;;22109:17;22089:16;:37;22085:317;;22166:5;22147:16;:24;22143:132;;;22226:7;22235:16;22253:5;22199:60;;;;;;;;;;;;;:::i;:::-;;;;;;;;22143:132;22318:57;22327:5;22334:7;22362:5;22343:16;:24;22369:5;22318:8;:57::i;:::-;22085:317;22011:398;21922:487;;;:::o;16765:308::-;16865:1;16849:18;;:4;:18;;;16845:88;;16918:1;16891:30;;;;;;;;;;;:::i;:::-;;;;;;;;16845:88;16961:1;16947:16;;:2;:16;;;16943:88;;17016:1;16987:32;;;;;;;;;;;:::i;:::-;;;;;;;;16943:88;17041:24;17049:4;17055:2;17059:5;17041:7;:24::i;:::-;16765:308;;;:::o;126474:268::-;126527:7;126568:11;126551:28;;126559:4;126551:28;;;:63;;;;;126600:14;126583:13;:31;126551:63;126547:188;;;126638:22;126631:29;;;;126547:188;126700:23;:21;:23::i;:::-;126693:30;;126474:268;;:::o;19426:211::-;19516:1;19497:21;;:7;:21;;;19493:91;;19569:1;19542:30;;;;;;;;;;;:::i;:::-;;;;;;;;19493:91;19594:35;19602:7;19619:1;19623:5;19594:7;:35::i;:::-;19426:211;;:::o;136513:191::-;136587:16;136606:6;;;;;;;;;;;136587:25;;136632:8;136623:6;;:17;;;;;;;;;;;;;;;;;;136687:8;136656:40;;136677:8;136656:40;;;;;;;;;;;;136576:128;136513:191;:::o;129901:109::-;129961:7;129988;:14;129996:5;129988:14;;;;;;;;;;;;;;;;129981:21;;129901:109;;;:::o;128716:128::-;128762:13;128795:41;128822:13;128795:5;:26;;:41;;;;:::i;:::-;128788:48;;128716:128;:::o;129179:137::-;129228:13;129261:47;129291:16;129261:8;:29;;:47;;;;:::i;:::-;129254:54;;129179:137;:::o;130131:402::-;130191:7;130498;:14;130506:5;130498:14;;;;;;;;;;;;;;;;:16;;;;;;;;;;;;130491:23;;130131:402;;;:::o;127573:178::-;127650:7;127677:66;127710:20;:18;:20::i;:::-;127732:10;127677:32;:66::i;:::-;127670:73;;127573:178;;;:::o;34619:264::-;34704:7;34725:17;34744:18;34764:16;34784:25;34795:4;34801:1;34804;34807;34784:10;:25::i;:::-;34724:85;;;;;;34820:28;34832:5;34839:8;34820:11;:28::i;:::-;34866:9;34859:16;;;;;34619:264;;;;;;:::o;21187:443::-;21317:1;21300:19;;:5;:19;;;21296:91;;21372:1;21343:32;;;;;;;;;;;:::i;:::-;;;;;;;;21296:91;21420:1;21401:21;;:7;:21;;;21397:92;;21474:1;21446:31;;;;;;;;;;;:::i;:::-;;;;;;;;21397:92;21529:5;21499:11;:18;21511:5;21499:18;;;;;;;;;;;;;;;:27;21518:7;21499:27;;;;;;;;;;;;;;;:35;;;;21549:9;21545:78;;;21596:7;21580:31;;21589:5;21580:31;;;21605:5;21580:31;;;;;;:::i;:::-;;;;;;;;21545:78;21187:443;;;;:::o;142301:592::-;142396:30;142410:4;142416:2;142420:5;142396:13;:30::i;:::-;142443:11;;;;;;;;;;;:38;;;;;142464:17;;;;;;;;;;;142458:23;;:2;:23;;;142443:38;:64;;;;;142494:13;;142485:5;:22;;142443:64;:99;;;;;142540:1;142511:31;;:17;;;;;;;;;;;:31;;;;142443:99;142439:447;;;142559:18;142592:17;;;;;;;;;;;142559:51;;142626:12;142652:6;142644:20;;142747:4;142753:5;142683:76;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142644:130;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142625:149;;;142794:7;142789:86;;142822:37;;;;;;;;;;:::i;:::-;;;;;;;;142789:86;142544:342;;142439:447;142301:592;;;:::o;126750:181::-;126805:7;124666:95;126864:11;126877:14;126893:13;126916:4;126842:80;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;126832:91;;;;;;126825:98;;126750:181;:::o;120943:273::-;121037:13;118917:66;121096:17;;121086:5;121067:46;121063:146;;121137:15;121146:5;121137:8;:15::i;:::-;121130:22;;;;121063:146;121192:5;121185:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;120943:273;;;;;:::o;112763:382::-;112856:14;112940:4;112934:11;112971:10;112966:3;112959:23;113019:15;113012:4;113007:3;113003:14;112996:39;113072:10;113065:4;113060:3;113056:14;113049:34;113122:4;113117:3;113107:20;113097:30;;112908:230;112763:382;;;;:::o;32903:1577::-;33034:17;33053:16;33071:14;33998:66;33993:1;33985:10;;:79;33981:166;;;34097:1;34101:30;34133:1;34081:54;;;;;;;;33981:166;34244:14;34261:24;34271:4;34277:1;34280;34283;34261:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34244:41;;34318:1;34300:20;;:6;:20;;;34296:115;;34353:1;34357:29;34396:1;34388:10;;34337:62;;;;;;;;;34296:115;34431:6;34439:20;34469:1;34461:10;;34423:49;;;;;;;32903:1577;;;;;;;;;:::o;35021:542::-;35117:20;35108:29;;;;;;;;:::i;:::-;;:5;:29;;;;;;;;:::i;:::-;;;35104:452;35154:7;35104:452;35215:29;35206:38;;;;;;;;:::i;:::-;;:5;:38;;;;;;;;:::i;:::-;;;35202:354;;35268:23;;;;;;;;;;;;;;35202:354;35322:35;35313:44;;;;;;;;:::i;:::-;;:5;:44;;;;;;;;:::i;:::-;;;35309:247;;35417:8;35409:17;;35381:46;;;;;;;;;;;:::i;:::-;;;;;;;;35309:247;35458:30;35449:39;;;;;;;;:::i;:::-;;:5;:39;;;;;;;;:::i;:::-;;;35445:111;;35535:8;35512:32;;;;;;;;;;;:::i;:::-;;;;;;;;35445:111;35021:542;;;:::o;17397:1135::-;17503:1;17487:18;;:4;:18;;;17483:552;;17641:5;17625:12;;:21;;;;;;;:::i;:::-;;;;;;;;17483:552;;;17679:19;17701:9;:15;17711:4;17701:15;;;;;;;;;;;;;;;;17679:37;;17749:5;17735:11;:19;17731:117;;;17807:4;17813:11;17826:5;17782:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;17731:117;18003:5;17989:11;:19;17971:9;:15;17981:4;17971:15;;;;;;;;;;;;;;;:37;;;;17664:371;17483:552;18065:1;18051:16;;:2;:16;;;18047:435;;18233:5;18217:12;;:21;;;;;;;;;;;18047:435;;;18450:5;18433:9;:13;18443:2;18433:13;;;;;;;;;;;;;;;;:22;;;;;;;;;;;18047:435;18514:2;18499:25;;18508:4;18499:25;;;18518:5;18499:25;;;;;;:::i;:::-;;;;;;;;17397:1135;;;:::o;119626:387::-;119685:13;119711:11;119725:16;119736:4;119725:10;:16::i;:::-;119711:30;;119831:17;119862:2;119851:14;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;119831:34;;119928:3;119923;119916:16;119969:4;119962;119957:3;119953:14;119946:28;120002:3;119995:10;;;;119626:387;;;:::o;120090:251::-;120151:7;120171:14;120224:4;120215;120188:33;;:40;120171:57;;120252:2;120243:6;:11;120239:71;;;120278:20;;;;;;;;;;;;;;120239:71;120327:6;120320:13;;;120090:251;;;:::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:139::-;376:6;371:3;366;360:23;417:1;408:6;403:3;399:16;392:27;287:139;;;:::o;432:102::-;473:6;524:2;520:7;515:2;508:5;504:14;500:28;490:38;;432:102;;;:::o;540:377::-;628:3;656:39;689:5;656:39;:::i;:::-;711:71;775:6;770:3;711:71;:::i;:::-;704:78;;791:65;849:6;844:3;837:4;830:5;826:16;791:65;:::i;:::-;881:29;903:6;881:29;:::i;:::-;876:3;872:39;865:46;;632:285;540:377;;;;:::o;923:313::-;1036:4;1074:2;1063:9;1059:18;1051:26;;1123:9;1117:4;1113:20;1109:1;1098:9;1094:17;1087:47;1151:78;1224:4;1215:6;1151:78;:::i;:::-;1143:86;;923:313;;;;:::o;1323:117::-;1432:1;1429;1422:12;1569:126;1606:7;1646:42;1639:5;1635:54;1624:65;;1569:126;;;:::o;1701:96::-;1738:7;1767:24;1785:5;1767:24;:::i;:::-;1756:35;;1701:96;;;:::o;1803:122::-;1876:24;1894:5;1876:24;:::i;:::-;1869:5;1866:35;1856:63;;1915:1;1912;1905:12;1856:63;1803:122;:::o;1931:139::-;1977:5;2015:6;2002:20;1993:29;;2031:33;2058:5;2031:33;:::i;:::-;1931:139;;;;:::o;2076:77::-;2113:7;2142:5;2131:16;;2076:77;;;:::o;2159:122::-;2232:24;2250:5;2232:24;:::i;:::-;2225:5;2222:35;2212:63;;2271:1;2268;2261:12;2212:63;2159:122;:::o;2287:139::-;2333:5;2371:6;2358:20;2349:29;;2387:33;2414:5;2387:33;:::i;:::-;2287:139;;;;:::o;2432:474::-;2500:6;2508;2557:2;2545:9;2536:7;2532:23;2528:32;2525:119;;;2563:79;;:::i;:::-;2525:119;2683:1;2708:53;2753:7;2744:6;2733:9;2729:22;2708:53;:::i;:::-;2698:63;;2654:117;2810:2;2836:53;2881:7;2872:6;2861:9;2857:22;2836:53;:::i;:::-;2826:63;;2781:118;2432:474;;;;;:::o;2912:90::-;2946:7;2989:5;2982:13;2975:21;2964:32;;2912:90;;;:::o;3008:109::-;3089:21;3104:5;3089:21;:::i;:::-;3084:3;3077:34;3008:109;;:::o;3123:210::-;3210:4;3248:2;3237:9;3233:18;3225:26;;3261:65;3323:1;3312:9;3308:17;3299:6;3261:65;:::i;:::-;3123:210;;;;:::o;3339:118::-;3426:24;3444:5;3426:24;:::i;:::-;3421:3;3414:37;3339:118;;:::o;3463:222::-;3556:4;3594:2;3583:9;3579:18;3571:26;;3607:71;3675:1;3664:9;3660:17;3651:6;3607:71;:::i;:::-;3463:222;;;;:::o;3691:619::-;3768:6;3776;3784;3833:2;3821:9;3812:7;3808:23;3804:32;3801:119;;;3839:79;;:::i;:::-;3801:119;3959:1;3984:53;4029:7;4020:6;4009:9;4005:22;3984:53;:::i;:::-;3974:63;;3930:117;4086:2;4112:53;4157:7;4148:6;4137:9;4133:22;4112:53;:::i;:::-;4102:63;;4057:118;4214:2;4240:53;4285:7;4276:6;4265:9;4261:22;4240:53;:::i;:::-;4230:63;;4185:118;3691:619;;;;;:::o;4316:86::-;4351:7;4391:4;4384:5;4380:16;4369:27;;4316:86;;;:::o;4408:112::-;4491:22;4507:5;4491:22;:::i;:::-;4486:3;4479:35;4408:112;;:::o;4526:214::-;4615:4;4653:2;4642:9;4638:18;4630:26;;4666:67;4730:1;4719:9;4715:17;4706:6;4666:67;:::i;:::-;4526:214;;;;:::o;4746:77::-;4783:7;4812:5;4801:16;;4746:77;;;:::o;4829:118::-;4916:24;4934:5;4916:24;:::i;:::-;4911:3;4904:37;4829:118;;:::o;4953:222::-;5046:4;5084:2;5073:9;5069:18;5061:26;;5097:71;5165:1;5154:9;5150:17;5141:6;5097:71;:::i;:::-;4953:222;;;;:::o;5181:329::-;5240:6;5289:2;5277:9;5268:7;5264:23;5260:32;5257:119;;;5295:79;;:::i;:::-;5257:119;5415:1;5440:53;5485:7;5476:6;5465:9;5461:22;5440:53;:::i;:::-;5430:63;;5386:117;5181:329;;;;:::o;5516:118::-;5603:24;5621:5;5603:24;:::i;:::-;5598:3;5591:37;5516:118;;:::o;5640:222::-;5733:4;5771:2;5760:9;5756:18;5748:26;;5784:71;5852:1;5841:9;5837:17;5828:6;5784:71;:::i;:::-;5640:222;;;;:::o;5868:329::-;5927:6;5976:2;5964:9;5955:7;5951:23;5947:32;5944:119;;;5982:79;;:::i;:::-;5944:119;6102:1;6127:53;6172:7;6163:6;6152:9;6148:22;6127:53;:::i;:::-;6117:63;;6073:117;5868:329;;;;:::o;6203:149::-;6239:7;6279:66;6272:5;6268:78;6257:89;;6203:149;;;:::o;6358:115::-;6443:23;6460:5;6443:23;:::i;:::-;6438:3;6431:36;6358:115;;:::o;6479:114::-;6546:6;6580:5;6574:12;6564:22;;6479:114;;;:::o;6599:184::-;6698:11;6732:6;6727:3;6720:19;6772:4;6767:3;6763:14;6748:29;;6599:184;;;;:::o;6789:132::-;6856:4;6879:3;6871:11;;6909:4;6904:3;6900:14;6892:22;;6789:132;;;:::o;6927:108::-;7004:24;7022:5;7004:24;:::i;:::-;6999:3;6992:37;6927:108;;:::o;7041:179::-;7110:10;7131:46;7173:3;7165:6;7131:46;:::i;:::-;7209:4;7204:3;7200:14;7186:28;;7041:179;;;;:::o;7226:113::-;7296:4;7328;7323:3;7319:14;7311:22;;7226:113;;;:::o;7375:732::-;7494:3;7523:54;7571:5;7523:54;:::i;:::-;7593:86;7672:6;7667:3;7593:86;:::i;:::-;7586:93;;7703:56;7753:5;7703:56;:::i;:::-;7782:7;7813:1;7798:284;7823:6;7820:1;7817:13;7798:284;;;7899:6;7893:13;7926:63;7985:3;7970:13;7926:63;:::i;:::-;7919:70;;8012:60;8065:6;8012:60;:::i;:::-;8002:70;;7858:224;7845:1;7842;7838:9;7833:14;;7798:284;;;7802:14;8098:3;8091:10;;7499:608;;;7375:732;;;;:::o;8113:1215::-;8462:4;8500:3;8489:9;8485:19;8477:27;;8514:69;8580:1;8569:9;8565:17;8556:6;8514:69;:::i;:::-;8630:9;8624:4;8620:20;8615:2;8604:9;8600:18;8593:48;8658:78;8731:4;8722:6;8658:78;:::i;:::-;8650:86;;8783:9;8777:4;8773:20;8768:2;8757:9;8753:18;8746:48;8811:78;8884:4;8875:6;8811:78;:::i;:::-;8803:86;;8899:72;8967:2;8956:9;8952:18;8943:6;8899:72;:::i;:::-;8981:73;9049:3;9038:9;9034:19;9025:6;8981:73;:::i;:::-;9064;9132:3;9121:9;9117:19;9108:6;9064:73;:::i;:::-;9185:9;9179:4;9175:20;9169:3;9158:9;9154:19;9147:49;9213:108;9316:4;9307:6;9213:108;:::i;:::-;9205:116;;8113:1215;;;;;;;;;;:::o;9334:118::-;9405:22;9421:5;9405:22;:::i;:::-;9398:5;9395:33;9385:61;;9442:1;9439;9432:12;9385:61;9334:118;:::o;9458:135::-;9502:5;9540:6;9527:20;9518:29;;9556:31;9581:5;9556:31;:::i;:::-;9458:135;;;;:::o;9599:122::-;9672:24;9690:5;9672:24;:::i;:::-;9665:5;9662:35;9652:63;;9711:1;9708;9701:12;9652:63;9599:122;:::o;9727:139::-;9773:5;9811:6;9798:20;9789:29;;9827:33;9854:5;9827:33;:::i;:::-;9727:139;;;;:::o;9872:1199::-;9983:6;9991;9999;10007;10015;10023;10031;10080:3;10068:9;10059:7;10055:23;10051:33;10048:120;;;10087:79;;:::i;:::-;10048:120;10207:1;10232:53;10277:7;10268:6;10257:9;10253:22;10232:53;:::i;:::-;10222:63;;10178:117;10334:2;10360:53;10405:7;10396:6;10385:9;10381:22;10360:53;:::i;:::-;10350:63;;10305:118;10462:2;10488:53;10533:7;10524:6;10513:9;10509:22;10488:53;:::i;:::-;10478:63;;10433:118;10590:2;10616:53;10661:7;10652:6;10641:9;10637:22;10616:53;:::i;:::-;10606:63;;10561:118;10718:3;10745:51;10788:7;10779:6;10768:9;10764:22;10745:51;:::i;:::-;10735:61;;10689:117;10845:3;10872:53;10917:7;10908:6;10897:9;10893:22;10872:53;:::i;:::-;10862:63;;10816:119;10974:3;11001:53;11046:7;11037:6;11026:9;11022:22;11001:53;:::i;:::-;10991:63;;10945:119;9872:1199;;;;;;;;;;:::o;11077:474::-;11145:6;11153;11202:2;11190:9;11181:7;11177:23;11173:32;11170:119;;;11208:79;;:::i;:::-;11170:119;11328:1;11353:53;11398:7;11389:6;11378:9;11374:22;11353:53;:::i;:::-;11343:63;;11299:117;11455:2;11481:53;11526:7;11517:6;11506:9;11502:22;11481:53;:::i;:::-;11471:63;;11426:118;11077:474;;;;;:::o;11557:180::-;11605:77;11602:1;11595:88;11702:4;11699:1;11692:15;11726:4;11723:1;11716:15;11743:320;11787:6;11824:1;11818:4;11814:12;11804:22;;11871:1;11865:4;11861:12;11892:18;11882:81;;11948:4;11940:6;11936:17;11926:27;;11882:81;12010:2;12002:6;11999:14;11979:18;11976:38;11973:84;;12029:18;;:::i;:::-;11973:84;11794:269;11743:320;;;:::o;12069:229::-;12209:34;12205:1;12197:6;12193:14;12186:58;12278:12;12273:2;12265:6;12261:15;12254:37;12069:229;:::o;12304:366::-;12446:3;12467:67;12531:2;12526:3;12467:67;:::i;:::-;12460:74;;12543:93;12632:3;12543:93;:::i;:::-;12661:2;12656:3;12652:12;12645:19;;12304:366;;;:::o;12676:419::-;12842:4;12880:2;12869:9;12865:18;12857:26;;12929:9;12923:4;12919:20;12915:1;12904:9;12900:17;12893:47;12957:131;13083:4;12957:131;:::i;:::-;12949:139;;12676:419;;;:::o;13101:180::-;13149:77;13146:1;13139:88;13246:4;13243:1;13236:15;13270:4;13267:1;13260:15;13287:172;13427:24;13423:1;13415:6;13411:14;13404:48;13287:172;:::o;13465:366::-;13607:3;13628:67;13692:2;13687:3;13628:67;:::i;:::-;13621:74;;13704:93;13793:3;13704:93;:::i;:::-;13822:2;13817:3;13813:12;13806:19;;13465:366;;;:::o;13837:419::-;14003:4;14041:2;14030:9;14026:18;14018:26;;14090:9;14084:4;14080:20;14076:1;14065:9;14061:17;14054:47;14118:131;14244:4;14118:131;:::i;:::-;14110:139;;13837:419;;;:::o;14262:232::-;14402:34;14398:1;14390:6;14386:14;14379:58;14471:15;14466:2;14458:6;14454:15;14447:40;14262:232;:::o;14500:366::-;14642:3;14663:67;14727:2;14722:3;14663:67;:::i;:::-;14656:74;;14739:93;14828:3;14739:93;:::i;:::-;14857:2;14852:3;14848:12;14841:19;;14500:366;;;:::o;14872:419::-;15038:4;15076:2;15065:9;15061:18;15053:26;;15125:9;15119:4;15115:20;15111:1;15100:9;15096:17;15089:47;15153:131;15279:4;15153:131;:::i;:::-;15145:139;;14872:419;;;:::o;15297:175::-;15437:27;15433:1;15425:6;15421:14;15414:51;15297:175;:::o;15478:366::-;15620:3;15641:67;15705:2;15700:3;15641:67;:::i;:::-;15634:74;;15717:93;15806:3;15717:93;:::i;:::-;15835:2;15830:3;15826:12;15819:19;;15478:366;;;:::o;15850:419::-;16016:4;16054:2;16043:9;16039:18;16031:26;;16103:9;16097:4;16093:20;16089:1;16078:9;16074:17;16067:47;16131:131;16257:4;16131:131;:::i;:::-;16123:139;;15850:419;;;:::o;16275:775::-;16508:4;16546:3;16535:9;16531:19;16523:27;;16560:71;16628:1;16617:9;16613:17;16604:6;16560:71;:::i;:::-;16641:72;16709:2;16698:9;16694:18;16685:6;16641:72;:::i;:::-;16723;16791:2;16780:9;16776:18;16767:6;16723:72;:::i;:::-;16805;16873:2;16862:9;16858:18;16849:6;16805:72;:::i;:::-;16887:73;16955:3;16944:9;16940:19;16931:6;16887:73;:::i;:::-;16970;17038:3;17027:9;17023:19;17014:6;16970:73;:::i;:::-;16275:775;;;;;;;;;:::o;17056:332::-;17177:4;17215:2;17204:9;17200:18;17192:26;;17228:71;17296:1;17285:9;17281:17;17272:6;17228:71;:::i;:::-;17309:72;17377:2;17366:9;17362:18;17353:6;17309:72;:::i;:::-;17056:332;;;;;:::o;17394:442::-;17543:4;17581:2;17570:9;17566:18;17558:26;;17594:71;17662:1;17651:9;17647:17;17638:6;17594:71;:::i;:::-;17675:72;17743:2;17732:9;17728:18;17719:6;17675:72;:::i;:::-;17757;17825:2;17814:9;17810:18;17801:6;17757:72;:::i;:::-;17394:442;;;;;;:::o;17842:332::-;17963:4;18001:2;17990:9;17986:18;17978:26;;18014:71;18082:1;18071:9;18067:17;18058:6;18014:71;:::i;:::-;18095:72;18163:2;18152:9;18148:18;18139:6;18095:72;:::i;:::-;17842:332;;;;;:::o;18180:98::-;18231:6;18265:5;18259:12;18249:22;;18180:98;;;:::o;18284:147::-;18385:11;18422:3;18407:18;;18284:147;;;;:::o;18437:386::-;18541:3;18569:38;18601:5;18569:38;:::i;:::-;18623:88;18704:6;18699:3;18623:88;:::i;:::-;18616:95;;18720:65;18778:6;18773:3;18766:4;18759:5;18755:16;18720:65;:::i;:::-;18810:6;18805:3;18801:16;18794:23;;18545:278;18437:386;;;;:::o;18829:271::-;18959:3;18981:93;19070:3;19061:6;18981:93;:::i;:::-;18974:100;;19091:3;19084:10;;18829:271;;;;:::o;19106:177::-;19246:29;19242:1;19234:6;19230:14;19223:53;19106:177;:::o;19289:366::-;19431:3;19452:67;19516:2;19511:3;19452:67;:::i;:::-;19445:74;;19528:93;19617:3;19528:93;:::i;:::-;19646:2;19641:3;19637:12;19630:19;;19289:366;;;:::o;19661:419::-;19827:4;19865:2;19854:9;19850:18;19842:26;;19914:9;19908:4;19904:20;19900:1;19889:9;19885:17;19878:47;19942:131;20068:4;19942:131;:::i;:::-;19934:139;;19661:419;;;:::o;20086:664::-;20291:4;20329:3;20318:9;20314:19;20306:27;;20343:71;20411:1;20400:9;20396:17;20387:6;20343:71;:::i;:::-;20424:72;20492:2;20481:9;20477:18;20468:6;20424:72;:::i;:::-;20506;20574:2;20563:9;20559:18;20550:6;20506:72;:::i;:::-;20588;20656:2;20645:9;20641:18;20632:6;20588:72;:::i;:::-;20670:73;20738:3;20727:9;20723:19;20714:6;20670:73;:::i;:::-;20086:664;;;;;;;;:::o;20756:545::-;20929:4;20967:3;20956:9;20952:19;20944:27;;20981:71;21049:1;21038:9;21034:17;21025:6;20981:71;:::i;:::-;21062:68;21126:2;21115:9;21111:18;21102:6;21062:68;:::i;:::-;21140:72;21208:2;21197:9;21193:18;21184:6;21140:72;:::i;:::-;21222;21290:2;21279:9;21275:18;21266:6;21222:72;:::i;:::-;20756:545;;;;;;;:::o;21307:180::-;21355:77;21352:1;21345:88;21452:4;21449:1;21442:15;21476:4;21473:1;21466:15;21493:180;21541:77;21538:1;21531:88;21638:4;21635:1;21628:15;21662:4;21659:1;21652:15;21679:191;21719:3;21738:20;21756:1;21738:20;:::i;:::-;21733:25;;21772:20;21790:1;21772:20;:::i;:::-;21767:25;;21815:1;21812;21808:9;21801:16;;21836:3;21833:1;21830:10;21827:36;;;21843:18;;:::i;:::-;21827:36;21679:191;;;;:::o
Swarm Source
ipfs://30282c7555911fcb4d966e1f3964253cfc35e3870ea9a3d3aa0d18b094be00eb
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.