@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,526 lines (1,525 loc) • 326 kB
JSON
{
"abi": [
{
"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": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "approvalCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "archiveCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "declineCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getApplicationDataStructure",
"outputs": [
{
"internalType": "string",
"name": "dataStructure",
"type": "string"
}
],
"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": [],
"name": "unpauseCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"32": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
"47": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
"48": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"49": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
"50": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"51": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"exportedSymbols": {
"Component": [
25407
],
"Context": [
24074
],
"IAccess": [
21938
],
"IBundle": [
20491
],
"IBundleToken": [
24052
],
"IComponent": [
22099
],
"IComponentEvents": [
22419
],
"IComponentOwnerService": [
23478
],
"IERC165": [
27203
],
"IERC20": [
18510
],
"IERC721": [
23745
],
"IInstanceOperatorService": [
23629
],
"IInstanceService": [
22849
],
"IOracleService": [
23755
],
"IPolicy": [
20837
],
"IPool": [
21652
],
"IProduct": [
21995
],
"IProductService": [
23900
],
"IRegistry": [
21750
],
"IRiskpoolService": [
24006
],
"ITreasury": [
23443
],
"Ownable": [
20950
],
"Product": [
20018
]
},
"id": 20019,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 19392,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:35"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"file": "./IProduct.sol",
"id": 19393,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 20019,
"sourceUnit": 21996,
"src": "63:24:35",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"file": "./Component.sol",
"id": 19394,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 20019,
"sourceUnit": 25408,
"src": "88:25:35",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"file": "../modules/IPolicy.sol",
"id": 19395,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 20019,
"sourceUnit": 20838,
"src": "114:32:35",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"file": "../services/IInstanceService.sol",
"id": 19396,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 20019,
"sourceUnit": 22850,
"src": "147:42:35",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"file": "../services/IProductService.sol",
"id": 19397,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 20019,
"sourceUnit": 23901,
"src": "190:41:35",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 19398,
"name": "IProduct",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21995,
"src": "266:8:35"
},
"id": 19399,
"nodeType": "InheritanceSpecifier",
"src": "266:8:35"
},
{
"baseName": {
"id": 19400,
"name": "Component",
"nodeType": "IdentifierPath",
"referencedDeclaration": 25407,
"src": "281:9:35"
},
"id": 19401,
"nodeType": "InheritanceSpecifier",
"src": "281:9:35"
}
],
"contractDependencies": [
20950,
21995,
22099,
22419,
24074,
25407
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 20018,
"linearizedBaseContracts": [
20018,
25407,
20950,
24074,
22419,
21995,
22099
],
"name": "Product",
"nameLocation": "251:7:35",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 19403,
"mutability": "mutable",
"name": "_policyFlow",
"nameLocation": "318:11:35",
"nodeType": "VariableDeclaration",
"scope": 20018,
"src": "302:27:35",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 19402,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "302:7:35",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 19405,
"mutability": "mutable",
"name": "_token",
"nameLocation": "398:6:35",
"nodeType": "VariableDeclaration",
"scope": 20018,
"src": "382:22:35",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 19404,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "382:7:35",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 19407,
"mutability": "mutable",
"name": "_riskpoolId",
"nameLocation": "465:11:35",
"nodeType": "VariableDeclaration",
"scope": 20018,
"src": "449:27:35",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 19406,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "449:7:35",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 19410,
"mutability": "mutable",
"name": "_productService",
"nameLocation": "555:15:35",
"nodeType": "VariableDeclaration",
"scope": 20018,
"src": "530:40:35",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IProductService_$23900",
"typeString": "contract IProductService"
},
"typeName": {
"id": 19409,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 19408,
"name": "IProductService",
"nodeType": "IdentifierPath",
"referencedDeclaration": 23900,
"src": "530:15:35"
},
"referencedDeclaration": 23900,
"src": "530:15:35",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IProductService_$23900",
"typeString": "contract IProductService"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 19413,
"mutability": "mutable",
"name": "_instanceService",
"nameLocation": "602:16:35",
"nodeType": "VariableDeclaration",
"scope": 20018,
"src": "576:42:35",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$22849",
"typeString": "contract IInstanceService"
},
"typeName": {
"id": 19412,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 19411,
"name": "IInstanceService",
"nodeType": "IdentifierPath",
"referencedDeclaration": 22849,
"src": "576:16:35"
},
"referencedDeclaration": 22849,
"src": "576:16:35",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$22849",
"typeString": "contract IInstanceService"
}
},
"visibility": "internal"
},
{
"body": {
"id": 19434,
"nodeType": "Block",
"src": "669:219:35",
"statements": [
{
"assignments": [
19418
],
"declarations": [
{
"constant": false,
"id": 19418,
"mutability": "mutable",
"name": "policyHolder",
"nameLocation": "687:12:35",
"nodeType": "VariableDeclaration",
"scope": 19434,
"src": "679:20:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 19417,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "679:7:35",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 19424,
"initialValue": {
"expression": {
"arguments": [
{
"id": 19421,
"name": "policyId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19415,
"src": "731:8:35",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"id": 19419,
"name": "_instanceService",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19413,
"src": "702:16:35",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$22849",
"typeString": "contract IInstanceService"
}
},
"id": 19420,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getMetadata",
"nodeType": "MemberAccess",
"referencedDeclaration": 22768,
"src": "702:28:35",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Metadata_$20652_memory_ptr_$",
"typeString": "function (bytes32) view external returns (struct IPolicy.Metadata memory)"
}
},
"id": 19422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "702:38:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_Metadata_$20652_memory_ptr",
"typeString": "struct IPolicy.Metadata memory"
}
},
"id": 19423,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 20640,
"src": "702:44:35",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "679:67:35"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 19429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 19426,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "777:10:35",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 19427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "777:12:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 19428,
"name": "policyHolder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19418,
"src": "793:12:35",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "777:28:35",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5052442d3030313a504f4c4943595f4f525f484f4c4445525f494e56414c4944",
"id": 19430,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "820:40:35",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8c751e03794b568011bdacc7506cfc24e9e6da1a04bd63102218013a02fcc8b2",
"typeString": "literal_string \"ERROR:PRD-001:POLICY_OR_HOLDER_INVALID\""
},
"value": "ERROR:PRD-001:POLICY_OR_HOLDER_INVALID"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8c751e03794b568011bdacc7506cfc24e9e6da1a04bd63102218013a02fcc8b2",
"typeString": "literal_string \"ERROR:PRD-001:POLICY_OR_HOLDER_INVALID\""
}
],
"id": 19425,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "756:7:35",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 19431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "756:114:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 19432,
"nodeType": "ExpressionStatement",
"src": "756:114:35"
},
{
"id": 19433,
"nodeType": "PlaceholderStatement",
"src": "880:1:35"
}
]
},
"id": 19435,
"name": "onlyPolicyHolder",
"nameLocation": "634:16:35",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 19416,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 19415,
"mutability": "mutable",
"name": "policyId",
"nameLocation": "659:8:35",
"nodeType": "VariableDeclaration",
"scope": 19435,
"src": "651:16:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 19414,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "651:7:35",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "650:18:35"
},
"src": "625:263:35",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 19448,
"nodeType": "Block",
"src": "915:149:35",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 19443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 19438,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "947:10:35",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 19439,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "947:12:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "4c6963656e6365",
"id": 19441,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "983:9:35",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd",
"typeString": "literal_string \"Licence\""
},
"value": "Licence"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd",
"typeString": "literal_string \"Licence\""
}
],
"id": 19440,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25406,
"src": "963:19:35",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 19442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "963:30:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "947:46:35",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5052442d3030323a4143434553535f44454e494544",
"id": 19444,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1007:29:35",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c303e58a1c0410c1101cc429b23d15274514a5237e202175e3c0976550224f8a",
"typeString": "literal_string \"ERROR:PRD-002:ACCESS_DENIED\""
},
"value": "ERROR:PRD-002:ACCESS_DENIED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c303e58a1c0410c1101cc429b23d15274514a5237e202175e3c0976550224f8a",
"typeString": "literal_string \"ERROR:PRD-002:ACCESS_DENIED\""
}
],
"id": 19437,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "925:7:35",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 19445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "925:121:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 19446,
"nodeType": "ExpressionStatement",
"src": "925:121:35"
},
{
"id": 19447,
"nodeType": "PlaceholderStatement",
"src": "1056:1:35"
}
]
},
"id": 19449,
"name": "onlyLicence",
"nameLocation": "903:11:35",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 19436,
"nodeType": "ParameterList",
"parameters": [],
"src": "915:0:35"
},
"src": "894:170:35",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 19462,
"nodeType": "Block",
"src": "1090:147:35",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 19457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 19452,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "1122:10:35",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 19453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1122:12:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "5175657279",
"id": 19455,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1158:7:35",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb",
"typeString": "literal_string \"Query\""
},
"value": "Query"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb",
"typeString": "literal_string \"Query\""
}
],
"id": 19454,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25406,
"src": "1138:19:35",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 19456,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1138:28:35",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1122:44:35",
"typeDescriptions": {
"typeIdentifier": "t_bool",