creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/FullFeatureToken.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.17;\n\n/**\n * Security notice: Refer to our product documentation for security advice\n * around the configuration of our smart contracts https://docs.bitbond.com/\n */\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ERC20Burnable } from \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport { ERC20Pausable } from \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\";\nimport { LibCommon } from \"./lib/LibCommon.sol\";\n\ncontract FullFeatureToken is ERC20, ERC20Burnable, ERC20Pausable, Ownable {\n  uint256 private constant MAX_BPS_AMOUNT = 10_000;\n  uint256 private constant MAX_ALLOWED_BPS = 5_000;\n  /// @notice mapping of blacklisted addresses to a boolean\n  mapping(address => bool) private _isBlacklisted;\n  /// @notice mapping of whitelisted addresses to a boolean\n  mapping(address => bool) public whitelist;\n  /// @notice array holding all whitelisted addresses\n  address[] public whitelistedAddresses;\n  /// @notice support for attaching of documentation for security tokens\n  string public initialDocumentUri;\n  /// @notice the security token documentation\n  string public documentUri;\n  /// @notice initial number of tokens which will be minted during initialization\n  uint256 public immutable initialSupply;\n  /// @notice initial max amount of tokens allowed per wallet\n  uint256 public immutable initialMaxTokenAmountPerAddress;\n  /// @notice max amount of tokens allowed per wallet\n  uint256 public maxTokenAmountPerAddress;\n  /// @notice set of features supported by the token\n  struct ERC20ConfigProps {\n    bool _isMintable;\n    bool _isBurnable;\n    bool _isPausable;\n    bool _isBlacklistEnabled;\n    bool _isDocumentAllowed;\n    bool _isWhitelistEnabled;\n    bool _isMaxAmountOfTokensSet;\n    bool _isForceTransferAllowed;\n    bool _isTaxable;\n    bool _isDeflationary;\n  }\n  /// @notice features of the token\n  ERC20ConfigProps private configProps;\n  /// @notice owner of the contract\n  address public immutable initialTokenOwner;\n  /// @notice number of decimals of the token\n  uint8 private immutable _decimals;\n  address public taxAddress;\n  uint256 public taxBPS;\n  uint256 public deflationBPS;\n\n  /// @notice emitted when an address is blacklisted\n  event UserBlacklisted(address indexed addr);\n  /// @notice emitted when an address is unblacklisted\n  event UserUnBlacklisted(address indexed addr);\n  /// @notice emitted when a new document is set for the security token\n  event DocumentUriSet(string newDocUri);\n  /// @notice emitted when a new max amount of tokens per wallet is set\n  event MaxTokenAmountPerSet(uint256 newMaxTokenAmount);\n  /// @notice emitted when a new whitelist is set\n  event UsersWhitelisted(address[] updatedAddresses);\n  /// @notice emitted when a new tax address or taxBPS is set\n  event TaxConfigSet(address indexed _taxAddress, uint256 indexed _taxBPS);\n  /// @notice emitted when a new deflationBPS is set\n  event DeflationConfigSet(uint256 indexed _deflationBPS);\n\n  /// @notice raised when the amount sent is zero\n  error InvalidMaxTokenAmount(uint256 maxTokenAmount);\n  /// @notice raised when the decimals are not in the range 0 - 18\n  error InvalidDecimals(uint8 decimals);\n  /// @notice raised when setting maxTokenAmount less than current\n  error MaxTokenAmountPerAddrLtPrevious();\n  /// @notice raised when blacklisting is not enabled\n  error BlacklistNotEnabled();\n  /// @notice raised when the address is already blacklisted\n  error AddrAlreadyBlacklisted(address addr);\n  /// @notice raised when the address is already unblacklisted\n  error AddrAlreadyUnblacklisted(address addr);\n  /// @notice raised when attempting to blacklist a whitelisted address\n  error CannotBlacklistWhitelistedAddr(address addr);\n  /// @notice raised when a recipient address is blacklisted\n  error RecipientBlacklisted(address addr);\n  /// @notice raised when a sender address is blacklisted\n  error SenderBlacklisted(address addr);\n  /// @notice raised when a recipient address is not whitelisted\n  error RecipientNotWhitelisted(address addr);\n  /// @notice raised when a sender address is not whitelisted\n  error SenderNotWhitelisted(address addr);\n  /// @notice raised when recipient balance exceeds maxTokenAmountPerAddress\n  error DestBalanceExceedsMaxAllowed(address addr);\n  /// @notice raised minting is not enabled\n  error MintingNotEnabled();\n  /// @notice raised when burning is not enabled\n  error BurningNotEnabled();\n  /// @notice raised when pause is not enabled\n  error PausingNotEnabled();\n  /// @notice raised when whitelist is not enabled\n  error WhitelistNotEnabled();\n  /// @notice raised when attempting to whitelist a blacklisted address\n  error CannotWhitelistBlacklistedAddr(address addr);\n  /// @notice raised when trying to set a document URI when not allowed\n  error DocumentUriNotAllowed();\n  /// @notice raised when trying to set a max amount of tokens when not allowed\n  error MaxTokenAmountNotAllowed();\n  /// @notice raised when trying to set a tax address or taxBPS when not allowed\n  error TokenIsNotTaxable();\n  /// @notice raised when trying to set a deflationBPS when not allowed\n  error TokenIsNotDeflationary();\n  /// @notice raised when trying to set an invalid taxBPS\n  error InvalidTaxBPS(uint256 bps);\n  /// @notice raised when trying to set and invalid deflationBPS\n  error InvalidDeflationBPS(uint256 bps);\n\n  /**\n   * @notice modifier for validating if transfer is possible and valid\n   * @param sender the sender of the transaction\n   * @param recipient the recipient of the transaction\n   */\n  modifier validateTransfer(address sender, address recipient) {\n    if (isWhitelistEnabled()) {\n      if (!whitelist[sender]) {\n        revert SenderNotWhitelisted(sender);\n      }\n      if (!whitelist[recipient]) {\n        revert RecipientNotWhitelisted(recipient);\n      }\n      if (\n        sender != msg.sender && msg.sender != owner() && !whitelist[msg.sender]\n      ) {\n        revert SenderNotWhitelisted(msg.sender);\n      }\n    }\n    if (isBlacklistEnabled()) {\n      if (_isBlacklisted[sender]) {\n        revert SenderBlacklisted(sender);\n      }\n      if (_isBlacklisted[recipient]) {\n        revert RecipientBlacklisted(recipient);\n      }\n      if (\n        sender != msg.sender &&\n        msg.sender != owner() &&\n        _isBlacklisted[msg.sender]\n      ) {\n        revert SenderBlacklisted(msg.sender);\n      }\n    }\n    _;\n  }\n\n  constructor(\n    string memory name_,\n    string memory symbol_,\n    uint256 initialSupplyToSet,\n    uint8 decimalsToSet,\n    address tokenOwner,\n    ERC20ConfigProps memory customConfigProps,\n    uint256 maxTokenAmount,\n    string memory newDocumentUri,\n    address _taxAddress,\n    uint256 _taxBPS,\n    uint256 _deflationBPS\n  ) ERC20(name_, symbol_) {\n    if (customConfigProps._isMaxAmountOfTokensSet) {\n      if (maxTokenAmount == 0) {\n        revert InvalidMaxTokenAmount(maxTokenAmount);\n      }\n    }\n    if (decimalsToSet > 18) {\n      revert InvalidDecimals(decimalsToSet);\n    }\n    if (customConfigProps._isTaxable) {\n      if (_taxBPS > MAX_ALLOWED_BPS) {\n        revert InvalidTaxBPS(_taxBPS);\n      }\n      LibCommon.validateAddress(_taxAddress);\n      taxAddress = _taxAddress;\n      taxBPS = _taxBPS;\n    }\n    if (customConfigProps._isDeflationary) {\n      if (_deflationBPS > MAX_ALLOWED_BPS) {\n        revert InvalidDeflationBPS(_deflationBPS);\n      }\n      deflationBPS = _deflationBPS;\n    }\n    LibCommon.validateAddress(tokenOwner);\n\n    initialSupply = initialSupplyToSet;\n    initialMaxTokenAmountPerAddress = maxTokenAmount;\n    initialDocumentUri = newDocumentUri;\n    initialTokenOwner = tokenOwner;\n    _decimals = decimalsToSet;\n    configProps = customConfigProps;\n    documentUri = newDocumentUri;\n    maxTokenAmountPerAddress = maxTokenAmount;\n\n    if (initialSupplyToSet != 0) {\n      _mint(tokenOwner, initialSupplyToSet * 10 ** decimalsToSet);\n    }\n\n    if (tokenOwner != msg.sender) {\n      transferOwnership(tokenOwner);\n    }\n  }\n\n  /**\n   * @notice hook called before any transfer of tokens. This includes minting and burning\n   * imposed by the ERC20 standard\n   * @param from - address of the sender\n   * @param to - address of the recipient\n   * @param amount - amount of tokens to transfer\n   */\n  function _beforeTokenTransfer(\n    address from,\n    address to,\n    uint256 amount\n  ) internal virtual override(ERC20, ERC20Pausable) {\n    super._beforeTokenTransfer(from, to, amount);\n  }\n\n  /// @notice method which checks if the token is pausable\n  function isPausable() public view returns (bool) {\n    return configProps._isPausable;\n  }\n\n  /// @notice method which checks if the token is mintable\n  function isMintable() public view returns (bool) {\n    return configProps._isMintable;\n  }\n\n  /// @notice method which checks if the token is burnable\n  function isBurnable() public view returns (bool) {\n    return configProps._isBurnable;\n  }\n\n  /// @notice method which checks if the token supports blacklisting\n  function isBlacklistEnabled() public view returns (bool) {\n    return configProps._isBlacklistEnabled;\n  }\n\n  /// @notice method which checks if the token supports whitelisting\n  function isWhitelistEnabled() public view returns (bool) {\n    return configProps._isWhitelistEnabled;\n  }\n\n  /// @notice method which checks if the token supports max amount of tokens per wallet\n  function isMaxAmountOfTokensSet() public view returns (bool) {\n    return configProps._isMaxAmountOfTokensSet;\n  }\n\n  /// @notice method which checks if the token supports documentUris\n  function isDocumentUriAllowed() public view returns (bool) {\n    return configProps._isDocumentAllowed;\n  }\n\n  /// @notice method which checks if the token supports force transfers\n  function isForceTransferAllowed() public view returns (bool) {\n    return configProps._isForceTransferAllowed;\n  }\n\n  /// @notice method which returns the number of decimals for the token\n  function decimals() public view virtual override returns (uint8) {\n    return _decimals;\n  }\n\n  /// @notice method which checks if the token is taxable\n  function isTaxable() public view returns (bool) {\n    return configProps._isTaxable;\n  }\n\n  /// @notice method which checks if the token is deflationary\n  function isDeflationary() public view returns (bool) {\n    return configProps._isDeflationary;\n  }\n\n  /**\n   * @notice which returns an array of all the whitelisted addresses\n   * @return whitelistedAddresses array of all the whitelisted addresses\n   */\n  function getWhitelistedAddresses() external view returns (address[] memory) {\n    return whitelistedAddresses;\n  }\n\n  /**\n   * @notice method which allows the owner to set a documentUri\n   * @param newDocumentUri - the new documentUri\n   * @dev only callable by the owner\n   */\n  function setDocumentUri(\n    string memory newDocumentUri\n  ) external onlyOwner whenNotPaused {\n    if (!isDocumentUriAllowed()) {\n      revert DocumentUriNotAllowed();\n    }\n    documentUri = newDocumentUri;\n    emit DocumentUriSet(newDocumentUri);\n  }\n\n  /**\n   * @notice method which allows the owner to set a max amount of tokens per wallet\n   * @param newMaxTokenAmount - the new max amount of tokens per wallet\n   * @dev only callable by the owner\n   */\n  function setMaxTokenAmountPerAddress(\n    uint256 newMaxTokenAmount\n  ) external onlyOwner whenNotPaused {\n    if (!isMaxAmountOfTokensSet()) {\n      revert MaxTokenAmountNotAllowed();\n    }\n    if (newMaxTokenAmount <= maxTokenAmountPerAddress) {\n      revert MaxTokenAmountPerAddrLtPrevious();\n    }\n\n    maxTokenAmountPerAddress = newMaxTokenAmount;\n    emit MaxTokenAmountPerSet(newMaxTokenAmount);\n  }\n\n  /**\n   * @notice method which allows the owner to blacklist an address\n   * @param addr - the address to blacklist\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   * @dev only callable if the token supports blacklisting\n   * @dev only callable if the address is not already blacklisted\n   * @dev only callable if the address is not whitelisted\n   */\n  function blackList(address addr) external onlyOwner whenNotPaused {\n    LibCommon.validateAddress(addr);\n    if (!isBlacklistEnabled()) {\n      revert BlacklistNotEnabled();\n    }\n    if (_isBlacklisted[addr]) {\n      revert AddrAlreadyBlacklisted(addr);\n    }\n    if (isWhitelistEnabled() && whitelist[addr]) {\n      revert CannotBlacklistWhitelistedAddr(addr);\n    }\n\n    _isBlacklisted[addr] = true;\n    emit UserBlacklisted(addr);\n  }\n\n  /**\n   * @notice method which allows the owner to unblacklist an address\n   * @param addr - the address to unblacklist\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   * @dev only callable if the token supports blacklisting\n   * @dev only callable if the address is blacklisted\n   */\n  function removeFromBlacklist(address addr) external onlyOwner whenNotPaused {\n    LibCommon.validateAddress(addr);\n    if (!isBlacklistEnabled()) {\n      revert BlacklistNotEnabled();\n    }\n    if (!_isBlacklisted[addr]) {\n      revert AddrAlreadyUnblacklisted(addr);\n    }\n    delete _isBlacklisted[addr];\n    emit UserUnBlacklisted(addr);\n  }\n\n  /**\n   * @notice method which allows the owner to set the tax config\n   * @param _taxAddress - the new taxAddress\n   * @param _taxBPS - the new taxBPS\n   */\n  function setTaxConfig(\n    address _taxAddress,\n    uint256 _taxBPS\n  ) external onlyOwner whenNotPaused {\n    if (!isTaxable()) {\n      revert TokenIsNotTaxable();\n    }\n    if (_taxBPS > MAX_ALLOWED_BPS) {\n      revert InvalidTaxBPS(_taxBPS);\n    }\n    LibCommon.validateAddress(_taxAddress);\n    taxAddress = _taxAddress;\n    taxBPS = _taxBPS;\n    emit TaxConfigSet(_taxAddress, _taxBPS);\n  }\n\n  /**\n   * @notice method which allows the owner to set the deflation config\n   * @param _deflationBPS - the new deflationBPS\n   */\n  function setDeflationConfig(\n    uint256 _deflationBPS\n  ) external onlyOwner whenNotPaused {\n    if (!isDeflationary()) {\n      revert TokenIsNotDeflationary();\n    }\n    if (_deflationBPS > MAX_ALLOWED_BPS) {\n      revert InvalidDeflationBPS(_deflationBPS);\n    }\n    deflationBPS = _deflationBPS;\n    emit DeflationConfigSet(_deflationBPS);\n  }\n\n  /**\n   * @notice method which allows to transfer a predefined amount of tokens to a predefined address\n   * @param to - the address to transfer the tokens to\n   * @param amount - the amount of tokens to transfer\n   * @return true if the transfer was successful\n   * @dev only callable if the token is not paused\n   * @dev only callable if the balance of the receiver is lower than the max amount of tokens per wallet\n   * @dev checks if blacklisting is enabled and if the sender and receiver are not blacklisted\n   * @dev checks if whitelisting is enabled and if the sender and receiver are whitelisted\n   * @dev captures the tax during the transfer if tax is enabvled\n   * @dev burns the deflationary amount during the transfer if deflation is enabled\n   */\n  function transfer(\n    address to,\n    uint256 amount\n  )\n    public\n    virtual\n    override\n    whenNotPaused\n    validateTransfer(msg.sender, to)\n    returns (bool)\n  {\n    uint256 taxAmount = _taxAmount(msg.sender, amount);\n    uint256 deflationAmount = _deflationAmount(amount);\n    uint256 amountToTransfer = amount - taxAmount - deflationAmount;\n\n    if (isMaxAmountOfTokensSet()) {\n      if (balanceOf(to) + amountToTransfer > maxTokenAmountPerAddress) {\n        revert DestBalanceExceedsMaxAllowed(to);\n      }\n    }\n\n    if (taxAmount != 0) {\n      _transfer(msg.sender, taxAddress, taxAmount);\n    }\n    if (deflationAmount != 0) {\n      _burn(msg.sender, deflationAmount);\n    }\n    return super.transfer(to, amountToTransfer);\n  }\n\n  /**\n   * @notice method which allows to transfer a predefined amount of tokens from a predefined address to a predefined address\n   * @param from - the address to transfer the tokens from\n   * @param to - the address to transfer the tokens to\n   * @param amount - the amount of tokens to transfer\n   * @return true if the transfer was successful\n   * @dev only callable if the token is not paused\n   * @dev only callable if the balance of the receiver is lower than the max amount of tokens per wallet\n   * @dev checks if blacklisting is enabled and if the sender and receiver are not blacklisted\n   * @dev checks if whitelisting is enabled and if the sender and receiver are whitelisted\n   * @dev captures the tax during the transfer if tax is enabvled\n   * @dev burns the deflationary amount during the transfer if deflation is enabled\n   */\n  function transferFrom(\n    address from,\n    address to,\n    uint256 amount\n  )\n    public\n    virtual\n    override\n    whenNotPaused\n    validateTransfer(from, to)\n    returns (bool)\n  {\n    uint256 taxAmount = _taxAmount(from, amount);\n    uint256 deflationAmount = _deflationAmount(amount);\n    uint256 amountToTransfer = amount - taxAmount - deflationAmount;\n\n    if (isMaxAmountOfTokensSet()) {\n      if (balanceOf(to) + amountToTransfer > maxTokenAmountPerAddress) {\n        revert DestBalanceExceedsMaxAllowed(to);\n      }\n    }\n\n    if (taxAmount != 0) {\n      _transfer(from, taxAddress, taxAmount);\n    }\n    if (deflationAmount != 0) {\n      _burn(from, deflationAmount);\n    }\n\n    if (isForceTransferAllowed() && owner() == msg.sender) {\n      _transfer(from, to, amountToTransfer);\n      return true;\n    } else {\n      return super.transferFrom(from, to, amountToTransfer);\n    }\n  }\n\n  /**\n   * @notice method which allows to mint a predefined amount of tokens to a predefined address\n   * @param to - the address to mint the tokens to\n   * @param amount - the amount of tokens to mint\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   * @dev only callable if the token supports additional minting\n   * @dev only callable if the balance of the receiver is lower than the max amount of tokens per wallet\n   * @dev checks if blacklisting is enabled and if the receiver is not blacklisted\n   * @dev checks if whitelisting is enabled and if the receiver is whitelisted\n   */\n  function mint(address to, uint256 amount) external onlyOwner whenNotPaused {\n    if (!isMintable()) {\n      revert MintingNotEnabled();\n    }\n    if (isMaxAmountOfTokensSet()) {\n      if (balanceOf(to) + amount > maxTokenAmountPerAddress) {\n        revert DestBalanceExceedsMaxAllowed(to);\n      }\n    }\n    if (isBlacklistEnabled()) {\n      if (_isBlacklisted[to]) {\n        revert RecipientBlacklisted(to);\n      }\n    }\n    if (isWhitelistEnabled()) {\n      if (!whitelist[to]) {\n        revert RecipientNotWhitelisted(to);\n      }\n    }\n\n    super._mint(to, amount);\n  }\n\n  /**\n   * @notice method which allows to burn a predefined amount of tokens\n   * @param amount - the amount of tokens to burn\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   * @dev only callable if the token supports burning\n   */\n  function burn(uint256 amount) public override onlyOwner whenNotPaused {\n    if (!isBurnable()) {\n      revert BurningNotEnabled();\n    }\n    super.burn(amount);\n  }\n\n  /**\n   * @notice method which allows to burn a predefined amount of tokens from a predefined address\n   * @param from - the address to burn the tokens from\n   * @param amount - the amount of tokens to burn\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   * @dev only callable if the token supports burning\n   */\n  function burnFrom(\n    address from,\n    uint256 amount\n  ) public override onlyOwner whenNotPaused {\n    if (!isBurnable()) {\n      revert BurningNotEnabled();\n    }\n    super.burnFrom(from, amount);\n  }\n\n  /**\n   * @notice method which allows to pause the token\n   * @dev only callable by the owner\n   */\n  function pause() external onlyOwner {\n    if (!isPausable()) {\n      revert PausingNotEnabled();\n    }\n    _pause();\n  }\n\n  /**\n   * @notice method which allows to unpause the token\n   * @dev only callable by the owner\n   */\n  function unpause() external onlyOwner {\n    if (!isPausable()) {\n      revert PausingNotEnabled();\n    }\n    _unpause();\n  }\n\n  /**\n   * @notice method which allows to removing the owner of the token\n   * @dev methods which are only callable by the owner will not be callable anymore\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   */\n  function renounceOwnership() public override onlyOwner whenNotPaused {\n    super.renounceOwnership();\n  }\n\n  /**\n   * @notice method which allows to transfer the ownership of the token\n   * @param newOwner - the address of the new owner\n   * @dev only callable by the owner\n   * @dev only callable if the token is not paused\n   */\n  function transferOwnership(\n    address newOwner\n  ) public override onlyOwner whenNotPaused {\n    super.transferOwnership(newOwner);\n  }\n\n  /**\n   * @notice method which allows to update the whitelist of the token\n   * @param updatedAddresses - the new set of addresses\n   * @dev only callable by the owner\n   * @dev only callable if the token supports whitelisting\n   */\n  function updateWhitelist(\n    address[] calldata updatedAddresses\n  ) external onlyOwner whenNotPaused {\n    if (!isWhitelistEnabled()) {\n      revert WhitelistNotEnabled();\n    }\n    _clearWhitelist();\n    _addManyToWhitelist(updatedAddresses);\n    whitelistedAddresses = updatedAddresses;\n    emit UsersWhitelisted(updatedAddresses);\n  }\n\n  /**\n   * @notice method which allows for adding a new set of addresses to the whitelist\n   * @param addresses - the addresses to add to the whitelist\n   * @dev called internally by the contract\n   * @dev only callable if any of the addresses are not already whitelisted\n   */\n  function _addManyToWhitelist(address[] calldata addresses) private {\n    for (uint256 i; i < addresses.length; ) {\n      LibCommon.validateAddress(addresses[i]);\n      if (configProps._isBlacklistEnabled && _isBlacklisted[addresses[i]]) {\n        revert CannotWhitelistBlacklistedAddr(addresses[i]);\n      }\n      whitelist[addresses[i]] = true;\n      unchecked {\n        ++i;\n      }\n    }\n  }\n\n  /**\n   * @notice method which allows for removing a set of addresses from the whitelist\n   */\n  function _clearWhitelist() private {\n    unchecked {\n      address[] memory addresses = whitelistedAddresses;\n      for (uint256 i; i < addresses.length; i++) {\n        delete whitelist[addresses[i]];\n      }\n    }\n  }\n\n  /**\n   * @notice method which returns the amount of tokens to be taxed during a transfer\n   * @param sender - the address of the originating account\n   * @param amount - the total amount of tokens sent in the transfer\n   * @dev if the tax address is the same as the originating account performing the transfer, no tax is applied\n   */\n  function _taxAmount(\n    address sender,\n    uint256 amount\n  ) internal view returns (uint256 taxAmount) {\n    taxAmount = 0;\n    if (taxBPS != 0 && sender != taxAddress) {\n      taxAmount = (amount * taxBPS) / MAX_BPS_AMOUNT;\n    }\n  }\n\n  /**\n   * @notice method which returns the amount of tokens to be burned during a transfer\n   * @param amount - the total amount of tokens sent in the transfer\n   */\n  function _deflationAmount(\n    uint256 amount\n  ) internal view returns (uint256 deflationAmount) {\n    deflationAmount = 0;\n    if (deflationBPS != 0) {\n      deflationAmount = (amount * deflationBPS) / MAX_BPS_AMOUNT;\n    }\n  }\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/ERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.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 * For a generic mechanism see {ERC20PresetMinterPauser}.\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 ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => 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     * All two of these values are immutable: they can only be set once during\n     * 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 override 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 override 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 override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override 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 `amount`.\n     */\n    function transfer(address to, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `amount` 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 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\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 `amount`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, amount);\n        _transfer(from, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, allowance(owner, spender) + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        uint256 currentAllowance = allowance(owner, spender);\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(owner, spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `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     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     */\n    function _transfer(address from, address to, uint256 amount) internal virtual {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n            // decrementing then incrementing.\n            _balances[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        _afterTokenTransfer(from, to, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        unchecked {\n            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n            _balances[account] += amount;\n        }\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n            // Overflow not possible: amount <= accountBalance <= totalSupply.\n            _totalSupply -= amount;\n        }\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` 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    function _approve(address owner, address spender, uint256 amount) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n     *\n     * Does not update the allowance amount in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Might emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance != type(uint256).max) {\n            require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n            unchecked {\n                _approve(owner, spender, currentAllowance - amount);\n            }\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\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 amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` 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 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` 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 amount) external returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\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 v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\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/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../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 * By default, the owner account will be the one that deploys the contract. This\n * can 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    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\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        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\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        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\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/ERC20Burnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n    /**\n     * @dev Destroys `amount` tokens from the caller.\n     *\n     * See {ERC20-_burn}.\n     */\n    function burn(uint256 amount) public virtual {\n        _burn(_msgSender(), amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n     * allowance.\n     *\n     * See {ERC20-_burn} and {ERC20-allowance}.\n     *\n     * Requirements:\n     *\n     * - the caller must have allowance for ``accounts``'s tokens of at least\n     * `amount`.\n     */\n    function burnFrom(address account, uint256 amount) public virtual {\n        _spendAllowance(account, _msgSender(), amount);\n        _burn(account, amount);\n    }\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 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 unpausable.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n    /**\n     * @dev See {ERC20-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {\n        super._beforeTokenTransfer(from, to, amount);\n\n        require(!paused(), \"ERC20Pausable: token transfer while paused\");\n    }\n}\n"
      },
      "@openzeppelin/contracts/security/Pausable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../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    /**\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    bool private _paused;\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\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        require(!paused(), \"Pausable: paused\");\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        require(paused(), \"Pausable: not paused\");\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"
      },
      "contracts/lib/LibCommon.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nlibrary LibCommon {\n  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n  /*                       CUSTOM ERRORS                        */\n  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n  /// @dev The ETH transfer has failed.\n  error ETHTransferFailed();\n\n  /// @dev The address is the zero address.\n  error ZeroAddress();\n\n  /// @notice raised when an ERC20 transfer fails\n  error TransferFailed();\n\n  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n  /*                       ETH OPERATIONS                       */\n  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n  /// @notice Taken from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol)\n  /// @dev Sends `amount` (in wei) ETH to `to`.\n  /// Reverts upon failure.\n  function safeTransferETH(address to, uint256 amount) internal {\n    // solhint-disable-next-line no-inline-assembly\n    assembly {\n      // Transfer the ETH and check if it succeeded or not.\n      if iszero(call(gas(), to, amount, 0, 0, 0, 0)) {\n        // Store the function selector of `ETHTransferFailed()`.\n        // bytes4(keccak256(bytes(\"ETHTransferFailed()\"))) = 0xb12d13eb\n        mstore(0x00, 0xb12d13eb)\n        // Revert with (offset, size).\n        revert(0x1c, 0x04)\n      }\n    }\n  }\n\n  /// @notice Validates that the address is not the zero address using assembly.\n  /// @dev Reverts if the address is the zero address.\n  function validateAddress(address addr) internal pure {\n    // solhint-disable-next-line no-inline-assembly\n    assembly {\n      if iszero(shl(96, addr)) {\n        // Store the function selector of `ZeroAddress()`.\n        // bytes4(keccak256(bytes(\"ZeroAddress()\"))) = 0xd92e233d\n        mstore(0x00, 0xd92e233d)\n        // Revert with (offset, size).\n        revert(0x1c, 0x04)\n      }\n    }\n  }\n\n  /// @notice Helper function to transfer ERC20 tokens without the need for SafeERC20.\n  /// @dev Reverts if the ERC20 transfer fails.\n  /// @param tokenAddress The address of the ERC20 token.\n  /// @param from The address to transfer the tokens from.\n  /// @param to The address to transfer the tokens to.\n  /// @param amount The amount of tokens to transfer.\n  function safeTransferFrom(\n    address tokenAddress,\n    address from,\n    address to,\n    uint256 amount\n  ) internal returns (bool) {\n    // solhint-disable-next-line avoid-low-level-calls\n    (bool success, bytes memory data) = tokenAddress.call(\n      abi.encodeWithSignature(\n        \"transferFrom(address,address,uint256)\",\n        from,\n        to,\n        amount\n      )\n    );\n    if (!success) {\n      if (data.length != 0) {\n        // bubble up error\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n          let returndata_size := mload(data)\n          revert(add(32, data), returndata_size)\n        }\n      } else {\n        revert TransferFailed();\n      }\n    }\n    return true;\n  }\n\n  /// @notice Helper function to transfer ERC20 tokens without the need for SafeERC20.\n  /// @dev Reverts if the ERC20 transfer fails.\n  /// @param tokenAddress The address of the ERC20 token.\n  /// @param to The address to transfer the tokens to.\n  /// @param amount The amount of tokens to transfer.\n  function safeTransfer(\n    address tokenAddress,\n    address to,\n    uint256 amount\n  ) internal returns (bool) {\n    // solhint-disable-next-line avoid-low-level-calls\n    (bool success, bytes memory data) = tokenAddress.call(\n      abi.encodeWithSignature(\"transfer(address,uint256)\", to, amount)\n    );\n    if (!success) {\n      if (data.length != 0) {\n        // bubble up error\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n          let returndata_size := mload(data)\n          revert(add(32, data), returndata_size)\n        }\n      } else {\n        revert TransferFailed();\n      }\n    }\n    return true;\n  }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 1337
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "metadata": {
        "useLiteralContent": true
      }
    }
  }}