creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "Order.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/utils/math/Math.sol\";\r\n\r\ncontract LybraOrder {\r\n    IERC20 public eUSDV1 = IERC20(0x97de57eC338AB5d51557DA3434828C5DbFaDA371);\r\n    IERC20 public eUSDV2 = IERC20(0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC);\r\n    IERC20 public peUSD = IERC20(0xD585aaafA2B58b1CD75092B51ade9Fa4Ce52F247);\r\n    IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);\r\n\r\n    Order[] public orders;\r\n\r\n    enum TokenType {\r\n        eUSDV1,\r\n        eUSDV2,\r\n        peUSD\r\n    }\r\n\r\n    struct Order {\r\n        address maker;\r\n        TokenType tokenType;\r\n        bool buyOrSale;\r\n        uint256 price;\r\n        uint256 remainingAmount;\r\n        bool isActive;\r\n    }\r\n\r\n    event MakeOrder(address indexed user, uint256 id, TokenType indexed tokenType, bool indexed buyOrSale, uint256 price, uint256 remainingAmount, uint256 time);\r\n    event TakeOrder(uint256 id, address indexed taker, TokenType indexed tokenType, bool indexed buyOrSale, uint256 price, uint256 amount, uint256 time);\r\n    event AdjustOrder(uint256 id, address indexed maker, uint256 price, uint256 amount, bool indexed isActive, uint256 time);\r\n\r\n    // --- Functions ---\r\n\r\n    constructor() {\r\n    }\r\n\r\n    function makeOrder(TokenType tokenType, bool buyOrSale, uint256 price, uint256 totalAmount) external {\r\n        _makeOrder(msg.sender, tokenType, buyOrSale, price, totalAmount);\r\n    }\r\n\r\n    function adjustOrder(uint256 orderId, uint256 price, uint256 amount, bool isActive) external {\r\n        Order memory order = orders[orderId];\r\n        require(order.maker == msg.sender, \"NA\");\r\n        order.price = price;\r\n        order.remainingAmount = amount;\r\n        order.isActive = isActive;\r\n        orders[orderId] = order;\r\n        emit AdjustOrder(orderId, msg.sender, price, amount, isActive, block.timestamp);\r\n    }\r\n\r\n    function takeOrder(uint256 orderId, uint256 takeAmount) external {\r\n        _takeOrder(msg.sender, orderId, takeAmount);\r\n    }\r\n\r\n    function batchTake(uint256[] memory ids, uint256[] memory amounts, Order memory order) external {\r\n        for(uint i = 0; i < ids.length; i++) {\r\n            if(order.tokenType != orders[ids[i]].tokenType) continue;\r\n            if(order.buyOrSale == orders[ids[i]].buyOrSale) continue;\r\n            if((order.buyOrSale && orders[ids[i]].price > order.price) || (!order.buyOrSale && orders[ids[i]].price < order.price)) continue;\r\n            if(checkOrder(msg.sender, ids[i], amounts[i]))\r\n                _takeOrder(msg.sender, ids[i], amounts[i]);\r\n        }\r\n        if(order.remainingAmount > 0) {\r\n            _makeOrder(msg.sender, order.tokenType, order.buyOrSale, order.price, order.remainingAmount);\r\n        } \r\n    }\r\n\r\n    function _makeOrder(address _maker, TokenType _tokenType, bool _buyOrSale, uint256 _price, uint256 _totalAmount) internal {\r\n        require(_price >= 5e5 && _price <= 2e6, \"OR\");\r\n        orders.push(Order({maker: _maker,\r\n        tokenType: _tokenType,\r\n        buyOrSale: _buyOrSale,\r\n        price: _price,\r\n        remainingAmount: _totalAmount,\r\n        isActive: true\r\n        }));\r\n        emit MakeOrder(_maker, orders.length - 1, _tokenType, _buyOrSale, _price, _totalAmount, block.timestamp);\r\n    }\r\n\r\n    function _takeOrder(address _taker, uint256 _id, uint256 _takeAmount) internal {\r\n        Order memory order = orders[_id];\r\n        require(order.isActive && order.remainingAmount >= _takeAmount, \"NA\");\r\n        IERC20 token = order.tokenType == TokenType.eUSDV1 ? eUSDV1 : order.tokenType == TokenType.eUSDV2 ? eUSDV2 : peUSD;\r\n        bool returnA;\r\n        bool returnB;\r\n        if(order.buyOrSale) {\r\n            returnA = token.transferFrom(_taker, order.maker, _takeAmount);\r\n            returnB = USDC.transferFrom(order.maker, _taker, _takeAmount * order.price / 1e18);\r\n        } else {\r\n            returnA = USDC.transferFrom(_taker, order.maker, _takeAmount * order.price / 1e18);\r\n            returnB = token.transferFrom(order.maker, _taker, _takeAmount);\r\n        }\r\n        require(returnA && returnB, \"TF\");\r\n        orders[_id].remainingAmount -= _takeAmount;\r\n        if(order.remainingAmount == _takeAmount) {\r\n            orders[_id].isActive = false;\r\n        }\r\n        emit TakeOrder(_id, _taker, order.tokenType, order.buyOrSale, order.price, _takeAmount, block.timestamp);\r\n    }\r\n\r\n    \r\n\r\n    function checkOrder(address taker, uint256 orderId, uint256 takeAmount) public view returns(bool) {\r\n        Order memory order = orders[orderId];\r\n        if(!order.isActive || order.remainingAmount < takeAmount) {\r\n            return false;\r\n        }\r\n\r\n        IERC20 token = order.tokenType == TokenType.eUSDV1 ? eUSDV1 : order.tokenType == TokenType.eUSDV2 ? eUSDV2 : peUSD;\r\n        if(order.buyOrSale) {\r\n            if(token.allowance(taker, address(this)) < takeAmount || token.balanceOf(taker) < takeAmount || USDC.allowance(order.maker, address(this)) < takeAmount * order.price / 1e18 || USDC.balanceOf(order.maker) < takeAmount * order.price / 1e18) {\r\n                return false;\r\n            }\r\n        } else {\r\n            if(USDC.allowance(taker, address(this)) < takeAmount * order.price / 1e18 || USDC.balanceOf(taker) < takeAmount * order.price / 1e18 || token.allowance(order.maker, address(this)) < takeAmount || token.balanceOf(order.maker) < takeAmount) {\r\n                return false;\r\n            }\r\n        }\r\n        return true;\r\n    }\r\n\r\n    function checkOrderValidAmount(uint256 orderId) public view returns(uint256) {\r\n        Order memory order = orders[orderId];\r\n        if(!order.isActive) {\r\n            return 0;\r\n        }\r\n        if(order.buyOrSale) {\r\n            uint a = Math.min(USDC.allowance(order.maker, address(this)) * 1e18 / order.price, USDC.balanceOf(order.maker) * 1e18 / order.price);\r\n            return Math.min(order.remainingAmount, a);\r\n        } else {\r\n            IERC20 token = order.tokenType == TokenType.eUSDV1 ? eUSDV1 : order.tokenType == TokenType.eUSDV2 ? eUSDV2 : peUSD;\r\n            uint a = Math.min(token.allowance(order.maker, address(this)), token.balanceOf(order.maker));\r\n            return Math.min(order.remainingAmount, a);\r\n        }\r\n    }\r\n\r\n    function batchCheckOrderValidAmount(uint256[] memory ids) external view returns(uint256[] memory, uint256[] memory) {\r\n        uint256[] memory numbers = new uint[](ids.length);\r\n        uint256[] memory prices = new uint[](ids.length);\r\n        for(uint i = 0; i < ids.length; i++) {\r\n            numbers[i] = checkOrderValidAmount(ids[i]);\r\n            prices[i] =  orders[ids[i]].price;\r\n        }\r\n        return (numbers, prices);\r\n    }\r\n\r\n    function getOrders(uint256[] memory ids) external view returns(Order[] memory) {\r\n        Order[] memory returnOrders = new Order[](ids.length);\r\n        for(uint i = 0; i < ids.length; i++) {\r\n            returnOrders[i] = orders[ids[i]];\r\n        }\r\n        return returnOrders;\r\n    }\r\n}\r\n"
      },
      "@openzeppelin/contracts/utils/math/Math.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Muldiv operation overflow.\n     */\n    error MathOverflowedMulDiv();\n\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            return a / b;\n        }\n\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                revert MathOverflowedMulDiv();\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\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 value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}