@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
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": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"26": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"27": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"31": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"40": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
"41": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
"42": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"43": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"45": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.sol",
"exportedSymbols": {
"Component": [
14352
],
"Context": [
15648
],
"IAccess": [
22927
],
"IBundle": [
13382
],
"IBundleToken": [
13428
],
"IComponent": [
11675
],
"IComponentEvents": [
22980
],
"IComponentOwnerService": [
23015
],
"IERC165": [
22864
],
"IERC20": [
15820
],
"IERC721": [
13932
],
"IInstanceOperatorService": [
23282
],
"IInstanceService": [
14934
],
"IOracleService": [
23292
],
"IPolicy": [
12649
],
"IPool": [
23131
],
"IProduct": [
21878
],
"IProductService": [
22121
],
"IRegistry": [
21976
],
"IRiskpoolService": [
15040
],
"ITreasury": [
12909
],
"Ownable": [
9476
],
"Product": [
12303
]
},
"id": 12304,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 11677,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:31"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"file": "./IProduct.sol",
"id": 11678,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12304,
"sourceUnit": 21879,
"src": "63:24:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"file": "./Component.sol",
"id": 11679,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12304,
"sourceUnit": 14353,
"src": "88:25:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"file": "../modules/IPolicy.sol",
"id": 11680,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12304,
"sourceUnit": 12650,
"src": "114:32:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"file": "../services/IInstanceService.sol",
"id": 11681,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12304,
"sourceUnit": 14935,
"src": "147:42:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"file": "../services/IProductService.sol",
"id": 11682,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12304,
"sourceUnit": 22122,
"src": "190:41:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 11683,
"name": "IProduct",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21878,
"src": "266:8:31"
},
"id": 11684,
"nodeType": "InheritanceSpecifier",
"src": "266:8:31"
},
{
"baseName": {
"id": 11685,
"name": "Component",
"nodeType": "IdentifierPath",
"referencedDeclaration": 14352,
"src": "281:9:31"
},
"id": 11686,
"nodeType": "InheritanceSpecifier",
"src": "281:9:31"
}
],
"contractDependencies": [
9476,
11675,
14352,
15648,
21878,
22980
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 12303,
"linearizedBaseContracts": [
12303,
14352,
9476,
15648,
22980,
21878,
11675
],
"name": "Product",
"nameLocation": "251:7:31",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 11688,
"mutability": "mutable",
"name": "_policyFlow",
"nameLocation": "318:11:31",
"nodeType": "VariableDeclaration",
"scope": 12303,
"src": "302:27:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11687,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "302:7:31",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 11690,
"mutability": "mutable",
"name": "_token",
"nameLocation": "398:6:31",
"nodeType": "VariableDeclaration",
"scope": 12303,
"src": "382:22:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11689,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "382:7:31",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 11692,
"mutability": "mutable",
"name": "_riskpoolId",
"nameLocation": "465:11:31",
"nodeType": "VariableDeclaration",
"scope": 12303,
"src": "449:27:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11691,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "449:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 11695,
"mutability": "mutable",
"name": "_productService",
"nameLocation": "555:15:31",
"nodeType": "VariableDeclaration",
"scope": 12303,
"src": "530:40:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IProductService_$22121",
"typeString": "contract IProductService"
},
"typeName": {
"id": 11694,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 11693,
"name": "IProductService",
"nodeType": "IdentifierPath",
"referencedDeclaration": 22121,
"src": "530:15:31"
},
"referencedDeclaration": 22121,
"src": "530:15:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IProductService_$22121",
"typeString": "contract IProductService"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 11698,
"mutability": "mutable",
"name": "_instanceService",
"nameLocation": "602:16:31",
"nodeType": "VariableDeclaration",
"scope": 12303,
"src": "576:42:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$14934",
"typeString": "contract IInstanceService"
},
"typeName": {
"id": 11697,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 11696,
"name": "IInstanceService",
"nodeType": "IdentifierPath",
"referencedDeclaration": 14934,
"src": "576:16:31"
},
"referencedDeclaration": 14934,
"src": "576:16:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$14934",
"typeString": "contract IInstanceService"
}
},
"visibility": "internal"
},
{
"body": {
"id": 11719,
"nodeType": "Block",
"src": "669:219:31",
"statements": [
{
"assignments": [
11703
],
"declarations": [
{
"constant": false,
"id": 11703,
"mutability": "mutable",
"name": "policyHolder",
"nameLocation": "687:12:31",
"nodeType": "VariableDeclaration",
"scope": 11719,
"src": "679:20:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 11702,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "679:7:31",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 11709,
"initialValue": {
"expression": {
"arguments": [
{
"id": 11706,
"name": "policyId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11700,
"src": "731:8:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"id": 11704,
"name": "_instanceService",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11698,
"src": "702:16:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IInstanceService_$14934",
"typeString": "contract IInstanceService"
}
},
"id": 11705,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getMetadata",
"nodeType": "MemberAccess",
"referencedDeclaration": 14853,
"src": "702:28:31",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Metadata_$12464_memory_ptr_$",
"typeString": "function (bytes32) view external returns (struct IPolicy.Metadata memory)"
}
},
"id": 11707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "702:38:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_Metadata_$12464_memory_ptr",
"typeString": "struct IPolicy.Metadata memory"
}
},
"id": 11708,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 12452,
"src": "702:44:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "679:67:31"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 11714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11711,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "777:10:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 11712,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "777:12:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 11713,
"name": "policyHolder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11703,
"src": "793:12:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "777:28:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5052442d3030313a504f4c4943595f4f525f484f4c4445525f494e56414c4944",
"id": 11715,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "820:40:31",
"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": 11710,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "756:7:31",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "756:114:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11717,
"nodeType": "ExpressionStatement",
"src": "756:114:31"
},
{
"id": 11718,
"nodeType": "PlaceholderStatement",
"src": "880:1:31"
}
]
},
"id": 11720,
"name": "onlyPolicyHolder",
"nameLocation": "634:16:31",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 11701,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11700,
"mutability": "mutable",
"name": "policyId",
"nameLocation": "659:8:31",
"nodeType": "VariableDeclaration",
"scope": 11720,
"src": "651:16:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11699,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "651:7:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "650:18:31"
},
"src": "625:263:31",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 11733,
"nodeType": "Block",
"src": "915:149:31",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 11728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11723,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "947:10:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 11724,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "947:12:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "4c6963656e6365",
"id": 11726,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "983:9:31",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd",
"typeString": "literal_string \"Licence\""
},
"value": "Licence"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd",
"typeString": "literal_string \"Licence\""
}
],
"id": 11725,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14351,
"src": "963:19:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 11727,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "963:30:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "947:46:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5052442d3030323a4143434553535f44454e494544",
"id": 11729,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1007:29:31",
"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": 11722,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "925:7:31",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 11730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "925:121:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 11731,
"nodeType": "ExpressionStatement",
"src": "925:121:31"
},
{
"id": 11732,
"nodeType": "PlaceholderStatement",
"src": "1056:1:31"
}
]
},
"id": 11734,
"name": "onlyLicence",
"nameLocation": "903:11:31",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 11721,
"nodeType": "ParameterList",
"parameters": [],
"src": "915:0:31"
},
"src": "894:170:31",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 11747,
"nodeType": "Block",
"src": "1090:147:31",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 11742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 11737,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "1122:10:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 11738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1122:12:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "5175657279",
"id": 11740,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1158:7:31",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb",
"typeString": "literal_string \"Query\""
},
"value": "Query"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb",
"typeString": "literal_string \"Query\""
}
],
"id": 11739,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14351,
"src": "1138:19:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 11741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1138:28:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1122:44:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",