ETH Price: $3,400.03 (+5.18%)

Contract

0x765eE5652281D2a17D4e43AeA97a5D47280079a7
 
Transaction Hash
Method
Block
From
To
Pause41953552024-06-01 0:08:45237 days ago1717200525IN
BlastUp : Pre-Sale Execution
0 ETH0.00000030.01002516
Deposit Coin41949512024-05-31 23:55:17237 days ago1717199717IN
BlastUp : Pre-Sale Execution
0.0521 ETH0.000001170.00978195
Deposit Coin41948782024-05-31 23:52:51237 days ago1717199571IN
BlastUp : Pre-Sale Execution
0.348 ETH0.000001230.01026192
Deposit Coin41947302024-05-31 23:47:55237 days ago1717199275IN
BlastUp : Pre-Sale Execution
0.00814 ETH0.000001310.01097242
Deposit Coin41939292024-05-31 23:21:13237 days ago1717197673IN
BlastUp : Pre-Sale Execution
0.04 ETH0.000001210.01006796
Deposit Coin41938952024-05-31 23:20:05237 days ago1717197605IN
BlastUp : Pre-Sale Execution
0.03 ETH0.000001190.00988447
Deposit Coin41935822024-05-31 23:09:39237 days ago1717196979IN
BlastUp : Pre-Sale Execution
0.019 ETH0.000001190.00996033
Deposit USDB41928192024-05-31 22:44:13237 days ago1717195453IN
BlastUp : Pre-Sale Execution
0 ETH0.000001560.00983183
Deposit Coin41926522024-05-31 22:38:39237 days ago1717195119IN
BlastUp : Pre-Sale Execution
0.0005327 ETH0.000001010.00978347
Deposit USDB41905962024-05-31 21:30:07237 days ago1717191007IN
BlastUp : Pre-Sale Execution
0 ETH0.000001710.0099534
Deposit Coin41903272024-05-31 21:21:09237 days ago1717190469IN
BlastUp : Pre-Sale Execution
0.0264 ETH0.000001160.00968001
Deposit Coin41886922024-05-31 20:26:39237 days ago1717187199IN
BlastUp : Pre-Sale Execution
0.1 ETH0.000001670.0138873
Deposit Coin41869142024-05-31 19:27:23237 days ago1717183643IN
BlastUp : Pre-Sale Execution
0.004 ETH0.00000190.01845978
Deposit Coin41869142024-05-31 19:27:23237 days ago1717183643IN
BlastUp : Pre-Sale Execution
0.025 ETH0.00000190.01845978
Deposit Coin41865502024-05-31 19:15:15237 days ago1717182915IN
BlastUp : Pre-Sale Execution
0.76 ETH0.00000220.01836636
Deposit Coin41864162024-05-31 19:10:47237 days ago1717182647IN
BlastUp : Pre-Sale Execution
0.0448 ETH0.000002180.0181848
Deposit Coin41849222024-05-31 18:20:59237 days ago1717179659IN
BlastUp : Pre-Sale Execution
0.0051823 ETH0.000002840.02760728
Deposit Coin41847852024-05-31 18:16:25237 days ago1717179385IN
BlastUp : Pre-Sale Execution
0.1225 ETH0.00000260.02168778
Deposit Coin41842132024-05-31 17:57:21237 days ago1717178241IN
BlastUp : Pre-Sale Execution
0.0246 ETH0.000001960.01905464
Deposit Coin41841912024-05-31 17:56:37237 days ago1717178197IN
BlastUp : Pre-Sale Execution
0.0066712 ETH0.00000230.019159
Deposit Coin41831602024-05-31 17:22:15237 days ago1717176135IN
BlastUp : Pre-Sale Execution
0.0025992 ETH0.000002250.02187849
Deposit Coin41829192024-05-31 17:14:13237 days ago1717175653IN
BlastUp : Pre-Sale Execution
0.0043666 ETH0.000002160.02096368
Deposit USDB41807412024-05-31 16:01:37237 days ago1717171297IN
BlastUp : Pre-Sale Execution
0 ETH0.000003610.02152006
Deposit USDB41807012024-05-31 16:00:17237 days ago1717171217IN
BlastUp : Pre-Sale Execution
0 ETH0.00000320.02076235
Deposit Coin41801742024-05-31 15:42:43237 days ago1717170163IN
BlastUp : Pre-Sale Execution
0.0028 ETH0.000002440.02030126
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
41949512024-05-31 23:55:17237 days ago1717199717
BlastUp : Pre-Sale Execution
0.00001366 ETH
41949512024-05-31 23:55:17237 days ago1717199717
BlastUp : Pre-Sale Execution
0.05208633 ETH
41948782024-05-31 23:52:51237 days ago1717199571
BlastUp : Pre-Sale Execution
0.00000391 ETH
41948782024-05-31 23:52:51237 days ago1717199571
BlastUp : Pre-Sale Execution
0.34799608 ETH
41947302024-05-31 23:47:55237 days ago1717199275
BlastUp : Pre-Sale Execution
0.00000852 ETH
41947302024-05-31 23:47:55237 days ago1717199275
BlastUp : Pre-Sale Execution
0.00813147 ETH
41939292024-05-31 23:21:13237 days ago1717197673
BlastUp : Pre-Sale Execution
0.00000929 ETH
41939292024-05-31 23:21:13237 days ago1717197673
BlastUp : Pre-Sale Execution
0.0399907 ETH
41938952024-05-31 23:20:05237 days ago1717197605
BlastUp : Pre-Sale Execution
0.00000378 ETH
41938952024-05-31 23:20:05237 days ago1717197605
BlastUp : Pre-Sale Execution
0.02999621 ETH
41935822024-05-31 23:09:39237 days ago1717196979
BlastUp : Pre-Sale Execution
0.00000585 ETH
41935822024-05-31 23:09:39237 days ago1717196979
BlastUp : Pre-Sale Execution
0.01899414 ETH
41926522024-05-31 22:38:39237 days ago1717195119
BlastUp : Pre-Sale Execution
0.00001655 ETH
41926522024-05-31 22:38:39237 days ago1717195119
BlastUp : Pre-Sale Execution
0.00051614 ETH
41903272024-05-31 21:21:09237 days ago1717190469
BlastUp : Pre-Sale Execution
0.00001188 ETH
41903272024-05-31 21:21:09237 days ago1717190469
BlastUp : Pre-Sale Execution
0.02638811 ETH
41886922024-05-31 20:26:39237 days ago1717187199
BlastUp : Pre-Sale Execution
0.00000116 ETH
41886922024-05-31 20:26:39237 days ago1717187199
BlastUp : Pre-Sale Execution
0.09999883 ETH
41869142024-05-31 19:27:23237 days ago1717183643
BlastUp : Pre-Sale Execution
0.00001444 ETH
41869142024-05-31 19:27:23237 days ago1717183643
BlastUp : Pre-Sale Execution
0.00398555 ETH
41869142024-05-31 19:27:23237 days ago1717183643
BlastUp : Pre-Sale Execution
0.00000436 ETH
41869142024-05-31 19:27:23237 days ago1717183643
BlastUp : Pre-Sale Execution
0.02499563 ETH
41865502024-05-31 19:15:15237 days ago1717182915
BlastUp : Pre-Sale Execution
0.00001012 ETH
41865502024-05-31 19:15:15237 days ago1717182915
BlastUp : Pre-Sale Execution
0.75998987 ETH
41864162024-05-31 19:10:47237 days ago1717182647
BlastUp : Pre-Sale Execution
0.00001672 ETH
View All Internal Transactions

Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xa580BEFe...46335bbd1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PresaleBlast

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion, MIT license
File 1 of 39 : PresaleBlast.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "./PresaleBSC.sol";

contract PresaleBlast is PresaleBSC {
  using SafeERC20 for IERC20;

  IERC20 public immutable usdbToken;
  IERC20 public immutable wethToken;

  constructor(
    AggregatorV3Interface COIN_PRICE_FEED_,
    IERC20 usdtToken_,
    IERC20 usdcToken_,
    IERC20 usdbToken_,
    IERC20 wethToken_,
    address protocolWallet_,
    address DAO,
    address operator
  ) PresaleBSC(
    COIN_PRICE_FEED_,
    usdcToken_,
    usdtToken_,
    protocolWallet_,
    DAO,
    operator
  ){
    usdbToken = usdbToken_;
    wethToken = wethToken_;
  }

  function depositUSDBTo(address to, uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdbToken, to, amount, true);

    _depositInteractions(usdbToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdbToken), to, referrer, spendedValue);
  }

  function depositUSDB(uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdbToken, msg.sender, amount, true);

    _depositInteractions(usdbToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdbToken), msg.sender, referrer, spendedValue);
  }

  function depositWETHTo(address to, uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(wethToken, to, amount, false);

    _depositInteractions(wethToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(wethToken), to, referrer, spendedValue);
  }

  function depositWETH(uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(wethToken, msg.sender, amount, false);

    _depositInteractions(wethToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(wethToken), msg.sender, referrer, spendedValue);
  }
}

File 2 of 39 : IDaiLikePermit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IDaiLikePermit {
    function permit(
        address holder,
        address spender,
        uint256 nonce,
        uint256 expiry,
        bool allowed,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 3 of 39 : IPermit2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IPermit2 {
    struct PermitDetails {
        // ERC20 token address
        address token;
        // the maximum amount allowed to spend
        uint160 amount;
        // timestamp at which a spender's token allowances become invalid
        uint48 expiration;
        // an incrementing value indexed per owner,token,and spender for each signature
        uint48 nonce;
    }
    /// @notice The permit message signed for a single token allownce
    struct PermitSingle {
        // the permit data for a single token alownce
        PermitDetails details;
        // address permissioned on the allowed tokens
        address spender;
        // deadline on the permit signature
        uint256 sigDeadline;
    }
    /// @notice Packed allowance
    struct PackedAllowance {
        // amount allowed
        uint160 amount;
        // permission expiry
        uint48 expiration;
        // an incrementing value indexed per owner,token,and spender for each signature
        uint48 nonce;
    }

    function transferFrom(address user, address spender, uint160 amount, address token) external;

    function permit(address owner, PermitSingle memory permitSingle, bytes calldata signature) external;

    function allowance(address user, address token, address spender) external view returns (PackedAllowance memory);
}

File 4 of 39 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWETH is IERC20 {
    event Deposit(address indexed dst, uint256 wad);

    event Withdrawal(address indexed src, uint256 wad);

    function deposit() external payable;

    function withdraw(uint256 amount) external;
}

File 5 of 39 : RevertReasonForwarder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @title Revert reason forwarder.
library RevertReasonForwarder {
    /// @dev Forwards latest externall call revert.
    function reRevert() internal pure {
        // bubble up revert reason from latest external call
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            let ptr := mload(0x40)
            returndatacopy(ptr, 0, returndatasize())
            revert(ptr, returndatasize())
        }
    }

    /// @dev Returns latest external call revert reason.
    function reReason() internal pure returns (bytes memory reason) {
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            reason := mload(0x40)
            let length := returndatasize()
            mstore(reason, length)
            returndatacopy(add(reason, 0x20), 0, length)
            mstore(0x40, add(reason, add(0x20, length)))
        }
    }
}

File 6 of 39 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
import "../interfaces/IDaiLikePermit.sol";
import "../interfaces/IPermit2.sol";
import "../interfaces/IWETH.sol";
import "../libraries/RevertReasonForwarder.sol";

/**
 * @title Implements efficient safe methods for ERC20 interface.
 * @notice Compared to the standard ERC20, this implementation offers several enhancements:
 * 1. more gas-efficient, providing significant savings in transaction costs.
 * 2. support for different permit implementations
 * 3. forceApprove functionality
 * 4. support for WETH deposit and withdraw
 */
library SafeERC20 {
    error SafeTransferFailed();
    error SafeTransferFromFailed();
    error ForceApproveFailed();
    error SafeIncreaseAllowanceFailed();
    error SafeDecreaseAllowanceFailed();
    error SafePermitBadLength();
    error Permit2TransferAmountTooHigh();

    // Uniswap Permit2 address
    address private constant _PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
    bytes4 private constant _PERMIT_LENGTH_ERROR = 0x68275857;  // SafePermitBadLength.selector
    uint256 private constant _RAW_CALL_GAS_LIMIT = 5000;

    /**
     * @notice Fetches the balance of a specific ERC20 token held by an account.
     * Consumes less gas then regular `ERC20.balanceOf`.
     * @dev Note that the implementation does not perform dirty bits cleaning, so it is the
     * responsibility of the caller to make sure that the higher 96 bits of the `account` parameter are clean.
     * @param token The IERC20 token contract for which the balance will be fetched.
     * @param account The address of the account whose token balance will be fetched.
     * @return tokenBalance The balance of the specified ERC20 token held by the account.
     */
    function safeBalanceOf(
        IERC20 token,
        address account
    ) internal view returns(uint256 tokenBalance) {
        bytes4 selector = IERC20.balanceOf.selector;
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            mstore(0x00, selector)
            mstore(0x04, account)
            let success := staticcall(gas(), token, 0x00, 0x24, 0x00, 0x20)
            tokenBalance := mload(0)

            if or(iszero(success), lt(returndatasize(), 0x20)) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
        }
    }

    /**
     * @notice Attempts to safely transfer tokens from one address to another.
     * @dev If permit2 is true, uses the Permit2 standard; otherwise uses the standard ERC20 transferFrom.
     * Either requires `true` in return data, or requires target to be smart-contract and empty return data.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean.
     * @param token The IERC20 token contract from which the tokens will be transferred.
     * @param from The address from which the tokens will be transferred.
     * @param to The address to which the tokens will be transferred.
     * @param amount The amount of tokens to transfer.
     * @param permit2 If true, uses the Permit2 standard for the transfer; otherwise uses the standard ERC20 transferFrom.
     */
    function safeTransferFromUniversal(
        IERC20 token,
        address from,
        address to,
        uint256 amount,
        bool permit2
    ) internal {
        if (permit2) {
            safeTransferFromPermit2(token, from, to, amount);
        } else {
            safeTransferFrom(token, from, to, amount);
        }
    }

    /**
     * @notice Attempts to safely transfer tokens from one address to another using the ERC20 standard.
     * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean.
     * @param token The IERC20 token contract from which the tokens will be transferred.
     * @param from The address from which the tokens will be transferred.
     * @param to The address to which the tokens will be transferred.
     * @param amount The amount of tokens to transfer.
     */
    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bytes4 selector = token.transferFrom.selector;
        bool success;
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            let data := mload(0x40)

            mstore(data, selector)
            mstore(add(data, 0x04), from)
            mstore(add(data, 0x24), to)
            mstore(add(data, 0x44), amount)
            success := call(gas(), token, 0, data, 100, 0x0, 0x20)
            if success {
                switch returndatasize()
                case 0 {
                    success := gt(extcodesize(token), 0)
                }
                default {
                    success := and(gt(returndatasize(), 31), eq(mload(0), 1))
                }
            }
        }
        if (!success) revert SafeTransferFromFailed();
    }

    /**
     * @notice Attempts to safely transfer tokens from one address to another using the Permit2 standard.
     * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean.
     * @param token The IERC20 token contract from which the tokens will be transferred.
     * @param from The address from which the tokens will be transferred.
     * @param to The address to which the tokens will be transferred.
     * @param amount The amount of tokens to transfer.
     */
    function safeTransferFromPermit2(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        if (amount > type(uint160).max) revert Permit2TransferAmountTooHigh();
        bytes4 selector = IPermit2.transferFrom.selector;
        bool success;
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            let data := mload(0x40)

            mstore(data, selector)
            mstore(add(data, 0x04), from)
            mstore(add(data, 0x24), to)
            mstore(add(data, 0x44), amount)
            mstore(add(data, 0x64), token)
            success := call(gas(), _PERMIT2, 0, data, 0x84, 0x0, 0x0)
            if success {
                success := gt(extcodesize(_PERMIT2), 0)
            }
        }
        if (!success) revert SafeTransferFromFailed();
    }

    /**
     * @notice Attempts to safely transfer tokens to another address.
     * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `to` parameter are clean.
     * @param token The IERC20 token contract from which the tokens will be transferred.
     * @param to The address to which the tokens will be transferred.
     * @param value The amount of tokens to transfer.
     */
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        if (!_makeCall(token, token.transfer.selector, to, value)) {
            revert SafeTransferFailed();
        }
    }

    /**
     * @notice Attempts to approve a spender to spend a certain amount of tokens.
     * @dev If `approve(from, to, amount)` fails, it tries to set the allowance to zero, and retries the `approve` call.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `spender` parameter are clean.
     * @param token The IERC20 token contract on which the call will be made.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     */
    function forceApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        if (!_makeCall(token, token.approve.selector, spender, value)) {
            if (
                !_makeCall(token, token.approve.selector, spender, 0) ||
                !_makeCall(token, token.approve.selector, spender, value)
            ) {
                revert ForceApproveFailed();
            }
        }
    }

    /**
     * @notice Safely increases the allowance of a spender.
     * @dev Increases with safe math check. Checks if the increased allowance will overflow, if yes, then it reverts the transaction.
     * Then uses `forceApprove` to increase the allowance.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `spender` parameter are clean.
     * @param token The IERC20 token contract on which the call will be made.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to increase the allowance by.
     */
    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (value > type(uint256).max - allowance) revert SafeIncreaseAllowanceFailed();
        forceApprove(token, spender, allowance + value);
    }

    /**
     * @notice Safely decreases the allowance of a spender.
     * @dev Decreases with safe math check. Checks if the decreased allowance will underflow, if yes, then it reverts the transaction.
     * Then uses `forceApprove` to increase the allowance.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `spender` parameter are clean.
     * @param token The IERC20 token contract on which the call will be made.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to decrease the allowance by.
     */
    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (value > allowance) revert SafeDecreaseAllowanceFailed();
        forceApprove(token, spender, allowance - value);
    }

    /**
     * @notice Attempts to execute the `permit` function on the provided token with the sender and contract as parameters.
     * Permit type is determined automatically based on permit calldata (IERC20Permit, IDaiLikePermit, and IPermit2).
     * @dev Wraps `tryPermit` function and forwards revert reason if permit fails.
     * @param token The IERC20 token to execute the permit function on.
     * @param permit The permit data to be used in the function call.
     */
    function safePermit(IERC20 token, bytes calldata permit) internal {
        if (!tryPermit(token, msg.sender, address(this), permit)) RevertReasonForwarder.reRevert();
    }

    /**
     * @notice Attempts to execute the `permit` function on the provided token with custom owner and spender parameters.
     * Permit type is determined automatically based on permit calldata (IERC20Permit, IDaiLikePermit, and IPermit2).
     * @dev Wraps `tryPermit` function and forwards revert reason if permit fails.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `owner` and `spender` parameters are clean.
     * @param token The IERC20 token to execute the permit function on.
     * @param owner The owner of the tokens for which the permit is made.
     * @param spender The spender allowed to spend the tokens by the permit.
     * @param permit The permit data to be used in the function call.
     */
    function safePermit(IERC20 token, address owner, address spender, bytes calldata permit) internal {
        if (!tryPermit(token, owner, spender, permit)) RevertReasonForwarder.reRevert();
    }

    /**
     * @notice Attempts to execute the `permit` function on the provided token with the sender and contract as parameters.
     * @dev Invokes `tryPermit` with sender as owner and contract as spender.
     * @param token The IERC20 token to execute the permit function on.
     * @param permit The permit data to be used in the function call.
     * @return success Returns true if the permit function was successfully executed, false otherwise.
     */
    function tryPermit(IERC20 token, bytes calldata permit) internal returns(bool success) {
        return tryPermit(token, msg.sender, address(this), permit);
    }

    /**
     * @notice The function attempts to call the permit function on a given ERC20 token.
     * @dev The function is designed to support a variety of permit functions, namely: IERC20Permit, IDaiLikePermit, and IPermit2.
     * It accommodates both Compact and Full formats of these permit types.
     * Please note, it is expected that the `expiration` parameter for the compact Permit2 and the `deadline` parameter
     * for the compact Permit are to be incremented by one before invoking this function. This approach is motivated by
     * gas efficiency considerations; as the unlimited expiration period is likely to be the most common scenario, and
     * zeros are cheaper to pass in terms of gas cost. Thus, callers should increment the expiration or deadline by one
     * before invocation for optimized performance.
     * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of
     * the caller to make sure that the higher 96 bits of the `owner` and `spender` parameters are clean.
     * @param token The address of the ERC20 token on which to call the permit function.
     * @param owner The owner of the tokens. This address should have signed the off-chain permit.
     * @param spender The address which will be approved for transfer of tokens.
     * @param permit The off-chain permit data, containing different fields depending on the type of permit function.
     * @return success A boolean indicating whether the permit call was successful.
     */
    function tryPermit(IERC20 token, address owner, address spender, bytes calldata permit) internal returns(bool success) {
        // load function selectors for different permit standards
        bytes4 permitSelector = IERC20Permit.permit.selector;
        bytes4 daiPermitSelector = IDaiLikePermit.permit.selector;
        bytes4 permit2Selector = IPermit2.permit.selector;
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            let ptr := mload(0x40)

            // Switch case for different permit lengths, indicating different permit standards
            switch permit.length
            // Compact IERC20Permit
            case 100 {
                mstore(ptr, permitSelector)     // store selector
                mstore(add(ptr, 0x04), owner)   // store owner
                mstore(add(ptr, 0x24), spender) // store spender

                // Compact IERC20Permit.permit(uint256 value, uint32 deadline, uint256 r, uint256 vs)
                {  // stack too deep
                    let deadline := shr(224, calldataload(add(permit.offset, 0x20))) // loads permit.offset 0x20..0x23
                    let vs := calldataload(add(permit.offset, 0x44))                 // loads permit.offset 0x44..0x63

                    calldatacopy(add(ptr, 0x44), permit.offset, 0x20)            // store value     = copy permit.offset 0x00..0x19
                    mstore(add(ptr, 0x64), sub(deadline, 1))                     // store deadline  = deadline - 1
                    mstore(add(ptr, 0x84), add(27, shr(255, vs)))                // store v         = most significant bit of vs + 27 (27 or 28)
                    calldatacopy(add(ptr, 0xa4), add(permit.offset, 0x24), 0x20) // store r         = copy permit.offset 0x24..0x43
                    mstore(add(ptr, 0xc4), shr(1, shl(1, vs)))                   // store s         = vs without most significant bit
                }
                // IERC20Permit.permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
                success := call(gas(), token, 0, ptr, 0xe4, 0, 0)
            }
            // Compact IDaiLikePermit
            case 72 {
                mstore(ptr, daiPermitSelector)  // store selector
                mstore(add(ptr, 0x04), owner)   // store owner
                mstore(add(ptr, 0x24), spender) // store spender

                // Compact IDaiLikePermit.permit(uint32 nonce, uint32 expiry, uint256 r, uint256 vs)
                {  // stack too deep
                    let expiry := shr(224, calldataload(add(permit.offset, 0x04))) // loads permit.offset 0x04..0x07
                    let vs := calldataload(add(permit.offset, 0x28))               // loads permit.offset 0x28..0x47

                    mstore(add(ptr, 0x44), shr(224, calldataload(permit.offset))) // store nonce   = copy permit.offset 0x00..0x03
                    mstore(add(ptr, 0x64), sub(expiry, 1))                        // store expiry  = expiry - 1
                    mstore(add(ptr, 0x84), true)                                  // store allowed = true
                    mstore(add(ptr, 0xa4), add(27, shr(255, vs)))                 // store v       = most significant bit of vs + 27 (27 or 28)
                    calldatacopy(add(ptr, 0xc4), add(permit.offset, 0x08), 0x20)  // store r       = copy permit.offset 0x08..0x27
                    mstore(add(ptr, 0xe4), shr(1, shl(1, vs)))                    // store s       = vs without most significant bit
                }
                // IDaiLikePermit.permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s)
                success := call(gas(), token, 0, ptr, 0x104, 0, 0)
            }
            // IERC20Permit
            case 224 {
                mstore(ptr, permitSelector)
                calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata
                // IERC20Permit.permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
                success := call(gas(), token, 0, ptr, 0xe4, 0, 0)
            }
            // IDaiLikePermit
            case 256 {
                mstore(ptr, daiPermitSelector)
                calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata
                // IDaiLikePermit.permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s)
                success := call(gas(), token, 0, ptr, 0x104, 0, 0)
            }
            // Compact IPermit2
            case 96 {
                // Compact IPermit2.permit(uint160 amount, uint32 expiration, uint32 nonce, uint32 sigDeadline, uint256 r, uint256 vs)
                mstore(ptr, permit2Selector)  // store selector
                mstore(add(ptr, 0x04), owner) // store owner
                mstore(add(ptr, 0x24), token) // store token

                calldatacopy(add(ptr, 0x50), permit.offset, 0x14)             // store amount = copy permit.offset 0x00..0x13
                // and(0xffffffffffff, ...) - conversion to uint48
                mstore(add(ptr, 0x64), and(0xffffffffffff, sub(shr(224, calldataload(add(permit.offset, 0x14))), 1))) // store expiration = ((permit.offset 0x14..0x17 - 1) & 0xffffffffffff)
                mstore(add(ptr, 0x84), shr(224, calldataload(add(permit.offset, 0x18)))) // store nonce = copy permit.offset 0x18..0x1b
                mstore(add(ptr, 0xa4), spender)                               // store spender
                // and(0xffffffffffff, ...) - conversion to uint48
                mstore(add(ptr, 0xc4), and(0xffffffffffff, sub(shr(224, calldataload(add(permit.offset, 0x1c))), 1))) // store sigDeadline = ((permit.offset 0x1c..0x1f - 1) & 0xffffffffffff)
                mstore(add(ptr, 0xe4), 0x100)                                 // store offset = 256
                mstore(add(ptr, 0x104), 0x40)                                 // store length = 64
                calldatacopy(add(ptr, 0x124), add(permit.offset, 0x20), 0x20) // store r      = copy permit.offset 0x20..0x3f
                calldatacopy(add(ptr, 0x144), add(permit.offset, 0x40), 0x20) // store vs     = copy permit.offset 0x40..0x5f
                // IPermit2.permit(address owner, PermitSingle calldata permitSingle, bytes calldata signature)
                success := call(gas(), _PERMIT2, 0, ptr, 0x164, 0, 0)
            }
            // IPermit2
            case 352 {
                mstore(ptr, permit2Selector)
                calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata
                // IPermit2.permit(address owner, PermitSingle calldata permitSingle, bytes calldata signature)
                success := call(gas(), _PERMIT2, 0, ptr, 0x164, 0, 0)
            }
            // Unknown
            default {
                mstore(ptr, _PERMIT_LENGTH_ERROR)
                revert(ptr, 4)
            }
        }
    }

    /**
     * @dev Executes a low level call to a token contract, making it resistant to reversion and erroneous boolean returns.
     * @param token The IERC20 token contract on which the call will be made.
     * @param selector The function signature that is to be called on the token contract.
     * @param to The address to which the token amount will be transferred.
     * @param amount The token amount to be transferred.
     * @return success A boolean indicating if the call was successful. Returns 'true' on success and 'false' on failure.
     * In case of success but no returned data, validates that the contract code exists.
     * In case of returned data, ensures that it's a boolean `true`.
     */
    function _makeCall(
        IERC20 token,
        bytes4 selector,
        address to,
        uint256 amount
    ) private returns (bool success) {
        assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
            let data := mload(0x40)

            mstore(data, selector)
            mstore(add(data, 0x04), to)
            mstore(add(data, 0x24), amount)
            success := call(gas(), token, 0, data, 0x44, 0x0, 0x20)
            if success {
                switch returndatasize()
                case 0 {
                    success := gt(extcodesize(token), 0)
                }
                default {
                    success := and(gt(returndatasize(), 31), eq(mload(0), 1))
                }
            }
        }
    }

    /**
     * @notice Safely deposits a specified amount of Ether into the IWETH contract. Consumes less gas then regular `IWETH.deposit`.
     * @param weth The IWETH token contract.
     * @param amount The amount of Ether to deposit into the IWETH contract.
     */
    function safeDeposit(IWETH weth, uint256 amount) internal {
        if (amount > 0) {
            bytes4 selector = IWETH.deposit.selector;
            assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
                mstore(0, selector)
                if iszero(call(gas(), weth, amount, 0, 4, 0, 0)) {
                    let ptr := mload(0x40)
                    returndatacopy(ptr, 0, returndatasize())
                    revert(ptr, returndatasize())
                }
            }
        }
    }

    /**
     * @notice Safely withdraws a specified amount of wrapped Ether from the IWETH contract. Consumes less gas then regular `IWETH.withdraw`.
     * @dev Uses inline assembly to interact with the IWETH contract.
     * @param weth The IWETH token contract.
     * @param amount The amount of wrapped Ether to withdraw from the IWETH contract.
     */
    function safeWithdraw(IWETH weth, uint256 amount) internal {
        bytes4 selector = IWETH.withdraw.selector;
        assembly ("memory-safe") {  // solhint-disable-line no-inline-assembly
            mstore(0, selector)
            mstore(4, amount)
            if iszero(call(gas(), weth, 0, 0, 0x24, 0, 0)) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
        }
    }

    /**
     * @notice Safely withdraws a specified amount of wrapped Ether from the IWETH contract to a specified recipient.
     * Consumes less gas then regular `IWETH.withdraw`.
     * @param weth The IWETH token contract.
     * @param amount The amount of wrapped Ether to withdraw from the IWETH contract.
     * @param to The recipient of the withdrawn Ether.
     */
    function safeWithdrawTo(IWETH weth, uint256 amount, address to) internal {
        safeWithdraw(weth, amount);
        if (to != address(this)) {
            assembly ("memory-safe") {  // solhint-disable-line no-inline-assembly
                if iszero(call(_RAW_CALL_GAS_LIMIT, to, amount, 0, 0, 0, 0)) {
                    let ptr := mload(0x40)
                    returndatacopy(ptr, 0, returndatasize())
                    revert(ptr, returndatasize())
                }
            }
        }
    }
}

File 7 of 39 : TokenCustomDecimalsMock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";

contract TokenCustomDecimalsMock is ERC20Permit, Ownable {
    uint8 internal immutable _DECIMALS;

    constructor(
        string memory name,
        string memory symbol,
        uint256 amount,
        uint8 decimals_
    ) ERC20(name, symbol) ERC20Permit(name) Ownable(msg.sender) {
        _mint(msg.sender, amount);
        _DECIMALS = decimals_;
    }

    function mint(address account, uint256 amount) external onlyOwner {
        _mint(account, amount);
    }

    function burn(address account, uint256 amount) external onlyOwner {
        _burn(account, amount);
    }

    function decimals() public view virtual override returns (uint8) {
        return _DECIMALS;
    }

    function getChainId() external view returns (uint256) {
        return block.chainid;
    }
}

File 8 of 39 : TokenMock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract TokenMock is ERC20, Ownable {
    // solhint-disable-next-line no-empty-blocks
    constructor(string memory name, string memory symbol) ERC20(name, symbol) Ownable(msg.sender) {}

    function mint(address account, uint256 amount) external onlyOwner {
        _mint(account, amount);
    }

    function burn(address account, uint256 amount) external onlyOwner {
        _burn(account, amount);
    }
}

File 9 of 39 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(
    uint80 _roundId
  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

  function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

File 10 of 39 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 11 of 39 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 12 of 39 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 13 of 39 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 14 of 39 : IERC5267.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.20;

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 15 of 39 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

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

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. 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);
            }
        }
    }
}

File 16 of 39 : ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)

pragma solidity ^0.8.20;

import {IERC20Permit} from "./IERC20Permit.sol";
import {ERC20} from "../ERC20.sol";
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
import {Nonces} from "../../../utils/Nonces.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 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 ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @inheritdoc IERC20Permit
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        if (block.timestamp > deadline) {
            revert ERC2612ExpiredSignature(deadline);
        }

        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        if (signer != owner) {
            revert ERC2612InvalidSigner(signer, owner);
        }

        _approve(owner, spender, value);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
        return super.nonces(owner);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
        return _domainSeparatorV4();
    }
}

File 17 of 39 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 19 of 39 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

File 20 of 39 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 21 of 39 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, 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[EIP-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);
        }
    }
}

File 22 of 39 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.20;

import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
 * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
 * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
 * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {IERC-5267}.
     */
    function eip712Domain()
        public
        view
        virtual
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _EIP712Name(),
            _EIP712Version(),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /**
     * @dev The name parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _name which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Name() internal view returns (string memory) {
        return _name.toStringWithFallback(_nameFallback);
    }

    /**
     * @dev The version parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _version which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Version() internal view returns (string memory) {
        return _version.toStringWithFallback(_versionFallback);
    }
}

File 23 of 39 : MessageHashUtils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)

pragma solidity ^0.8.20;

import {Strings} from "../Strings.sol";

/**
 * @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[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
 * specifications.
 */
library MessageHashUtils {
    /**
     * @dev Returns the keccak256 digest of an EIP-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 EIP-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 EIP-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 (EIP-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)
        }
    }
}

File 24 of 39 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 25 of 39 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 26 of 39 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @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 overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        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 division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        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;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        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;
    }
}

File 27 of 39 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

File 28 of 39 : Nonces.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
pragma solidity ^0.8.20;

/**
 * @dev Provides tracking nonces for addresses. Nonces will only increment.
 */
abstract contract Nonces {
    /**
     * @dev The nonce used for an `account` is not the expected current nonce.
     */
    error InvalidAccountNonce(address account, uint256 currentNonce);

    mapping(address account => uint256) private _nonces;

    /**
     * @dev Returns the next unused nonce for an address.
     */
    function nonces(address owner) public view virtual returns (uint256) {
        return _nonces[owner];
    }

    /**
     * @dev Consumes a nonce.
     *
     * Returns the current value and increments nonce.
     */
    function _useNonce(address owner) internal virtual returns (uint256) {
        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
        // decremented or reset. This guarantees that the nonce never overflows.
        unchecked {
            // It is important to do x++ and not ++x here.
            return _nonces[owner]++;
        }
    }

    /**
     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
     */
    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
        uint256 current = _useNonce(owner);
        if (nonce != current) {
            revert InvalidAccountNonce(owner, current);
        }
    }
}

File 29 of 39 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 30 of 39 : ShortStrings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.20;

import {StorageSlot} from "./StorageSlot.sol";

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

File 31 of 39 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 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
        }
    }
}

File 32 of 39 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

File 33 of 39 : TokenCustomDecimalsMock.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >0.0.0;
import '@1inch/solidity-utils/contracts/mocks/TokenCustomDecimalsMock.sol';

File 34 of 39 : TokenMock.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >0.0.0;
import '@1inch/solidity-utils/contracts/mocks/TokenMock.sol';

File 35 of 39 : IPresale.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IPresale {
    struct StageData {
        uint96 cost;
        uint160 amount;
    }

    event TokensBought(address indexed token, address indexed user, address indexed referrer, uint256 amount);
    event AmountAndUSD(address indexed user, uint256 amount, int256 usd);
    event StageUpdated(uint256 currentStage);

    function updateProtocolWallet(address wallet) external;
    function setStage(uint256 stageIterator_) external;
    function updateTotalSold(uint256 amount) external;
    function pause() external;
    function unpause() external;

    function depositUSDCTo(address to, uint256 amount, address referrer) external;
    function depositUSDTTo(address to, uint256 amount, address referrer) external;

    function depositUSDC(uint256 amount, address referrer) external;
    function depositUSDT(uint256 amount, address referrer) external;
}

File 36 of 39 : IPresaleBlast.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "./IPresale.sol";

interface IPresaleBlast is IPresale {
    function depositUSDBTo(address to, uint256 amount, address referrer) external;
    function depositWETHTo(address to, uint256 amount, address referrer) external;

    function depositUSDB(uint256 amount, address referrer) external;
    function depositWETH(uint256 amount, address referrer) external;
}

File 37 of 39 : CoinPriceFeed.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

contract CoinPriceFeedMock is AggregatorV3Interface {
    uint8 public decimals_ = 8;
    uint256 public version_ = 1;

    function decimals() external view returns (uint8) {
        return decimals_;
    }

    //As mock smart-contract we used MATIC/USD pair
    function description() external pure returns (string memory) {
        return "MATIC/USD";
    }

    function version() external view returns (uint256) {
        return version_;
    }

    function getRoundData(
        uint80 _roundId
    )
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {}

    //14.11.2023
    //MATIC/USD = 90180000
    //MATIC Decimals = 18

    //ETH/USD = 208074000000
    //Ethereum Decimals = 18

    function latestRoundData()
        external
        pure
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        roundId = 0;
        answer = 208074000000;
        startedAt = 0;
        updatedAt = 0;
        answeredInRound = 0;
    }
}

File 38 of 39 : Presale.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import { IERC20, SafeERC20 } from "@1inch/solidity-utils/contracts/libraries/SafeERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "./interfaces/IPresale.sol";

contract Presale is IPresale, AccessControl, Pausable {
  using SafeERC20 for IERC20;

  bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

  uint256 public constant DEFAULT_DELAY = 12 hours;

  int32 public constant STABLETOKEN_PRICE = 1e8;
  uint8 public constant STABLE_TOKEN_DECIMALS = 6;
  uint8 public constant PRICEFEED_DECIMALS = 8;
  uint8 public constant TOKEN_PRECISION = 18;

  AggregatorV3Interface public immutable COIN_PRICE_FEED;

  IERC20 public immutable usdcToken;
  IERC20 public immutable usdtToken;

  address public protocolWallet;

  uint256 public totalTokensSold;
  uint256 public totalSoldInUSD; //NOTE Precision is 8 decimals

  uint256 public stageIterator;
  StageData[] public stages;

  mapping(address user => uint256 balance) public balances;

  mapping(bytes4 selector => uint256 timestamp) private _timestamps;

  constructor(
    AggregatorV3Interface COIN_PRICE_FEED_,
    IERC20 usdcToken_,
    IERC20 usdtToken_,
    address protocolWallet_,
    address DAO,
    address operator
  ) {
    COIN_PRICE_FEED = COIN_PRICE_FEED_;

    usdcToken = usdcToken_;
    usdtToken = usdtToken_;

    protocolWallet = protocolWallet_;

    stages.push(StageData(2e6, 25e5));
    stages.push(StageData(3e6, 25e5));
    stages.push(StageData(4e6, 625e4));
    stages.push(StageData(5e6, 275e5));
    stages.push(StageData(55e5, 375e5));
    stages.push(StageData(6e6, 4125e4));
    stages.push(StageData(65e5, 375e5));
    stages.push(StageData(7e6, 35e6));
    stages.push(StageData(8e6, 75e5));
    stages.push(StageData(9e6, 25e5));
    stages.push(StageData(0, 0));

    _grantRole(DEFAULT_ADMIN_ROLE, DAO);
    _grantRole(OPERATOR_ROLE, operator);
  }

  //NOTE function selector is: 0xe308a099
  function updateProtocolWallet(address wallet) external onlyRole(DEFAULT_ADMIN_ROLE) {
    uint256 delayedTill = _timestamps[0xe308a099];

    if(delayedTill > 0 && delayedTill <= block.timestamp) {
      protocolWallet = wallet;
      
      _timestamps[0xe308a099] = 0;
    } else {
      _timestamps[0xe308a099] = block.timestamp + DEFAULT_DELAY;
    }
  }

  function setStage(uint256 stageIterator_) external onlyRole(OPERATOR_ROLE) {
    require(stageIterator_ < stages.length, "Presale: Wrong iterator");

    stageIterator = stageIterator_;

    emit StageUpdated(stageIterator);
  }

  //NOTE function selector is: 0x76aa28fc
  function updateTotalSold(uint256 amount) external onlyRole(OPERATOR_ROLE) {
    uint256 delayedTill = _timestamps[0x76aa28fc];

    if(delayedTill > 0 && delayedTill <= block.timestamp) {
      totalTokensSold = amount;

      _timestamps[0xe308a099] = 0;
    } else {
      _timestamps[0x76aa28fc] = block.timestamp + DEFAULT_DELAY;
    }
  }

  function pause() external onlyRole(OPERATOR_ROLE) {
    _pause();
  }

  function unpause() external onlyRole(OPERATOR_ROLE) {
    _unpause();
  }

  function rescueFunds(IERC20 token, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
    uint256 delayedTill = _timestamps[0x78e3214f];

    if(delayedTill > 0 && delayedTill <= block.timestamp) {
      if (address(token) == address(0)) {
          require(amount <= address(this).balance, "Presale: Wrong amount");
          (bool success, ) = payable(msg.sender).call{value: amount}("");

          require(success, "Payout: Transfer coin failed");
      } else {
          require(amount <= token.balanceOf(address(this)), "Presale: Wrong amount");

          token.safeTransfer(protocolWallet, amount);
      }

      _timestamps[0x78e3214f] = 0;
    } else {
      _timestamps[0x78e3214f] = block.timestamp + DEFAULT_DELAY;
    }
  }

  function depositUSDCTo(address to, uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdcToken, to, amount, true);

    _depositInteractions(usdcToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdcToken), to, referrer, spendedValue);
  }

  function depositUSDC(uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdcToken, msg.sender, amount, true);

    _depositInteractions(usdcToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdcToken), msg.sender, referrer, spendedValue);
  }

  function depositUSDTTo(address to, uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdtToken, to, amount, true);

    _depositInteractions(usdtToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdtToken), to, referrer, spendedValue);
  }

  function depositUSDT(uint256 amount, address referrer) external whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(usdtToken, msg.sender, amount, true);

    _depositInteractions(usdtToken, amount, chargeBack, spendedValue);

    emit TokensBought(address(usdtToken), msg.sender, referrer, spendedValue);
  }

  function depositCoinTo(address to, address referrer) public payable whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(IERC20(address(0)), to, msg.value, false);

    (bool success, ) = payable(protocolWallet).call{value: spendedValue}("");
    require(success, "Presale: Coin transfer failed");

    if(chargeBack > 0) {
      (success, ) = payable(msg.sender).call{value: chargeBack}("");
      require(success, "Presale: Coin transfer failed");
    }

    emit TokensBought(address(0), to, referrer, spendedValue);
  }

  function depositCoin(address referrer) public payable whenNotPaused {
    (uint256 chargeBack, uint256 spendedValue) = _depositChecksAndEffects(IERC20(address(0)), msg.sender, msg.value, false);

    (bool success, ) = payable(protocolWallet).call{value: spendedValue}("");
    require(success, "Presale: Coin transfer failed");

    if(chargeBack > 0) {
      (success, ) = payable(msg.sender).call{value: chargeBack}("");
      require(success, "Presale: Coin transfer failed");
    }

    emit TokensBought(address(0), msg.sender, referrer, spendedValue);
  }

  function _depositChecksAndEffects(
    IERC20 token, 
    address to, 
    uint256 value, 
    bool isStableToken
  ) internal virtual returns (uint256 chargeBack, uint256 spendedValue) {
    require(stages[stageIterator].amount != 0, "PreSale: is ended");

    (uint256 tokensToTransfer, uint256 coinPrice) = _calculateAmount(isStableToken, value);
    (chargeBack, spendedValue) = _purchase(token, to, coinPrice, tokensToTransfer, value);
  }

  function _depositInteractions(
    IERC20 token, 
    uint256 amount, 
    uint256 chargeBack, 
    uint256 spendedValue
  ) internal virtual {
    token.safeTransferFrom(msg.sender, address(this), amount);
    token.safeTransfer(protocolWallet, spendedValue);
    if(chargeBack > 0) token.safeTransfer(msg.sender, chargeBack);
  }

  function _calculateAmount(bool isStableToken, uint256 value) internal virtual returns (uint256 amount, uint256 price) {
    int256 coinPrice;
    uint256 PRECISION;

    if (isStableToken) {
      coinPrice = STABLETOKEN_PRICE;
      PRECISION = STABLE_TOKEN_DECIMALS;
    } else {
      (, coinPrice, , , ) = COIN_PRICE_FEED.latestRoundData();
      PRECISION = TOKEN_PRECISION;
    }

    uint256 expectedAmount = uint(coinPrice) * value / uint(stages[stageIterator].cost);

    emit AmountAndUSD(msg.sender, expectedAmount, coinPrice);

    return (expectedAmount / 10 ** (PRECISION), uint(coinPrice));
  }

  function _purchase(
    IERC20 token, 
    address to, 
    uint256 coinPrice, 
    uint256 amount, 
    uint256 value
  ) internal virtual returns (uint256 tokensToChargeBack, uint256 spendedValue) {
    StageData storage crtStage =  stages[stageIterator];

    if (uint(crtStage.amount) <= amount) {
      spendedValue = crtStage.amount * crtStage.cost;
    } else {
      spendedValue = amount * crtStage.cost;
    }

    totalSoldInUSD += spendedValue;

    if(address(token) == address(0)) {
      uint256 usdInEth = 1 ether / coinPrice;
      spendedValue *= usdInEth;
    } else {
      spendedValue /= 10 ** (PRICEFEED_DECIMALS - STABLE_TOKEN_DECIMALS);
    }

    tokensToChargeBack = value - spendedValue;

    if (uint(crtStage.amount) <= amount) {
      balances[to] += crtStage.amount;
      totalTokensSold += crtStage.amount;

      crtStage.amount = 0;
      stageIterator++;

      emit StageUpdated(stageIterator);
    } else {
      balances[to] += amount;

      totalTokensSold += amount;
      crtStage.amount -= uint160(amount);
    }
  }
}

