UNPKG

@ensuro/core

Version:

Ensuro - Blockchain-based insurance protocol

843 lines (842 loc) 20.6 kB
{ "_format": "hh-sol-artifact-1", "contractName": "IPolicyPool", "sourceName": "contracts/interfaces/IPolicyPool.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "indexed": false, "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" } ], "name": "NewPolicy", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "cancelledPolicyId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "purePremiumRefund", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "jrCocRefund", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "srCocRefund", "type": "uint256" } ], "name": "PolicyCancelled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "oldPolicyId", "type": "uint256" }, { "indexed": true, "internalType": "uint256", "name": "newPolicyId", "type": "uint256" } ], "name": "PolicyReplaced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "policyId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "payout", "type": "uint256" } ], "name": "PolicyResolved", "type": "event" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policyToCancel", "type": "tuple" }, { "internalType": "uint256", "name": "purePremiumRefund", "type": "uint256" }, { "internalType": "uint256", "name": "jrCocRefund", "type": "uint256" }, { "internalType": "uint256", "name": "srCocRefund", "type": "uint256" } ], "name": "cancelPolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "currency", "outputs": [ { "internalType": "contract IERC20Metadata", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IEToken", "name": "eToken", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IEToken", "name": "eToken", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "depositWithPermit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" } ], "name": "expirePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "policyId", "type": "uint256" } ], "name": "getPolicyHash", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "policyId", "type": "uint256" } ], "name": "isActive", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" }, { "internalType": "address", "name": "payer", "type": "address" }, { "internalType": "address", "name": "policyHolder", "type": "address" }, { "internalType": "uint96", "name": "internalId", "type": "uint96" } ], "name": "newPolicy", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "oldPolicy", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "newPolicy_", "type": "tuple" }, { "internalType": "address", "name": "payer", "type": "address" }, { "internalType": "uint96", "name": "internalId", "type": "uint96" } ], "name": "replacePolicy", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" }, { "internalType": "uint256", "name": "payout", "type": "uint256" } ], "name": "resolvePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "treasury", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IEToken", "name": "eToken", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" } ], "name": "withdraw", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }