ETH Price: $3,433.02 (+3.58%)
Gas: 7.94 Gwei

Contract

0x1Fac00CceE478eCeD6A120a50Ed2Ab28EE7FE32b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer212770732024-11-27 5:43:234 hrs ago1732686203IN
Bitune: TUNE Token
0 ETH0.000372437.21543641
Approve212559552024-11-24 6:56:233 days ago1732431383IN
Bitune: TUNE Token
0 ETH0.000381338.17787679
Transfer212469212024-11-23 0:42:114 days ago1732322531IN
Bitune: TUNE Token
0 ETH0.0006833613.23639521
Transfer212430892024-11-22 11:51:474 days ago1732276307IN
Bitune: TUNE Token
0 ETH0.0005992511.6072045
Transfer212362342024-11-21 12:54:235 days ago1732193663IN
Bitune: TUNE Token
0 ETH0.0016931332.79491705
Transfer212188552024-11-19 2:41:358 days ago1731984095IN
Bitune: TUNE Token
0 ETH0.0005527910.70969122
Transfer212108002024-11-17 23:45:119 days ago1731887111IN
Bitune: TUNE Token
0 ETH0.000226517.62277008
Transfer212100822024-11-17 21:21:359 days ago1731878495IN
Bitune: TUNE Token
0 ETH0.0006142111.89961233
Transfer212053762024-11-17 5:35:5910 days ago1731821759IN
Bitune: TUNE Token
0 ETH0.000251228.45418138
Transfer212052342024-11-17 5:07:3510 days ago1731820055IN
Bitune: TUNE Token
0 ETH0.0005653210.95258633
Transfer212051662024-11-17 4:53:4710 days ago1731819227IN
Bitune: TUNE Token
0 ETH0.0005180510.03670809
Transfer212051522024-11-17 4:50:5910 days ago1731819059IN
Bitune: TUNE Token
0 ETH0.000336069.73650567
Transfer212021792024-11-16 18:53:5910 days ago1731783239IN
Bitune: TUNE Token
0 ETH0.0003272211.01167668
Transfer212021692024-11-16 18:51:5910 days ago1731783119IN
Bitune: TUNE Token
0 ETH0.0003599812.10918485
Transfer212020472024-11-16 18:27:3510 days ago1731781655IN
Bitune: TUNE Token
0 ETH0.0003489811.7345923
Transfer212020472024-11-16 18:27:3510 days ago1731781655IN
Bitune: TUNE Token
0 ETH0.0003489811.7345923
Transfer212018112024-11-16 17:40:2310 days ago1731778823IN
Bitune: TUNE Token
0 ETH0.0007395314.32766752
Transfer212017942024-11-16 17:36:5910 days ago1731778619IN
Bitune: TUNE Token
0 ETH0.0007962315.42261611
Transfer212015502024-11-16 16:47:5910 days ago1731775679IN
Bitune: TUNE Token
0 ETH0.0007816415.13990211
Transfer212014432024-11-16 16:26:3510 days ago1731774395IN
Bitune: TUNE Token
0 ETH0.0005654316.38750863
Transfer212014132024-11-16 16:20:3510 days ago1731774035IN
Bitune: TUNE Token
0 ETH0.0008420116.30934541
Transfer212013752024-11-16 16:12:5910 days ago1731773579IN
Bitune: TUNE Token
0 ETH0.0005701416.5184107
Transfer212013432024-11-16 16:06:3510 days ago1731773195IN
Bitune: TUNE Token
0 ETH0.0006109717.70113513
Transfer212013142024-11-16 16:00:4710 days ago1731772847IN
Bitune: TUNE Token
0 ETH0.0008950617.34085276
Transfer211990352024-11-16 8:22:5911 days ago1731745379IN
Bitune: TUNE Token
0 ETH0.0003232310.8687619
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
212770752024-11-27 5:43:474 hrs ago1732686227
0x1Fac00Cc...8EE7FE32b
0 ETH
212770752024-11-27 5:43:474 hrs ago1732686227
0x1Fac00Cc...8EE7FE32b
0 ETH
212770752024-11-27 5:43:474 hrs ago1732686227
0x1Fac00Cc...8EE7FE32b
0 ETH
212770752024-11-27 5:43:474 hrs ago1732686227
0x1Fac00Cc...8EE7FE32b
0 ETH
212770752024-11-27 5:43:474 hrs ago1732686227
0x1Fac00Cc...8EE7FE32b
0 ETH
212559612024-11-24 6:57:353 days ago1732431455
0x1Fac00Cc...8EE7FE32b
0 ETH
212559612024-11-24 6:57:353 days ago1732431455
0x1Fac00Cc...8EE7FE32b
0 ETH
212559612024-11-24 6:57:353 days ago1732431455
0x1Fac00Cc...8EE7FE32b
0 ETH
212559602024-11-24 6:57:233 days ago1732431443
0x1Fac00Cc...8EE7FE32b
0 ETH
212559602024-11-24 6:57:233 days ago1732431443
0x1Fac00Cc...8EE7FE32b
0 ETH
212559602024-11-24 6:57:233 days ago1732431443
0x1Fac00Cc...8EE7FE32b
0 ETH
212469242024-11-23 0:42:474 days ago1732322567
0x1Fac00Cc...8EE7FE32b
0 ETH
212469242024-11-23 0:42:474 days ago1732322567
0x1Fac00Cc...8EE7FE32b
0 ETH
212469242024-11-23 0:42:474 days ago1732322567
0x1Fac00Cc...8EE7FE32b
0 ETH
212469242024-11-23 0:42:474 days ago1732322567
0x1Fac00Cc...8EE7FE32b
0 ETH
212469242024-11-23 0:42:474 days ago1732322567
0x1Fac00Cc...8EE7FE32b
0 ETH
212431352024-11-22 12:00:594 days ago1732276859
0x1Fac00Cc...8EE7FE32b
0 ETH
212431352024-11-22 12:00:594 days ago1732276859
0x1Fac00Cc...8EE7FE32b
0 ETH
212431352024-11-22 12:00:594 days ago1732276859
0x1Fac00Cc...8EE7FE32b
0 ETH
212431352024-11-22 12:00:594 days ago1732276859
0x1Fac00Cc...8EE7FE32b
0 ETH
212431352024-11-22 12:00:594 days ago1732276859
0x1Fac00Cc...8EE7FE32b
0 ETH
212362362024-11-21 12:54:475 days ago1732193687
0x1Fac00Cc...8EE7FE32b
0 ETH
212362362024-11-21 12:54:475 days ago1732193687
0x1Fac00Cc...8EE7FE32b
0 ETH
212362362024-11-21 12:54:475 days ago1732193687
0x1Fac00Cc...8EE7FE32b
0 ETH
212362362024-11-21 12:54:475 days ago1732193687
0x1Fac00Cc...8EE7FE32b
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BituneAi

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 2: BituneAi.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

