@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,565 lines (1,564 loc) • 1.34 MB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"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": "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"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "archiveFromComponentOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "archiveFromInstanceOperator",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "components",
"outputs": [
{
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "decline",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "exists",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "getComponent",
"outputs": [
{
"internalType": "contract IComponent",
"name": "component",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "componentAddress",
"type": "address"
}
],
"name": "getComponentId",
"outputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "getComponentState",
"outputs": [
{
"internalType": "enum IComponent.ComponentState",
"name": "componentState",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "getComponentType",
"outputs": [
{
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getOracleId",
"outputs": [
{
"internalType": "uint256",
"name": "oracleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "productId",
"type": "uint256"
}
],
"name": "getPolicyFlow",
"outputs": [
{
"internalType": "address",
"name": "_policyFlow",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getProductId",
"outputs": [
{
"internalType": "uint256",
"name": "productId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum IComponent.ComponentType",
"name": "componentType",
"type": "uint8"
}
],
"name": "getRequiredRole",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getRiskpoolId",
"outputs": [
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "isOracle",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "isProduct",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "isRiskpool",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "oracles",
"outputs": [
{
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "products",
"outputs": [
{
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IComponent",
"name": "component",
"type": "address"
}
],
"name": "propose",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "resume",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "riskpools",
"outputs": [
{
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "suspend",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"16": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"18": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol",
"22": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.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",
"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"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol",
"exportedSymbols": {
"Address": [
24852
],
"ComponentController": [
18412
],
"Context": [
15648
],
"CoreController": [
21649
],
"EnumerableSet": [
10109
],
"IAccess": [
22927
],
"IBundle": [
13382
],
"IComponent": [
11675
],
"IComponentEvents": [
22980
],
"IOracle": [
23539
],
"IPolicy": [
12649
],
"IProduct": [
21878
],
"IRegistry": [
21976
],
"IRiskpool": [
14585
],
"Initializable": [
23690
]
},
"id": 18413,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17414,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "40:22:18"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.sol",
"file": "../shared/CoreController.sol",
"id": 17415,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 21650,
"src": "66:38:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "@etherisc/gif-interface/contracts/components/IComponent.sol",
"id": 17416,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 11676,
"src": "106:69:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol",
"file": "@etherisc/gif-interface/contracts/components/IOracle.sol",
"id": 17417,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 23540,
"src": "177:66:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"file": "@etherisc/gif-interface/contracts/components/IProduct.sol",
"id": 17418,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 21879,
"src": "245:67:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
"file": "@etherisc/gif-interface/contracts/components/IRiskpool.sol",
"id": 17419,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 14586,
"src": "314:68:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"file": "@etherisc/gif-interface/contracts/modules/IComponentEvents.sol",
"id": 17420,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 22981,
"src": "384:72:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"file": "@openzeppelin/contracts/utils/structs/EnumerableSet.sol",
"id": 17421,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18413,
"sourceUnit": 10110,
"src": "458:65:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 17422,
"name": "IComponentEvents",
"nodeType": "IdentifierPath",
"referencedDeclaration": 22980,
"src": "564:16:18"
},
"id": 17423,
"nodeType": "InheritanceSpecifier",
"src": "564:16:18"
},
{
"baseName": {
"id": 17424,
"name": "CoreController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21649,
"src": "587:14:18"
},
"id": 17425,
"nodeType": "InheritanceSpecifier",
"src": "587:14:18"
}
],
"contractDependencies": [
15648,
21649,
22980,
23690
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 18412,
"linearizedBaseContracts": [
18412,
21649,
23690,
15648,
22980
],
"name": "ComponentController",
"nameLocation": "536:19:18",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 17429,
"libraryName": {
"id": 17426,
"name": "EnumerableSet",
"nodeType": "IdentifierPath",
"referencedDeclaration": 10109,
"src": "618:13:18"
},
"nodeType": "UsingForDirective",
"src": "612:46:18",
"typeName": {
"id": 17428,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17427,
"name": "EnumerableSet.UintSet",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9979,
"src": "636:21:18"
},
"referencedDeclaration": 9979,
"src": "636:21:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr",
"typeString": "struct EnumerableSet.UintSet"
}
}
},
{
"constant": false,
"id": 17434,
"mutability": "mutable",
"name": "_componentById",
"nameLocation": "705:14:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "666:53:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_contract$_IComponent_$11675_$",
"typeString": "mapping(uint256 => contract IComponent)"
},
"typeName": {
"id": 17433,
"keyType": {
"id": 17430,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "674:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "666:30:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_contract$_IComponent_$11675_$",
"typeString": "mapping(uint256 => contract IComponent)"
},
"valueType": {
"id": 17432,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17431,
"name": "IComponent",
"nodeType": "IdentifierPath",
"referencedDeclaration": 11675,
"src": "685:10:18"
},
"referencedDeclaration": 11675,
"src": "685:10:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IComponent_$11675",
"typeString": "contract IComponent"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17438,
"mutability": "mutable",
"name": "_componentIdByName",
"nameLocation": "762:18:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "726:54:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"typeName": {
"id": 17437,
"keyType": {
"id": 17435,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "734:7:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "726:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"valueType": {
"id": 17436,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "745:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17442,
"mutability": "mutable",
"name": "_componentIdByAddress",
"nameLocation": "823:21:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "787:57:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 17441,
"keyType": {
"id": 17439,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "795:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "787:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 17440,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "806:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17447,
"mutability": "mutable",
"name": "_componentState",
"nameLocation": "907:15:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "853:69:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_enum$_ComponentState_$11586_$",
"typeString": "mapping(uint256 => enum IComponent.ComponentState)"
},
"typeName": {
"id": 17446,
"keyType": {
"id": 17443,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "861:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "853:45:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_enum$_ComponentState_$11586_$",
"typeString": "mapping(uint256 => enum IComponent.ComponentState)"
},
"valueType": {
"id": 17445,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17444,
"name": "IComponent.ComponentState",
"nodeType": "IdentifierPath",
"referencedDeclaration": 11586,
"src": "872:25:18"
},
"referencedDeclaration": 11586,
"src": "872:25:18",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$11586",
"typeString": "enum IComponent.ComponentState"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17450,
"mutability": "mutable",
"name": "_products",
"nameLocation": "961:9:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "931:39:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage",
"typeString": "struct EnumerableSet.UintSet"
},
"typeName": {
"id": 17449,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17448,
"name": "EnumerableSet.UintSet",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9979,
"src": "931:21:18"
},
"referencedDeclaration": 9979,
"src": "931:21:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr",
"typeString": "struct EnumerableSet.UintSet"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17453,
"mutability": "mutable",
"name": "_oracles",
"nameLocation": "1007:8:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "977:38:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage",
"typeString": "struct EnumerableSet.UintSet"
},
"typeName": {
"id": 17452,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17451,
"name": "EnumerableSet.UintSet",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9979,
"src": "977:21:18"
},
"referencedDeclaration": 9979,
"src": "977:21:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr",
"typeString": "struct EnumerableSet.UintSet"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17456,
"mutability": "mutable",
"name": "_riskpools",
"nameLocation": "1052:10:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "1022:40:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage",
"typeString": "struct EnumerableSet.UintSet"
},
"typeName": {
"id": 17455,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17454,
"name": "EnumerableSet.UintSet",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9979,
"src": "1022:21:18"
},
"referencedDeclaration": 9979,
"src": "1022:21:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr",
"typeString": "struct EnumerableSet.UintSet"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17458,
"mutability": "mutable",
"name": "_componentCount",
"nameLocation": "1085:15:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "1069:31:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 17457,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1069:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 17462,
"mutability": "mutable",
"name": "_policyFlowByProductId",
"nameLocation": "1188:22:18",
"nodeType": "VariableDeclaration",
"scope": 18412,
"src": "1109:101:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"typeName": {
"id": 17461,
"keyType": {
"id": 17459,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1117:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1109:70:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"valueType": {
"id": 17460,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1145:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"visibility": "private"
},
{
"body": {
"id": 17475,
"nodeType": "Block",
"src": "1256:172:18",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 17470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 17465,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "1289:10:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 17466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1289:12:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "436f6d706f6e656e744f776e657253657276696365",
"id": 17468,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1325:23:18",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_95855e0e8f5cd64ffc781762663437a44ef7554eea00fdb413a3a655c097a675",
"typeString": "literal_string \"ComponentOwnerService\""
},
"value": "ComponentOwnerService"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_95855e0e8f5cd64ffc781762663437a44ef7554eea00fdb413a3a655c097a675",
"typeString": "literal_string \"ComponentOwnerService\""
}
],
"id": 17467,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21648,
"src": "1305:19:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 17469,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1305:44:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1289:60:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a4343522d3030313a4e4f545f434f4d504f4e454e545f4f574e45525f53455256494345",
"id": 17471,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1364:43:18",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2b163f71e59f0a392de25481a553757716afafc14f2c0ddf4ef8779c20751707",
"typeString": "literal_string \"ERROR:CCR-001:NOT_COMPONENT_OWNER_SERVICE\""
},
"value": "ERROR:CCR-001:NOT_COMPONENT_OWNER_SERVICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2b163f71e59f0a392de25481a553757716afafc14f2c0ddf4ef8779c20751707",
"typeString": "literal_string \"ERROR:CCR-001:NOT_COMPONENT_OWNER_SERVICE\""
}
],
"id": 17464,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1267:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 17472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1267:141:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17473,
"nodeType": "ExpressionStatement",
"src": "1267:141:18"
},
{
"id": 17474,
"nodeType": "PlaceholderStatement",
"src": "1419:1:18"
}
]
},
"id": 17476,
"name": "onlyComponentOwnerService",
"nameLocation": "1228:25:18",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 17463,
"nodeType": "ParameterList",
"parameters": [],
"src": "1253:2:18"
},
"src": "1219:209:18",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 17489,
"nodeType": "Block",
"src": "1475:176:18",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 17484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 17479,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15638,
"src": "1508:10:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 17480,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1508:12:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "496e7374616e63654f70657261746f7253657276696365",
"id": 17482,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1544:25:18",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544",
"typeString": "literal_string \"InstanceOperatorService\""
},
"value": "InstanceOperatorService"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544",
"typeString": "literal_string \"InstanceOperatorService\""
}
],
"id": 17481,
"name": "_getContractAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21648,
"src": "1524:19:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 17483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1524:46:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1508:62:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a4343522d3030323a4e4f545f494e5354414e43455f4f50455241544f525f53455256494345",
"id": 17485,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1585:45:18",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_130007efea4d49cc157bd5faf2f1c80f98e50627fe669a9a215b28142c1ee23f",
"typeString": "literal_string \"ERROR:CCR-002:NOT_INSTANCE_OPERATOR_SERVICE\""
},
"value": "ERROR:CCR-002:NOT_INSTANCE_OPERATOR_SERVICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_130007efea4d49cc157bd5faf2f1c80f98e50627fe669a9a215b28142c1ee23f",
"typeString": "literal_string \"ERROR:CCR-002:NOT_INSTANCE_OPERATOR_SERVICE\""
}
],
"id": 17478,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1486:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 17486,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1486:145:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17487,
"nodeType": "ExpressionStatement",
"src": "1486:145:18"
},