Covest Labs Docs
  • Covest InSaaS Protocol
    • InSaaS Architecture
      • Basic Signed Quote Model
    • InSaaS Components
      • Governance
      • Risk Assessment
      • Claim Assessment
      • Validator Selection
      • Risk Carrier
    • InSaaS Smart Contracts
      • Policy States
      • Claim Case States
      • Operator
        • Pool Manager
        • Pricing Manager
        • Policy Manager
        • Claim Manager
      • Policyholder
        • Policy Manager
          • issuePolicy
          • redeemPolicy
          • Others
        • Claim Manager
          • submitClaim
          • Others
      • Claim Assessor
        • Claim Manager
      • Governance Board
        • Claim Manager
      • Contract Integration
  • Covest Warranty
    • Key Components
    • System Overview
    • Core Features
      • Contract Management
      • Warranty Certificate
      • Claim Management
      • Customer Portal
    • API Documentations
    • API Diagrams
      • Create Order Flow
      • Redeem Order Flow
Powered by GitBook
On this page
  • getPricingMerkleRoot
  • setPricingMerkleRoot
  • verifyMerkleProof
  1. Covest InSaaS Protocol
  2. InSaaS Smart Contracts
  3. Operator

Pricing Manager

Insurance Smart Contract

getPricingMerkleRoot

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

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

event PricingMerkleRootChanged(bytes32 merkleRoot)

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

Name
Type
Description

merkleRoot

bytes32

The merkle root.

verifyMerkleProof

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.

PreviousPool ManagerNextPolicy Manager

Last updated 2 years ago