UNPKG

@ensuro/core

Version:

Ensuro - Decentralized insurance protocol

821 lines (820 loc) 20.5 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": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": "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": [], "name": "access", "outputs": [ { "internalType": "contract IAccessManager", "name": "", "type": "address" } ], "stateMutability": "view", "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" } ], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "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": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "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": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" }, { "internalType": "bool", "name": "customerWon", "type": "bool" } ], "name": "resolvePolicyFullPayout", "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" } ], "name": "withdraw", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }