P4L

P4L is a contemporary device insurance provider partnering with CoverCompared to provide insurance.

Buy Product by ETH

To buy a device insurance P4L product using ETH the user will call the buyProductByETH function.

    function buyProductByETH(
        string memory _device,
        string memory _brand,
        uint256 _value,
        uint256 _purchMonth,
        uint256 _durPlan,
        bytes memory sig
    ) 

Input variables :

  • _device : refers to the device name for which the device insurance is being bought

  • _brand : refers to the brand of the device for which the insurance is being bought

  • _value : refers to the value of the product for which

  • _purchMonth : refers to the purchase month

  • _durPlan : refers to the duration for which the cover is being bought

  • sig : refers to the signature signed by CoverCompared to authenticate/validate the transaction and price

Buy Product by Token

To buy the P4L device insurance product using a supported ERC20 the user will call the buyProductByToken function.

    function buyProductByToken(
        string memory _device,
        string memory _brand,
        uint256 _value,
        uint256 _purchMonth,
        uint256 _durPlan,
        address _token,
        address _sender,
        bytes memory sig
    )

Input variables :

  • _device : refers to the device name for which the device insurance is being bought

  • _brand : refers to the brand of the device for which the insurance is being bought

  • _value : refers to the value of the product for which

  • _purchMonth : refers to the purchase month

  • _durPlan : refers to the duration for which the cover is being bought

  • _token : refers to the address of the ERC20 token in which the payment is to be made

  • _sender : refers to the sender

  • sig : refers to the signature signed by CoverCompared to authenticate/validate the transaction and price

Last updated