@etherisc/terraguard-poc-contracts
Version:
Etherisc's smart contracts for the terraguard poc
1,851 lines (1,850 loc) • 615 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "productName",
"type": "bytes32"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentApproved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentArchived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "componentName",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
},
{
"indexed": false,
"internalType": "address",
"name": "componentAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "registryAddress",
"type": "address"
}
],
"name": "LogComponentCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentDeclined",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentPaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "componentName",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
},
{
"indexed": false,
"internalType": "address",
"name": "componentAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentProposed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentResumed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentState",
"name": "stateOld",
"type": "uint8"
},
{
"indexed": false,
"internalType": "enum IComponent.ComponentState",
"name": "stateNew",
"type": "uint8"
}
],
"name": "LogComponentStateChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentSuspended",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "LogComponentUnpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "LogProductApproved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "productAddress",
"type": "address"
}
],
"name": "LogProductCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "LogProductDeclined",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "LogProductProposed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "address",
"name": "policyHolder",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "premium",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "sumInsured",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint16",
"name": "locationId",
"type": "uint16"
},
{
"indexed": false,
"internalType": "uint8",
"name": "protectionType",
"type": "uint8"
}
],
"name": "LogTerraGuardApplicationCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "claimId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "payoutAmount",
"type": "uint256"
}
],
"name": "LogTerraGuardClaimConfirmed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "claimId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "payoutId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "payoutAmount",
"type": "uint256"
}
],
"name": "LogTerraGuardPayoutExecuted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "LogTerraGuardPolicyCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "LogTerraGuardPolicyExpired",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "CALLBACK_METHOD_NAME",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "OBJECT_VALUE_DIVISOR",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PAYOUT_FACTOR_LARGE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PAYOUT_FACTOR_MEDIUM",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "POLICY_FLOW",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TYPE_5_PLUS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TYPE_7_PLUS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VERSION",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "_oracleId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "applications",
"outputs": [
{
"internalType": "uint256",
"name": "numberOfApplications",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "protectionType",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "locationId",
"type": "uint16"
},
{
"internalType": "uint256",
"name": "sumInsuredAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
}
],
"name": "applyForPolicy",
"outputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "approvalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "archiveCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "objectValue",
"type": "uint256"
}
],
"name": "calculatePremium",
"outputs": [
{
"internalType": "uint256",
"name": "premiumAmount",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "declineCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "decodeApplicationParameterFromData",
"outputs": [
{
"internalType": "uint8",
"name": "protectionType",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "locationId",
"type": "uint16"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "protectionType",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "locationId",
"type": "uint16"
}
],
"name": "encodeApplicationParametersToData",
"outputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "expirePolicy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getApplicationDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getApplicationId",
"outputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getClaimDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getName",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPayoutDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPolicyFlow",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRegistry",
"outputs": [
{
"internalType": "contract IRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRiskpoolId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getState",
"outputs": [
{
"internalType": "enum IComponent.ComponentState",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getType",
"outputs": [
{
"internalType": "enum IComponent.ComponentType",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isOracle",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isProduct",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isRiskpool",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pauseCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "proposalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "resumeCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "capacity",
"type": "uint256"
}
],
"name": "riskPoolCapacityCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "setId",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "suspendCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "underwrite",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpauseCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
"11": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"14": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"16": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"18": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol",
"21": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"23": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
"24": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
"25": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"26": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
"27": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"28": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"29": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"34": "contracts/terra/TerraGuardProduct.sol",
"4": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol",
"5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
"6": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol",
"8": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"9": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol"
},
"ast": {
"absolutePath": "contracts/terra/TerraGuardProduct.sol",
"exportedSymbols": {
"Component": [
5114
],
"Context": [
6682
],
"IAccess": [
6858
],
"IBundle": [
3612
],
"IBundleToken": [
4029
],
"IComponent": [
5218
],
"IComponentEvents": [
6911
],
"IComponentOwnerService": [
7044
],
"IERC165": [
7662
],
"IERC20": [
4694
],
"IERC721": [
6660
],
"IInstanceOperatorService": [
7311
],
"IInstanceService": [
5668
],
"IOracleService": [
5262
],
"IPolicy": [
3958
],
"IPool": [
7160
],
"IProduct": [
5319
],
"IProductService": [
5813
],
"IRegistry": [
7009
],
"IRiskpoolService": [
7417
],
"ITreasury": [
2409
],
"Ownable": [
6795
],
"Product": [
3139
],
"TerraGuardProduct": [
1080
]
},
"id": 1081,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 701,
"literals": [
"solidity",
"^",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:23:34"
},
{
"absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"file": "@etherisc/gif-interface/contracts/components/Product.sol",
"id": 702,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 1081,
"sourceUnit": 3140,
"src": "64:66:34",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 703,
"name": "Product",
"nodeType": "IdentifierPath",
"referencedDeclaration": 3139,
"src": "163:7:34"
},
"id": 704,
"nodeType": "InheritanceSpecifier",
"src": "163:7:34"
}
],
"contractDependencies": [
3139,
5114,
5218,
5319,
6682,
6795,
6911
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1080,
"linearizedBaseContracts": [
1080,
3139,
5114,
6795,
6682,
6911,
5319,
5218
],
"name": "TerraGuardProduct",
"nameLocation": "142:17:34",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "ffa1ad74",
"id": 707,
"mutability": "constant",
"name": "VERSION",
"nameLocation": "218:7:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "194:41:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 705,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "194:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "302e302e31",
"id": 706,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "228:7:34",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "09128d83",
"id": 710,
"mutability": "constant",
"name": "POLICY_FLOW",
"nameLocation": "265:11:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "241:57:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 708,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "241:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "506f6c69637944656661756c74466c6f77",
"id": 709,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "279:19:34",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4c6194c52a3447410e4616772f780a88c4ac5f0b731d2fc7e7979c603182714e",
"typeString": "literal_string \"PolicyDefaultFlow\""
},
"value": "PolicyDefaultFlow"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "1b1a361c",
"id": 713,
"mutability": "constant",
"name": "TYPE_5_PLUS",
"nameLocation": "329:11:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "305:39:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 711,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "305:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "35",
"id": 712,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "343:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "9e592639",
"id": 716,
"mutability": "constant",
"name": "TYPE_7_PLUS",
"nameLocation": "374:11:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "350:39:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 714,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "350:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "37",
"id": 715,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "388:1:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_7_by_1",
"typeString": "int_const 7"
},
"value": "7"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "1d6f7ca6",
"id": 719,
"mutability": "constant",
"name": "OBJECT_VALUE_DIVISOR",
"nameLocation": "464:20:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "440:49:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 717,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "440:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "3230",
"id": 718,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "487:2:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "809faf12",
"id": 722,
"mutability": "constant",
"name": "PAYOUT_FACTOR_MEDIUM",
"nameLocation": "540:20:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "516:49:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 720,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "516:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "3230",
"id": 721,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "563:2:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "95bb88db",
"id": 725,
"mutability": "constant",
"name": "PAYOUT_FACTOR_LARGE",
"nameLocation": "595:19:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "571:49:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 723,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "571:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "313030",
"id": 724,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "617:3:34",
"typeDescriptions": {
"typeIdentifier": "t_rational_100_by_1",
"typeString": "int_const 100"
},
"value": "100"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "0e5b3c9d",
"id": 728,
"mutability": "constant",
"name": "CALLBACK_METHOD_NAME",
"nameLocation": "650:20:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "627:62:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 726,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "627:6:34",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "6f7261636c6543616c6c6261636b",
"id": 727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "673:16:34",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2aafc7d392265772ce577bc392adfed2dc64b60acfcc2d5e2ce66fbfe088b79b",
"typeString": "literal_string \"oracleCallback\""
},
"value": "oracleCallback"
},
"visibility": "public"
},
{
"constant": false,
"id": 731,
"mutability": "mutable",
"name": "_applications",
"nameLocation": "771:13:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "753:31:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage",
"typeString": "bytes32[]"
},
"typeName": {
"baseType": {
"id": 729,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "753:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 730,
"nodeType": "ArrayTypeName",
"src": "753:9:34",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
"typeString": "bytes32[]"
}
},
"visibility": "private"
},
{
"constant": false,
"functionSelector": "47f71b46",
"id": 733,
"mutability": "mutable",
"name": "_oracleId",
"nameLocation": "805:9:34",
"nodeType": "VariableDeclaration",
"scope": 1080,
"src": "790:24:34",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 732,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "790:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"anonymous": false,
"id": 747,
"name": "LogTerraGuardApplicationCreated",
"nameLocation": "841:31:34",
"nodeType": "EventDefinition",
"parameters": {
"id": 746,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 735,
"indexed": false,
"mutability": "mutable",
"name": "processId",
"nameLocation": "890:9:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "882:17:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 734,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "882:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 737,
"indexed": false,
"mutability": "mutable",
"name": "policyHolder",
"nameLocation": "917:12:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "909:20:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 736,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "909:7:34",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 739,
"indexed": false,
"mutability": "mutable",
"name": "premium",
"nameLocation": "947:7:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "939:15:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 738,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "939:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 741,
"indexed": false,
"mutability": "mutable",
"name": "sumInsured",
"nameLocation": "972:10:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "964:18:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 740,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "964:7:34",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 743,
"indexed": false,
"mutability": "mutable",
"name": "locationId",
"nameLocation": "999:10:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "992:17:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 742,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "992:6:34",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 745,
"indexed": false,
"mutability": "mutable",
"name": "protectionType",
"nameLocation": "1025:14:34",
"nodeType": "VariableDeclaration",
"scope": 747,
"src": "1019:20:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 744,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1019:5:34",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "872:173:34"
},
"src": "835:211:34"
},
{
"anonymous": false,
"id": 751,
"name": "LogTerraGuardPolicyCreated",
"nameLocation": "1058:26:34",
"nodeType": "EventDefinition",
"parameters": {
"id": 750,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 749,
"indexed": false,
"mutability": "mutable",
"name": "processId",
"nameLocation": "1093:9:34",
"nodeType": "VariableDeclaration",
"scope": 751,
"src": "1085:17:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 748,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1085:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1084:19:34"
},
"src": "1052:52:34"
},
{
"anonymous": false,
"id": 755,
"name": "LogTerraGuardPolicyExpired",
"nameLocation": "1115:26:34",
"nodeType": "EventDefinition",
"parameters": {
"id": 754,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 753,
"indexed": false,
"mutability": "mutable",
"name": "processId",
"nameLocation": "1150:9:34",
"nodeType": "VariableDeclaration",
"scope": 755,
"src": "1142:17:34",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 752,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1142:7:34",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1141:19:34"
},
"src": "1109:52:34"
},
{
"anonymous": false,
"id": 763,
"name": "LogTerraGuardClaimConfirmed",
"nameLocation": "1173:27:34",
"nodeType": "EventDefinition",
"parameters": {
"id": 762,