> For the complete documentation index, see [llms.txt](https://docs.covestlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/operator/pricing-manager.md).

# Pricing Manager

### getPricingMerkleRoot

```solidity
function getPricingMerkleRoot() external view returns (bytes32)
```

Get the pricing merkle root.

| Name | Type    | Description                                                    |
| ---- | ------- | -------------------------------------------------------------- |
| \[0] | bytes32 | The merkle root of the pricing data of the insurance products. |

### setPricingMerkleRoot

```solidity
function setPricingMerkleRoot(bytes32 _merkleRoot_) external
```

Set the pricing merkle root.

Requirements:

* `msg.sender` - The caller must have the role of `SUPER_MANAGER_LEVEL`.

Events:

* `PricingMerkleRootChanged` - Emitted when the pricing merkle root is changed successfully.

| Name         | Type    | Description                                                    |
| ------------ | ------- | -------------------------------------------------------------- |
| *merkleRoot* | bytes32 | The merkle root of the pricing data of the insurance products. |

#### PricingMerkleRootChanged

```solidity
event PricingMerkleRootChanged(bytes32 merkleRoot)
```

This event is emitted when the pricing merkle root is changed.

| Name       | Type    | Description      |
| ---------- | ------- | ---------------- |
| merkleRoot | bytes32 | The merkle root. |

### verifyMerkleProof

```solidity
function verifyMerkleProof(bytes32[] _proof_, string _pricingReference_, uint256 _premiumRate_) external view returns (bool)
```

Verify the merkle proof of the pricing data.

| Name               | Type       | Description                             |
| ------------------ | ---------- | --------------------------------------- |
| *proof*            | bytes32\[] | The merkle proof of the pricing data.   |
| *pricingReference* | string     | The reference of the insurance product. |
| *premiumRate*      | uint256    | The pricing data.                       |

| Name | Type | Description                                         |
| ---- | ---- | --------------------------------------------------- |
| \[0] | bool | True if the merkle proof is valid, false otherwise. |
