Protection
Protection Action
Transactional Functions
AddProtectionToLoan Contract
AddProtectionToLoan.sol
contract is used to add protection data(add link to data) to a users loan.
function addProtectionToLoan(bytes memory protectionData, address user, uint256 uniqueId)
Process:
Validates protection data, user address, and unique ID.
Creates a new Protection instance and stores it in concrete storage.
SetProtectionUpdate Contract
setProtectionUpdate.sol
contract is used to set the protection update data(add a link to data) for a user's protection.
function setProtectionUpdate(bytes memory protectionData, address user, uint256 uniqueId)
Process:
Validates user address and unique ID.
Creates a new ProtectionUpdate instance and stores it.
UpdateProtection Contract
updateProtection.sol
contract is used to update protection details for a user's protection.
Process:
Validates user address and unique ID.
Fetches existing protection data and updates specified fields.
Last updated