File 39 of 39 : PresaleBSC.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "./Presale.sol";

contract PresaleBSC is Presale {
  using SafeERC20 for IERC20;

  constructor(
    AggregatorV3Interface COIN_PRICE_FEED_,
    IERC20 usdcToken_,
    IERC20 usdtToken_,
    address protocolWallet_,
    address DAO,
    address operator
  ) Presale(
    COIN_PRICE_FEED_,
    usdcToken_,
    usdtToken_,
    protocolWallet_,
    DAO,
    operator
  ) {}

  function _depositChecksAndEffects(
    IERC20 token,
    address to, 
    uint256 value, 
    bool isStableToken
  ) internal override returns (uint256 chargeBack, uint256 spendedValue) {
    require(stages[stageIterator].amount != 0, "PreSale: is ended");

    (uint256 tokensToTransfer, uint256 coinPrice) = _calculateAmount(isStableToken, value);
    
    (chargeBack, spendedValue) = _purchase(token, to, coinPrice, tokensToTransfer, value);
  }

  function _depositInteractions(
    IERC20 token, 
    uint256 amount, 
    uint256 chargeBack, 
    uint256 spendedValue
  ) internal override {
    token.safeTransferFrom(msg.sender, address(this), amount);
    token.safeTransfer(protocolWallet, spendedValue);
    if(chargeBack > 0) token.safeTransfer(msg.sender, chargeBack);
  }

  function _calculateAmount(bool isStableToken, uint256 value) internal override returns (uint256 amount, uint256 price) {
    int256 coinPrice;

    if (isStableToken) {
      coinPrice = STABLETOKEN_PRICE;
    } else {
      (, coinPrice, , , ) = COIN_PRICE_FEED.latestRoundData();
    }

    uint256 expectedAmount = uint(coinPrice) * value / uint(stages[stageIterator].cost);

    emit AmountAndUSD(msg.sender, expectedAmount, coinPrice);

    return (expectedAmount / 10 ** (TOKEN_PRECISION), uint(coinPrice));
  }

  function _purchase(
    IERC20 token,
    address to, 
    uint256 coinPrice, 
    uint256 amount, 
    uint256 value
  ) internal override returns (uint256 tokensToChargeBack, uint256 spendedValue) {
    StageData storage crtStage =  stages[stageIterator];

    if (uint(crtStage.amount) <= amount) {
      spendedValue = crtStage.amount * crtStage.cost;
    } else {
      spendedValue = amount * crtStage.cost;
    }

    totalSoldInUSD += spendedValue;

    spendedValue *= (1 ether / coinPrice);

    tokensToChargeBack = value - spendedValue;

    if (uint(crtStage.amount) <= amount) {
      balances[to] += crtStage.amount;
      totalTokensSold += crtStage.amount;

      crtStage.amount = 0;
      stageIterator++;

      emit StageUpdated(stageIterator);
    } else {
      balances[to] += amount;

      totalTokensSold += amount;
      crtStage.amount -= uint160(amount);
    }
  }
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract AggregatorV3Interface","name":"COIN_PRICE_FEED_","type":"address"},{"internalType":"contract IERC20","name":"usdtToken_","type":"address"},{"internalType":"contract IERC20","name":"usdcToken_","type":"address"},{"internalType":"contract IERC20","name":"usdbToken_","type":"address"},{"internalType":"contract IERC20","name":"wethToken_","type":"address"},{"internalType":"address","name":"protocolWallet_","type":"address"},{"internalType":"address","name":"DAO","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"SafeTransferFailed","type":"error"},{"inputs":[],"name":"SafeTransferFromFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"int256","name":"usd","type":"int256"}],"name":"AmountAndUSD","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"currentStage","type":"uint256"}],"name":"StageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"COIN_PRICE_FEED","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICEFEED_DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STABLETOKEN_PRICE","outputs":[{"internalType":"int32","name":"","type":"int32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STABLE_TOKEN_DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_PRECISION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"}],"name":"depositCoin","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositCoinTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDBTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDCTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositUSDTTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"depositWETHTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stageIterator_","type":"uint256"}],"name":"setStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stageIterator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stages","outputs":[{"internalType":"uint96","name":"cost","type":"uint96"},{"internalType":"uint160","name":"amount","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSoldInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"updateProtocolWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateTotalSold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdbToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdcToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdtToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604052600436106102465760003560e01c806376aa28fc11610139578063ad50d142116100b6578063d20eec781161007a578063d20eec781461082b578063d434df7114610854578063d547741f1461087f578063e308a099146108a8578063f5b541a6146108d1578063fab5b91f146108fc57610246565b8063ad50d14214610767578063ba680e5614610790578063c6616894146107bb578063cbd6e8f4146107e6578063cf19388e1461080257610246565b8063860956b6116100fd578063860956b61461067e57806391d14854146106a95780639a6c5952146106e6578063a217fddf14610711578063a98ad46c1461073c57610246565b806376aa28fc146105ac57806378e3214f146105d55780637f9aee99146105fe5780638456cb5914610629578063845ddcb21461064057610246565b80633eb1d777116101c75780634b57b0be1161018b5780634b57b0be146104d75780635c975abb1461050257806363b201171461052d578063659495a0146105585780636f6c2bd31461058357610246565b80633eb1d7771461041a5780633f4ba83a146104435780633f63cf971461045a57806345f5c0dc146104835780634a80409e146104ac57610246565b8063248a9ca31161020e578063248a9ca31461032357806327e235e3146103605780632f2ff15d1461039d57806336568abe146103c65780633be00ab3146103ef57610246565b806301ffc9a71461024b57806306d6e63f1461028857806309577319146102b357806311eac855146102dc5780631c7e11af14610307575b600080fd5b34801561025757600080fd5b50610272600480360381019061026d9190612c9e565b610925565b60405161027f9190612ce6565b60405180910390f35b34801561029457600080fd5b5061029d61099f565b6040516102aa9190612d42565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190612dbf565b6109c3565b005b3480156102e857600080fd5b506102f1610ace565b6040516102fe9190612e71565b60405180910390f35b610321600480360381019061031c9190612e8c565b610af2565b005b34801561032f57600080fd5b5061034a60048036038101906103459190612f02565b610d15565b6040516103579190612f3e565b60405180910390f35b34801561036c57600080fd5b5061038760048036038101906103829190612f59565b610d34565b6040516103949190612f95565b60405180910390f35b3480156103a957600080fd5b506103c460048036038101906103bf9190612fb0565b610d4c565b005b3480156103d257600080fd5b506103ed60048036038101906103e89190612fb0565b610d6e565b005b3480156103fb57600080fd5b50610404610de9565b604051610411919061300c565b60405180910390f35b34801561042657600080fd5b50610441600480360381019061043c9190613027565b610dee565b005b34801561044f57600080fd5b50610458610ea3565b005b34801561046657600080fd5b50610481600480360381019061047c9190613054565b610ed8565b005b34801561048f57600080fd5b506104aa60048036038101906104a59190613054565b610fe2565b005b3480156104b857600080fd5b506104c16110ec565b6040516104ce9190612e71565b60405180910390f35b3480156104e357600080fd5b506104ec611110565b6040516104f99190612e71565b60405180910390f35b34801561050e57600080fd5b50610517611134565b6040516105249190612ce6565b60405180910390f35b34801561053957600080fd5b5061054261114b565b60405161054f9190612f95565b60405180910390f35b34801561056457600080fd5b5061056d611151565b60405161057a9190612f95565b60405180910390f35b34801561058f57600080fd5b506105aa60048036038101906105a59190612dbf565b611157565b005b3480156105b857600080fd5b506105d360048036038101906105ce9190613027565b611262565b005b3480156105e157600080fd5b506105fc60048036038101906105f791906130d2565b61137b565b005b34801561060a57600080fd5b506106136116a2565b6040516106209190612f95565b60405180910390f35b34801561063557600080fd5b5061063e6116a8565b005b34801561064c57600080fd5b5061066760048036038101906106629190613027565b6116dd565b604051610675929190613148565b60405180910390f35b34801561068a57600080fd5b50610693611745565b6040516106a0919061318d565b60405180910390f35b3480156106b557600080fd5b506106d060048036038101906106cb9190612fb0565b61174d565b6040516106dd9190612ce6565b60405180910390f35b3480156106f257600080fd5b506106fb6117b7565b60405161070891906131c9565b60405180910390f35b34801561071d57600080fd5b506107266117db565b6040516107339190612f3e565b60405180910390f35b34801561074857600080fd5b506107516117e2565b60405161075e9190612e71565b60405180910390f35b34801561077357600080fd5b5061078e60048036038101906107899190612dbf565b611806565b005b34801561079c57600080fd5b506107a5611911565b6040516107b29190612f95565b60405180910390f35b3480156107c757600080fd5b506107d0611917565b6040516107dd919061300c565b60405180910390f35b61080060048036038101906107fb9190612f59565b61191c565b005b34801561080e57600080fd5b5061082960048036038101906108249190612dbf565b611b3e565b005b34801561083757600080fd5b50610852600480360381019061084d9190613054565b611c49565b005b34801561086057600080fd5b50610869611d53565b604051610876919061300c565b60405180910390f35b34801561088b57600080fd5b506108a660048036038101906108a19190612fb0565b611d58565b005b3480156108b457600080fd5b506108cf60048036038101906108ca9190612f59565b611d7a565b005b3480156108dd57600080fd5b506108e6611eaf565b6040516108f39190612f3e565b60405180910390f35b34801561090857600080fd5b50610923600480360381019061091e9190613054565b611ed3565b005b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610998575061099782611fdd565b5b9050919050565b60018054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109cb612047565b6000806109fb7f000000000000000000000000430000000000000000000000000000000000000386866001612088565b91509150610a2b7f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce84604051610abf9190612f95565b60405180910390a45050505050565b7f000000000000000000000000430000000000000000000000000000000000000381565b610afa612047565b600080610b0b600085346000612088565b91509150600060018054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610b5590613215565b60006040518083038185875af1925050503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b5050905080610bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd290613287565b60405180910390fd5b6000831115610c91573373ffffffffffffffffffffffffffffffffffffffff1683604051610c0890613215565b60006040518083038185875af1925050503d8060008114610c45576040519150601f19603f3d011682016040523d82523d6000602084013e610c4a565b606091505b50508091505080610c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8790613287565b60405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce85604051610d069190612f95565b60405180910390a45050505050565b6000806000838152602001908152602001600020600101549050919050565b60066020528060005260406000206000915090505481565b610d5582610d15565b610d5e8161220b565b610d68838361221f565b50505050565b610d76612310565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610dda576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610de48282612318565b505050565b600681565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610e188161220b565b6005805490508210610e5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e56906132f3565b60405180910390fd5b816004819055507f34cf54504fd39ab670a54acbb37f686c5bd25e6eedfa39889cba899d360bc7d9600454604051610e979190612f95565b60405180910390a15050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610ecd8161220b565b610ed561240a565b50565b610ee0612047565b600080610f107f000000000000000000000000430000000000000000000000000000000000000333866001612088565b91509150610f407f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce84604051610fd49190612f95565b60405180910390a450505050565b610fea612047565b60008061101a7f000000000000000000000000430000000000000000000000000000000000000333866001612088565b9150915061104a7f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce846040516110de9190612f95565b60405180910390a450505050565b7f000000000000000000000000430000000000000000000000000000000000000381565b7f000000000000000000000000430000000000000000000000000000000000000481565b6000600160009054906101000a900460ff16905090565b60025481565b61a8c081565b61115f612047565b60008061118f7f000000000000000000000000430000000000000000000000000000000000000386866001612088565b915091506111bf7f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce846040516112539190612f95565b60405180910390a45050505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961128c8161220b565b6000600760006376aa28fc60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205490506000811180156112da5750428111155b1561132a578260028190555060006007600063e308a09960e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002081905550611376565b61a8c0426113389190613342565b600760006376aa28fc60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b505050565b6000801b6113888161220b565b6000600760006378e3214f60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205490506000811180156113d65750428111155b1561165057600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036115045747831115611452576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611449906133c2565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff168460405161147890613215565b60006040518083038185875af1925050503d80600081146114b5576040519150601f19603f3d011682016040523d82523d6000602084013e6114ba565b606091505b50509050806114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f59061342e565b60405180910390fd5b5061160c565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161153d9190612d42565b602060405180830381865afa15801561155a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157e9190613463565b8311156115c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b7906133c2565b60405180910390fd5b61160b60018054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848673ffffffffffffffffffffffffffffffffffffffff1661246d9092919063ffffffff16565b5b6000600760006378e3214f60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000208190555061169c565b61a8c04261165e9190613342565b600760006378e3214f60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b50505050565b60035481565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296116d28161220b565b6116da6124bb565b50565b600581815481106116ed57600080fd5b906000526020600020016000915090508060000160009054906101000a90046bffffffffffffffffffffffff169080600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6305f5e10081565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f0000000000000000000000000af23b08bcd8ad35d1e8e8f2d2b779024bd8d24a81565b6000801b81565b7f000000000000000000000000430000000000000000000000000000000000000381565b61180e612047565b60008061183e7f000000000000000000000000430000000000000000000000000000000000000386866001612088565b9150915061186e7f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce846040516119029190612f95565b60405180910390a45050505050565b60045481565b601281565b611924612047565b600080611935600033346000612088565b91509150600060018054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260405161197f90613215565b60006040518083038185875af1925050503d80600081146119bc576040519150601f19603f3d011682016040523d82523d6000602084013e6119c1565b606091505b5050905080611a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fc90613287565b60405180910390fd5b6000831115611abb573373ffffffffffffffffffffffffffffffffffffffff1683604051611a3290613215565b60006040518083038185875af1925050503d8060008114611a6f576040519150601f19603f3d011682016040523d82523d6000602084013e611a74565b606091505b50508091505080611aba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab190613287565b60405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce85604051611b309190612f95565b60405180910390a450505050565b611b46612047565b600080611b767f000000000000000000000000430000000000000000000000000000000000000486866000612088565b91509150611ba67f0000000000000000000000004300000000000000000000000000000000000004858484612158565b8273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000473ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce84604051611c3a9190612f95565b60405180910390a45050505050565b611c51612047565b600080611c817f000000000000000000000000430000000000000000000000000000000000000333866001612088565b91509150611cb17f0000000000000000000000004300000000000000000000000000000000000003858484612158565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000373ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce84604051611d459190612f95565b60405180910390a450505050565b600881565b611d6182610d15565b611d6a8161220b565b611d748383612318565b50505050565b6000801b611d878161220b565b60006007600063e308a09960e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600081118015611dd55750428111155b15611e5e57826001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006007600063e308a09960e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002081905550611eaa565b61a8c042611e6c9190613342565b6007600063e308a09960e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b611edb612047565b600080611f0b7f000000000000000000000000430000000000000000000000000000000000000433866000612088565b91509150611f3b7f0000000000000000000000004300000000000000000000000000000000000004858484612158565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000430000000000000000000000000000000000000473ffffffffffffffffffffffffffffffffffffffff167f3bf78ceb2bec33367593d193d62ee0bab304fd3356e414656d746684d8c8d9ce84604051611fcf9190612f95565b60405180910390a450505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61204f611134565b15612086576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60008060006005600454815481106120a3576120a2613490565b5b90600052602060002001600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211e9061350b565b60405180910390fd5b600080612134858761251d565b91509150612145888883858a6126b1565b8094508195505050505094509492505050565b6121853330858773ffffffffffffffffffffffffffffffffffffffff16612abb909392919063ffffffff16565b6121d060018054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff1661246d9092919063ffffffff16565b60008211156122055761220433838673ffffffffffffffffffffffffffffffffffffffff1661246d9092919063ffffffff16565b5b50505050565b61221c81612217612310565b612b5a565b50565b600061222b838361174d565b61230557600160008085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506122a2612310565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001905061230a565b600090505b92915050565b600033905090565b6000612324838361174d565b156123ff57600080600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061239c612310565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050612404565b600090505b92915050565b612412612bab565b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612456612310565b6040516124639190612d42565b60405180910390a1565b6124808363a9059cbb60e01b8484612beb565b6124b6576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6124c3612047565b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612506612310565b6040516125139190612d42565b60405180910390a1565b60008060008415612537576305f5e10060030b90506125d6565b7f0000000000000000000000000af23b08bcd8ad35d1e8e8f2d2b779024bd8d24a73ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156125a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125c691906135a3565b9091929350909150905050809150505b60006005600454815481106125ee576125ed613490565b5b9060005260206000200160000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16858361262e919061361e565b612638919061368f565b90503373ffffffffffffffffffffffffffffffffffffffff167fb80c9abe533e6358a5262b5e8e8d3aa6f8e4d2bb4ebab1e44efa024ee5cbb60682846040516126829291906136cf565b60405180910390a26012600a612698919061382b565b816126a3919061368f565b829350935050509250929050565b60008060006005600454815481106126cc576126cb613490565b5b9060005260206000200190508481600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1611612790578060000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166127739190613876565b73ffffffffffffffffffffffffffffffffffffffff1691506127c9565b8060000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16856127c6919061361e565b91505b81600360008282546127db9190613342565b9250508190555085670de0b6b3a76400006127f6919061368f565b82612801919061361e565b9150818461280f91906138b8565b92508481600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16116129cf5780600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128db9190613342565b9250508190555080600001600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166002600082825461292e9190613342565b92505081905550600081600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506004600081548092919061298c906138ec565b91905055507f34cf54504fd39ab670a54acbb37f686c5bd25e6eedfa39889cba899d360bc7d96004546040516129c29190612f95565b60405180910390a1612ab0565b84600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612a1e9190613342565b925050819055508460026000828254612a379190613342565b925050819055508481600001600c8282829054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612a719190613934565b92506101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b509550959350505050565b60006323b872dd60e01b905060006040518281528560048201528460248201528360448201526020600060648360008b5af191508115612b1a573d60008114612b1057600160005114601f3d11169250612b18565b6000883b1192505b505b5080612b52576040517ff405907100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b612b64828261174d565b612ba75780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401612b9e92919061397c565b60405180910390fd5b5050565b612bb3611134565b612be9576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60006040518481528360048201528260248201526020600060448360008a5af191508115612c38573d60008114612c2e57600160005114601f3d11169250612c36565b6000873b1192505b505b50949350505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612c7b81612c46565b8114612c8657600080fd5b50565b600081359050612c9881612c72565b92915050565b600060208284031215612cb457612cb3612c41565b5b6000612cc284828501612c89565b91505092915050565b60008115159050919050565b612ce081612ccb565b82525050565b6000602082019050612cfb6000830184612cd7565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d2c82612d01565b9050919050565b612d3c81612d21565b82525050565b6000602082019050612d576000830184612d33565b92915050565b612d6681612d21565b8114612d7157600080fd5b50565b600081359050612d8381612d5d565b92915050565b6000819050919050565b612d9c81612d89565b8114612da757600080fd5b50565b600081359050612db981612d93565b92915050565b600080600060608486031215612dd857612dd7612c41565b5b6000612de686828701612d74565b9350506020612df786828701612daa565b9250506040612e0886828701612d74565b9150509250925092565b6000819050919050565b6000612e37612e32612e2d84612d01565b612e12565b612d01565b9050919050565b6000612e4982612e1c565b9050919050565b6000612e5b82612e3e565b9050919050565b612e6b81612e50565b82525050565b6000602082019050612e866000830184612e62565b92915050565b60008060408385031215612ea357612ea2612c41565b5b6000612eb185828601612d74565b9250506020612ec285828601612d74565b9150509250929050565b6000819050919050565b612edf81612ecc565b8114612eea57600080fd5b50565b600081359050612efc81612ed6565b92915050565b600060208284031215612f1857612f17612c41565b5b6000612f2684828501612eed565b91505092915050565b612f3881612ecc565b82525050565b6000602082019050612f536000830184612f2f565b92915050565b600060208284031215612f6f57612f6e612c41565b5b6000612f7d84828501612d74565b91505092915050565b612f8f81612d89565b82525050565b6000602082019050612faa6000830184612f86565b92915050565b60008060408385031215612fc757612fc6612c41565b5b6000612fd585828601612eed565b9250506020612fe685828601612d74565b9150509250929050565b600060ff82169050919050565b61300681612ff0565b82525050565b60006020820190506130216000830184612ffd565b92915050565b60006020828403121561303d5761303c612c41565b5b600061304b84828501612daa565b91505092915050565b6000806040838503121561306b5761306a612c41565b5b600061307985828601612daa565b925050602061308a85828601612d74565b9150509250929050565b600061309f82612d21565b9050919050565b6130af81613094565b81146130ba57600080fd5b50565b6000813590506130cc816130a6565b92915050565b600080604083850312156130e9576130e8612c41565b5b60006130f7858286016130bd565b925050602061310885828601612daa565b9150509250929050565b60006bffffffffffffffffffffffff82169050919050565b61313381613112565b82525050565b61314281612d01565b82525050565b600060408201905061315d600083018561312a565b61316a6020830184613139565b9392505050565b60008160030b9050919050565b61318781613171565b82525050565b60006020820190506131a2600083018461317e565b92915050565b60006131b382612e3e565b9050919050565b6131c3816131a8565b82525050565b60006020820190506131de60008301846131ba565b92915050565b600081905092915050565b50565b60006131ff6000836131e4565b915061320a826131ef565b600082019050919050565b6000613220826131f2565b9150819050919050565b600082825260208201905092915050565b7f50726573616c653a20436f696e207472616e73666572206661696c6564000000600082015250565b6000613271601d8361322a565b915061327c8261323b565b602082019050919050565b600060208201905081810360008301526132a081613264565b9050919050565b7f50726573616c653a2057726f6e67206974657261746f72000000000000000000600082015250565b60006132dd60178361322a565b91506132e8826132a7565b602082019050919050565b6000602082019050818103600083015261330c816132d0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061334d82612d89565b915061335883612d89565b92508282019050808211156133705761336f613313565b5b92915050565b7f50726573616c653a2057726f6e6720616d6f756e740000000000000000000000600082015250565b60006133ac60158361322a565b91506133b782613376565b602082019050919050565b600060208201905081810360008301526133db8161339f565b9050919050565b7f5061796f75743a205472616e7366657220636f696e206661696c656400000000600082015250565b6000613418601c8361322a565b9150613423826133e2565b602082019050919050565b600060208201905081810360008301526134478161340b565b9050919050565b60008151905061345d81612d93565b92915050565b60006020828403121561347957613478612c41565b5b60006134878482850161344e565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f50726553616c653a20697320656e646564000000000000000000000000000000600082015250565b60006134f560118361322a565b9150613500826134bf565b602082019050919050565b60006020820190508181036000830152613524816134e8565b9050919050565b600069ffffffffffffffffffff82169050919050565b61354a8161352b565b811461355557600080fd5b50565b60008151905061356781613541565b92915050565b6000819050919050565b6135808161356d565b811461358b57600080fd5b50565b60008151905061359d81613577565b92915050565b600080600080600060a086880312156135bf576135be612c41565b5b60006135cd88828901613558565b95505060206135de8882890161358e565b94505060406135ef8882890161344e565b93505060606136008882890161344e565b925050608061361188828901613558565b9150509295509295909350565b600061362982612d89565b915061363483612d89565b925082820261364281612d89565b9150828204841483151761365957613658613313565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061369a82612d89565b91506136a583612d89565b9250826136b5576136b4613660565b5b828204905092915050565b6136c98161356d565b82525050565b60006040820190506136e46000830185612f86565b6136f160208301846136c0565b9392505050565b60008160011c9050919050565b6000808291508390505b600185111561374f5780860481111561372b5761372a613313565b5b600185161561373a5780820291505b8081029050613748856136f8565b945061370f565b94509492505050565b6000826137685760019050613824565b816137765760009050613824565b816001811461378c5760028114613796576137c5565b6001915050613824565b60ff8411156137a8576137a7613313565b5b8360020a9150848211156137bf576137be613313565b5b50613824565b5060208310610133831016604e8410600b84101617156137fa5782820a9050838111156137f5576137f4613313565b5b613824565b6138078484846001613705565b9250905081840481111561381e5761381d613313565b5b81810290505b9392505050565b600061383682612d89565b915061384183612ff0565b925061386e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613758565b905092915050565b600061388182612d01565b915061388c83612d01565b925082820261389a81612d01565b915082820484148315176138b1576138b0613313565b5b5092915050565b60006138c382612d89565b91506138ce83612d89565b92508282039050818111156138e6576138e5613313565b5b92915050565b60006138f782612d89565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361392957613928613313565b5b600182019050919050565b600061393f82612d01565b915061394a83612d01565b9250828203905073ffffffffffffffffffffffffffffffffffffffff81111561397657613975613313565b5b92915050565b60006040820190506139916000830185612d33565b61399e6020830184612f2f565b939250505056fea26469706673582212203df6236ac7b92cbe1c75888fae58460e8d8c51411dab7fac8c626e7ac9b7f04464736f6c63430008180033

Deployed Bytecode Sourcemap

84:1943:33:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:8;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;917:29:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;627:345:33;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;842:33:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5401:560;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3810:120:8;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1112:56:31;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4226:136:8;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;5328:245;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;637:47:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2482:228;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3176:73;;;;;;;;;;;;;:::i;:::-;;4350:347;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;5050;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;155:33:33;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;192;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1850:84:20;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;951:30:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;535:48;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4701:345;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2756:343;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3253:744;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;985:29;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3103:69;;;;;;;;;;;;;:::i;:::-;;1082:25;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;588:45;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2854:136:8;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;783:54:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2187:49:8;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;879:33:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4001:345;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1050:28;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;736:42;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5965:562;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1327:346:33;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;976:347;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;688:44:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4642:138:8;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2120:358:31;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;464:66;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1677:348:33;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2565:202:8;2650:4;2688:32;2673:47;;;:11;:47;;;;:87;;;;2724:36;2748:11;2724:23;:36::i;:::-;2673:87;2666:94;;2565:202;;;:::o;917:29:31:-;;;;;;;;;;;;:::o;627:345:33:-;1474:19:20;:17;:19::i;:::-;726:18:33::1;746:20:::0;770:53:::1;795:9;806:2;810:6;818:4;770:24;:53::i;:::-;725:98;;;;830:65;851:9;862:6;870:10;882:12;830:20;:65::i;:::-;944:8;907:60;;940:2;907:60;;928:9;907:60;;;954:12;907:60;;;;;;:::i;:::-;;;;;;;;719:253;;627:345:::0;;;:::o;842:33:31:-;;;:::o;5401:560::-;1474:19:20;:17;:19::i;:::-;5490:18:31::1;5510:20:::0;5534:66:::1;5574:1;5579:2;5583:9;5594:5;5534:24;:66::i;:::-;5489:111;;;;5608:12;5634:14;::::0;::::1;;;;;;;;5626:28;;5662:12;5626:53;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5607:72;;;5693:7;5685:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;5757:1;5744:10;:14;5741:152;;;5790:10;5782:24;;5814:10;5782:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5768:61;;;;;5845:7;5837:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;5741:152;5933:8;5904:52;;5929:2;5904:52;;5925:1;5904:52;;;5943:12;5904:52;;;;;;:::i;:::-;;;;;;;;5483:478;;;5401:560:::0;;:::o;3810:120:8:-;3875:7;3901:6;:12;3908:4;3901:12;;;;;;;;;;;:22;;;3894:29;;3810:120;;;:::o;1112:56:31:-;;;;;;;;;;;;;;;;;:::o;4226:136:8:-;4300:18;4313:4;4300:12;:18::i;:::-;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;5443:12;:10;:12::i;:::-;5421:34;;:18;:34;;;5417:102;;5478:30;;;;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;637:47:31:-;683:1;637:47;:::o;2482:228::-;504:26;2464:16:8;2475:4;2464:10;:16::i;:::-;2588:6:31::1;:13;;;;2571:14;:30;2563:66;;;;;;;;;;;;:::i;:::-;;;;;;;;;2652:14;2636:13;:30;;;;2678:27;2691:13;;2678:27;;;;;;:::i;:::-;;;;;;;;2482:228:::0;;:::o;3176:73::-;504:26;2464:16:8;2475:4;2464:10;:16::i;:::-;3234:10:31::1;:8;:10::i;:::-;3176:73:::0;:::o;4350:347::-;1474:19:20;:17;:19::i;:::-;4435:18:31::1;4455:20:::0;4479:61:::1;4504:9;4515:10;4527:6;4535:4;4479:24;:61::i;:::-;4434:106;;;;4547:65;4568:9;4579:6;4587:10;4599:12;4547:20;:65::i;:::-;4669:8;4624:68;;4657:10;4624:68;;4645:9;4624:68;;;4679:12;4624:68;;;;;;:::i;:::-;;;;;;;;4428:269;;4350:347:::0;;:::o;5050:::-;1474:19:20;:17;:19::i;:::-;5135:18:31::1;5155:20:::0;5179:61:::1;5204:9;5215:10;5227:6;5235:4;5179:24;:61::i;:::-;5134:106;;;;5247:65;5268:9;5279:6;5287:10;5299:12;5247:20;:65::i;:::-;5369:8;5324:68;;5357:10;5324:68;;5345:9;5324:68;;;5379:12;5324:68;;;;;;:::i;:::-;;;;;;;;5128:269;;5050:347:::0;;:::o;155:33:33:-;;;:::o;192:::-;;;:::o;1850:84:20:-;1897:4;1920:7;;;;;;;;;;;1913:14;;1850:84;:::o;951:30:31:-;;;;:::o;535:48::-;575:8;535:48;:::o;4701:345::-;1474:19:20;:17;:19::i;:::-;4800:18:31::1;4820:20:::0;4844:53:::1;4869:9;4880:2;4884:6;4892:4;4844:24;:53::i;:::-;4799:98;;;;4904:65;4925:9;4936:6;4944:10;4956:12;4904:20;:65::i;:::-;5018:8;4981:60;;5014:2;4981:60;;5002:9;4981:60;;;5028:12;4981:60;;;;;;:::i;:::-;;;;;;;;4793:253;;4701:345:::0;;;:::o;2756:343::-;504:26;2464:16:8;2475:4;2464:10;:16::i;:::-;2836:19:31::1;2858:11;:23;2870:10;2858:23;;;;;;;;;;;;;;;;;2836:45;;2905:1;2891:11;:15;:49;;;;;2925:15;2910:11;:30;;2891:49;2888:207;;;2968:6;2950:15;:24;;;;3009:1;2983:11;:23;2995:10;2983:23;;;;;;;;;;;;;;;;:27;;;;2888:207;;;575:8;3057:15;:31;;;;:::i;:::-;3031:11;:23;3043:10;3031:23;;;;;;;;;;;;;;;;:57;;;;2888:207;2830:269;2756:343:::0;;:::o;3253:744::-;2232:4:8;3322:18:31;;2464:16:8;2475:4;2464:10;:16::i;:::-;3348:19:31::1;3370:11;:23;3382:10;3370:23;;;;;;;;;;;;;;;;;3348:45;;3417:1;3403:11;:15;:49;;;;;3437:15;3422:11;:30;;3403:49;3400:593;;;3492:1;3466:28;;3474:5;3466:28;;::::0;3462:411:::1;;3526:21;3516:6;:31;;3508:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;3586:12;3612:10;3604:24;;3636:6;3604:43;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3585:62;;;3668:7;3660:48;;;;;;;;;;;;:::i;:::-;;;;;;;;;3496:221;3462:411;;;3753:5;:15;;;3777:4;3753:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3743:6;:40;;3735:74;;;;;;;;;;;;:::i;:::-;;;;;;;;;3822:42;3841:14;::::0;::::1;;;;;;;;3857:6;3822:5;:18;;;;:42;;;;;:::i;:::-;3462:411;3907:1;3881:11;:23;3893:10;3881:23;;;;;;;;;;;;;;;;:27;;;;3400:593;;;575:8;3955:15;:31;;;;:::i;:::-;3929:11;:23;3941:10;3929:23;;;;;;;;;;;;;;;;:57;;;;3400:593;3342:655;3253:744:::0;;;:::o;985:29::-;;;;:::o;3103:69::-;504:26;2464:16:8;2475:4;2464:10;:16::i;:::-;3159:8:31::1;:6;:8::i;:::-;3103:69:::0;:::o;1082:25::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;588:45::-;630:3;588:45;:::o;2854:136:8:-;2931:4;2954:6;:12;2961:4;2954:12;;;;;;;;;;;:20;;:29;2975:7;2954:29;;;;;;;;;;;;;;;;;;;;;;;;;2947:36;;2854:136;;;;:::o;783:54:31:-;;;:::o;2187:49:8:-;2232:4;2187:49;;;:::o;879:33:31:-;;;:::o;4001:345::-;1474:19:20;:17;:19::i;:::-;4100:18:31::1;4120:20:::0;4144:53:::1;4169:9;4180:2;4184:6;4192:4;4144:24;:53::i;:::-;4099:98;;;;4204:65;4225:9;4236:6;4244:10;4256:12;4204:20;:65::i;:::-;4318:8;4281:60;;4314:2;4281:60;;4302:9;4281:60;;;4328:12;4281:60;;;;;;:::i;:::-;;;;;;;;4093:253;;4001:345:::0;;;:::o;1050:28::-;;;;:::o;736:42::-;776:2;736:42;:::o;5965:562::-;1474:19:20;:17;:19::i;:::-;6040:18:31::1;6060:20:::0;6084:74:::1;6124:1;6129:10;6141:9;6152:5;6084:24;:74::i;:::-;6039:119;;;;6166:12;6192:14;::::0;::::1;;;;;;;;6184:28;;6220:12;6184:53;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6165:72;;;6251:7;6243:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;6315:1;6302:10;:14;6299:152;;;6348:10;6340:24;;6372:10;6340:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6326:61;;;;;6403:7;6395:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;6299:152;6499:8;6462:60;;6487:10;6462:60;;6483:1;6462:60;;;6509:12;6462:60;;;;;;:::i;:::-;;;;;;;;6033:494;;;5965:562:::0;:::o;1327:346:33:-;1474:19:20;:17;:19::i;:::-;1426:18:33::1;1446:20:::0;1470:54:::1;1495:9;1506:2;1510:6;1518:5;1470:24;:54::i;:::-;1425:99;;;;1531:65;1552:9;1563:6;1571:10;1583:12;1531:20;:65::i;:::-;1645:8;1608:60;;1641:2;1608:60;;1629:9;1608:60;;;1655:12;1608:60;;;;;;:::i;:::-;;;;;;;;1419:254;;1327:346:::0;;;:::o;976:347::-;1474:19:20;:17;:19::i;:::-;1061:18:33::1;1081:20:::0;1105:61:::1;1130:9;1141:10;1153:6;1161:4;1105:24;:61::i;:::-;1060:106;;;;1173:65;1194:9;1205:6;1213:10;1225:12;1173:20;:65::i;:::-;1295:8;1250:68;;1283:10;1250:68;;1271:9;1250:68;;;1305:12;1250:68;;;;;;:::i;:::-;;;;;;;;1054:269;;976:347:::0;;:::o;688:44:31:-;731:1;688:44;:::o;4642:138:8:-;4717:18;4730:4;4717:12;:18::i;:::-;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;:::-;;4642:138:::0;;;:::o;2120:358:31:-;2232:4:8;2184:18:31;;2464:16:8;2475:4;2464:10;:16::i;:::-;2210:19:31::1;2232:11;:23;2244:10;2232:23;;;;;;;;;;;;;;;;;2210:45;;2279:1;2265:11;:15;:49;;;;;2299:15;2284:11;:30;;2265:49;2262:212;;;2341:6;2324:14;::::0;:23:::1;;;;;;;;;;;;;;;;;;2388:1;2362:11;:23;2374:10;2362:23;;;;;;;;;;;;;;;;:27;;;;2262:212;;;575:8;2436:15;:31;;;;:::i;:::-;2410:11;:23;2422:10;2410:23;;;;;;;;;;;;;;;;:57;;;;2262:212;2204:274;2120:358:::0;;:::o;464:66::-;504:26;464:66;:::o;1677:348:33:-;1474:19:20;:17;:19::i;:::-;1762:18:33::1;1782:20:::0;1806:62:::1;1831:9;1842:10;1854:6;1862:5;1806:24;:62::i;:::-;1761:107;;;;1875:65;1896:9;1907:6;1915:10;1927:12;1875:20;:65::i;:::-;1997:8;1952:68;;1985:10;1952:68;;1973:9;1952:68;;;2007:12;1952:68;;;;;;:::i;:::-;;;;;;;;1755:270;;1677:348:::0;;:::o;762:146:27:-;838:4;876:25;861:40;;;:11;:40;;;;854:47;;762:146;;;:::o;2002:128:20:-;2067:8;:6;:8::i;:::-;2063:61;;;2098:15;;;;;;;;;;;;;;2063:61;2002:128::o;437:449:32:-;581:18;601:20;669:1;637:6;644:13;;637:21;;;;;;;;:::i;:::-;;;;;;;;;:28;;;;;;;;;;;;:33;;;629:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;700:24;726:17;747:38;764:13;779:5;747:16;:38::i;:::-;699:86;;;;825:56;835:5;842:2;846:9;857:16;875:5;825:9;:56::i;:::-;796:85;;;;;;;;623:263;;437:449;;;;;;;:::o;890:332::-;1039:57;1062:10;1082:4;1089:6;1039:5;:22;;;;:57;;;;;;:::i;:::-;1102:48;1121:14;;;;;;;;;;1137:12;1102:5;:18;;;;:48;;;;;:::i;:::-;1172:1;1159:10;:14;1156:61;;;1175:42;1194:10;1206;1175:5;:18;;;;:42;;;;;:::i;:::-;1156:61;890:332;;;;:::o;3199:103:8:-;3265:30;3276:4;3282:12;:10;:12::i;:::-;3265:10;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6347:4;6315:6;:12;6322:4;6315:12;;;;;;;;;;;:20;;:29;6336:7;6315:29;;;;;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;6397:12;:10;:12::i;:::-;6370:40;;6388:7;6370:40;;6382:4;6370:40;;;;;;;;;;6431:4;6424:11;;;;6272:217;6473:5;6466:12;;6179:316;;;;;:::o;656:96:18:-;709:7;735:10;728:17;;656:96;:::o;6730:317:8:-;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:6;:12;6873:4;6866:12;;;;;;;;;;;:20;;:29;6887:7;6866:29;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;6949:12;:10;:12::i;:::-;6922:40;;6940:7;6922:40;;6934:4;6922:40;;;;;;;;;;6983:4;6976:11;;;;6824:217;7025:5;7018:12;;6730:317;;;;;:::o;2710:117:20:-;1721:16;:14;:16::i;:::-;2778:5:::1;2768:7;;:15;;;;;;;;;;;;;;;;;;2798:22;2807:12;:10;:12::i;:::-;2798:22;;;;;;:::i;:::-;;;;;;;;2710:117::o:0;7685:229:4:-;7802:52;7812:5;7819:23;;;7844:2;7848:5;7802:9;:52::i;:::-;7797:111;;7877:20;;;;;;;;;;;;;;7797:111;7685:229;;;:::o;2463:115:20:-;1474:19;:17;:19::i;:::-;2532:4:::1;2522:7:::0;::::1;:14;;;;;;;;;;;;;;;;;;2551:20;2558:12;:10;:12::i;:::-;2551:20;;;;;;:::i;:::-;;;;;;;;2463:115::o:0;1226:517:32:-;1314:14;1330:13;1351:16;1378:13;1374:139;;;630:3:31;1401:29:32;;;;1374:139;;;1473:15;:31;;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1451:55;;;;;;;;;;;;;;;1374:139;1519:22;1575:6;1582:13;;1575:21;;;;;;;;:::i;:::-;;;;;;;;;:26;;;;;;;;;;;;1570:32;;1562:5;1549:9;1544:23;;;;:::i;:::-;:58;;;;:::i;:::-;1519:83;;1627:10;1614:51;;;1639:14;1655:9;1614:51;;;;;;;:::i;:::-;;;;;;;;776:2:31;1697::32;:23;;;;:::i;:::-;1680:14;:40;;;;:::i;:::-;1727:9;1672:66;;;;;;1226:517;;;;;:::o;1747:894::-;1896:26;1924:20;1952:26;1982:6;1989:13;;1982:21;;;;;;;;:::i;:::-;;;;;;;;;1952:51;;2039:6;2019:8;:15;;;;;;;;;;;;2014:21;;:31;2010:156;;2088:8;:13;;;;;;;;;;;;2070:31;;:8;:15;;;;;;;;;;;;:31;;;;:::i;:::-;2055:46;;;;2010:156;;;2146:8;:13;;;;;;;;;;;;2137:22;;:6;:22;;;;:::i;:::-;2122:37;;2010:156;2190:12;2172:14;;:30;;;;;;;:::i;:::-;;;;;;;;2236:9;2226:7;:19;;;;:::i;:::-;2209:37;;;;;:::i;:::-;;;2282:12;2274:5;:20;;;;:::i;:::-;2253:41;;2330:6;2310:8;:15;;;;;;;;;;;;2305:21;;:31;2301:336;;2362:8;:15;;;;;;;;;;;;2346:31;;:8;:12;2355:2;2346:12;;;;;;;;;;;;;;;;:31;;;;;;;:::i;:::-;;;;;;;;2404:8;:15;;;;;;;;;;;;2385:34;;:15;;:34;;;;;;;:::i;:::-;;;;;;;;2446:1;2428:8;:15;;;:19;;;;;;;;;;;;;;;;;;2455:13;;:15;;;;;;;;;:::i;:::-;;;;;;2484:27;2497:13;;2484:27;;;;;;:::i;:::-;;;;;;;;2301:336;;;2548:6;2532:8;:12;2541:2;2532:12;;;;;;;;;;;;;;;;:22;;;;;;;:::i;:::-;;;;;;;;2582:6;2563:15;;:25;;;;;;;:::i;:::-;;;;;;;;2623:6;2596:8;:15;;;:34;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2301:336;1946:695;1747:894;;;;;;;;:::o;4565:922:4:-;4704:15;4722:27;;;4704:45;;4759:12;4881:4;4875:11;4913:8;4907:4;4900:22;4959:4;4952;4946;4942:15;4935:29;5001:2;4994:4;4988;4984:15;4977:27;5041:6;5034:4;5028;5024:15;5017:31;5110:4;5105:3;5100;5094:4;5091:1;5084:5;5077;5072:43;5061:54;;5131:7;5128:288;;;5164:16;5202:1;5197:83;;;;5381:1;5377;5371:8;5368:15;5363:2;5345:16;5342:24;5338:46;5327:57;;5157:245;;5197:83;5260:1;5252:5;5240:18;5237:25;5226:36;;5157:245;;5128:288;4806:620;5440:7;5435:45;;5456:24;;;;;;;;;;;;;;5435:45;4694:793;;4565:922;;;;:::o;3432:197:8:-;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3598:7;3607:4;3565:47;;;;;;;;;;;;:::i;:::-;;;;;;;;3515:108;3432:197;;:::o;2202:126:20:-;2265:8;:6;:8::i;:::-;2260:62;;2296:15;;;;;;;;;;;;;;2260:62;2202:126::o;22632:767:4:-;22765:12;22889:4;22883:11;22921:8;22915:4;22908:22;22967:2;22960:4;22954;22950:15;22943:27;23007:6;23000:4;22994;22990:15;22983:31;23077:4;23072:3;23066:4;23060;23057:1;23050:5;23043;23038:44;23027:55;;23098:7;23095:288;;;23131:16;23169:1;23164:83;;;;23348:1;23344;23338:8;23335:15;23330:2;23312:16;23309:24;23305:46;23294:57;;23124:245;;23164:83;23227:1;23219:5;23207:18;23204:25;23193:36;;23124:245;;23095:288;22814:579;22632:767;;;;;;:::o;88:117:39:-;197:1;194;187:12;334:149;370:7;410:66;403:5;399:78;388:89;;334:149;;;:::o;489:120::-;561:23;578:5;561:23;:::i;:::-;554:5;551:34;541:62;;599:1;596;589:12;541:62;489:120;:::o;615:137::-;660:5;698:6;685:20;676:29;;714:32;740:5;714:32;:::i;:::-;615:137;;;;:::o;758:327::-;816:6;865:2;853:9;844:7;840:23;836:32;833:119;;;871:79;;:::i;:::-;833:119;991:1;1016:52;1060:7;1051:6;1040:9;1036:22;1016:52;:::i;:::-;1006:62;;962:116;758:327;;;;:::o;1091:90::-;1125:7;1168:5;1161:13;1154:21;1143:32;;1091:90;;;:::o;1187:109::-;1268:21;1283:5;1268:21;:::i;:::-;1263:3;1256:34;1187:109;;:::o;1302:210::-;1389:4;1427:2;1416:9;1412:18;1404:26;;1440:65;1502:1;1491:9;1487:17;1478:6;1440:65;:::i;:::-;1302:210;;;;:::o;1518:126::-;1555:7;1595:42;1588:5;1584:54;1573:65;;1518:126;;;:::o;1650:96::-;1687:7;1716:24;1734:5;1716:24;:::i;:::-;1705:35;;1650:96;;;:::o;1752:118::-;1839:24;1857:5;1839:24;:::i;:::-;1834:3;1827:37;1752:118;;:::o;1876:222::-;1969:4;2007:2;1996:9;1992:18;1984:26;;2020:71;2088:1;2077:9;2073:17;2064:6;2020:71;:::i;:::-;1876:222;;;;:::o;2104:122::-;2177:24;2195:5;2177:24;:::i;:::-;2170:5;2167:35;2157:63;;2216:1;2213;2206:12;2157:63;2104:122;:::o;2232:139::-;2278:5;2316:6;2303:20;2294:29;;2332:33;2359:5;2332:33;:::i;:::-;2232:139;;;;:::o;2377:77::-;2414:7;2443:5;2432:16;;2377:77;;;:::o;2460:122::-;2533:24;2551:5;2533:24;:::i;:::-;2526:5;2523:35;2513:63;;2572:1;2569;2562:12;2513:63;2460:122;:::o;2588:139::-;2634:5;2672:6;2659:20;2650:29;;2688:33;2715:5;2688:33;:::i;:::-;2588:139;;;;:::o;2733:619::-;2810:6;2818;2826;2875:2;2863:9;2854:7;2850:23;2846:32;2843:119;;;2881:79;;:::i;:::-;2843:119;3001:1;3026:53;3071:7;3062:6;3051:9;3047:22;3026:53;:::i;:::-;3016:63;;2972:117;3128:2;3154:53;3199:7;3190:6;3179:9;3175:22;3154:53;:::i;:::-;3144:63;;3099:118;3256:2;3282:53;3327:7;3318:6;3307:9;3303:22;3282:53;:::i;:::-;3272:63;;3227:118;2733:619;;;;;:::o;3358:60::-;3386:3;3407:5;3400:12;;3358:60;;;:::o;3424:142::-;3474:9;3507:53;3525:34;3534:24;3552:5;3534:24;:::i;:::-;3525:34;:::i;:::-;3507:53;:::i;:::-;3494:66;;3424:142;;;:::o;3572:126::-;3622:9;3655:37;3686:5;3655:37;:::i;:::-;3642:50;;3572:126;;;:::o;3704:141::-;3769:9;3802:37;3833:5;3802:37;:::i;:::-;3789:50;;3704:141;;;:::o;3851:161::-;3953:52;3999:5;3953:52;:::i;:::-;3948:3;3941:65;3851:161;;:::o;4018:252::-;4126:4;4164:2;4153:9;4149:18;4141:26;;4177:86;4260:1;4249:9;4245:17;4236:6;4177:86;:::i;:::-;4018:252;;;;:::o;4276:474::-;4344:6;4352;4401:2;4389:9;4380:7;4376:23;4372:32;4369:119;;;4407:79;;:::i;:::-;4369:119;4527:1;4552:53;4597:7;4588:6;4577:9;4573:22;4552:53;:::i;:::-;4542:63;;4498:117;4654:2;4680:53;4725:7;4716:6;4705:9;4701:22;4680:53;:::i;:::-;4670:63;;4625:118;4276:474;;;;;:::o;4756:77::-;4793:7;4822:5;4811:16;;4756:77;;;:::o;4839:122::-;4912:24;4930:5;4912:24;:::i;:::-;4905:5;4902:35;4892:63;;4951:1;4948;4941:12;4892:63;4839:122;:::o;4967:139::-;5013:5;5051:6;5038:20;5029:29;;5067:33;5094:5;5067:33;:::i;:::-;4967:139;;;;:::o;5112:329::-;5171:6;5220:2;5208:9;5199:7;5195:23;5191:32;5188:119;;;5226:79;;:::i;:::-;5188:119;5346:1;5371:53;5416:7;5407:6;5396:9;5392:22;5371:53;:::i;:::-;5361:63;;5317:117;5112:329;;;;:::o;5447:118::-;5534:24;5552:5;5534:24;:::i;:::-;5529:3;5522:37;5447:118;;:::o;5571:222::-;5664:4;5702:2;5691:9;5687:18;5679:26;;5715:71;5783:1;5772:9;5768:17;5759:6;5715:71;:::i;:::-;5571:222;;;;:::o;5799:329::-;5858:6;5907:2;5895:9;5886:7;5882:23;5878:32;5875:119;;;5913:79;;:::i;:::-;5875:119;6033:1;6058:53;6103:7;6094:6;6083:9;6079:22;6058:53;:::i;:::-;6048:63;;6004:117;5799:329;;;;:::o;6134:118::-;6221:24;6239:5;6221:24;:::i;:::-;6216:3;6209:37;6134:118;;:::o;6258:222::-;6351:4;6389:2;6378:9;6374:18;6366:26;;6402:71;6470:1;6459:9;6455:17;6446:6;6402:71;:::i;:::-;6258:222;;;;:::o;6486:474::-;6554:6;6562;6611:2;6599:9;6590:7;6586:23;6582:32;6579:119;;;6617:79;;:::i;:::-;6579:119;6737:1;6762:53;6807:7;6798:6;6787:9;6783:22;6762:53;:::i;:::-;6752:63;;6708:117;6864:2;6890:53;6935:7;6926:6;6915:9;6911:22;6890:53;:::i;:::-;6880:63;;6835:118;6486:474;;;;;:::o;6966:86::-;7001:7;7041:4;7034:5;7030:16;7019:27;;6966:86;;;:::o;7058:112::-;7141:22;7157:5;7141:22;:::i;:::-;7136:3;7129:35;7058:112;;:::o;7176:214::-;7265:4;7303:2;7292:9;7288:18;7280:26;;7316:67;7380:1;7369:9;7365:17;7356:6;7316:67;:::i;:::-;7176:214;;;;:::o;7396:329::-;7455:6;7504:2;7492:9;7483:7;7479:23;7475:32;7472:119;;;7510:79;;:::i;:::-;7472:119;7630:1;7655:53;7700:7;7691:6;7680:9;7676:22;7655:53;:::i;:::-;7645:63;;7601:117;7396:329;;;;:::o;7731:474::-;7799:6;7807;7856:2;7844:9;7835:7;7831:23;7827:32;7824:119;;;7862:79;;:::i;:::-;7824:119;7982:1;8007:53;8052:7;8043:6;8032:9;8028:22;8007:53;:::i;:::-;7997:63;;7953:117;8109:2;8135:53;8180:7;8171:6;8160:9;8156:22;8135:53;:::i;:::-;8125:63;;8080:118;7731:474;;;;;:::o;8211:111::-;8263:7;8292:24;8310:5;8292:24;:::i;:::-;8281:35;;8211:111;;;:::o;8328:152::-;8416:39;8449:5;8416:39;:::i;:::-;8409:5;8406:50;8396:78;;8470:1;8467;8460:12;8396:78;8328:152;:::o;8486:169::-;8547:5;8585:6;8572:20;8563:29;;8601:48;8643:5;8601:48;:::i;:::-;8486:169;;;;:::o;8661:504::-;8744:6;8752;8801:2;8789:9;8780:7;8776:23;8772:32;8769:119;;;8807:79;;:::i;:::-;8769:119;8927:1;8952:68;9012:7;9003:6;8992:9;8988:22;8952:68;:::i;:::-;8942:78;;8898:132;9069:2;9095:53;9140:7;9131:6;9120:9;9116:22;9095:53;:::i;:::-;9085:63;;9040:118;8661:504;;;;;:::o;9171:109::-;9207:7;9247:26;9240:5;9236:38;9225:49;;9171:109;;;:::o;9286:115::-;9371:23;9388:5;9371:23;:::i;:::-;9366:3;9359:36;9286:115;;:::o;9407:118::-;9494:24;9512:5;9494:24;:::i;:::-;9489:3;9482:37;9407:118;;:::o;9531:328::-;9650:4;9688:2;9677:9;9673:18;9665:26;;9701:69;9767:1;9756:9;9752:17;9743:6;9701:69;:::i;:::-;9780:72;9848:2;9837:9;9833:18;9824:6;9780:72;:::i;:::-;9531:328;;;;;:::o;9865:90::-;9900:7;9943:5;9940:1;9929:20;9918:31;;9865:90;;;:::o;9961:112::-;10044:22;10060:5;10044:22;:::i;:::-;10039:3;10032:35;9961:112;;:::o;10079:214::-;10168:4;10206:2;10195:9;10191:18;10183:26;;10219:67;10283:1;10272:9;10268:17;10259:6;10219:67;:::i;:::-;10079:214;;;;:::o;10299:155::-;10378:9;10411:37;10442:5;10411:37;:::i;:::-;10398:50;;10299:155;;;:::o;10460:189::-;10576:66;10636:5;10576:66;:::i;:::-;10571:3;10564:79;10460:189;;:::o;10655:280::-;10777:4;10815:2;10804:9;10800:18;10792:26;;10828:100;10925:1;10914:9;10910:17;10901:6;10828:100;:::i;:::-;10655:280;;;;:::o;10941:147::-;11042:11;11079:3;11064:18;;10941:147;;;;:::o;11094:114::-;;:::o;11214:398::-;11373:3;11394:83;11475:1;11470:3;11394:83;:::i;:::-;11387:90;;11486:93;11575:3;11486:93;:::i;:::-;11604:1;11599:3;11595:11;11588:18;;11214:398;;;:::o;11618:379::-;11802:3;11824:147;11967:3;11824:147;:::i;:::-;11817:154;;11988:3;11981:10;;11618:379;;;:::o;12003:169::-;12087:11;12121:6;12116:3;12109:19;12161:4;12156:3;12152:14;12137:29;;12003:169;;;;:::o;12178:179::-;12318:31;12314:1;12306:6;12302:14;12295:55;12178:179;:::o;12363:366::-;12505:3;12526:67;12590:2;12585:3;12526:67;:::i;:::-;12519:74;;12602:93;12691:3;12602:93;:::i;:::-;12720:2;12715:3;12711:12;12704:19;;12363:366;;;:::o;12735:419::-;12901:4;12939:2;12928:9;12924:18;12916:26;;12988:9;12982:4;12978:20;12974:1;12963:9;12959:17;12952:47;13016:131;13142:4;13016:131;:::i;:::-;13008:139;;12735:419;;;:::o;13160:173::-;13300:25;13296:1;13288:6;13284:14;13277:49;13160:173;:::o;13339:366::-;13481:3;13502:67;13566:2;13561:3;13502:67;:::i;:::-;13495:74;;13578:93;13667:3;13578:93;:::i;:::-;13696:2;13691:3;13687:12;13680:19;;13339:366;;;:::o;13711:419::-;13877:4;13915:2;13904:9;13900:18;13892:26;;13964:9;13958:4;13954:20;13950:1;13939:9;13935:17;13928:47;13992:131;14118:4;13992:131;:::i;:::-;13984:139;;13711:419;;;:::o;14136:180::-;14184:77;14181:1;14174:88;14281:4;14278:1;14271:15;14305:4;14302:1;14295:15;14322:191;14362:3;14381:20;14399:1;14381:20;:::i;:::-;14376:25;;14415:20;14433:1;14415:20;:::i;:::-;14410:25;;14458:1;14455;14451:9;14444:16;;14479:3;14476:1;14473:10;14470:36;;;14486:18;;:::i;:::-;14470:36;14322:191;;;;:::o;14519:171::-;14659:23;14655:1;14647:6;14643:14;14636:47;14519:171;:::o;14696:366::-;14838:3;14859:67;14923:2;14918:3;14859:67;:::i;:::-;14852:74;;14935:93;15024:3;14935:93;:::i;:::-;15053:2;15048:3;15044:12;15037:19;;14696:366;;;:::o;15068:419::-;15234:4;15272:2;15261:9;15257:18;15249:26;;15321:9;15315:4;15311:20;15307:1;15296:9;15292:17;15285:47;15349:131;15475:4;15349:131;:::i;:::-;15341:139;;15068:419;;;:::o;15493:178::-;15633:30;15629:1;15621:6;15617:14;15610:54;15493:178;:::o;15677:366::-;15819:3;15840:67;15904:2;15899:3;15840:67;:::i;:::-;15833:74;;15916:93;16005:3;15916:93;:::i;:::-;16034:2;16029:3;16025:12;16018:19;;15677:366;;;:::o;16049:419::-;16215:4;16253:2;16242:9;16238:18;16230:26;;16302:9;16296:4;16292:20;16288:1;16277:9;16273:17;16266:47;16330:131;16456:4;16330:131;:::i;:::-;16322:139;;16049:419;;;:::o;16474:143::-;16531:5;16562:6;16556:13;16547:22;;16578:33;16605:5;16578:33;:::i;:::-;16474:143;;;;:::o;16623:351::-;16693:6;16742:2;16730:9;16721:7;16717:23;16713:32;16710:119;;;16748:79;;:::i;:::-;16710:119;16868:1;16893:64;16949:7;16940:6;16929:9;16925:22;16893:64;:::i;:::-;16883:74;;16839:128;16623:351;;;;:::o;16980:180::-;17028:77;17025:1;17018:88;17125:4;17122:1;17115:15;17149:4;17146:1;17139:15;17166:167;17306:19;17302:1;17294:6;17290:14;17283:43;17166:167;:::o;17339:366::-;17481:3;17502:67;17566:2;17561:3;17502:67;:::i;:::-;17495:74;;17578:93;17667:3;17578:93;:::i;:::-;17696:2;17691:3;17687:12;17680:19;;17339:366;;;:::o;17711:419::-;17877:4;17915:2;17904:9;17900:18;17892:26;;17964:9;17958:4;17954:20;17950:1;17939:9;17935:17;17928:47;17992:131;18118:4;17992:131;:::i;:::-;17984:139;;17711:419;;;:::o;18136:105::-;18172:7;18212:22;18205:5;18201:34;18190:45;;18136:105;;;:::o;18247:120::-;18319:23;18336:5;18319:23;:::i;:::-;18312:5;18309:34;18299:62;;18357:1;18354;18347:12;18299:62;18247:120;:::o;18373:141::-;18429:5;18460:6;18454:13;18445:22;;18476:32;18502:5;18476:32;:::i;:::-;18373:141;;;;:::o;18520:76::-;18556:7;18585:5;18574:16;;18520:76;;;:::o;18602:120::-;18674:23;18691:5;18674:23;:::i;:::-;18667:5;18664:34;18654:62;;18712:1;18709;18702:12;18654:62;18602:120;:::o;18728:141::-;18784:5;18815:6;18809:13;18800:22;;18831:32;18857:5;18831:32;:::i;:::-;18728:141;;;;:::o;18875:971::-;18978:6;18986;18994;19002;19010;19059:3;19047:9;19038:7;19034:23;19030:33;19027:120;;;19066:79;;:::i;:::-;19027:120;19186:1;19211:63;19266:7;19257:6;19246:9;19242:22;19211:63;:::i;:::-;19201:73;;19157:127;19323:2;19349:63;19404:7;19395:6;19384:9;19380:22;19349:63;:::i;:::-;19339:73;;19294:128;19461:2;19487:64;19543:7;19534:6;19523:9;19519:22;19487:64;:::i;:::-;19477:74;;19432:129;19600:2;19626:64;19682:7;19673:6;19662:9;19658:22;19626:64;:::i;:::-;19616:74;;19571:129;19739:3;19766:63;19821:7;19812:6;19801:9;19797:22;19766:63;:::i;:::-;19756:73;;19710:129;18875:971;;;;;;;;:::o;19852:410::-;19892:7;19915:20;19933:1;19915:20;:::i;:::-;19910:25;;19949:20;19967:1;19949:20;:::i;:::-;19944:25;;20004:1;20001;19997:9;20026:30;20044:11;20026:30;:::i;:::-;20015:41;;20205:1;20196:7;20192:15;20189:1;20186:22;20166:1;20159:9;20139:83;20116:139;;20235:18;;:::i;:::-;20116:139;19900:362;19852:410;;;;:::o;20268:180::-;20316:77;20313:1;20306:88;20413:4;20410:1;20403:15;20437:4;20434:1;20427:15;20454:185;20494:1;20511:20;20529:1;20511:20;:::i;:::-;20506:25;;20545:20;20563:1;20545:20;:::i;:::-;20540:25;;20584:1;20574:35;;20589:18;;:::i;:::-;20574:35;20631:1;20628;20624:9;20619:14;;20454:185;;;;:::o;20645:115::-;20730:23;20747:5;20730:23;:::i;:::-;20725:3;20718:36;20645:115;;:::o;20766:328::-;20885:4;20923:2;20912:9;20908:18;20900:26;;20936:71;21004:1;20993:9;20989:17;20980:6;20936:71;:::i;:::-;21017:70;21083:2;21072:9;21068:18;21059:6;21017:70;:::i;:::-;20766:328;;;;;:::o;21100:102::-;21142:8;21189:5;21186:1;21182:13;21161:34;;21100:102;;;:::o;21208:848::-;21269:5;21276:4;21300:6;21291:15;;21324:5;21315:14;;21338:712;21359:1;21349:8;21346:15;21338:712;;;21454:4;21449:3;21445:14;21439:4;21436:24;21433:50;;;21463:18;;:::i;:::-;21433:50;21513:1;21503:8;21499:16;21496:451;;;21928:4;21921:5;21917:16;21908:25;;21496:451;21978:4;21972;21968:15;21960:23;;22008:32;22031:8;22008:32;:::i;:::-;21996:44;;21338:712;;;21208:848;;;;;;;:::o;22062:1073::-;22116:5;22307:8;22297:40;;22328:1;22319:10;;22330:5;;22297:40;22356:4;22346:36;;22373:1;22364:10;;22375:5;;22346:36;22442:4;22490:1;22485:27;;;;22526:1;22521:191;;;;22435:277;;22485:27;22503:1;22494:10;;22505:5;;;22521:191;22566:3;22556:8;22553:17;22550:43;;;22573:18;;:::i;:::-;22550:43;22622:8;22619:1;22615:16;22606:25;;22657:3;22650:5;22647:14;22644:40;;;22664:18;;:::i;:::-;22644:40;22697:5;;;22435:277;;22821:2;22811:8;22808:16;22802:3;22796:4;22793:13;22789:36;22771:2;22761:8;22758:16;22753:2;22747:4;22744:12;22740:35;22724:111;22721:246;;;22877:8;22871:4;22867:19;22858:28;;22912:3;22905:5;22902:14;22899:40;;;22919:18;;:::i;:::-;22899:40;22952:5;;22721:246;22992:42;23030:3;23020:8;23014:4;23011:1;22992:42;:::i;:::-;22977:57;;;;23066:4;23061:3;23057:14;23050:5;23047:25;23044:51;;;23075:18;;:::i;:::-;23044:51;23124:4;23117:5;23113:16;23104:25;;22062:1073;;;;;;:::o;23141:281::-;23199:5;23223:23;23241:4;23223:23;:::i;:::-;23215:31;;23267:25;23283:8;23267:25;:::i;:::-;23255:37;;23311:104;23348:66;23338:8;23332:4;23311:104;:::i;:::-;23302:113;;23141:281;;;;:::o;23428:410::-;23468:7;23491:20;23509:1;23491:20;:::i;:::-;23486:25;;23525:20;23543:1;23525:20;:::i;:::-;23520:25;;23580:1;23577;23573:9;23602:30;23620:11;23602:30;:::i;:::-;23591:41;;23781:1;23772:7;23768:15;23765:1;23762:22;23742:1;23735:9;23715:83;23692:139;;23811:18;;:::i;:::-;23692:139;23476:362;23428:410;;;;:::o;23844:194::-;23884:4;23904:20;23922:1;23904:20;:::i;:::-;23899:25;;23938:20;23956:1;23938:20;:::i;:::-;23933:25;;23982:1;23979;23975:9;23967:17;;24006:1;24000:4;23997:11;23994:37;;;24011:18;;:::i;:::-;23994:37;23844:194;;;;:::o;24044:233::-;24083:3;24106:24;24124:5;24106:24;:::i;:::-;24097:33;;24152:66;24145:5;24142:77;24139:103;;24222:18;;:::i;:::-;24139:103;24269:1;24262:5;24258:13;24251:20;;24044:233;;;:::o;24283:235::-;24323:4;24343:20;24361:1;24343:20;:::i;:::-;24338:25;;24377:20;24395:1;24377:20;:::i;:::-;24372:25;;24421:1;24418;24414:9;24406:17;;24445:42;24439:4;24436:52;24433:78;;;24491:18;;:::i;:::-;24433:78;24283:235;;;;:::o;24524:332::-;24645:4;24683:2;24672:9;24668:18;24660:26;;24696:71;24764:1;24753:9;24749:17;24740:6;24696:71;:::i;:::-;24777:72;24845:2;24834:9;24830:18;24821:6;24777:72;:::i;:::-;24524:332;;;;;:::o

Swarm Source

ipfs://3df6236ac7b92cbe1c75888fae58460e8d8c51411dab7fac8c626e7ac9b7f044

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.