# 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. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/operator/pricing-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
