@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,257 lines • 45 kB
JSON
{
"abi": [
{
"inputs": [],
"name": "getId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"39": "contracts/registry/IInstanceServiceFacade.sol"
},
"ast": {
"absolutePath": "contracts/registry/IInstanceServiceFacade.sol",
"exportedSymbols": {
"IComponent": [
4200
],
"IERC20Metadata": [
12510
],
"IInstanceServiceFacade": [
4295
]
},
"id": 4296,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4192,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:39"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"id": 4194,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4296,
"sourceUnit": 12511,
"src": "65:97:39",
"symbolAliases": [
{
"foreign": {
"id": 4193,
"name": "IERC20Metadata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12510,
"src": "73:14:39",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IComponent",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 4200,
"linearizedBaseContracts": [
4200
],
"name": "IComponent",
"nameLocation": "234:10:39",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "5d1ca631",
"id": 4199,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getId",
"nameLocation": "261:5:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4195,
"nodeType": "ParameterList",
"parameters": [],
"src": "266:2:39"
},
"returnParameters": {
"id": 4198,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4197,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4199,
"src": "291:7:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "291:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "290:9:39"
},
"scope": 4200,
"src": "252:48:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 4296,
"src": "224:78:39",
"usedErrors": []
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IInstanceServiceFacade",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 4295,
"linearizedBaseContracts": [
4295
],
"name": "IInstanceServiceFacade",
"nameLocation": "315:22:39",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "IInstanceServiceFacade.ComponentType",
"id": 4204,
"members": [
{
"id": 4201,
"name": "Oracle",
"nameLocation": "431:6:39",
"nodeType": "EnumValue",
"src": "431:6:39"
},
{
"id": 4202,
"name": "Product",
"nameLocation": "447:7:39",
"nodeType": "EnumValue",
"src": "447:7:39"
},
{
"id": 4203,
"name": "Riskpool",
"nameLocation": "464:8:39",
"nodeType": "EnumValue",
"src": "464:8:39"
}
],
"name": "ComponentType",
"nameLocation": "407:13:39",
"nodeType": "EnumDefinition",
"src": "402:76:39"
},
{
"canonicalName": "IInstanceServiceFacade.ComponentState",
"id": 4212,
"members": [
{
"id": 4205,
"name": "Created",
"nameLocation": "571:7:39",
"nodeType": "EnumValue",
"src": "571:7:39"
},
{
"id": 4206,
"name": "Proposed",
"nameLocation": "588:8:39",
"nodeType": "EnumValue",
"src": "588:8:39"
},
{
"id": 4207,
"name": "Declined",
"nameLocation": "606:8:39",
"nodeType": "EnumValue",
"src": "606:8:39"
},
{
"id": 4208,
"name": "Active",
"nameLocation": "624:6:39",
"nodeType": "EnumValue",
"src": "624:6:39"
},
{
"id": 4209,
"name": "Paused",
"nameLocation": "640:6:39",
"nodeType": "EnumValue",
"src": "640:6:39"
},
{
"id": 4210,
"name": "Suspended",
"nameLocation": "656:9:39",
"nodeType": "EnumValue",
"src": "656:9:39"
},
{
"id": 4211,
"name": "Archived",
"nameLocation": "675:8:39",
"nodeType": "EnumValue",
"src": "675:8:39"
}
],
"name": "ComponentState",
"nameLocation": "546:14:39",
"nodeType": "EnumDefinition",
"src": "541:148:39"
},
{
"canonicalName": "IInstanceServiceFacade.BundleState",
"id": 4217,
"members": [
{
"id": 4213,
"name": "Active",
"nameLocation": "776:6:39",
"nodeType": "EnumValue",
"src": "776:6:39"
},
{
"id": 4214,
"name": "Locked",
"nameLocation": "792:6:39",
"nodeType": "EnumValue",
"src": "792:6:39"
},
{
"id": 4215,
"name": "Closed",
"nameLocation": "808:6:39",
"nodeType": "EnumValue",
"src": "808:6:39"
},
{
"id": 4216,
"name": "Burned",
"nameLocation": "824:6:39",
"nodeType": "EnumValue",
"src": "824:6:39"
}
],
"name": "BundleState",
"nameLocation": "754:11:39",
"nodeType": "EnumDefinition",
"src": "749:87:39"
},
{
"canonicalName": "IInstanceServiceFacade.Bundle",
"id": 4239,
"members": [
{
"constant": false,
"id": 4219,
"mutability": "mutable",
"name": "id",
"nameLocation": "928:2:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "920:10:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4218,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "920:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4221,
"mutability": "mutable",
"name": "riskpoolId",
"nameLocation": "948:10:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "940:18:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "940:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4223,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "976:7:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "968:15:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4222,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "968:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4226,
"mutability": "mutable",
"name": "state",
"nameLocation": "1005:5:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "993:17:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_BundleState_$4217",
"typeString": "enum IInstanceServiceFacade.BundleState"
},
"typeName": {
"id": 4225,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4224,
"name": "BundleState",
"nameLocations": [
"993:11:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4217,
"src": "993:11:39"
},
"referencedDeclaration": 4217,
"src": "993:11:39",
"typeDescriptions": {
"typeIdentifier": "t_enum$_BundleState_$4217",
"typeString": "enum IInstanceServiceFacade.BundleState"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4228,
"mutability": "mutable",
"name": "filter",
"nameLocation": "1026:6:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1020:12:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4227,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1020:5:39",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4230,
"mutability": "mutable",
"name": "capital",
"nameLocation": "1144:7:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1136:15:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4229,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1136:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4232,
"mutability": "mutable",
"name": "lockedCapital",
"nameLocation": "1215:13:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1207:21:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4231,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1207:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4234,
"mutability": "mutable",
"name": "balance",
"nameLocation": "1327:7:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1319:15:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4233,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1319:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4236,
"mutability": "mutable",
"name": "createdAt",
"nameLocation": "1426:9:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1418:17:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4235,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1418:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4238,
"mutability": "mutable",
"name": "updatedAt",
"nameLocation": "1453:9:39",
"nodeType": "VariableDeclaration",
"scope": 4239,
"src": "1445:17:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4237,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1445:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "Bundle",
"nameLocation": "903:6:39",
"nodeType": "StructDefinition",
"scope": 4295,
"src": "896:573:39",
"visibility": "public"
},
{
"functionSelector": "3408e470",
"id": 4244,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getChainId",
"nameLocation": "1484:10:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4240,
"nodeType": "ParameterList",
"parameters": [],
"src": "1494:2:39"
},
"returnParameters": {
"id": 4243,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4242,
"mutability": "mutable",
"name": "chainId",
"nameLocation": "1527:7:39",
"nodeType": "VariableDeclaration",
"scope": 4244,
"src": "1519:15:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4241,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1519:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1518:17:39"
},
"scope": 4295,
"src": "1475:61:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "1551100f",
"id": 4249,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getInstanceId",
"nameLocation": "1550:13:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4245,
"nodeType": "ParameterList",
"parameters": [],
"src": "1563:2:39"
},
"returnParameters": {
"id": 4248,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4247,
"mutability": "mutable",
"name": "instanceId",
"nameLocation": "1596:10:39",
"nodeType": "VariableDeclaration",
"scope": 4249,
"src": "1588:18:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4246,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1588:7:39",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1587:20:39"
},
"scope": 4295,
"src": "1541:67:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "39c6fa90",
"id": 4254,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getInstanceOperator",
"nameLocation": "1622:19:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4250,
"nodeType": "ParameterList",
"parameters": [],
"src": "1641:2:39"
},
"returnParameters": {
"id": 4253,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4252,
"mutability": "mutable",
"name": "instanceOperator",
"nameLocation": "1674:16:39",
"nodeType": "VariableDeclaration",
"scope": 4254,
"src": "1666:24:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4251,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1666:7:39",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1665:26:39"
},
"scope": 4295,
"src": "1613:79:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "4f27da18",
"id": 4262,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getComponent",
"nameLocation": "1707:12:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4257,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4256,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "1728:11:39",
"nodeType": "VariableDeclaration",
"scope": 4262,
"src": "1720:19:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4255,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1720:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1719:21:39"
},
"returnParameters": {
"id": 4261,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4260,
"mutability": "mutable",
"name": "component",
"nameLocation": "1774:9:39",
"nodeType": "VariableDeclaration",
"scope": 4262,
"src": "1763:20:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IComponent_$4200",
"typeString": "contract IComponent"
},
"typeName": {
"id": 4259,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4258,
"name": "IComponent",
"nameLocations": [
"1763:10:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4200,
"src": "1763:10:39"
},
"referencedDeclaration": 4200,
"src": "1763:10:39",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IComponent_$4200",
"typeString": "contract IComponent"
}
},
"visibility": "internal"
}
],
"src": "1762:22:39"
},
"scope": 4295,
"src": "1698:87:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "dd51c86a",
"id": 4270,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getComponentType",
"nameLocation": "1799:16:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4265,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4264,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "1824:11:39",
"nodeType": "VariableDeclaration",
"scope": 4270,
"src": "1816:19:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4263,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1816:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1815:21:39"
},
"returnParameters": {
"id": 4269,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4268,
"mutability": "mutable",
"name": "componentType",
"nameLocation": "1873:13:39",
"nodeType": "VariableDeclaration",
"scope": 4270,
"src": "1859:27:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$4204",
"typeString": "enum IInstanceServiceFacade.ComponentType"
},
"typeName": {
"id": 4267,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4266,
"name": "ComponentType",
"nameLocations": [
"1859:13:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4204,
"src": "1859:13:39"
},
"referencedDeclaration": 4204,
"src": "1859:13:39",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$4204",
"typeString": "enum IInstanceServiceFacade.ComponentType"
}
},
"visibility": "internal"
}
],
"src": "1858:29:39"
},
"scope": 4295,
"src": "1790:98:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "5e966e45",
"id": 4278,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getComponentState",
"nameLocation": "1902:17:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4273,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4272,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "1928:11:39",
"nodeType": "VariableDeclaration",
"scope": 4278,
"src": "1920:19:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4271,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1920:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1919:21:39"
},
"returnParameters": {
"id": 4277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4276,
"mutability": "mutable",
"name": "componentState",
"nameLocation": "1978:14:39",
"nodeType": "VariableDeclaration",
"scope": 4278,
"src": "1963:29:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$4212",
"typeString": "enum IInstanceServiceFacade.ComponentState"
},
"typeName": {
"id": 4275,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4274,
"name": "ComponentState",
"nameLocations": [
"1963:14:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4212,
"src": "1963:14:39"
},
"referencedDeclaration": 4212,
"src": "1963:14:39",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$4212",
"typeString": "enum IInstanceServiceFacade.ComponentState"
}
},
"visibility": "internal"
}
],
"src": "1962:31:39"
},
"scope": 4295,
"src": "1893:101:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "038696bb",
"id": 4286,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getComponentToken",
"nameLocation": "2008:17:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4280,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "2034:11:39",
"nodeType": "VariableDeclaration",
"scope": 4286,
"src": "2026:19:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4279,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2026:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2025:21:39"
},
"returnParameters": {
"id": 4285,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4284,
"mutability": "mutable",
"name": "token",
"nameLocation": "2084:5:39",
"nodeType": "VariableDeclaration",
"scope": 4286,
"src": "2069:20:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Metadata_$12510",
"typeString": "contract IERC20Metadata"
},
"typeName": {
"id": 4283,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4282,
"name": "IERC20Metadata",
"nameLocations": [
"2069:14:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12510,
"src": "2069:14:39"
},
"referencedDeclaration": 12510,
"src": "2069:14:39",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Metadata_$12510",
"typeString": "contract IERC20Metadata"
}
},
"visibility": "internal"
}
],
"src": "2068:22:39"
},
"scope": 4295,
"src": "1999:92:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "2d0821b7",
"id": 4294,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getBundle",
"nameLocation": "2106:9:39",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4289,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4288,
"mutability": "mutable",
"name": "bundleId",
"nameLocation": "2124:8:39",
"nodeType": "VariableDeclaration",
"scope": 4294,
"src": "2116:16:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4287,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2116:7:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2115:18:39"
},
"returnParameters": {
"id": 4293,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4292,
"mutability": "mutable",
"name": "bundle",
"nameLocation": "2170:6:39",
"nodeType": "VariableDeclaration",
"scope": 4294,
"src": "2156:20:39",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Bundle_$4239_memory_ptr",
"typeString": "struct IInstanceServiceFacade.Bundle"
},
"typeName": {
"id": 4291,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4290,
"name": "Bundle",
"nameLocations": [
"2156:6:39"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4239,
"src": "2156:6:39"
},
"referencedDeclaration": 4239,
"src": "2156:6:39",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Bundle_$4239_storage_ptr",
"typeString": "struct IInstanceServiceFacade.Bundle"
}
},
"visibility": "internal"
}
],
"src": "2155:22:39"
},
"scope": 4295,
"src": "2097:81:39",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 4296,
"src": "305:1875:39",
"usedErrors": []
}
],
"src": "39:2141:39"
},
"bytecode": "",
"bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"compiler": {
"evm_version": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"version": "0.8.19+commit.7dd6d404"
},
"contractName": "IComponent",
"coverageMap": {
"branches": {},
"statements": {}
},
"dependencies": [],
"deployedBytecode": "",
"deployedSourceMap": "",
"language": "Solidity",
"natspec": {
"kind": "dev",
"methods": {},
"version": 1
},
"offset": [
224,
302
],
"opcodes": "",
"pcMap": {},
"sha1": "68fd239e2705337fe3d814924ad2e0ce1a22789f",
"source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.19;\n\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\n\n// needs to be in sync with definition in IInstanceService\n\ninterface IComponent {\n\n function getId() external view returns(uint256);\n}\n\n\ninterface IInstanceServiceFacade {\n\n // needs to be in sync with definition in IComponent\n enum ComponentType {\n Oracle,\n Product,\n Riskpool\n }\n\n // needs to be in sync with definition in IComponent\n enum ComponentState {\n Created,\n Proposed,\n Declined,\n Active,\n Paused,\n Suspended,\n Archived\n }\n\n // needs to be in sync with definition in IBundle\n enum BundleState {\n Active,\n Locked,\n Closed,\n Burned\n }\n\n // needs to be in sync with definition in IBundle\n struct Bundle {\n uint256 id;\n uint256 riskpoolId;\n uint256 tokenId;\n BundleState state;\n bytes filter; // required conditions for applications to be considered for collateralization by this bundle\n uint256 capital; // net investment capital amount (<= balance)\n uint256 lockedCapital; // capital amount linked to collateralizaion of non-closed policies (<= capital)\n uint256 balance; // total amount of funds: net investment capital + net premiums - payouts\n uint256 createdAt;\n uint256 updatedAt;\n }\n\n function getChainId() external view returns(uint256 chainId);\n function getInstanceId() external view returns(bytes32 instanceId);\n function getInstanceOperator() external view returns(address instanceOperator);\n\n function getComponent(uint256 componentId) external view returns(IComponent component);\n function getComponentType(uint256 componentId) external view returns(ComponentType componentType);\n function getComponentState(uint256 componentId) external view returns(ComponentState componentState);\n function getComponentToken(uint256 componentId) external view returns(IERC20Metadata token);\n\n function getBundle(uint256 bundleId) external view returns(Bundle memory bundle);\n}",
"sourceMap": "",
"sourcePath": "contracts/registry/IInstanceServiceFacade.sol",
"type": "interface"
}