```\n    function storePrice(address asset_) public override permissioned {\n        Asset storage asset = _assetData[asset_];\n\n        // Check if asset is approved\n        if (!asset.approved) revert PRICE_AssetNotApproved(asset_);\n\n        // Get the current price for the asset\n   (uint256 price, uint48 currentTime) = _getCurrentPrice(asset_);\n\n        // Store the data in the obs index\n        uint256 oldestPrice = asset.obs[asset.nextObsIndex];\n        asset.obs[asset.nextObsIndex] = price;\n\n        // Update the last observation time and increment the next index\n        asset.lastObservationTime = currentTime;\n        asset.nextObsIndex = (asset.nextObsIndex + 1) % asset.numObservations;\n\n        // Update the cumulative observation, if storing the moving average\n        if (asset.storeMovingAverage)\n       asset.cumulativeObs = asset.cumulativeObs + price - oldestPrice;\n\n        // Emit event\n        emit PriceStored(asset_, price, currentTime);\n    }\n```\n