import "./libraries.sol";

/**
 *  name: Bitune AI Platform Token
 *  symble: TUNE
 *  website: Bitune.ai
 */
contract BituneAi is ERC20Permit {
	using SafeERC20 for IERC20;

    IERC20 public immutable matterToken;
    address constant dead = 0x000000000000000000000000000000000000dEaD;

    event Permutation(address indexed account,uint256 amount);

    constructor(address _token,string memory name, string memory symbol,uint8 decimals, uint256 totalSupply) ERC20Permit(name) ERC20(name,symbol,decimals){
        require(_token != address(0),'token can not be zero addr');
        matterToken = IERC20(_token);
        _mint(address(this), totalSupply);
    }

    function permutation(uint256 _amount) external {
        require(_amount > 0,'amount must gt 0');
        matterToken.safeTransferFrom(msg.sender, dead, _amount);
        _transfer(address(this),msg.sender,_amount);
        emit Permutation(msg.sender,_amount);
    }
}

File 2 of 2: libraries.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity =0.8.20;


/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}


/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return 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 {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}



/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    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 Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return 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.
            return a / b;
        }

        // 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 a == 0 ? 0 : (a - 1) / b + 1;
        }
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev 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^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + 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^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 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^256 / 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^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            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^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // 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^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, 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;
        }
    }

    /**
     * @notice 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) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @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;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @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;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @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;
    }
}


/**
 * @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;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    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 Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}



/**
 * @dev 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) {
        /// @solidity memory-safe-assembly
        assembly {
            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) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, hex"19_01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            digest := keccak256(ptr, 0x42)
        }
    }
}


/**
 * @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 {
 *     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;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}


// | 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);
        /// @solidity memory-safe-assembly
        assembly {
            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;
        }
    }
}


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
        );
}


/**
 * @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);
    }
}


/**
 * @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;
    }
}


/**
 * @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);
}


/**
 * @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);
}


/**
 * @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);
}


/**
 * @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 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.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the ERC may not emit
 * these events, as it isn't required by the specification.
 */
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;

    uint8 private _decimals;
    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_,uint8 decimals_) {
        _name = name_;
        _symbol = symbol_;
        _decimals = decimals_;
    }

    /**
     * @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 _decimals;
    }

    /**
     * @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}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the ERC. See the note at the beginning of {ERC20}.
     *
     * 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:
     * ```
     * 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);
            }
        }
    }
}


/**
 * @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);
        }
    }
}


/**
 * @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, RecoverError, bytes32) {
        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.
            /// @solidity memory-safe-assembly
            assembly {
                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, RecoverError, bytes32) {
        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, RecoverError, bytes32) {
        // 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);
        }
    }
}


/**
 * @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();
    }
}


/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}


Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"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":[],"name":"FailedInnerCall","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":"token","type":"address"}],"name":"SafeERC20FailedOperation","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":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Permutation","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":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"matterToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":[{"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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"permutation","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"}]

61018060405234801562000011575f80fd5b506040516200196138038062001961833981016040819052620000349162000469565b6040805180820190915260018152603160f81b60208201528490819081868660046200006184826200059d565b5060056200007083826200059d565b506003805460ff191660ff9290921691909117905550620000959050826006620001be565b61012052620000a6816007620001be565b61014052815160208084019190912060e052815190820120610100524660a0526200013360e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506001600160a01b038516620001995760405162461bcd60e51b815260206004820152601a60248201527f746f6b656e2063616e206e6f74206265207a65726f206164647200000000000060448201526064015b60405180910390fd5b6001600160a01b03851661016052620001b33082620001f6565b5050505050620006dd565b5f602083511015620001dd57620001d58362000232565b9050620001f0565b81620001ea84826200059d565b5060ff90505b92915050565b6001600160a01b038216620002215760405163ec442f0560e01b81525f600482015260240162000190565b6200022e5f838362000274565b5050565b5f80829050601f815111156200025f578260405163305a27a960e01b815260040162000190919062000665565b80516200026c8262000699565b179392505050565b6001600160a01b038316620002a2578060025f828254620002969190620006bd565b90915550620003149050565b6001600160a01b0383165f9081526020819052604090205481811015620002f65760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000190565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216620003325760028054829003905562000350565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200039691815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b5f5b83811015620003d3578181015183820152602001620003b9565b50505f910152565b5f82601f830112620003eb575f80fd5b81516001600160401b0380821115620004085762000408620003a3565b604051601f8301601f19908116603f01168101908282118183101715620004335762000433620003a3565b816040528381528660208588010111156200044c575f80fd5b6200045f846020830160208901620003b7565b9695505050505050565b5f805f805f60a086880312156200047e575f80fd5b85516001600160a01b038116811462000495575f80fd5b60208701519095506001600160401b0380821115620004b2575f80fd5b620004c089838a01620003db565b95506040880151915080821115620004d6575f80fd5b50620004e588828901620003db565b935050606086015160ff81168114620004fc575f80fd5b80925050608086015190509295509295909350565b600181811c908216806200052657607f821691505b6020821081036200054557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000598575f81815260208120601f850160051c81016020861015620005735750805b601f850160051c820191505b8181101562000594578281556001016200057f565b5050505b505050565b81516001600160401b03811115620005b957620005b9620003a3565b620005d181620005ca845462000511565b846200054b565b602080601f83116001811462000607575f8415620005ef5750858301515b5f19600386901b1c1916600185901b17855562000594565b5f85815260208120601f198616915b82811015620006375788860151825594840194600190910190840162000616565b50858210156200065557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b602081525f825180602084015262000685816040850160208701620003b7565b601f01601f19169190910160400192915050565b8051602080830151919081101562000545575f1960209190910360031b1b16919050565b80820180821115620001f057634e487b7160e01b5f52601160045260245ffd5b60805160a05160c05160e05161010051610120516101405161016051611221620007405f395f81816101b9015261038401525f61087601525f61084901525f6107f201525f6107ca01525f61072501525f61074f01525f61077901526112215ff3fe608060405234801561000f575f80fd5b50600436106100f0575f3560e01c806370a082311161009357806395d89b411161006357806395d89b4114610221578063a9059cbb14610229578063d505accf1461023c578063dd62ed3e1461024f575f80fd5b806370a082311461018c578063753894f3146101b45780637ecebe00146101f357806384b0196e14610206575f80fd5b80631a50c853116100ce5780631a50c8531461014757806323b872dd1461015c578063313ce5671461016f5780633644e51514610184575f80fd5b806306fdde03146100f4578063095ea7b31461011257806318160ddd14610135575b5f80fd5b6100fc610287565b6040516101099190610f56565b60405180910390f35b610125610120366004610f83565b610317565b6040519015158152602001610109565b6002545b604051908152602001610109565b61015a610155366004610fab565b610330565b005b61012561016a366004610fc2565b6103f1565b60035460405160ff9091168152602001610109565b610139610416565b61013961019a366004610ffb565b6001600160a01b03165f9081526020819052604090205490565b6101db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610109565b610139610201366004610ffb565b610424565b61020e610441565b6040516101099796959493929190611014565b6100fc610483565b610125610237366004610f83565b610492565b61015a61024a3660046110a8565b61049f565b61013961025d366004611115565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606004805461029690611146565b80601f01602080910402602001604051908101604052809291908181526020018280546102c290611146565b801561030d5780601f106102e45761010080835404028352916020019161030d565b820191905f5260205f20905b8154815290600101906020018083116102f057829003601f168201915b5050505050905090565b5f336103248185856105d5565b60019150505b92915050565b5f81116103775760405162461bcd60e51b815260206004820152601060248201526f0616d6f756e74206d75737420677420360841b60448201526064015b60405180910390fd5b6103ae6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163361dead846105e7565b6103b9303383610647565b60405181815233907f078254c58cf2d358e22654408bbb36a5ec378ef9d8817f8ab81d0b0e0461eb619060200160405180910390a250565b5f336103fe8582856106a4565b610409858585610647565b60019150505b9392505050565b5f61041f610719565b905090565b6001600160a01b0381165f9081526008602052604081205461032a565b5f6060805f805f6060610452610842565b61045a61086f565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606005805461029690611146565b5f33610324818585610647565b834211156104c35760405163313c898160e11b81526004810185905260240161036e565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861050e8c6001600160a01b03165f90815260086020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6105688261089c565b90505f610577828787876108c8565b9050896001600160a01b0316816001600160a01b0316146105be576040516325c0072360e11b81526001600160a01b0380831660048301528b16602482015260440161036e565b6105c98a8a8a6105d5565b50505050505050505050565b6105e283838360016108f4565b505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526106419085906109c6565b50505050565b6001600160a01b03831661067057604051634b637e8f60e11b81525f600482015260240161036e565b6001600160a01b0382166106995760405163ec442f0560e01b81525f600482015260240161036e565b6105e2838383610a27565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114610641578181101561070b57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161036e565b61064184848484035f6108f4565b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561077157507f000000000000000000000000000000000000000000000000000000000000000046145b1561079b57507f000000000000000000000000000000000000000000000000000000000000000090565b61041f604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b606061041f7f00000000000000000000000000000000000000000000000000000000000000006006610b4d565b606061041f7f00000000000000000000000000000000000000000000000000000000000000006007610b4d565b5f61032a6108a8610719565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f806108d888888888610bf6565b9250925092506108e88282610cbe565b50909695505050505050565b6001600160a01b03841661091d5760405163e602df0560e01b81525f600482015260240161036e565b6001600160a01b03831661094657604051634a1406b160e11b81525f600482015260240161036e565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561064157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516109b891815260200190565b60405180910390a350505050565b5f6109da6001600160a01b03841683610d7a565b905080515f141580156109fe5750808060200190518101906109fc919061117e565b155b156105e257604051635274afe760e01b81526001600160a01b038416600482015260240161036e565b6001600160a01b038316610a51578060025f828254610a46919061119d565b90915550610ac19050565b6001600160a01b0383165f9081526020819052604090205481811015610aa35760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161036e565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610add57600280548290039055610afb565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610b4091815260200190565b60405180910390a3505050565b606060ff8314610b6757610b6083610d87565b905061032a565b818054610b7390611146565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9f90611146565b8015610bea5780601f10610bc157610100808354040283529160200191610bea565b820191905f5260205f20905b815481529060010190602001808311610bcd57829003601f168201915b5050505050905061032a565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610c2f57505f91506003905082610cb4565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610c80573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116610cab57505f925060019150829050610cb4565b92505f91508190505b9450945094915050565b5f826003811115610cd157610cd16111bc565b03610cda575050565b6001826003811115610cee57610cee6111bc565b03610d0c5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610d2057610d206111bc565b03610d415760405163fce698f760e01b81526004810182905260240161036e565b6003826003811115610d5557610d556111bc565b03610d76576040516335e2f38360e21b81526004810182905260240161036e565b5050565b606061040f83835f610dc4565b60605f610d9383610e5d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b606081471015610de95760405163cd78605960e01b815230600482015260240161036e565b5f80856001600160a01b03168486604051610e0491906111d0565b5f6040518083038185875af1925050503d805f8114610e3e576040519150601f19603f3d011682016040523d82523d5f602084013e610e43565b606091505b5091509150610e53868383610e84565b9695505050505050565b5f60ff8216601f81111561032a57604051632cd44ac360e21b815260040160405180910390fd5b606082610e9957610e9482610ee0565b61040f565b8151158015610eb057506001600160a01b0384163b155b15610ed957604051639996b31560e01b81526001600160a01b038516600482015260240161036e565b508061040f565b805115610ef05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b83811015610f23578181015183820152602001610f0b565b50505f910152565b5f8151808452610f42816020860160208601610f09565b601f01601f19169290920160200192915050565b602081525f61040f6020830184610f2b565b80356001600160a01b0381168114610f7e575f80fd5b919050565b5f8060408385031215610f94575f80fd5b610f9d83610f68565b946020939093013593505050565b5f60208284031215610fbb575f80fd5b5035919050565b5f805f60608486031215610fd4575f80fd5b610fdd84610f68565b9250610feb60208501610f68565b9150604084013590509250925092565b5f6020828403121561100b575f80fd5b61040f82610f68565b60ff60f81b881681525f602060e08184015261103360e084018a610f2b565b8381036040850152611045818a610f2b565b606085018990526001600160a01b038816608086015260a0850187905284810360c086015285518082528387019250908301905f5b818110156110965783518352928401929184019160010161107a565b50909c9b505050505050505050505050565b5f805f805f805f60e0888a0312156110be575f80fd5b6110c788610f68565b96506110d560208901610f68565b95506040880135945060608801359350608088013560ff811681146110f8575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215611126575f80fd5b61112f83610f68565b915061113d60208401610f68565b90509250929050565b600181811c9082168061115a57607f821691505b60208210810361117857634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561118e575f80fd5b8151801515811461040f575f80fd5b8082018082111561032a57634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b5f82516111e1818460208701610f09565b919091019291505056fea2646970667358221220adc571df8e93a80f96e835668504531758401dd113c63ff5d67117b347f4077664736f6c634300081400330000000000000000000000009b99cca871be05119b2012fd4474731dd653febe00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000018426974756e6520414920506c6174666f726d20546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000454554e4500000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100f0575f3560e01c806370a082311161009357806395d89b411161006357806395d89b4114610221578063a9059cbb14610229578063d505accf1461023c578063dd62ed3e1461024f575f80fd5b806370a082311461018c578063753894f3146101b45780637ecebe00146101f357806384b0196e14610206575f80fd5b80631a50c853116100ce5780631a50c8531461014757806323b872dd1461015c578063313ce5671461016f5780633644e51514610184575f80fd5b806306fdde03146100f4578063095ea7b31461011257806318160ddd14610135575b5f80fd5b6100fc610287565b6040516101099190610f56565b60405180910390f35b610125610120366004610f83565b610317565b6040519015158152602001610109565b6002545b604051908152602001610109565b61015a610155366004610fab565b610330565b005b61012561016a366004610fc2565b6103f1565b60035460405160ff9091168152602001610109565b610139610416565b61013961019a366004610ffb565b6001600160a01b03165f9081526020819052604090205490565b6101db7f0000000000000000000000009b99cca871be05119b2012fd4474731dd653febe81565b6040516001600160a01b039091168152602001610109565b610139610201366004610ffb565b610424565b61020e610441565b6040516101099796959493929190611014565b6100fc610483565b610125610237366004610f83565b610492565b61015a61024a3660046110a8565b61049f565b61013961025d366004611115565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606004805461029690611146565b80601f01602080910402602001604051908101604052809291908181526020018280546102c290611146565b801561030d5780601f106102e45761010080835404028352916020019161030d565b820191905f5260205f20905b8154815290600101906020018083116102f057829003601f168201915b5050505050905090565b5f336103248185856105d5565b60019150505b92915050565b5f81116103775760405162461bcd60e51b815260206004820152601060248201526f0616d6f756e74206d75737420677420360841b60448201526064015b60405180910390fd5b6103ae6001600160a01b037f0000000000000000000000009b99cca871be05119b2012fd4474731dd653febe163361dead846105e7565b6103b9303383610647565b60405181815233907f078254c58cf2d358e22654408bbb36a5ec378ef9d8817f8ab81d0b0e0461eb619060200160405180910390a250565b5f336103fe8582856106a4565b610409858585610647565b60019150505b9392505050565b5f61041f610719565b905090565b6001600160a01b0381165f9081526008602052604081205461032a565b5f6060805f805f6060610452610842565b61045a61086f565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606005805461029690611146565b5f33610324818585610647565b834211156104c35760405163313c898160e11b81526004810185905260240161036e565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861050e8c6001600160a01b03165f90815260086020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6105688261089c565b90505f610577828787876108c8565b9050896001600160a01b0316816001600160a01b0316146105be576040516325c0072360e11b81526001600160a01b0380831660048301528b16602482015260440161036e565b6105c98a8a8a6105d5565b50505050505050505050565b6105e283838360016108f4565b505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526106419085906109c6565b50505050565b6001600160a01b03831661067057604051634b637e8f60e11b81525f600482015260240161036e565b6001600160a01b0382166106995760405163ec442f0560e01b81525f600482015260240161036e565b6105e2838383610a27565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114610641578181101561070b57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161036e565b61064184848484035f6108f4565b5f306001600160a01b037f0000000000000000000000001fac00ccee478eced6a120a50ed2ab28ee7fe32b1614801561077157507f000000000000000000000000000000000000000000000000000000000000000146145b1561079b57507f50a3a9a8964412fc656c33550d13d74f292f728ad31bf8f4f7e31fc8691c415090565b61041f604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fcbefa581d8b7286dab73c95ccda2ecdd8e180f4404585dc4c2b112d596092d37918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b606061041f7f426974756e6520414920506c6174666f726d20546f6b656e00000000000000186006610b4d565b606061041f7f31000000000000000000000000000000000000000000000000000000000000016007610b4d565b5f61032a6108a8610719565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f806108d888888888610bf6565b9250925092506108e88282610cbe565b50909695505050505050565b6001600160a01b03841661091d5760405163e602df0560e01b81525f600482015260240161036e565b6001600160a01b03831661094657604051634a1406b160e11b81525f600482015260240161036e565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561064157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516109b891815260200190565b60405180910390a350505050565b5f6109da6001600160a01b03841683610d7a565b905080515f141580156109fe5750808060200190518101906109fc919061117e565b155b156105e257604051635274afe760e01b81526001600160a01b038416600482015260240161036e565b6001600160a01b038316610a51578060025f828254610a46919061119d565b90915550610ac19050565b6001600160a01b0383165f9081526020819052604090205481811015610aa35760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161036e565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610add57600280548290039055610afb565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610b4091815260200190565b60405180910390a3505050565b606060ff8314610b6757610b6083610d87565b905061032a565b818054610b7390611146565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9f90611146565b8015610bea5780601f10610bc157610100808354040283529160200191610bea565b820191905f5260205f20905b815481529060010190602001808311610bcd57829003601f168201915b5050505050905061032a565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610c2f57505f91506003905082610cb4565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610c80573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116610cab57505f925060019150829050610cb4565b92505f91508190505b9450945094915050565b5f826003811115610cd157610cd16111bc565b03610cda575050565b6001826003811115610cee57610cee6111bc565b03610d0c5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610d2057610d206111bc565b03610d415760405163fce698f760e01b81526004810182905260240161036e565b6003826003811115610d5557610d556111bc565b03610d76576040516335e2f38360e21b81526004810182905260240161036e565b5050565b606061040f83835f610dc4565b60605f610d9383610e5d565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b606081471015610de95760405163cd78605960e01b815230600482015260240161036e565b5f80856001600160a01b03168486604051610e0491906111d0565b5f6040518083038185875af1925050503d805f8114610e3e576040519150601f19603f3d011682016040523d82523d5f602084013e610e43565b606091505b5091509150610e53868383610e84565b9695505050505050565b5f60ff8216601f81111561032a57604051632cd44ac360e21b815260040160405180910390fd5b606082610e9957610e9482610ee0565b61040f565b8151158015610eb057506001600160a01b0384163b155b15610ed957604051639996b31560e01b81526001600160a01b038516600482015260240161036e565b508061040f565b805115610ef05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f5b83811015610f23578181015183820152602001610f0b565b50505f910152565b5f8151808452610f42816020860160208601610f09565b601f01601f19169290920160200192915050565b602081525f61040f6020830184610f2b565b80356001600160a01b0381168114610f7e575f80fd5b919050565b5f8060408385031215610f94575f80fd5b610f9d83610f68565b946020939093013593505050565b5f60208284031215610fbb575f80fd5b5035919050565b5f805f60608486031215610fd4575f80fd5b610fdd84610f68565b9250610feb60208501610f68565b9150604084013590509250925092565b5f6020828403121561100b575f80fd5b61040f82610f68565b60ff60f81b881681525f602060e08184015261103360e084018a610f2b565b8381036040850152611045818a610f2b565b606085018990526001600160a01b038816608086015260a0850187905284810360c086015285518082528387019250908301905f5b818110156110965783518352928401929184019160010161107a565b50909c9b505050505050505050505050565b5f805f805f805f60e0888a0312156110be575f80fd5b6110c788610f68565b96506110d560208901610f68565b95506040880135945060608801359350608088013560ff811681146110f8575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215611126575f80fd5b61112f83610f68565b915061113d60208401610f68565b90509250929050565b600181811c9082168061115a57607f821691505b60208210810361117857634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561118e575f80fd5b8151801515811461040f575f80fd5b8082018082111561032a57634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b5f82516111e1818460208701610f09565b919091019291505056fea2646970667358221220adc571df8e93a80f96e835668504531758401dd113c63ff5d67117b347f4077664736f6c63430008140033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000009b99cca871be05119b2012fd4474731dd653febe00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000000018426974756e6520414920506c6174666f726d20546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000454554e4500000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _token (address): 0x9B99CcA871Be05119B2012fd4474731dd653FEBe
Arg [1] : name (string): Bitune AI Platform Token
Arg [2] : symbol (string): TUNE
Arg [3] : decimals (uint8): 18
Arg [4] : totalSupply (uint256): 100000000000000000000000000

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000009b99cca871be05119b2012fd4474731dd653febe
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [4] : 00000000000000000000000000000000000000000052b7d2dcc80cd2e4000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [6] : 426974756e6520414920506c6174666f726d20546f6b656e0000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 54554e4500000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

168:828:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55345:89:1;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;57571:186;;;;;;:::i;:::-;;:::i;:::-;;;1372:14:2;;1365:22;1347:41;;1335:2;1320:18;57571:186:1;1207:187:2;56422:97:1;56500:12;;56422:97;;;1545:25:2;;;1533:2;1518:18;56422:97:1;1399:177:2;727:267:0;;;;;;:::i;:::-;;:::i;:::-;;58317:244:1;;;;;;:::i;:::-;;:::i;56273:89::-;56346:9;;56273:89;;56346:9;;;;2241:36:2;;2229:2;2214:18;56273:89:1;2099:184:2;75636:112:1;;;:::i;56577:116::-;;;;;;:::i;:::-;-1:-1:-1;;;;;56668:18:1;56642:7;56668:18;;;;;;;;;;;;56577:116;237:35:0;;;;;;;;-1:-1:-1;;;;;2840:32:2;;;2822:51;;2810:2;2795:18;237:35:0;2661:218:2;75386:143:1;;;;;;:::i;:::-;;:::i;42623:557::-;;;:::i;:::-;;;;;;;;;;;;;:::i;55547:93::-;;;:::i;56888:178::-;;;;;;:::i;:::-;;:::i;74660:672::-;;;;;;:::i;:::-;;:::i;57124:140::-;;;;;;:::i;:::-;-1:-1:-1;;;;;57230:18:1;;;57204:7;57230:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;57124:140;55345:89;55390:13;55422:5;55415:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55345:89;:::o;57571:186::-;57644:4;44700:10;57698:31;44700:10;57714:7;57723:5;57698:8;:31::i;:::-;57746:4;57739:11;;;57571:186;;;;;:::o;727:267:0:-;802:1;792:7;:11;784:39;;;;-1:-1:-1;;;784:39:0;;5698:2:2;784:39:0;;;5680:21:2;5737:2;5717:18;;;5710:30;-1:-1:-1;;;5756:18:2;;;5749:46;5812:18;;784:39:0;;;;;;;;;833:55;-1:-1:-1;;;;;833:11:0;:28;862:10;302:42;880:7;833:28;:55::i;:::-;898:43;916:4;922:10;933:7;898:9;:43::i;:::-;956:31;;1545:25:2;;;968:10:0;;956:31;;1533:2:2;1518:18;956:31:0;;;;;;;727:267;:::o;58317:244:1:-;58404:4;44700:10;58460:37;58476:4;44700:10;58491:5;58460:15;:37::i;:::-;58507:26;58517:4;58523:2;58527:5;58507:9;:26::i;:::-;58550:4;58543:11;;;58317:244;;;;;;:::o;75636:112::-;75695:7;75721:20;:18;:20::i;:::-;75714:27;;75636:112;:::o;75386:143::-;-1:-1:-1;;;;;64922:14:1;;75477:7;64922:14;;;:7;:14;;;;;;75503:19;64836:107;42623:557;42721:13;42748:18;42780:21;42815:15;42844:25;42883:12;42909:27;43012:13;:11;:13::i;:::-;43039:16;:14;:16::i;:::-;43147;;;43131:1;43147:16;;;;;;;;;-1:-1:-1;;;42961:212:1;;;-1:-1:-1;42961:212:1;;-1:-1:-1;43069:13:1;;-1:-1:-1;43104:4:1;;-1:-1:-1;43131:1:1;-1:-1:-1;43147:16:1;-1:-1:-1;42961:212:1;-1:-1:-1;42623:557:1:o;55547:93::-;55594:13;55626:7;55619:14;;;;;:::i;56888:178::-;56957:4;44700:10;57011:27;44700:10;57028:2;57032:5;57011:9;:27::i;74660:672::-;74881:8;74863:15;:26;74859:97;;;74912:33;;-1:-1:-1;;;74912:33:1;;;;;1545:25:2;;;1518:18;;74912:33:1;1399:177:2;74859:97:1;74966:18;74001:95;75025:5;75032:7;75041:5;75048:16;75058:5;-1:-1:-1;;;;;65419:14:1;65117:7;65419:14;;;:7;:14;;;;;:16;;;;;;;;;65057:395;75048:16;74997:78;;;;;;6260:25:2;;;;-1:-1:-1;;;;;6359:15:2;;;6339:18;;;6332:43;6411:15;;;;6391:18;;;6384:43;6443:18;;;6436:34;6486:19;;;6479:35;6530:19;;;6523:35;;;6232:19;;74997:78:1;;;;;;;;;;;;74987:89;;;;;;74966:110;;75087:12;75102:28;75119:10;75102:16;:28::i;:::-;75087:43;;75141:14;75158:28;75172:4;75178:1;75181;75184;75158:13;:28::i;:::-;75141:45;;75210:5;-1:-1:-1;;;;;75200:15:1;:6;-1:-1:-1;;;;;75200:15:1;;75196:88;;75238:35;;-1:-1:-1;;;75238:35:1;;-1:-1:-1;;;;;6799:15:2;;;75238:35:1;;;6781:34:2;6851:15;;6831:18;;;6824:43;6716:18;;75238:35:1;6569:304:2;75196:88:1;75294:31;75303:5;75310:7;75319:5;75294:8;:31::i;:::-;74849:483;;;74660:672;;;;;;;:::o;62267:128::-;62351:37;62360:5;62367:7;62376:5;62383:4;62351:8;:37::i;:::-;62267:128;;;:::o;77164:188::-;77291:53;;;-1:-1:-1;;;;;7136:15:2;;;77291:53:1;;;7118:34:2;7188:15;;7168:18;;;7161:43;7220:18;;;;7213:34;;;77291:53:1;;;;;;;;;;7053:18:2;;;;77291:53:1;;;;;;;;-1:-1:-1;;;;;77291:53:1;-1:-1:-1;;;77291:53:1;;;77264:81;;77284:5;;77264:19;:81::i;:::-;77164:188;;;;:::o;58934:300::-;-1:-1:-1;;;;;59017:18:1;;59013:86;;59058:30;;-1:-1:-1;;;59058:30:1;;59085:1;59058:30;;;2822:51:2;2795:18;;59058:30:1;2661:218:2;59013:86:1;-1:-1:-1;;;;;59112:16:1;;59108:86;;59151:32;;-1:-1:-1;;;59151:32:1;;59180:1;59151:32;;;2822:51:2;2795:18;;59151:32:1;2661:218:2;59108:86:1;59203:24;59211:4;59217:2;59221:5;59203:7;:24::i;63941:477::-;-1:-1:-1;;;;;57230:18:1;;;64040:24;57230:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;64106:37:1;;64102:310;;64182:5;64163:16;:24;64159:130;;;64214:60;;-1:-1:-1;;;64214:60:1;;-1:-1:-1;;;;;7686:32:2;;64214:60:1;;;7668:51:2;7735:18;;;7728:34;;;7778:18;;;7771:34;;;7641:18;;64214:60:1;7466:345:2;64159:130:1;64330:57;64339:5;64346:7;64374:5;64355:16;:24;64381:5;64330:8;:57::i;41324:262::-;41377:7;41408:4;-1:-1:-1;;;;;41417:11:1;41400:28;;:63;;;;;41449:14;41432:13;:31;41400:63;41396:184;;;-1:-1:-1;41486:22:1;;41324:262::o;41396:184::-;41546:23;41683:80;;;39558:95;41683:80;;;8584:25:2;41705:11:1;8625:18:2;;;8618:34;;;;41718:14:1;8668:18:2;;;8661:34;41734:13:1;8711:18:2;;;8704:34;41757:4:1;8754:19:2;;;8747:61;41647:7:1;;8556:19:2;;41683:80:1;;;;;;;;;;;;41673:91;;;;;;41666:98;;41592:179;;43500:126;43546:13;43578:41;:5;43605:13;43578:26;:41::i;43952:135::-;44001:13;44033:47;:8;44063:16;44033:29;:47::i;42396:176::-;42473:7;42499:66;42532:20;:18;:20::i;:::-;42554:10;29137:4;29131:11;-1:-1:-1;;;29155:23:1;;29207:4;29198:14;;29191:39;;;;29259:4;29250:14;;29243:34;29315:4;29300:20;;;28935:401;72455:260;72540:7;72560:17;72579:18;72599:16;72619:25;72630:4;72636:1;72639;72642;72619:10;:25::i;:::-;72559:85;;;;;;72654:28;72666:5;72673:8;72654:11;:28::i;:::-;-1:-1:-1;72699:9:1;;72455:260;-1:-1:-1;;;;;;72455:260:1:o;63227:432::-;-1:-1:-1;;;;;63339:19:1;;63335:89;;63381:32;;-1:-1:-1;;;63381:32:1;;63410:1;63381:32;;;2822:51:2;2795:18;;63381:32:1;2661:218:2;63335:89:1;-1:-1:-1;;;;;63437:21:1;;63433:90;;63481:31;;-1:-1:-1;;;63481:31:1;;63509:1;63481:31;;;2822:51:2;2795:18;;63481:31:1;2661:218:2;63433:90:1;-1:-1:-1;;;;;63532:18:1;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;63577:76;;;;63627:7;-1:-1:-1;;;;;63611:31:1;63620:5;-1:-1:-1;;;;;63611:31:1;;63636:5;63611:31;;;;1545:25:2;;1533:2;1518:18;;1399:177;63611:31:1;;;;;;;;63227:432;;;;:::o;79521:629::-;79940:23;79966:33;-1:-1:-1;;;;;79966:27:1;;79994:4;79966:27;:33::i;:::-;79940:59;;80013:10;:17;80034:1;80013:22;;:57;;;;;80051:10;80040:30;;;;;;;;;;;;:::i;:::-;80039:31;80013:57;80009:135;;;80093:40;;-1:-1:-1;;;80093:40:1;;-1:-1:-1;;;;;2840:32:2;;80093:40:1;;;2822:51:2;2795:18;;80093:40:1;2661:218:2;59549:1107:1;-1:-1:-1;;;;;59638:18:1;;59634:540;;59790:5;59774:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;59634:540:1;;-1:-1:-1;59634:540:1;;-1:-1:-1;;;;;59848:15:1;;59826:19;59848:15;;;;;;;;;;;59881:19;;;59877:115;;;59927:50;;-1:-1:-1;;;59927:50:1;;-1:-1:-1;;;;;7686:32:2;;59927:50:1;;;7668:51:2;7735:18;;;7728:34;;;7778:18;;;7771:34;;;7641:18;;59927:50:1;7466:345:2;59877:115:1;-1:-1:-1;;;;;60112:15:1;;:9;:15;;;;;;;;;;60130:19;;;;60112:37;;59634:540;-1:-1:-1;;;;;60188:16:1;;60184:425;;60351:12;:21;;;;;;;60184:425;;;-1:-1:-1;;;;;60562:13:1;;:9;:13;;;;;;;;;;:22;;;;;;60184:425;60639:2;-1:-1:-1;;;;;60624:25:1;60633:4;-1:-1:-1;;;;;60624:25:1;;60643:5;60624:25;;;;1545::2;;1533:2;1518:18;;1399:177;60624:25:1;;;;;;;;59549:1107;;;:::o;36261:267::-;36355:13;34266:66;36384:46;;36380:142;;36453:15;36462:5;36453:8;:15::i;:::-;36446:22;;;;36380:142;36506:5;36499:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;70792:1530;70918:7;;;71851:66;71838:79;;71834:164;;;-1:-1:-1;71949:1:1;;-1:-1:-1;71953:30:1;;-1:-1:-1;71985:1:1;71933:54;;71834:164;72109:24;;;72092:14;72109:24;;;;;;;;;9046:25:2;;;9119:4;9107:17;;9087:18;;;9080:45;;;;9141:18;;;9134:34;;;9184:18;;;9177:34;;;72109:24:1;;9018:19:2;;72109:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;72109:24:1;;-1:-1:-1;;72109:24:1;;;-1:-1:-1;;;;;;;72147:20:1;;72143:113;;-1:-1:-1;72199:1:1;;-1:-1:-1;72203:29:1;;-1:-1:-1;72199:1:1;;-1:-1:-1;72183:62:1;;72143:113;72274:6;-1:-1:-1;72282:20:1;;-1:-1:-1;72282:20:1;;-1:-1:-1;70792:1530:1;;;;;;;;;:::o;72848:532::-;72943:20;72934:5;:29;;;;;;;;:::i;:::-;;72930:444;;72848:532;;:::o;72930:444::-;73039:29;73030:5;:38;;;;;;;;:::i;:::-;;73026:348;;73091:23;;-1:-1:-1;;;73091:23:1;;;;;;;;;;;73026:348;73144:35;73135:5;:44;;;;;;;;:::i;:::-;;73131:243;;73202:46;;-1:-1:-1;;;73202:46:1;;;;;1545:25:2;;;1518:18;;73202:46:1;1399:177:2;73131:243:1;73278:30;73269:5;:39;;;;;;;;:::i;:::-;;73265:109;;73331:32;;-1:-1:-1;;;73331:32:1;;;;;1545:25:2;;;1518:18;;73331:32:1;1399:177:2;73265:109:1;72848:532;;:::o;2728:151::-;2803:12;2834:38;2856:6;2864:4;2870:1;2834:21;:38::i;34954:405::-;35013:13;35038:11;35052:16;35063:4;35052:10;:16::i;:::-;35176:14;;;35187:2;35176:14;;;;;;;;;35038:30;;-1:-1:-1;35156:17:1;;35176:14;;;;;;;;;-1:-1:-1;;;35266:16:1;;;-1:-1:-1;35311:4:1;35302:14;;35295:28;;;;-1:-1:-1;35266:16:1;34954:405::o;3203:392::-;3302:12;3354:5;3330:21;:29;3326:108;;;3382:41;;-1:-1:-1;;;3382:41:1;;3417:4;3382:41;;;2822:51:2;2795:18;;3382:41:1;2661:218:2;3326:108:1;3444:12;3458:23;3485:6;-1:-1:-1;;;;;3485:11:1;3504:5;3511:4;3485:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3443:73;;;;3533:55;3560:6;3568:7;3577:10;3533:26;:55::i;:::-;3526:62;3203:392;-1:-1:-1;;;;;;3203:392:1:o;35431:245::-;35492:7;35564:4;35528:40;;35591:2;35582:11;;35578:69;;;35616:20;;-1:-1:-1;;;35616:20:1;;;;;;;;;;;4648:582;4792:12;4821:7;4816:408;;4844:19;4852:10;4844:7;:19::i;:::-;4816:408;;;5068:17;;:22;:49;;;;-1:-1:-1;;;;;;5094:18:1;;;:23;5068:49;5064:119;;;5144:24;;-1:-1:-1;;;5144:24:1;;-1:-1:-1;;;;;2840:32:2;;5144:24:1;;;2822:51:2;2795:18;;5144:24:1;2661:218:2;5064:119:1;-1:-1:-1;5203:10:1;5196:17;;5766:516;5897:17;;:21;5893:383;;6125:10;6119:17;6181:15;6168:10;6164:2;6160:19;6153:44;5893:383;6248:17;;-1:-1:-1;;;6248:17:1;;;;;;;;;;;14:250:2;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:2;238:16;;231:27;14:250::o;269:271::-;311:3;349:5;343:12;376:6;371:3;364:19;392:76;461:6;454:4;449:3;445:14;438:4;431:5;427:16;392:76;:::i;:::-;522:2;501:15;-1:-1:-1;;497:29:2;488:39;;;;529:4;484:50;;269:271;-1:-1:-1;;269:271:2:o;545:220::-;694:2;683:9;676:21;657:4;714:45;755:2;744:9;740:18;732:6;714:45;:::i;770:173::-;838:20;;-1:-1:-1;;;;;887:31:2;;877:42;;867:70;;933:1;930;923:12;867:70;770:173;;;:::o;948:254::-;1016:6;1024;1077:2;1065:9;1056:7;1052:23;1048:32;1045:52;;;1093:1;1090;1083:12;1045:52;1116:29;1135:9;1116:29;:::i;:::-;1106:39;1192:2;1177:18;;;;1164:32;;-1:-1:-1;;;948:254:2:o;1581:180::-;1640:6;1693:2;1681:9;1672:7;1668:23;1664:32;1661:52;;;1709:1;1706;1699:12;1661:52;-1:-1:-1;1732:23:2;;1581:180;-1:-1:-1;1581:180:2:o;1766:328::-;1843:6;1851;1859;1912:2;1900:9;1891:7;1887:23;1883:32;1880:52;;;1928:1;1925;1918:12;1880:52;1951:29;1970:9;1951:29;:::i;:::-;1941:39;;1999:38;2033:2;2022:9;2018:18;1999:38;:::i;:::-;1989:48;;2084:2;2073:9;2069:18;2056:32;2046:42;;1766:328;;;;;:::o;2470:186::-;2529:6;2582:2;2570:9;2561:7;2557:23;2553:32;2550:52;;;2598:1;2595;2588:12;2550:52;2621:29;2640:9;2621:29;:::i;2884:1259::-;3290:3;3285;3281:13;3273:6;3269:26;3258:9;3251:45;3232:4;3315:2;3353:3;3348:2;3337:9;3333:18;3326:31;3380:46;3421:3;3410:9;3406:19;3398:6;3380:46;:::i;:::-;3474:9;3466:6;3462:22;3457:2;3446:9;3442:18;3435:50;3508:33;3534:6;3526;3508:33;:::i;:::-;3572:2;3557:18;;3550:34;;;-1:-1:-1;;;;;3621:32:2;;3615:3;3600:19;;3593:61;3641:3;3670:19;;3663:35;;;3735:22;;;3729:3;3714:19;;3707:51;3807:13;;3829:22;;;3905:15;;;;-1:-1:-1;3867:15:2;;;;-1:-1:-1;3948:169:2;3962:6;3959:1;3956:13;3948:169;;;4023:13;;4011:26;;4092:15;;;;4057:12;;;;3984:1;3977:9;3948:169;;;-1:-1:-1;4134:3:2;;2884:1259;-1:-1:-1;;;;;;;;;;;;2884:1259:2:o;4148:693::-;4259:6;4267;4275;4283;4291;4299;4307;4360:3;4348:9;4339:7;4335:23;4331:33;4328:53;;;4377:1;4374;4367:12;4328:53;4400:29;4419:9;4400:29;:::i;:::-;4390:39;;4448:38;4482:2;4471:9;4467:18;4448:38;:::i;:::-;4438:48;;4533:2;4522:9;4518:18;4505:32;4495:42;;4584:2;4573:9;4569:18;4556:32;4546:42;;4638:3;4627:9;4623:19;4610:33;4683:4;4676:5;4672:16;4665:5;4662:27;4652:55;;4703:1;4700;4693:12;4652:55;4148:693;;;;-1:-1:-1;4148:693:2;;;;4726:5;4778:3;4763:19;;4750:33;;-1:-1:-1;4830:3:2;4815:19;;;4802:33;;4148:693;-1:-1:-1;;4148:693:2:o;4846:260::-;4914:6;4922;4975:2;4963:9;4954:7;4950:23;4946:32;4943:52;;;4991:1;4988;4981:12;4943:52;5014:29;5033:9;5014:29;:::i;:::-;5004:39;;5062:38;5096:2;5085:9;5081:18;5062:38;:::i;:::-;5052:48;;4846:260;;;;;:::o;5111:380::-;5190:1;5186:12;;;;5233;;;5254:61;;5308:4;5300:6;5296:17;5286:27;;5254:61;5361:2;5353:6;5350:14;5330:18;5327:38;5324:161;;5407:10;5402:3;5398:20;5395:1;5388:31;5442:4;5439:1;5432:15;5470:4;5467:1;5460:15;5324:161;;5111:380;;;:::o;7816:277::-;7883:6;7936:2;7924:9;7915:7;7911:23;7907:32;7904:52;;;7952:1;7949;7942:12;7904:52;7984:9;7978:16;8037:5;8030:13;8023:21;8016:5;8013:32;8003:60;;8059:1;8056;8049:12;8098:222;8163:9;;;8184:10;;;8181:133;;;8236:10;8231:3;8227:20;8224:1;8217:31;8271:4;8268:1;8261:15;8299:4;8296:1;8289:15;9222:127;9283:10;9278:3;9274:20;9271:1;9264:31;9314:4;9311:1;9304:15;9338:4;9335:1;9328:15;9354:287;9483:3;9521:6;9515:13;9537:66;9596:6;9591:3;9584:4;9576:6;9572:17;9537:66;:::i;:::-;9619:16;;;;;9354:287;-1:-1:-1;;9354:287:2:o

Swarm Source

ipfs://adc571df8e93a80f96e835668504531758401dd113c63ff5d67117b347f40776

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Building Bitcoin infrastructure of tomorrow.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.