creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/DefiV4Token.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.17;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { LibCommon } from \"./lib/LibCommon.sol\";\nimport { ReflectiveERC20 } from \"./ReflectiveERC20.sol\";\n\n/// @title A Defi Token implementation with extended functionalities\n/// @notice Implements ERC20 standards with additional features like tax and deflation\ncontract DefiV4Token is ReflectiveERC20, Ownable {\n  // Constants\n  uint256 private constant MAX_BPS_AMOUNT = 10_000;\n  uint256 private constant MAX_ALLOWED_BPS = 2_000;\n  string public constant VERSION = \"defi_v_4\";\n  string public constant CONTRACT_NAME = \"DefiV4Token\";\n  bytes32 public constant CONTRACT_HASH = 0xa6627f4bef8a2d2f8d1ec2ba76aa3e4991679c8ec5624ebbb3034af4eae91573;\n\n  // State Variables\n  string public initialDocumentUri;\n  string public documentUri;\n  uint256 public immutable initialSupply;\n  uint256 public immutable initialMaxTokenAmountPerAddress;\n  uint256 public maxTokenAmountPerAddress;\n  uint256 public maxTotalSupply;\n\n  /// @notice Configuration properties for the ERC20 token\n  struct ERC20ConfigProps {\n    bool _isMintable;\n    bool _isBurnable;\n    bool _isDocumentAllowed;\n    bool _isMaxAmountOfTokensSet;\n    bool _isMaxSupplySet;\n    bool _isTaxable;\n    bool _isDeflationary;\n    bool _isReflective;\n  }\n  ERC20ConfigProps private configProps;\n\n  address public immutable initialTokenOwner;\n  uint8 private immutable _decimals;\n  address public taxAddress;\n  uint256 public taxBPS;\n  uint256 public deflationBPS;\n\n  // Events\n  event DocumentUriSet(string newDocUri);\n  event MaxTokenAmountPerSet(uint256 newMaxTokenAmount);\n  event TaxConfigSet(address indexed _taxAddress, uint256 indexed _taxBPS);\n  event DeflationConfigSet(uint256 indexed _deflationBPS);\n  event ReflectionConfigSet(uint256 indexed _feeBPS);\n\n  // Custom Errors\n  error InvalidMaxTokenAmount(uint256 maxTokenAmount);\n  error InvalidDecimals(uint8 decimals);\n  error MaxTokenAmountPerAddrLtPrevious();\n  error DestBalanceExceedsMaxAllowed(address addr);\n  error DocumentUriNotAllowed();\n  error MaxTokenAmountNotAllowed();\n  error TokenIsNotTaxable();\n  error TokenIsNotDeflationary();\n  error InvalidTotalBPS(uint256 bps);\n  error InvalidReflectiveConfig();\n  error InvalidMaxSupplyConfig();\n  error TotalSupplyExceedsMaxAllowedAmount();\n\n  /// @notice Constructor to initialize the DeFi token\n  /// @param name_ Name of the token\n  /// @param symbol_ Symbol of the token\n  /// @param initialSupplyToSet Initial supply of tokens\n  /// @param decimalsToSet Number of decimals for the token\n  /// @param tokenOwner Address of the initial token owner\n  /// @param customConfigProps Configuration properties for the token\n  /// @param newDocumentUri URI for the document associated with the token\n  /// @param _taxAddress Address where tax will be sent\n  /// @param bpsParams array of BPS values in this order:\n  ///           taxBPS = bpsParams[0],\n  ///           deflationBPS = bpsParams[1],\n  ///           rewardFeeBPS = bpsParams[2],\n  /// @param amountParams array of amounts for amount specific config:\n  ///           maxTokenAmount = amountParams[0], Maximum token amount per address\n  ///           maxSupplyAmount = amountParams[1], Maximum token token supply amount\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    string memory newDocumentUri,\n    address _taxAddress,\n    uint256[3] memory bpsParams,\n    uint256[2] memory amountParams\n  )\n    ReflectiveERC20(\n      name_,\n      symbol_,\n      tokenOwner,\n      initialSupplyToSet,\n      decimalsToSet,\n      initialSupplyToSet != 0 ? bpsParams[2] : 0,\n      customConfigProps._isReflective\n    )\n  {\n    // reflection feature can't be used in combination with burning/minting/deflation\n    // or reflection config is invalid if no reflection BPS amount is provided\n    if (\n      (customConfigProps._isReflective &&\n        (customConfigProps._isBurnable ||\n          customConfigProps._isMintable ||\n          customConfigProps._isDeflationary)) ||\n      (!customConfigProps._isReflective && bpsParams[2] != 0)\n    ) {\n      revert InvalidReflectiveConfig();\n    }\n\n    if (customConfigProps._isMaxAmountOfTokensSet) {\n      if (amountParams[0] == 0) {\n        revert InvalidMaxTokenAmount(amountParams[0]);\n      }\n    }\n    if (decimalsToSet > 18) {\n      revert InvalidDecimals(decimalsToSet);\n    }\n\n    if (\n      customConfigProps._isMaxSupplySet &&\n      (!customConfigProps._isMintable || (totalSupply() > amountParams[1]))\n    ) {\n      revert InvalidMaxSupplyConfig();\n    }\n\n    bpsInitChecks(customConfigProps, bpsParams, _taxAddress);\n\n    LibCommon.validateAddress(tokenOwner);\n\n    taxAddress = _taxAddress;\n\n    taxBPS = bpsParams[0];\n    deflationBPS = bpsParams[1];\n    initialSupply = initialSupplyToSet;\n    initialMaxTokenAmountPerAddress = amountParams[0];\n    initialDocumentUri = newDocumentUri;\n    initialTokenOwner = tokenOwner;\n    _decimals = decimalsToSet;\n    configProps = customConfigProps;\n    documentUri = newDocumentUri;\n    maxTokenAmountPerAddress = amountParams[0];\n    maxTotalSupply = amountParams[1];\n\n    if (tokenOwner != msg.sender) {\n      transferOwnership(tokenOwner);\n    }\n  }\n\n  function bpsInitChecks(\n    ERC20ConfigProps memory customConfigProps,\n    uint256[3] memory bpsParams,\n    address _taxAddress\n  ) private pure {\n    uint256 totalBPS = 0;\n    if (customConfigProps._isTaxable) {\n      LibCommon.validateAddress(_taxAddress);\n\n      totalBPS += bpsParams[0];\n    }\n    if (customConfigProps._isDeflationary) {\n      totalBPS += bpsParams[1];\n    }\n    if (customConfigProps._isReflective) {\n      totalBPS += bpsParams[2];\n    }\n    if (totalBPS > MAX_ALLOWED_BPS) {\n      revert InvalidTotalBPS(totalBPS);\n    }\n  }\n\n  // Public and External Functions\n\n  /// @notice Checks if the token is mintable\n  /// @return True if the token can be minted\n  function isMintable() public view returns (bool) {\n    return configProps._isMintable;\n  }\n\n  /// @notice Checks if the token is burnable\n  /// @return True if the token can be burned\n  function isBurnable() public view returns (bool) {\n    return configProps._isBurnable;\n  }\n\n  /// @notice Checks if the maximum amount of tokens per address is set\n  /// @return True if there is a maximum limit for token amount per address\n  function isMaxAmountOfTokensSet() public view returns (bool) {\n    return configProps._isMaxAmountOfTokensSet;\n  }\n\n  /// @notice Checks if the maximum amount of token supply is set\n  /// @return True if there is a maximum limit for token supply\n  function isMaxSupplySet() public view returns (bool) {\n    return configProps._isMaxSupplySet;\n  }\n\n  /// @notice Checks if setting a document URI is allowed\n  /// @return True if setting a document URI is allowed\n  function isDocumentUriAllowed() public view returns (bool) {\n    return configProps._isDocumentAllowed;\n  }\n\n  /// @notice Returns the number of decimals used for the token\n  /// @return The number of decimals\n  function decimals() public view virtual override returns (uint8) {\n    return _decimals;\n  }\n\n  /// @notice Checks if the token is taxable\n  /// @return True if the token has tax applied on transfers\n  function isTaxable() public view returns (bool) {\n    return configProps._isTaxable;\n  }\n\n  /// @notice Checks if the token is deflationary\n  /// @return True if the token has deflation applied on transfers\n  function isDeflationary() public view returns (bool) {\n    return configProps._isDeflationary;\n  }\n\n  /// @notice Checks if the token is reflective\n  /// @return True if the token has reflection (ie. holder rewards) applied on transfers\n  function isReflective() public view returns (bool) {\n    return configProps._isReflective;\n  }\n\n  /// @notice Sets a new document URI\n  /// @dev Can only be called by the contract owner\n  /// @param newDocumentUri The new URI to be set\n  function setDocumentUri(string memory newDocumentUri) external onlyOwner {\n    if (!isDocumentUriAllowed()) {\n      revert DocumentUriNotAllowed();\n    }\n    documentUri = newDocumentUri;\n    emit DocumentUriSet(newDocumentUri);\n  }\n\n  /// @notice Sets a new maximum token amount per address\n  /// @dev Can only be called by the contract owner\n  /// @param newMaxTokenAmount The new maximum token amount per address\n  function setMaxTokenAmountPerAddress(\n    uint256 newMaxTokenAmount\n  ) external onlyOwner {\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  /// @notice Sets a new reflection fee\n  /// @dev Can only be called by the contract owner\n  /// @param _feeBPS The reflection fee in basis points\n  function setReflectionConfig(uint256 _feeBPS) external onlyOwner {\n    if (!isReflective()) {\n      revert TokenIsNotReflective();\n    }\n    super._setReflectionFee(_feeBPS);\n\n    emit ReflectionConfigSet(_feeBPS);\n  }\n\n  /// @notice Sets a new tax configuration\n  /// @dev Can only be called by the contract owner\n  /// @param _taxAddress The address where tax will be sent\n  /// @param _taxBPS The tax rate in basis points\n  function setTaxConfig(\n    address _taxAddress,\n    uint256 _taxBPS\n  ) external onlyOwner {\n    if (!isTaxable()) {\n      revert TokenIsNotTaxable();\n    }\n\n    uint256 totalBPS = deflationBPS + tFeeBPS + _taxBPS;\n    if (totalBPS > MAX_ALLOWED_BPS) {\n      revert InvalidTotalBPS(totalBPS);\n    }\n    LibCommon.validateAddress(_taxAddress);\n    taxAddress = _taxAddress;\n    taxBPS = _taxBPS;\n    emit TaxConfigSet(_taxAddress, _taxBPS);\n  }\n\n  /// @notice Sets a new deflation configuration\n  /// @dev Can only be called by the contract owner\n  /// @param _deflationBPS The deflation rate in basis points\n  function setDeflationConfig(uint256 _deflationBPS) external onlyOwner {\n    if (!isDeflationary()) {\n      revert TokenIsNotDeflationary();\n    }\n    uint256 totalBPS = deflationBPS + tFeeBPS + _deflationBPS;\n    if (totalBPS > MAX_ALLOWED_BPS) {\n      revert InvalidTotalBPS(totalBPS);\n    }\n    deflationBPS = _deflationBPS;\n    emit DeflationConfigSet(_deflationBPS);\n  }\n\n  /// @notice Transfers tokens to a specified address\n  /// @dev Overrides the ERC20 transfer function with added tax and deflation logic\n  /// @param to The address to transfer tokens to\n  /// @param amount The amount of tokens to be transferred\n  /// @return True if the transfer was successful\n  function transfer(\n    address to,\n    uint256 amount\n  ) public virtual override returns (bool) {\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      _transferNonReflectedTax(msg.sender, taxAddress, taxAmount);\n    }\n    if (deflationAmount != 0) {\n      _burn(msg.sender, deflationAmount);\n    }\n    return super.transfer(to, amountToTransfer);\n  }\n\n  /// @notice Transfers tokens from one address to another\n  /// @dev Overrides the ERC20 transferFrom function with added tax and deflation logic\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 amount The amount of tokens to be transferred\n  /// @return True if the transfer was successful\n  function transferFrom(\n    address from,\n    address to,\n    uint256 amount\n  ) public virtual override returns (bool) {\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      _transferNonReflectedTax(from, taxAddress, taxAmount);\n    }\n    if (deflationAmount != 0) {\n      _burn(from, deflationAmount);\n    }\n\n    return super.transferFrom(from, to, amountToTransfer);\n  }\n\n  /// @notice Mints new tokens to a specified address\n  /// @dev Can only be called by the contract owner and if minting is enabled\n  /// @param to The address to mint tokens to\n  /// @param amount The amount of tokens to mint\n  function mint(address to, uint256 amount) external onlyOwner {\n    if (!isMintable()) {\n      revert MintingNotEnabled();\n    }\n    if (isMaxAmountOfTokensSet()) {\n      if (balanceOf(to) + amount > maxTokenAmountPerAddress) {\n        revert DestBalanceExceedsMaxAllowed(to);\n      }\n    }\n    if (isMaxSupplySet()) {\n      if (totalSupply() + amount > maxTotalSupply) {\n        revert TotalSupplyExceedsMaxAllowedAmount();\n      }\n    }\n\n    super._mint(to, amount);\n  }\n\n  /// @notice Burns a specific amount of tokens\n  /// @dev Can only be called by the contract owner and if burning is enabled\n  /// @param amount The amount of tokens to be burned\n  function burn(uint256 amount) external onlyOwner {\n    if (!isBurnable()) {\n      revert BurningNotEnabled();\n    }\n    _burn(msg.sender, amount);\n  }\n\n  /// @notice Renounces ownership of the contract\n  /// @dev Leaves the contract without an owner, disabling any functions that require the owner's authorization\n  function renounceOwnership() public override onlyOwner {\n    super.renounceOwnership();\n  }\n\n  /// @notice Transfers ownership of the contract to a new account\n  /// @dev Can only be called by the current owner\n  /// @param newOwner The address of the new owner\n  function transferOwnership(address newOwner) public override onlyOwner {\n    super.transferOwnership(newOwner);\n  }\n\n  // Internal Functions\n\n  /// @notice Calculates the tax amount for a transfer\n  /// @param sender The address initiating the transfer\n  /// @param amount The amount of tokens being transferred\n  /// @return taxAmount The calculated tax amount\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  /// @notice Calculates the deflation amount for a transfer\n  /// @param amount The amount of tokens being transferred\n  /// @return deflationAmount The calculated deflation amount\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/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/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"
      },
      "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"
      },
      "contracts/ReflectiveERC20.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity 0.8.17;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { LibCommon } from \"./lib/LibCommon.sol\";\n\n/// @title A ERC20 implementation with extended reflection token functionalities\n/// @notice Implements ERC20 standards with additional token holder reward feature\nabstract contract ReflectiveERC20 is ERC20 {\n  // Constants\n  uint256 private constant BPS_DIVISOR = 10_000;\n\n  mapping(address => uint256) private _rOwned;\n  mapping(address => uint256) private _tOwned;\n\n  uint256 private constant UINT_256_MAX = type(uint256).max;\n  uint256 private _rTotal;\n  uint256 private _tFeeTotal;\n\n  uint256 public tFeeBPS;\n  bool private immutable isReflective;\n\n  // custom errors\n  error TokenIsNotReflective();\n  error TotalReflectionTooSmall();\n  error ZeroTransferError();\n  error MintingNotEnabled();\n  error BurningNotEnabled();\n  error ERC20InsufficientBalance(\n    address recipient,\n    uint256 fromBalance,\n    uint256 balance\n  );\n\n  /// @notice Gets total supply of the erc20 token\n  /// @return Token total supply\n  function _tTotal() public view virtual returns (uint256) {\n    return totalSupply();\n  }\n\n  /// @notice Constructor to initialize the ReflectionErc20 token\n  /// @param name_ Name of the token\n  /// @param symbol_ Symbol of the token\n  /// @param tokenOwner Address of the token owner\n  /// @param totalSupply_ Initial total supply\n  /// @param decimalsToSet Token decimal number\n  /// @param decimalsToSet Token reward (reflection fee BPS value\n  constructor(\n    string memory name_,\n    string memory symbol_,\n    address tokenOwner,\n    uint256 totalSupply_,\n    uint8 decimalsToSet,\n    uint256 tFeeBPS_,\n    bool isReflective_\n  ) ERC20(name_, symbol_) {\n    if (totalSupply_ != 0) {\n      super._mint(tokenOwner, totalSupply_ * 10 ** decimalsToSet);\n      _rTotal = (UINT_256_MAX - (UINT_256_MAX % totalSupply_));\n    }\n\n    _rOwned[tokenOwner] = _rTotal;\n    tFeeBPS = tFeeBPS_;\n    isReflective = isReflective_;\n  }\n\n  // public standard ERC20 functions\n\n  /// @notice Gets balance the erc20 token for specific address\n  /// @param account Account address\n  /// @return Token balance\n  function balanceOf(address account) public view override returns (uint256) {\n    if (isReflective) {\n      return tokenFromReflection(_rOwned[account]);\n    } else {\n      return super.balanceOf(account);\n    }\n  }\n\n  /// @notice Transfers allowed tokens between accounts\n  /// @param from From account\n  /// @param to To account\n  /// @param value Transferred value\n  /// @return Success\n  function transferFrom(\n    address from,\n    address to,\n    uint256 value\n  ) public virtual override returns (bool) {\n    address spender = super._msgSender();\n    _spendAllowance(from, spender, value);\n    _transfer(from, to, value);\n    return true;\n  }\n\n  /// @notice Transfers tokens from owner to an account\n  /// @param to To account\n  /// @param value Transferred value\n  /// @return Success\n  function transfer(\n    address to,\n    uint256 value\n  ) public virtual override returns (bool) {\n    address owner = super._msgSender();\n    _transfer(owner, to, value);\n    return true;\n  }\n\n  // override internal OZ standard ERC20 functions related to transfer\n\n  /// @notice Transfers tokens from owner to an account\n  /// @param to To account\n  /// @param amount Transferred amount\n  function _transfer(\n    address from,\n    address to,\n    uint256 amount\n  ) internal override {\n    if (isReflective) {\n      LibCommon.validateAddress(from);\n      LibCommon.validateAddress(to);\n      if (amount == 0) {\n        revert ZeroTransferError();\n      }\n\n      _transferReflected(from, to, amount);\n    } else {\n      super._transfer(from, to, amount);\n    }\n  }\n\n  // override incompatible internal OZ standard ERC20 functions to disable them in case\n  // reflection mechanism is used, ie. tFeeBPS is non zero\n\n  /// @notice Creates specified amount of tokens, it either uses standard OZ ERC function\n  ///         or in case of reflection logic, it is prohibited\n  /// @param account Account new tokens will be transferred to\n  /// @param value Created tokens value\n  function _mint(address account, uint256 value) internal override {\n    if (isReflective) {\n      revert MintingNotEnabled();\n    } else {\n      super._mint(account, value);\n    }\n  }\n\n  /// @notice Destroys specified amount of tokens, it either uses standard OZ ERC function\n  ///         or in case of reflection logic, it is prohibited\n  /// @param account Account in which tokens will be destroyed\n  /// @param value Destroyed tokens value\n  function _burn(address account, uint256 value) internal override {\n    if (isReflective) {\n      revert BurningNotEnabled();\n    } else {\n      super._burn(account, value);\n    }\n  }\n\n  // public reflection custom functions\n\n  /// @notice Sets a new reflection fee\n  /// @dev Should only be called by the contract owner\n  /// @param _tFeeBPS The reflection fee in basis points\n  function _setReflectionFee(uint256 _tFeeBPS) internal {\n    if (!isReflective) {\n      revert TokenIsNotReflective();\n    }\n\n    tFeeBPS = _tFeeBPS;\n  }\n\n  /// @notice Calculates number of tokens from reflection amount\n  /// @param rAmount Reflection token amount\n  function tokenFromReflection(uint256 rAmount) public view returns (uint256) {\n    if (rAmount > _rTotal) {\n      revert TotalReflectionTooSmall();\n    }\n\n    uint256 currentRate = _getRate();\n    return rAmount / currentRate;\n  }\n\n  // private reflection custom functions\n\n  /// @notice Transfers reflected amount of tokens\n  /// @param sender Account to transfer tokens from\n  /// @param recipient Account to transfer tokens to\n  /// @param tAmount Total token amount\n  function _transferReflected(\n    address sender,\n    address recipient,\n    uint256 tAmount\n  ) private {\n    uint256 tFee = calculateFee(tAmount);\n    uint256 tTransferAmount = tAmount - tFee;\n    (uint256 rAmount, uint256 rFee, uint256 rTransferAmount) = _getRValues(\n      tAmount,\n      tFee,\n      tTransferAmount\n    );\n\n    if (tAmount != 0) {\n      _rUpdate(sender, recipient, rAmount, rTransferAmount);\n\n      _reflectFee(rFee, tFee);\n      emit Transfer(sender, recipient, tAmount);\n    }\n  }\n\n  /// @notice Deducts reflection fee from reflection supply to 'distribute' token holder rewards\n  /// @param rFee Reflection fee\n  /// @param tFee Token fee\n  function _reflectFee(uint256 rFee, uint256 tFee) private {\n    _rTotal = _rTotal - rFee;\n    _tFeeTotal = _tFeeTotal + tFee;\n  }\n\n  /// @notice Calculates the reflection fee from token amount\n  /// @param _amount Amount of tokens to calculate fee from\n  function calculateFee(uint256 _amount) private view returns (uint256) {\n    return (_amount * tFeeBPS) / BPS_DIVISOR;\n  }\n\n  /// @notice Transfers Tax related tokens and do not apply reflection fees\n  /// @param from Account to transfer tokens from\n  /// @param to Account to transfer tokens to\n  /// @param tAmount Total token amount\n  function _transferNonReflectedTax(\n    address from,\n    address to,\n    uint256 tAmount\n  ) internal {\n    if (isReflective) {\n      if (tAmount != 0) {\n        uint256 currentRate = _getRate();\n        uint256 rAmount = tAmount * currentRate;\n\n        _rUpdate(from, to, rAmount, rAmount);\n        emit Transfer(from, to, tAmount);\n      }\n    } else {\n      super._transfer(from, to, tAmount);\n    }\n  }\n\n  /// @notice Get reflective values from token values\n  /// @param tAmount Token amount\n  /// @param tFee Token fee\n  /// @param tTransferAmount Transfer amount\n  function _getRValues(\n    uint256 tAmount,\n    uint256 tFee,\n    uint256 tTransferAmount\n  ) private view returns (uint256, uint256, uint256) {\n    uint256 currentRate = _getRate();\n    uint256 rAmount = tAmount * currentRate;\n    uint256 rFee = tFee * currentRate;\n    uint256 rTransferAmount = tTransferAmount * currentRate;\n\n    return (rAmount, rFee, rTransferAmount);\n  }\n\n  /// @notice Get ratio rate between reflective and token supply\n  /// @return Reflective rate\n  function _getRate() private view returns (uint256) {\n    (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n    return rSupply / tSupply;\n  }\n\n  /// @notice Get reflective and token supplies\n  /// @return Reflective and token supplies\n  function _getCurrentSupply() private view returns (uint256, uint256) {\n    return (_rTotal, _tTotal());\n  }\n\n  /// @notice Update reflective balances to reflect amount transfer,\n  ///         with or without a fee applied. If a fee is applied,\n  ///         the amount deducted from the sender will differ\n  ///         from amount added to the recipient\n  /// @param sender Sender address\n  /// @param recipient Recipient address\n  /// @param rSubAmount Amount to be deducted from sender\n  /// @param rTransferAmount Amount to be added to recipient\n  function _rUpdate(\n    address sender,\n    address recipient,\n    uint256 rSubAmount,\n    uint256 rTransferAmount\n  ) private {\n    uint256 fromBalance = _rOwned[sender];\n    if (fromBalance < rSubAmount) {\n      revert ERC20InsufficientBalance(recipient, fromBalance, rSubAmount);\n    }\n    _rOwned[sender] = _rOwned[sender] - rSubAmount;\n    _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;\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"
      }
    },
    "settings": {
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}