{"language":"Solidity","sources":{"contracts/contracts/BasicToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.36;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/// @title BasicToken\n/// @notice Fixed-supply ERC-20 token for the Basic package.\ncontract BasicToken is ERC20, Ownable {\n    error InvalidOwner();\n    error InvalidSupply();\n    error InvalidDecimals();\n    error FeeTransferFailed();\n\n    uint8 private immutable _customDecimals;\n\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_,\n        uint256 totalSupply_,\n        address owner_,\n        address feeReceiver_\n    ) payable ERC20(name_, symbol_) Ownable(owner_) {\n        if (owner_ == address(0)) revert InvalidOwner();\n        if (totalSupply_ == 0) revert InvalidSupply();\n        if (decimals_ > 18) revert InvalidDecimals();\n\n        _customDecimals = decimals_;\n        _mint(owner_, totalSupply_ * 10 ** decimals_);\n        _forwardFee(feeReceiver_);\n    }\n\n    function decimals() public view override returns (uint8) {\n        return _customDecimals;\n    }\n\n    function generator() external pure returns (string memory) {\n        return \"https://tokengeneratorapp.com\";\n    }\n\n    function _forwardFee(address feeReceiver_) private {\n        if (msg.value == 0 || feeReceiver_ == address(0)) return;\n\n        (bool ok,) = payable(feeReceiver_).call{value: msg.value}(\"\");\n        if (!ok) revert FeeTransferFailed();\n    }\n}\n"},"contracts/contracts/StandardToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.36;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {ERC20Pausable} from \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/// @title StandardToken\n/// @notice ERC-20 token with optional owner controls, whitelist, and independent transfer limits.\ncontract StandardToken is ERC20, ERC20Pausable, Ownable {\n    error InvalidOwner();\n    error InvalidSupply();\n    error InvalidDecimals();\n    error InvalidLimit();\n    error InvalidAddress();\n    error FeatureDisabled();\n    error CannotBlacklistOwner();\n    error BlacklistedAccount();\n    error AddressNotWhitelisted();\n    error MaxTxExceeded();\n    error MaxWalletExceeded();\n    error FeeTransferFailed();\n    error InvalidCap();\n    error CapExceeded();\n    error UnsafeRenounce();\n\n    uint256 private constant BPS = 10_000;\n    uint256 private constant MIN_LIMIT_BPS = 10;\n\n    uint256 public immutable maximumSupply;\n    uint8 private immutable _customDecimals;\n    uint16 private immutable _features;\n\n    uint256 public maxWalletAmount;\n    uint256 public maxTxAmount;\n    bool public maxWalletActive;\n    bool public maxTxActive;\n    bool public whitelistActive;\n\n    mapping(address account => bool) private _blacklisted;\n    mapping(address account => bool) private _whitelisted;\n    mapping(address account => bool) public isLimitExempt;\n\n    uint16 private constant FEATURE_BURN = 1 << 0;\n    uint16 private constant FEATURE_MINT = 1 << 1;\n    uint16 private constant FEATURE_PAUSE = 1 << 2;\n    uint16 private constant FEATURE_BLACKLIST = 1 << 3;\n    uint16 private constant FEATURE_WHITELIST = 1 << 4;\n    uint16 private constant FEATURE_MAX_WALLET = 1 << 5;\n    uint16 private constant FEATURE_MAX_TX = 1 << 6;\n\n    uint16 private constant FEATURE_CAP = 1 << 7;\n    uint16 private constant FEATURE_TRANSFER_OWNERSHIP = 1 << 8;\n    uint16 private constant FEATURE_RENOUNCE = 1 << 9;\n\n    event BlacklistUpdated(address indexed account, bool blocked);\n    event WhitelistUpdated(address indexed account, bool allowed);\n    event WhitelistStatusUpdated(bool enabled);\n    event LimitExemptUpdated(address indexed account, bool exempt);\n    event MaxWalletUpdated(uint256 amount, bool enabled);\n    event MaxTransactionUpdated(uint256 amount, bool enabled);\n\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_,\n        uint256 totalSupply_,\n        address owner_,\n        address feeReceiver_,\n        bool[10] memory features_,\n        uint256[2] memory limitBps_,\n        address[] memory initialWhitelist_,\n        uint256 maximumSupply_\n    ) payable ERC20(name_, symbol_) Ownable(owner_) {\n        if (owner_ == address(0)) revert InvalidOwner();\n        if (totalSupply_ == 0) revert InvalidSupply();\n        if (decimals_ > 18) revert InvalidDecimals();\n\n        _validateLimit(features_[5], limitBps_[0]);\n        _validateLimit(features_[6], limitBps_[1]);\n\n        if (features_[7] && (!features_[1] || maximumSupply_ < totalSupply_)) revert InvalidCap();\n        maximumSupply = features_[7] ? maximumSupply_ * 10 ** decimals_ : 0;\n        _customDecimals = decimals_;\n        _features = _packFeatures(features_);\n\n        uint256 supply = totalSupply_ * 10 ** decimals_;\n        maxWalletAmount = features_[5] ? (supply * limitBps_[0]) / BPS : supply;\n        maxTxAmount = features_[6] ? (supply * limitBps_[1]) / BPS : supply;\n        if ((features_[5] && maxWalletAmount == 0) || (features_[6] && maxTxAmount == 0)) revert InvalidLimit();\n        maxWalletActive = features_[5];\n        maxTxActive = features_[6];\n        whitelistActive = features_[4];\n\n        _whitelisted[owner_] = true;\n        _whitelisted[address(this)] = true;\n        isLimitExempt[owner_] = true;\n        isLimitExempt[address(this)] = true;\n\n        for (uint256 i; i < initialWhitelist_.length; ++i) {\n            _setWhitelist(initialWhitelist_[i], true);\n        }\n\n        _mint(owner_, supply);\n        _forwardFee(feeReceiver_);\n    }\n\n    function decimals() public view override returns (uint8) { return _customDecimals; }\n\n    function generator() external pure returns (string memory) {\n        return \"https://tokengeneratorapp.com\";\n    }\n\n    function cappedSupplyEnabled() public view returns (bool) { return _hasFeature(FEATURE_CAP); }\n    function ownershipTransferEnabled() public view returns (bool) { return _hasFeature(FEATURE_TRANSFER_OWNERSHIP); }\n    function renounceOwnershipEnabled() public view returns (bool) { return _hasFeature(FEATURE_RENOUNCE); }\n\n    function burnEnabled() public view returns (bool) { return _hasFeature(FEATURE_BURN); }\n    function mintEnabled() public view returns (bool) { return _hasFeature(FEATURE_MINT); }\n    function pauseEnabled() public view returns (bool) { return _hasFeature(FEATURE_PAUSE); }\n    function blacklistEnabled() public view returns (bool) { return _hasFeature(FEATURE_BLACKLIST); }\n    function whitelistEnabled() public view returns (bool) { return _hasFeature(FEATURE_WHITELIST); }\n    function maxWalletEnabled() public view returns (bool) { return _hasFeature(FEATURE_MAX_WALLET); }\n    function maxTransactionEnabled() public view returns (bool) { return _hasFeature(FEATURE_MAX_TX); }\n\n    function burn(uint256 amount) external {\n        if (!burnEnabled()) revert FeatureDisabled();\n        _burn(msg.sender, amount);\n    }\n\n    function burnFrom(address account, uint256 amount) external {\n        if (!burnEnabled()) revert FeatureDisabled();\n        _spendAllowance(account, msg.sender, amount);\n        _burn(account, amount);\n    }\n\n    function mint(address to, uint256 amount) external onlyOwner {\n        if (!mintEnabled()) revert FeatureDisabled();\n        _mint(to, amount);\n    }\n\n    function pause() external onlyOwner {\n        if (!pauseEnabled()) revert FeatureDisabled();\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        if (!pauseEnabled()) revert FeatureDisabled();\n        _unpause();\n    }\n\n    function blacklist(address account) external onlyOwner {\n        if (!blacklistEnabled()) revert FeatureDisabled();\n        if (account == owner()) revert CannotBlacklistOwner();\n        _blacklisted[account] = true;\n        emit BlacklistUpdated(account, true);\n    }\n\n    function unblacklist(address account) external onlyOwner {\n        if (!blacklistEnabled()) revert FeatureDisabled();\n        _blacklisted[account] = false;\n        emit BlacklistUpdated(account, false);\n    }\n\n    function isBlacklisted(address account) external view returns (bool) { return _blacklisted[account]; }\n\n    function setWhitelist(address account, bool allowed) external onlyOwner {\n        if (!whitelistEnabled()) revert FeatureDisabled();\n        _setWhitelist(account, allowed);\n    }\n\n    function setWhitelistEnabled(bool enabled) external onlyOwner {\n        if (!whitelistEnabled()) revert FeatureDisabled();\n        whitelistActive = enabled;\n        emit WhitelistStatusUpdated(enabled);\n    }\n\n    function isWhitelisted(address account) external view returns (bool) { return _whitelisted[account]; }\n\n    function setExemptFromLimits(address account, bool exempt) external onlyOwner {\n        if (account == address(0)) revert InvalidAddress();\n        isLimitExempt[account] = exempt;\n        emit LimitExemptUpdated(account, exempt);\n    }\n\n    function setMaxWallet(uint256 amount, bool enabled) external onlyOwner {\n        if (!maxWalletEnabled()) revert FeatureDisabled();\n        if (enabled && (amount == 0 || amount < totalSupply() / 1_000)) revert InvalidLimit();\n        maxWalletAmount = amount;\n        maxWalletActive = enabled;\n        emit MaxWalletUpdated(amount, enabled);\n    }\n\n    function setMaxTransaction(uint256 amount, bool enabled) external onlyOwner {\n        if (!maxTransactionEnabled()) revert FeatureDisabled();\n        if (enabled && (amount == 0 || amount < totalSupply() / 1_000)) revert InvalidLimit();\n        maxTxAmount = amount;\n        maxTxActive = enabled;\n        emit MaxTransactionUpdated(amount, enabled);\n    }\n\n    function transferOwnership(address newOwner) public override onlyOwner {\n        if (!ownershipTransferEnabled()) revert FeatureDisabled();\n        address oldOwner = owner();\n        super.transferOwnership(newOwner);\n        _migrateOwnerAccess(oldOwner, newOwner);\n    }\n\n    function renounceOwnership() public override onlyOwner {\n        if (!renounceOwnershipEnabled()) revert FeatureDisabled();\n        if (paused()) revert UnsafeRenounce();\n        address oldOwner = owner();\n        super.renounceOwnership();\n        _migrateOwnerAccess(oldOwner, address(0));\n    }\n\n    function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) {\n        if (from == address(0) && cappedSupplyEnabled() && totalSupply() + value > maximumSupply) revert CapExceeded();\n        bool regularTransfer = from != address(0) && to != address(0);\n\n        if (regularTransfer && blacklistEnabled() && (_blacklisted[from] || _blacklisted[to])) {\n            revert BlacklistedAccount();\n        }\n        if (regularTransfer && whitelistActive && (!_whitelisted[from] || !_whitelisted[to])) {\n            revert AddressNotWhitelisted();\n        }\n        if (regularTransfer && maxTxActive && !isLimitExempt[from] && !isLimitExempt[to] && value > maxTxAmount) {\n            revert MaxTxExceeded();\n        }\n        if (regularTransfer && maxWalletActive && !isLimitExempt[to] && balanceOf(to) + value > maxWalletAmount) {\n            revert MaxWalletExceeded();\n        }\n\n        super._update(from, to, value);\n    }\n\n    function _setWhitelist(address account, bool allowed) private {\n        if (account == address(0)) revert InvalidAddress();\n        _whitelisted[account] = allowed;\n        emit WhitelistUpdated(account, allowed);\n    }\n\n    function _migrateOwnerAccess(address oldOwner, address newOwner) private {\n        if (oldOwner != address(0)) {\n            _whitelisted[oldOwner] = false;\n            isLimitExempt[oldOwner] = false;\n        }\n        if (newOwner != address(0)) {\n            _blacklisted[newOwner] = false;\n            _whitelisted[newOwner] = true;\n            isLimitExempt[newOwner] = true;\n        }\n    }\n\n    function _hasFeature(uint16 feature) private view returns (bool) { return _features & feature != 0; }\n\n    function _packFeatures(bool[10] memory enabled) private pure returns (uint16 features) {\n        if (enabled[0]) features |= FEATURE_BURN;\n        if (enabled[1]) features |= FEATURE_MINT;\n        if (enabled[2]) features |= FEATURE_PAUSE;\n        if (enabled[3]) features |= FEATURE_BLACKLIST;\n        if (enabled[4]) features |= FEATURE_WHITELIST;\n        if (enabled[5]) features |= FEATURE_MAX_WALLET;\n        if (enabled[6]) features |= FEATURE_MAX_TX;\n        if (enabled[7]) features |= FEATURE_CAP;\n        if (enabled[8]) features |= FEATURE_TRANSFER_OWNERSHIP;\n        if (enabled[9]) features |= FEATURE_RENOUNCE;\n    }\n\n    function _validateLimit(bool enabled, uint256 limitBps) private pure {\n        if (enabled && (limitBps < MIN_LIMIT_BPS || limitBps > BPS)) revert InvalidLimit();\n    }\n\n    function _forwardFee(address feeReceiver_) private {\n        if (msg.value == 0 || feeReceiver_ == address(0)) return;\n        (bool ok,) = payable(feeReceiver_).call{value: msg.value}(\"\");\n        if (!ok) revert FeeTransferFailed();\n    }\n}\n"},"contracts/contracts/PremiumToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.36;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {ERC20Pausable} from \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/// @title PremiumToken\n/// @notice ERC-20 token with modular launch controls, transfer limits, and tax distribution.\n/// @dev Tax and burn transfers call the parent implementation directly to avoid recursive taxation.\ncontract PremiumToken is ERC20, ERC20Pausable, Ownable {\n    using SafeERC20 for IERC20;\n\n    error InvalidOwner();\n    error InvalidSupply();\n    error InvalidDecimals();\n    error InvalidTax();\n    error InvalidLimit();\n    error InvalidAddress();\n    error FeatureDisabled();\n    error CannotBlacklistOwner();\n    error BlacklistedAccount();\n    error AddressNotWhitelisted();\n    error TradingDisabled();\n    error MaxTxExceeded();\n    error MaxWalletExceeded();\n    error NothingToWithdraw();\n    error FeeTransferFailed();\n    error InvalidCap();\n    error CapExceeded();\n    error UnsafeRenounce();\n    error InvalidLaunchConfiguration();\n    error LaunchAlreadyStarted();\n    error LaunchCannotBeRelocked();\n\n    uint256 public constant MAX_TAX = 2_500;\n    uint256 private constant BPS = 10_000;\n    uint256 private constant MIN_LIMIT_BPS = 10;\n\n    uint256 public immutable protectionBlocks;\n    uint256 public immutable launchMaxTxAmount;\n    uint256 public immutable launchMaxWalletAmount;\n    uint256 public launchBlock;\n    uint256 public protectionEndBlock;\n    bool public launchStarted;\n    uint16 private constant FEATURE_LAUNCH_PROTECTION = 1 << 11;\n    event LaunchStarted(uint256 startBlock, uint256 endBlock);\n\n    uint256 public immutable maximumSupply;\n    uint8 private immutable _customDecimals;\n    uint16 private immutable _features;\n\n    uint256 public buyTax;\n    uint256 public sellTax;\n    uint256 public transferTax;\n    uint256 public burnTax;\n    address public taxReceiver;\n\n    uint256 public maxWalletAmount;\n    uint256 public maxTxAmount;\n    bool public maxWalletActive;\n    bool public maxTxActive;\n    bool public whitelistActive;\n    bool public tradingEnabled;\n\n    mapping(address account => bool) private _blacklisted;\n    mapping(address account => bool) private _whitelisted;\n    mapping(address account => bool) public isTaxExempt;\n    mapping(address account => bool) public isLimitExempt;\n    mapping(address account => bool) public isTradingExempt;\n    mapping(address account => bool) public automatedMarketMakers;\n\n    uint16 private constant FEATURE_BURN = 1 << 0;\n    uint16 private constant FEATURE_MINT = 1 << 1;\n    uint16 private constant FEATURE_PAUSE = 1 << 2;\n    uint16 private constant FEATURE_BLACKLIST = 1 << 3;\n    uint16 private constant FEATURE_WHITELIST = 1 << 4;\n    uint16 private constant FEATURE_MAX_WALLET = 1 << 5;\n    uint16 private constant FEATURE_MAX_TX = 1 << 6;\n    uint16 private constant FEATURE_TRADING_CONTROL = 1 << 7;\n\n    uint16 private constant FEATURE_CAP = 1 << 8;\n    uint16 private constant FEATURE_TRANSFER_OWNERSHIP = 1 << 9;\n    uint16 private constant FEATURE_RENOUNCE = 1 << 10;\n\n    event BlacklistUpdated(address indexed account, bool blocked);\n    event WhitelistUpdated(address indexed account, bool allowed);\n    event WhitelistStatusUpdated(bool enabled);\n    event TradingStatusUpdated(bool enabled);\n    event TaxUpdated(uint256 buyTax, uint256 sellTax, uint256 transferTax, uint256 burnTax);\n    event TaxReceiverUpdated(address indexed receiver);\n    event TaxExemptUpdated(address indexed account, bool exempt);\n    event LimitExemptUpdated(address indexed account, bool exempt);\n    event TradingExemptUpdated(address indexed account, bool exempt);\n    event MaxWalletUpdated(uint256 amount, bool enabled);\n    event MaxTransactionUpdated(uint256 amount, bool enabled);\n    event AMMUpdated(address indexed account, bool enabled);\n    event TaxCollected(address indexed from, address indexed to, address indexed receiver, uint256 receiverAmount, uint256 burnedAmount);\n    event TaxWithdrawn(address indexed receiver, uint256 amount);\n\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_,\n        uint256 totalSupply_,\n        address owner_,\n        address feeReceiver_,\n        bool[12] memory features_,\n        uint256[6] memory params_,\n        address taxReceiver_,\n        bool tradingInitiallyEnabled_,\n        address[] memory initialWhitelist_,\n        address[] memory initialTaxExempt_,\n        uint256 maximumSupply_,\n        uint256[3] memory launchParams_\n    ) payable ERC20(name_, symbol_) Ownable(owner_) {\n        if (owner_ == address(0)) revert InvalidOwner();\n        if (totalSupply_ == 0) revert InvalidSupply();\n        if (decimals_ > 18) revert InvalidDecimals();\n\n        _validateTaxConfiguration(params_[0], params_[1], params_[2], params_[3]);\n        _validateLimit(features_[5], params_[4]);\n        _validateLimit(features_[6], params_[5]);\n\n        bool hasTax = params_[0] != 0 || params_[1] != 0 || params_[2] != 0;\n        if (hasTax && taxReceiver_ == address(0)) revert InvalidAddress();\n\n        if (features_[8] && (!features_[1] || maximumSupply_ < totalSupply_)) revert InvalidCap();\n        maximumSupply = features_[8] ? maximumSupply_ * 10 ** decimals_ : 0;\n        _customDecimals = decimals_;\n        _features = _packFeatures(features_);\n        buyTax = params_[0];\n        sellTax = params_[1];\n        transferTax = params_[2];\n        burnTax = params_[3];\n        taxReceiver = taxReceiver_ == address(0) ? owner_ : taxReceiver_;\n\n        uint256 supply = totalSupply_ * 10 ** decimals_;\n        if (features_[11]) {\n            if (!features_[7] || tradingInitiallyEnabled_ || launchParams_[0] == 0 || launchParams_[0] > 100) revert InvalidLaunchConfiguration();\n            _validateLimit(true, launchParams_[1]);\n            _validateLimit(true, launchParams_[2]);\n            if ((features_[6] && launchParams_[1] > params_[5]) || (features_[5] && launchParams_[2] > params_[4])) revert InvalidLaunchConfiguration();\n            if ((supply * launchParams_[1]) / BPS == 0 || (supply * launchParams_[2]) / BPS == 0) revert InvalidLaunchConfiguration();\n        }\n        protectionBlocks = features_[11] ? launchParams_[0] : 0;\n        launchMaxTxAmount = features_[11] ? (supply * launchParams_[1]) / BPS : 0;\n        launchMaxWalletAmount = features_[11] ? (supply * launchParams_[2]) / BPS : 0;\n        maxWalletAmount = features_[5] ? (supply * params_[4]) / BPS : supply;\n        maxTxAmount = features_[6] ? (supply * params_[5]) / BPS : supply;\n        if ((features_[5] && maxWalletAmount == 0) || (features_[6] && maxTxAmount == 0)) revert InvalidLimit();\n        maxWalletActive = features_[5];\n        maxTxActive = features_[6];\n        whitelistActive = features_[4];\n        tradingEnabled = features_[7] ? tradingInitiallyEnabled_ : true;\n\n        _grantSystemAccess(owner_);\n        _grantSystemAccess(address(this));\n        _grantSystemAccess(taxReceiver);\n\n        for (uint256 i; i < initialWhitelist_.length; ++i) {\n            _setWhitelist(initialWhitelist_[i], true);\n        }\n        for (uint256 i; i < initialTaxExempt_.length; ++i) {\n            _setTaxExempt(initialTaxExempt_[i], true);\n        }\n\n        _mint(owner_, supply);\n        _forwardFee(feeReceiver_);\n    }\n\n    receive() external payable {}\n\n    function decimals() public view override returns (uint8) { return _customDecimals; }\n\n    function generator() external pure returns (string memory) {\n        return \"https://tokengeneratorapp.com\";\n    }\n\n    function cappedSupplyEnabled() public view returns (bool) { return _hasFeature(FEATURE_CAP); }\n    function ownershipTransferEnabled() public view returns (bool) { return _hasFeature(FEATURE_TRANSFER_OWNERSHIP); }\n    function renounceOwnershipEnabled() public view returns (bool) { return _hasFeature(FEATURE_RENOUNCE); }\n\n    function burnEnabled() public view returns (bool) { return _hasFeature(FEATURE_BURN); }\n    function mintEnabled() public view returns (bool) { return _hasFeature(FEATURE_MINT); }\n    function pauseEnabled() public view returns (bool) { return _hasFeature(FEATURE_PAUSE); }\n    function blacklistEnabled() public view returns (bool) { return _hasFeature(FEATURE_BLACKLIST); }\n    function whitelistEnabled() public view returns (bool) { return _hasFeature(FEATURE_WHITELIST); }\n    function maxWalletEnabled() public view returns (bool) { return _hasFeature(FEATURE_MAX_WALLET); }\n    function maxTransactionEnabled() public view returns (bool) { return _hasFeature(FEATURE_MAX_TX); }\n    function tradingControlEnabled() public view returns (bool) { return _hasFeature(FEATURE_TRADING_CONTROL); }\n\n    function burn(uint256 amount) external {\n        if (!burnEnabled()) revert FeatureDisabled();\n        _burn(msg.sender, amount);\n    }\n\n    function burnFrom(address account, uint256 amount) external {\n        if (!burnEnabled()) revert FeatureDisabled();\n        _spendAllowance(account, msg.sender, amount);\n        _burn(account, amount);\n    }\n\n    function mint(address to, uint256 amount) external onlyOwner {\n        if (!mintEnabled()) revert FeatureDisabled();\n        _mint(to, amount);\n    }\n\n    function pause() external onlyOwner {\n        if (!pauseEnabled()) revert FeatureDisabled();\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        if (!pauseEnabled()) revert FeatureDisabled();\n        _unpause();\n    }\n\n    function blacklist(address account) external onlyOwner {\n        if (!blacklistEnabled()) revert FeatureDisabled();\n        if (account == owner()) revert CannotBlacklistOwner();\n        _blacklisted[account] = true;\n        emit BlacklistUpdated(account, true);\n    }\n\n    function unblacklist(address account) external onlyOwner {\n        if (!blacklistEnabled()) revert FeatureDisabled();\n        _blacklisted[account] = false;\n        emit BlacklistUpdated(account, false);\n    }\n\n    function isBlacklisted(address account) external view returns (bool) { return _blacklisted[account]; }\n\n    function setWhitelist(address account, bool allowed) external onlyOwner {\n        if (!whitelistEnabled()) revert FeatureDisabled();\n        _setWhitelist(account, allowed);\n    }\n\n    function setWhitelistEnabled(bool enabled) external onlyOwner {\n        if (!whitelistEnabled()) revert FeatureDisabled();\n        whitelistActive = enabled;\n        emit WhitelistStatusUpdated(enabled);\n    }\n\n    function isWhitelisted(address account) external view returns (bool) { return _whitelisted[account]; }\n\n    function setTradingEnabled(bool enabled) external onlyOwner {\n        if (!tradingControlEnabled()) revert FeatureDisabled();\n        if (launchProtectionEnabled()) {\n            if (enabled && !launchStarted) { _startLaunch(); return; }\n            if (!enabled && launchStarted) revert LaunchCannotBeRelocked();\n        }\n        tradingEnabled = enabled;\n        emit TradingStatusUpdated(enabled);\n    }\n\n    function launchProtectionEnabled() public view returns (bool) { return _hasFeature(FEATURE_LAUNCH_PROTECTION); }\n\n    /// @notice The start block is included; the end block is excluded. This window cannot be reset or extended.\n    function launchProtectionActive() public view returns (bool) {\n        return launchStarted && block.number < protectionEndBlock;\n    }\n\n    function startLaunch() external onlyOwner {\n        if (!launchProtectionEnabled()) revert FeatureDisabled();\n        _startLaunch();\n    }\n\n    function _startLaunch() private {\n        if (launchStarted) revert LaunchAlreadyStarted();\n        launchStarted = true;\n        launchBlock = block.number;\n        protectionEndBlock = block.number + protectionBlocks;\n        tradingEnabled = true;\n        emit LaunchStarted(launchBlock, protectionEndBlock);\n        emit TradingStatusUpdated(true);\n    }\n\n    function setTax(uint256 buyTax_, uint256 sellTax_, uint256 transferTax_, uint256 burnTax_) external onlyOwner {\n        _validateTaxConfiguration(buyTax_, sellTax_, transferTax_, burnTax_);\n        buyTax = buyTax_;\n        sellTax = sellTax_;\n        transferTax = transferTax_;\n        burnTax = burnTax_;\n        emit TaxUpdated(buyTax_, sellTax_, transferTax_, burnTax_);\n    }\n\n    function setTaxReceiver(address receiver) external onlyOwner {\n        if (receiver == address(0)) revert InvalidAddress();\n        taxReceiver = receiver;\n        _grantSystemAccess(receiver);\n        emit TaxReceiverUpdated(receiver);\n    }\n\n    function setExemptFromTax(address account, bool exempt) external onlyOwner {\n        _setTaxExempt(account, exempt);\n    }\n\n    function addTaxExempt(address account) external onlyOwner { _setTaxExempt(account, true); }\n    function removeTaxExempt(address account) external onlyOwner { _setTaxExempt(account, false); }\n    function isExemptFromTax(address account) external view returns (bool) { return isTaxExempt[account]; }\n\n    function setExemptFromLimits(address account, bool exempt) external onlyOwner {\n        if (account == address(0)) revert InvalidAddress();\n        isLimitExempt[account] = exempt;\n        emit LimitExemptUpdated(account, exempt);\n    }\n\n    function setExemptFromTrading(address account, bool exempt) external onlyOwner {\n        if (!tradingControlEnabled()) revert FeatureDisabled();\n        if (account == address(0)) revert InvalidAddress();\n        isTradingExempt[account] = exempt;\n        emit TradingExemptUpdated(account, exempt);\n    }\n\n    function setAutomatedMarketMaker(address account, bool enabled) external onlyOwner {\n        if (account == address(0)) revert InvalidAddress();\n        automatedMarketMakers[account] = enabled;\n        isLimitExempt[account] = enabled;\n        if (whitelistEnabled()) _setWhitelist(account, enabled);\n        emit AMMUpdated(account, enabled);\n    }\n\n    function setMaxWallet(uint256 amount, bool enabled) external onlyOwner {\n        if (!maxWalletEnabled()) revert FeatureDisabled();\n        if (enabled && (amount == 0 || amount < totalSupply() / 1_000)) revert InvalidLimit();\n        maxWalletAmount = amount;\n        maxWalletActive = enabled;\n        emit MaxWalletUpdated(amount, enabled);\n    }\n\n    function setMaxTransaction(uint256 amount, bool enabled) external onlyOwner {\n        if (!maxTransactionEnabled()) revert FeatureDisabled();\n        if (enabled && (amount == 0 || amount < totalSupply() / 1_000)) revert InvalidLimit();\n        maxTxAmount = amount;\n        maxTxActive = enabled;\n        emit MaxTransactionUpdated(amount, enabled);\n    }\n\n    function transferOwnership(address newOwner) public override onlyOwner {\n        if (!ownershipTransferEnabled()) revert FeatureDisabled();\n        address oldOwner = owner();\n        super.transferOwnership(newOwner);\n        _migrateOwnerAccess(oldOwner, newOwner);\n    }\n\n    function renounceOwnership() public override onlyOwner {\n        if (!renounceOwnershipEnabled()) revert FeatureDisabled();\n        if (paused() || !tradingEnabled) revert UnsafeRenounce();\n        address oldOwner = owner();\n        super.renounceOwnership();\n        _migrateOwnerAccess(oldOwner, address(0));\n    }\n\n    /// @notice Recovers this token if tokens were transferred to the contract address directly.\n    function manualSwap() external onlyOwner {\n        uint256 amount = balanceOf(address(this));\n        if (amount == 0) revert NothingToWithdraw();\n        super._update(address(this), taxReceiver, amount);\n        emit TaxWithdrawn(taxReceiver, amount);\n    }\n\n    function withdrawStuckETH() external onlyOwner {\n        uint256 amount = address(this).balance;\n        if (amount == 0) revert NothingToWithdraw();\n        (bool ok,) = payable(owner()).call{value: amount}(\"\");\n        if (!ok) revert FeeTransferFailed();\n    }\n\n    function withdrawStuckTokens(address token) external onlyOwner {\n        if (token == address(this) || token == address(0)) revert InvalidAddress();\n        uint256 amount = IERC20(token).balanceOf(address(this));\n        if (amount == 0) revert NothingToWithdraw();\n        IERC20(token).safeTransfer(owner(), amount);\n    }\n\n    function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) {\n        if (from == address(0) && cappedSupplyEnabled() && totalSupply() + value > maximumSupply) revert CapExceeded();\n        bool regularTransfer = from != address(0) && to != address(0) && from != address(this);\n        if (!regularTransfer) {\n            super._update(from, to, value);\n            return;\n        }\n\n        if (blacklistEnabled() && (_blacklisted[from] || _blacklisted[to])) revert BlacklistedAccount();\n        if (whitelistActive && (!_whitelisted[from] || !_whitelisted[to])) revert AddressNotWhitelisted();\n        if (tradingControlEnabled() && !tradingEnabled && !isTradingExempt[from] && !isTradingExempt[to]) {\n            revert TradingDisabled();\n        }\n        // An AMM is exempt from wallet limits, never from transaction caps on ordinary traders.\n        bool txExempt = (isLimitExempt[from] && !automatedMarketMakers[from]) || (isLimitExempt[to] && !automatedMarketMakers[to]);\n        bool protectedLaunch = launchProtectionActive();\n        if (!txExempt && ((maxTxActive && value > maxTxAmount) || (protectedLaunch && value > launchMaxTxAmount))) revert MaxTxExceeded();\n\n        uint256 rate = _taxRate(from, to);\n        uint256 taxAmount;\n        uint256 burnAmount;\n        uint256 receiverAmount;\n        if (rate != 0 && !isTaxExempt[from] && !isTaxExempt[to]) {\n            taxAmount = (value * rate) / BPS;\n            burnAmount = (value * burnTax) / BPS;\n            if (burnAmount > taxAmount) burnAmount = taxAmount;\n            receiverAmount = taxAmount - burnAmount;\n        }\n\n        uint256 receivedAmount = value - taxAmount;\n        if (!isLimitExempt[to]) {\n            uint256 nextBalance = balanceOf(to) + receivedAmount;\n            if ((maxWalletActive && nextBalance > maxWalletAmount) || (protectedLaunch && nextBalance > launchMaxWalletAmount)) revert MaxWalletExceeded();\n        }\n\n        if (receiverAmount != 0) super._update(from, taxReceiver, receiverAmount);\n        if (burnAmount != 0) super._update(from, address(0), burnAmount);\n        if (taxAmount != 0) emit TaxCollected(from, to, taxReceiver, receiverAmount, burnAmount);\n        super._update(from, to, receivedAmount);\n    }\n\n    function _taxRate(address from, address to) private view returns (uint256) {\n        if (automatedMarketMakers[from]) return buyTax;\n        if (automatedMarketMakers[to]) return sellTax;\n        return transferTax;\n    }\n\n    function _setWhitelist(address account, bool allowed) private {\n        if (account == address(0)) revert InvalidAddress();\n        _whitelisted[account] = allowed;\n        emit WhitelistUpdated(account, allowed);\n    }\n\n    function _setTaxExempt(address account, bool exempt) private {\n        if (account == address(0)) revert InvalidAddress();\n        isTaxExempt[account] = exempt;\n        emit TaxExemptUpdated(account, exempt);\n    }\n\n    function _grantSystemAccess(address account) private {\n        if (account == address(0)) return;\n        _whitelisted[account] = true;\n        isTaxExempt[account] = true;\n        isLimitExempt[account] = true;\n        isTradingExempt[account] = true;\n    }\n\n    function _migrateOwnerAccess(address oldOwner, address newOwner) private {\n        if (oldOwner != address(0)) {\n            _whitelisted[oldOwner] = false;\n            isTaxExempt[oldOwner] = false;\n            isLimitExempt[oldOwner] = false;\n            isTradingExempt[oldOwner] = false;\n        }\n        if (newOwner != address(0)) {\n            _blacklisted[newOwner] = false;\n            _grantSystemAccess(newOwner);\n        }\n    }\n\n    function _hasFeature(uint16 feature) private view returns (bool) { return _features & feature != 0; }\n\n    function _packFeatures(bool[12] memory enabled) private pure returns (uint16 features) {\n        if (enabled[0]) features |= FEATURE_BURN;\n        if (enabled[1]) features |= FEATURE_MINT;\n        if (enabled[2]) features |= FEATURE_PAUSE;\n        if (enabled[3]) features |= FEATURE_BLACKLIST;\n        if (enabled[4]) features |= FEATURE_WHITELIST;\n        if (enabled[5]) features |= FEATURE_MAX_WALLET;\n        if (enabled[6]) features |= FEATURE_MAX_TX;\n        if (enabled[8]) features |= FEATURE_CAP;\n        if (enabled[9]) features |= FEATURE_TRANSFER_OWNERSHIP;\n        if (enabled[10]) features |= FEATURE_RENOUNCE;\n        if (enabled[7]) features |= FEATURE_TRADING_CONTROL;\n        if (enabled[11]) features |= FEATURE_LAUNCH_PROTECTION;\n    }\n\n    function _validateLimit(bool enabled, uint256 limitBps) private pure {\n        if (enabled && (limitBps < MIN_LIMIT_BPS || limitBps > BPS)) revert InvalidLimit();\n    }\n\n    function _validateTaxConfiguration(\n        uint256 buyTax_,\n        uint256 sellTax_,\n        uint256 transferTax_,\n        uint256 burnTax_\n    ) private pure {\n        if (buyTax_ > MAX_TAX || sellTax_ > MAX_TAX || transferTax_ > MAX_TAX || burnTax_ > MAX_TAX) {\n            revert InvalidTax();\n        }\n        if (burnTax_ != 0) {\n            if (buyTax_ != 0 && burnTax_ > buyTax_) revert InvalidTax();\n            if (sellTax_ != 0 && burnTax_ > sellTax_) revert InvalidTax();\n            if (transferTax_ != 0 && burnTax_ > transferTax_) revert InvalidTax();\n            if (buyTax_ == 0 && sellTax_ == 0 && transferTax_ == 0) revert InvalidTax();\n        }\n    }\n\n    function _forwardFee(address feeReceiver_) private {\n        if (msg.value == 0 || feeReceiver_ == address(0)) return;\n        (bool ok,) = payable(feeReceiver_).call{value: msg.value}(\"\");\n        if (!ok) revert FeeTransferFailed();\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/ERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n    mapping(address account => uint256) private _balances;\n\n    mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * Both values are immutable: they can only be set once during construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view virtual returns (uint256) {\n        return _totalSupply;\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Skips emitting an {Approval} event indicating an allowance update. This is not\n     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            _totalSupply += value;\n        } else {\n            uint256 fromBalance = _balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                _balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                _totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                _balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```solidity\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        _allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance < type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"},"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ERC20} from \"../ERC20.sol\";\nimport {Pausable} from \"../../../utils/Pausable.sol\";\n\n/**\n * @dev ERC-20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * IMPORTANT: This contract does not include public pause and unpause functions. In\n * addition to inheriting this contract, you must define both functions, invoking the\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\n * make the contract pause mechanism of the contract unreachable, and thus unusable.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n    /**\n     * @dev See {ERC20-_update}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _update(address from, address to, uint256 value) internal virtual override whenNotPaused {\n        super._update(from, to, value);\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC6093.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"},"@openzeppelin/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"@openzeppelin/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"@openzeppelin/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"settings":{"optimizer":{"enabled":true,"runs":200},"viaIR":true,"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode.object"]}}}}