UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

1,519 lines (1,518 loc) 64.9 kB
{ "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": "LogOracleApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "oracleAddress", "type": "address" } ], "name": "LogOracleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogOracleDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogOracleProposed", "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": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "cancel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "declineCallback", "outputs": [], "stateMutability": "nonpayable", "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": "getRegistry", "outputs": [ { "internalType": "contract IRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "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": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "bytes", "name": "input", "type": "bytes" } ], "name": "request", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "resumeCallback", "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/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol", "10": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "13": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Oracle.sol", "16": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "18": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol", "21": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "23": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol", "24": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol", "25": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "26": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol", "27": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol", "28": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol", "29": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol", "4": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol", "6": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol", "8": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "9": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol" }, "ast": { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Oracle.sol", "exportedSymbols": { "Component": [ 5114 ], "Context": [ 6682 ], "IAccess": [ 6858 ], "IBundle": [ 3612 ], "IBundleToken": [ 4029 ], "IComponent": [ 5218 ], "IComponentEvents": [ 6911 ], "IComponentOwnerService": [ 7044 ], "IERC165": [ 7662 ], "IERC20": [ 4694 ], "IERC721": [ 6660 ], "IInstanceOperatorService": [ 7311 ], "IInstanceService": [ 5668 ], "IOracle": [ 5252 ], "IOracleService": [ 5262 ], "IPolicy": [ 3958 ], "IPool": [ 7160 ], "IProductService": [ 5813 ], "IRegistry": [ 7009 ], "IRiskpoolService": [ 7417 ], "ITreasury": [ 2409 ], "Oracle": [ 2511 ], "Ownable": [ 6795 ] }, "id": 2512, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2411, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "40:22:13" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "file": "./IOracle.sol", "id": 2412, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2512, "sourceUnit": 5253, "src": "66:23:13", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "file": "./Component.sol", "id": 2413, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2512, "sourceUnit": 5115, "src": "91:25:13", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "./IComponent.sol", "id": 2414, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2512, "sourceUnit": 5219, "src": "118:26:13", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol", "file": "../services/IOracleService.sol", "id": 2415, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2512, "sourceUnit": 5263, "src": "146:40:13", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 2416, "name": "IOracle", "nodeType": "IdentifierPath", "referencedDeclaration": 5252, "src": "223:7:13" }, "id": 2417, "nodeType": "InheritanceSpecifier", "src": "223:7:13" }, { "baseName": { "id": 2418, "name": "Component", "nodeType": "IdentifierPath", "referencedDeclaration": 5114, "src": "238:9:13" }, "id": 2419, "nodeType": "InheritanceSpecifier", "src": "238:9:13" } ], "contractDependencies": [ 5114, 5218, 5252, 6682, 6795, 6911 ], "contractKind": "contract", "fullyImplemented": false, "id": 2511, "linearizedBaseContracts": [ 2511, 5114, 6795, 6682, 6911, 5252, 5218 ], "name": "Oracle", "nameLocation": "208:6:13", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2422, "mutability": "mutable", "name": "_oracleService", "nameLocation": "283:14:13", "nodeType": "VariableDeclaration", "scope": 2511, "src": "260:37:13", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IOracleService_$5262", "typeString": "contract IOracleService" }, "typeName": { "id": 2421, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 2420, "name": "IOracleService", "nodeType": "IdentifierPath", "referencedDeclaration": 5262, "src": "260:14:13" }, "referencedDeclaration": 5262, "src": "260:14:13", "typeDescriptions": { "typeIdentifier": "t_contract$_IOracleService_$5262", "typeString": "contract IOracleService" } }, "visibility": "private" }, { "body": { "id": 2435, "nodeType": "Block", "src": "325:153:13", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 2425, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "359:10:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 2426, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "359:12:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "5175657279", "id": 2428, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "395:7:13", "typeDescriptions": { "typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb", "typeString": "literal_string \"Query\"" }, "value": "Query" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb", "typeString": "literal_string \"Query\"" } ], "id": 2427, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "375:19:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 2429, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "375:28:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "359:44:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4f52412d3030313a4143434553535f44454e494544", "id": 2431, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "418:29:13", "typeDescriptions": { "typeIdentifier": "t_stringliteral_a3214b105f8e4fc42f2f6a7934ad3971d0ae822439cb6ceb58541fba4df7e8c0", "typeString": "literal_string \"ERROR:ORA-001:ACCESS_DENIED\"" }, "value": "ERROR:ORA-001:ACCESS_DENIED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_a3214b105f8e4fc42f2f6a7934ad3971d0ae822439cb6ceb58541fba4df7e8c0", "typeString": "literal_string \"ERROR:ORA-001:ACCESS_DENIED\"" } ], "id": 2424, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "336:7:13", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2432, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "336:122:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2433, "nodeType": "ExpressionStatement", "src": "336:122:13" }, { "id": 2434, "nodeType": "PlaceholderStatement", "src": "469:1:13" } ] }, "id": 2436, "name": "onlyQuery", "nameLocation": "315:9:13", "nodeType": "ModifierDefinition", "parameters": { "id": 2423, "nodeType": "ParameterList", "parameters": [], "src": "325:0:13" }, "src": "306:172:13", "virtual": false, "visibility": "internal" }, { "body": { "id": 2464, "nodeType": "Block", "src": "617:135:13", "statements": [ { "expression": { "id": 2455, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 2449, "name": "_oracleService", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2422, "src": "628:14:13", "typeDescriptions": { "typeIdentifier": "t_contract$_IOracleService_$5262", "typeString": "contract IOracleService" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "arguments": [ { "hexValue": "4f7261636c6553657276696365", "id": 2452, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "680:15:13", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b10ffebb48b8cc789ab1dfe7a210b91b4cf99b6d74d0c01c069195f8f6b41b06", "typeString": "literal_string \"OracleService\"" }, "value": "OracleService" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_b10ffebb48b8cc789ab1dfe7a210b91b4cf99b6d74d0c01c069195f8f6b41b06", "typeString": "literal_string \"OracleService\"" } ], "id": 2451, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "660:19:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 2453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "660:36:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2450, "name": "IOracleService", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5262, "src": "645:14:13", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IOracleService_$5262_$", "typeString": "type(contract IOracleService)" } }, "id": 2454, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "645:52:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IOracleService_$5262", "typeString": "contract IOracleService" } }, "src": "628:69:13", "typeDescriptions": { "typeIdentifier": "t_contract$_IOracleService_$5262", "typeString": "contract IOracleService" } }, "id": 2456, "nodeType": "ExpressionStatement", "src": "628:69:13" }, { "eventCall": { "arguments": [ { "arguments": [ { "id": 2460, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "738:4:13", "typeDescriptions": { "typeIdentifier": "t_contract$_Oracle_$2511", "typeString": "contract Oracle" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Oracle_$2511", "typeString": "contract Oracle" } ], "id": 2459, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "730:7:13", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 2458, "name": "address", "nodeType": "ElementaryTypeName", "src": "730:7:13", "typeDescriptions": {} } }, "id": 2461, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "730:13:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2457, "name": "LogOracleCreated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5227, "src": "713:16:13", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 2462, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "713:31:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2463, "nodeType": "EmitStatement", "src": "708:36:13" } ] }, "id": 2465, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "id": 2443, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2438, "src": "574:4:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "expression": { "id": 2444, "name": "ComponentType", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5121, "src": "580:13:13", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_ComponentType_$5121_$", "typeString": "type(enum IComponent.ComponentType)" } }, "id": 2445, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "Oracle", "nodeType": "MemberAccess", "referencedDeclaration": 5118, "src": "580:20:13", "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentType_$5121", "typeString": "enum IComponent.ComponentType" } }, { "id": 2446, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2440, "src": "602:8:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "id": 2447, "modifierName": { "id": 2442, "name": "Component", "nodeType": "IdentifierPath", "referencedDeclaration": 5114, "src": "564:9:13" }, "nodeType": "ModifierInvocation", "src": "564:47:13" } ], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 2441, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2438, "mutability": "mutable", "name": "name", "nameLocation": "516:4:13", "nodeType": "VariableDeclaration", "scope": 2465, "src": "508:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2437, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "508:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 2440, "mutability": "mutable", "name": "registry", "nameLocation": "539:8:13", "nodeType": "VariableDeclaration", "scope": 2465, "src": "531:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2439, "name": "address", "nodeType": "ElementaryTypeName", "src": "531:7:13", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "497:57:13" }, "returnParameters": { "id": 2448, "nodeType": "ParameterList", "parameters": [], "src": "617:0:13" }, "scope": 2511, "src": "486:266:13", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "baseFunctions": [ 5037 ], "body": { "id": 2474, "nodeType": "Block", "src": "853:52:13", "statements": [ { "eventCall": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 2470, "name": "getId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4867, "src": "888:5:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 2471, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "888:7:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 2469, "name": "LogOracleApproved", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5235, "src": "870:17:13", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "870:26:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2473, "nodeType": "EmitStatement", "src": "865:31:13" } ] }, "id": 2475, "implemented": true, "kind": "function", "modifiers": [], "name": "_afterApprove", "nameLocation": "819:13:13", "nodeType": "FunctionDefinition", "overrides": { "id": 2467, "nodeType": "OverrideSpecifier", "overrides": [], "src": "844:8:13" }, "parameters": { "id": 2466, "nodeType": "ParameterList", "parameters": [], "src": "832:2:13" }, "returnParameters": { "id": 2468, "nodeType": "ParameterList", "parameters": [], "src": "853:0:13" }, "scope": 2511, "src": "810:95:13", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "baseFunctions": [ 5033 ], "body": { "id": 2484, "nodeType": "Block", "src": "956:36:13", "statements": [ { "eventCall": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 2480, "name": "getId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4867, "src": "981:5:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 2481, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "981:7:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 2479, "name": "LogOracleProposed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5231, "src": "963:17:13", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 2482, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "963:26:13", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2483, "nodeType": "EmitStatement", "src": "958:31:13" } ] }, "id": 2485, "implemented": true, "kind": "function", "modifiers": [], "name": "_afterPropose", "nameLocation": "922:13:13", "nodeType": "FunctionDefinition", "overrides": { "id": 2477, "nodeType": "OverrideSpecifier", "overrides": [], "src": "947:8:13" }, "parameters": { "id": 2476, "nodeType": "ParameterList", "parameters": [],