{
    "Function": "create",
    "File": "tokenomics/contracts/Depository.sol",
    "Parent Contracts": [
        "tokenomics/contracts/interfaces/IErrorsTokenomics.sol"
    ],
    "High-Level Calls": [
        "ITokenomics",
        "ITreasury",
        "ITokenomics"
    ],
    "Internal Calls": [
        "revert OwnerOnly(address,address)",
        "revert Overflow(uint256,uint256)",
        "revert LowerThan(uint256,uint256)",
        "revert Overflow(uint256,uint256)",
        "revert ZeroValue()",
        "revert Overflow(uint256,uint256)",
        "revert UnauthorizedToken(address)",
        "revert ZeroValue()",
        "revert LowerThan(uint256,uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function create(address token, uint256 priceLP, uint256 supply, uint256 vesting) external returns (uint256 productId) {\n        // Check for the contract ownership\n        if (msg.sender != owner) {\n            revert OwnerOnly(msg.sender, owner);\n        }\n\n        // Check for the pool liquidity as the LP price being greater than zero\n        if (priceLP == 0) {\n            revert ZeroValue();\n        }\n\n        // Check the priceLP limit value\n        if (priceLP > type(uint160).max) {\n            revert Overflow(priceLP, type(uint160).max);\n        }\n\n        // Check that the supply is greater than zero\n        if (supply == 0) {\n            revert ZeroValue();\n        }\n\n        // Check the supply limit value\n        if (supply > type(uint96).max) {\n            revert Overflow(supply, type(uint96).max);\n        }\n\n        // Check the vesting minimum limit value\n        if (vesting < MIN_VESTING) {\n            revert LowerThan(vesting, MIN_VESTING);\n        }\n\n        // Check for the maturity time overflow for the current timestamp\n        uint256 maturity = block.timestamp + vesting;\n        if (maturity > type(uint32).max) {\n            revert Overflow(maturity, type(uint32).max);\n        }\n\n        // Check if the LP token is enabled\n        if (!ITreasury(treasury).isEnabled(token)) {\n            revert UnauthorizedToken(token);\n        }\n\n        // Check if the bond amount is beyond the limits\n        if (!ITokenomics(tokenomics).reserveAmountForBondProgram(supply)) {\n            revert LowerThan(ITokenomics(tokenomics).effectiveBond(), supply);\n        }\n\n        // Push newly created bond product into the list of products\n        productId = productCounter;\n        mapBondProducts[productId] = Product(uint160(priceLP), uint32(vesting), token, uint96(supply));\n        // Even if we create a bond product every second, 2^32 - 1 is enough for the next 136 years\n        productCounter = uint32(productId + 1);\n        emit CreateProduct(token, productId, supply, priceLP, vesting);\n    }"
}