[
  {
    "anonymous": false,
    "inputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "onBehalfOf",
            "type": "address"
          },
          {
            "internalType": "bytes32",
            "name": "coverKey",
            "type": "bytes32"
          },
          {
            "internalType": "bytes32",
            "name": "productKey",
            "type": "bytes32"
          },
          {
            "internalType": "uint256",
            "name": "coverDuration",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountToCover",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "referralCode",
            "type": "bytes32"
          }
        ],
        "indexed": false,
        "internalType": "struct IPolicy.PurchaseCoverArgs",
        "name": "args",
        "type": "tuple"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "cxToken",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "fee",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "platformFee",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "expiresOn",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "policyId",
        "type": "uint256"
      }
    ],
    "name": "CoverPurchased",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      }
    ],
    "name": "getAvailableLiquidity",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "productKey",
        "type": "bytes32"
      }
    ],
    "name": "getCommitment",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "productKey",
        "type": "bytes32"
      },
      {
        "internalType": "uint256",
        "name": "coverDuration",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "amountToCover",
        "type": "uint256"
      }
    ],
    "name": "getCoverFeeInfo",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "fee",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "utilizationRatio",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "totalAvailableLiquidity",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "floor",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "ceiling",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "rate",
            "type": "uint256"
          }
        ],
        "internalType": "struct IPolicy.CoverFeeInfoType",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "productKey",
        "type": "bytes32"
      }
    ],
    "name": "getCoverPoolSummary",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "totalAmountInPool",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "totalCommitment",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "reassuranceAmount",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "reassurancePoolWeight",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "productCount",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "leverage",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "productCapitalEfficiency",
            "type": "uint256"
          }
        ],
        "internalType": "struct IPolicy.CoverPoolSummaryType",
        "name": "summary",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "productKey",
        "type": "bytes32"
      },
      {
        "internalType": "uint256",
        "name": "coverDuration",
        "type": "uint256"
      }
    ],
    "name": "getCxToken",
    "outputs": [
      {
        "internalType": "address",
        "name": "cxToken",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "expiryDate",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "coverKey",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "productKey",
        "type": "bytes32"
      },
      {
        "internalType": "uint256",
        "name": "expiryDate",
        "type": "uint256"
      }
    ],
    "name": "getCxTokenByExpiryDate",
    "outputs": [
      {
        "internalType": "address",
        "name": "cxToken",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "today",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "coverDuration",
        "type": "uint256"
      }
    ],
    "name": "getExpiryDate",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getName",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "onBehalfOf",
            "type": "address"
          },
          {
            "internalType": "bytes32",
            "name": "coverKey",
            "type": "bytes32"
          },
          {
            "internalType": "bytes32",
            "name": "productKey",
            "type": "bytes32"
          },
          {
            "internalType": "uint256",
            "name": "coverDuration",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountToCover",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "referralCode",
            "type": "bytes32"
          }
        ],
        "internalType": "struct IPolicy.PurchaseCoverArgs",
        "name": "args",
        "type": "tuple"
      }
    ],
    "name": "purchaseCover",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "version",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  }
]