MarketStorage.sol
MarketStorage
struct MarketStorage {
contract IChromaticMarketFactory factory;
contract IOracleProvider oracleProvider;
contract IERC20Metadata settlementToken;
contract ICLBToken clbToken;
contract IChromaticVault vault;
struct LiquidityPool liquidityPool;
uint16 protocolFeeRate;
enum PositionMode positionMode;
enum LiquidityMode liquidityMode;
enum DisplayMode displayMode;
}
LpReceiptStorage
struct LpReceiptStorage {
uint256 lpReceiptId;
mapping(uint256 => struct LpReceipt) lpReceipts;
}
PositionStorage
struct PositionStorage {
uint256 positionId;
mapping(uint256 => struct Position) positions;
}
MarketStorageLib
MARKET_STORAGE_POSITION
bytes32 MARKET_STORAGE_POSITION
marketStorage
function marketStorage() internal pure returns (struct MarketStorage ms)
LpReceiptStorageLib
LP_RECEIPT_STORAGE_POSITION
bytes32 LP_RECEIPT_STORAGE_POSITION
lpReceiptStorage
function lpReceiptStorage() internal pure returns (struct LpReceiptStorage ls)
nextId
function nextId(struct LpReceiptStorage self) internal returns (uint256 id)
setReceipt
function setReceipt(struct LpReceiptStorage self, struct LpReceipt receipt) internal
getReceipt
function getReceipt(struct LpReceiptStorage self, uint256 receiptId) internal view returns (struct LpReceipt receipt)
deleteReceipt
function deleteReceipt(struct LpReceiptStorage self, uint256 receiptId) internal
PositionStorageLib
POSITION_STORAGE_POSITION
bytes32 POSITION_STORAGE_POSITION
positionStorage
function positionStorage() internal pure returns (struct PositionStorage ls)
nextId
function nextId(struct PositionStorage self) internal returns (uint256 id)
setPosition
function setPosition(struct PositionStorage self, struct Position position) internal
getPosition
function getPosition(struct PositionStorage self, uint256 positionId) internal view returns (struct Position position)
getStoragePosition
function getStoragePosition(struct PositionStorage self, uint256 positionId) internal view returns (struct Position position)
deletePosition
function deletePosition(struct PositionStorage self, uint256 positionId) internal