Pricing Manager

Insurance Smart Contract

getPricingMerkleRoot

function getPricingMerkleRoot() external view returns (bytes32)

Get the pricing merkle root.

NameTypeDescription

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

NameTypeDescription

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.

NameTypeDescription

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.

NameTypeDescription

proof

bytes32[]

The merkle proof of the pricing data.

pricingReference

string

The reference of the insurance product.

premiumRate

uint256

The pricing data.

NameTypeDescription

[0]

bool

True if the merkle proof is valid, false otherwise.

Last updated