@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,549 lines • 289 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "oracleName",
"type": "bytes32"
},
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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": [
{
"internalType": "uint256",
"name": "requestId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isLossEvent",
"type": "bool"
}
],
"name": "respond",
"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": {
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol",
"30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"31": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol",
"34": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Oracle.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol",
"47": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol",
"48": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol",
"49": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol",
"50": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol",
"51": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"95": "contracts/test/TestOracle.sol"
},
"ast": {
"absolutePath": "contracts/test/TestOracle.sol",
"exportedSymbols": {
"Component": [
25407
],
"Context": [
24074
],
"IAccess": [
21938
],
"IBundle": [
20491
],
"IBundleToken": [
24052
],
"IComponent": [
22099
],
"IComponentEvents": [
22419
],
"IComponentOwnerService": [
23478
],
"IERC165": [
27203
],
"IERC20": [
18510
],
"IERC721": [
23745
],
"IInstanceOperatorService": [
23629
],
"IInstanceService": [
22849
],
"IOracle": [
22133
],
"IOracleService": [
23755
],
"IPolicy": [
20837
],
"IPool": [
21652
],
"IProductService": [
23900
],
"IRegistry": [
21750
],
"IRiskpoolService": [
24006
],
"ITreasury": [
23443
],
"Oracle": [
17368
],
"Ownable": [
20950
],
"TestOracle": [
16071
]
},
"id": 16072,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 15967,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:95"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Oracle.sol",
"file": "@etherisc/gif-interface/contracts/components/Oracle.sol",
"id": 15968,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 16072,
"sourceUnit": 17369,
"src": "63:65:95",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 15969,
"name": "Oracle",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17368,
"src": "153:6:95"
},
"id": 15970,
"nodeType": "InheritanceSpecifier",
"src": "153:6:95"
}
],
"contractDependencies": [
17368,
20950,
22099,
22133,
22419,
24074,
25407
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 16071,
"linearizedBaseContracts": [
16071,
17368,
25407,
20950,
24074,
22419,
22133,
22099
],
"name": "TestOracle",
"nameLocation": "139:10:95",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 15981,
"nodeType": "Block",
"src": "280:3:95",
"statements": []
},
"id": 15982,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"id": 15977,
"name": "oracleName",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15972,
"src": "254:10:95",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 15978,
"name": "registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15974,
"src": "266:8:95",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 15979,
"modifierName": {
"id": 15976,
"name": "Oracle",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17368,
"src": "247:6:95"
},
"nodeType": "ModifierInvocation",
"src": "247:28:95"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15975,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15972,
"mutability": "mutable",
"name": "oracleName",
"nameLocation": "196:10:95",
"nodeType": "VariableDeclaration",
"scope": 15982,
"src": "188:18:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15971,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "188:7:95",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 15974,
"mutability": "mutable",
"name": "registry",
"nameLocation": "224:8:95",
"nodeType": "VariableDeclaration",
"scope": 15982,
"src": "216:16:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15973,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "216:7:95",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "178:60:95"
},
"returnParameters": {
"id": 15980,
"nodeType": "ParameterList",
"parameters": [],
"src": "280:0:95"
},
"scope": 16071,
"src": "167:116:95",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
22127
],
"body": {
"id": 16020,
"nodeType": "Block",
"src": "375:481:95",
"statements": [
{
"assignments": [
15993,
15995
],
"declarations": [
{
"constant": false,
"id": 15993,
"mutability": "mutable",
"name": "counter",
"nameLocation": "430:7:95",
"nodeType": "VariableDeclaration",
"scope": 16020,
"src": "422:15:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15992,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "422:7:95",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 15995,
"mutability": "mutable",
"name": "immediateResponse",
"nameLocation": "444:17:95",
"nodeType": "VariableDeclaration",
"scope": 16020,
"src": "439:22:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 15994,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "439:4:95",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 16005,
"initialValue": {
"arguments": [
{
"id": 15998,
"name": "input",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15986,
"src": "476:5:95",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
},
{
"components": [
{
"id": 16000,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "484:7:95",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 15999,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "484:7:95",
"typeDescriptions": {}
}
},
{
"id": 16002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "493:4:95",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 16001,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "493:4:95",
"typeDescriptions": {}
}
}
],
"id": 16003,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "483:15:95",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_bool_$_$",
"typeString": "tuple(type(uint256),type(bool))"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
},
{
"typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_bool_$_$",
"typeString": "tuple(type(uint256),type(bool))"
}
],
"expression": {
"id": 15996,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "465:3:95",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 15997,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "465:10:95",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 16004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "465:34:95",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
"typeString": "tuple(uint256,bool)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "421:78:95"
},
{
"condition": {
"id": 16006,
"name": "immediateResponse",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15995,
"src": "514:17:95",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 16019,
"nodeType": "IfStatement",
"src": "510:340:95",
"trueBody": {
"id": 16018,
"nodeType": "Block",
"src": "533:317:95",
"statements": [
{
"assignments": [
16008
],
"declarations": [
{
"constant": false,
"id": 16008,
"mutability": "mutable",
"name": "isLossEvent",
"nameLocation": "753:11:95",
"nodeType": "VariableDeclaration",
"scope": 16018,
"src": "748:16:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 16007,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "748:4:95",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 16012,
"initialValue": {
"arguments": [
{
"id": 16010,
"name": "counter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15993,
"src": "786:7:95",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 16009,
"name": "_oracleCalculation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16070,
"src": "767:18:95",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$_t_bool_$",
"typeString": "function (uint256) returns (bool)"
}
},
"id": 16011,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "767:27:95",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "748:46:95"
},
{
"expression": {
"arguments": [
{
"id": 16014,
"name": "requestId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15984,
"src": "816:9:95",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 16015,
"name": "isLossEvent",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16008,
"src": "827:11:95",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 16013,
"name": "respond",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16053,
"src": "808:7:95",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_bool_$returns$__$",
"typeString": "function (uint256,bool)"
}
},
"id": 16016,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "808:31:95",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 16017,
"nodeType": "ExpressionStatement",
"src": "808:31:95"
}
]
}
}
]
},
"functionSelector": "ffc79065",
"id": 16021,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 15990,
"modifierName": {
"id": 15989,
"name": "onlyQuery",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17293,
"src": "365:9:95"
},
"nodeType": "ModifierInvocation",
"src": "365:9:95"
}
],
"name": "request",
"nameLocation": "298:7:95",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 15988,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "356:8:95"
},
"parameters": {
"id": 15987,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15984,
"mutability": "mutable",
"name": "requestId",
"nameLocation": "314:9:95",
"nodeType": "VariableDeclaration",
"scope": 16021,
"src": "306:17:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15983,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "306:7:95",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 15986,
"mutability": "mutable",
"name": "input",
"nameLocation": "340:5:95",
"nodeType": "VariableDeclaration",
"scope": 16021,
"src": "325:20:95",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 15985,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "325:5:95",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "305:41:95"
},
"returnParameters": {
"id": 15991,
"nodeType": "ParameterList",
"parameters": [],
"src": "375:0:95"
},
"scope": 16071,
"src": "289:567:95",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"baseFunctions": [
22132
],
"body": {
"id": 16029,
"nodeType": "Block",
"src": "945:131:95",
"statements": []
},
"functionSelector": "40e58ee5",
"id": 16030,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 16027,
"modifierName": {
"id": 16026,
"name": "onlyOwner",
"nodeType": "IdentifierPath",
"referencedDeclaration": 20869,
"src": "931:9:95"
},
"nodeType": "ModifierInvocation",
"src": "931:9:95"
}
],
"name": "cancel",
"nameLocation": "871:6:95",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 16025,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "914:8:95"
},
"parameters": {
"id": 16024,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 16023,
"mutability": "mutable",
"name": "requestId",
"nameLocation": "886:9:95",
"nodeType": "VariableDeclaration",
"scope": 16030,
"src": "878:17:95",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 16022,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "878:7:95",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "877:19:95"
},
"returnParameters": {
"id": 16028,
"nodeType": "ParameterList",
"parameters": [],
"src": "945:0:95"
},
"scope": 16071,
"src": "862:214:95",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 16052,
"nodeType": "Block",
"src": "1301:197:95",
"statements": [
{
"assignments": [
16038
],
"declarations": [
{
"constant": false,
"id": 16038,
"mutability": "mutable",
"name": "output",
"nameLocation": "1368:6:95",
"nodeType": "VariableDeclaration",
"scope": 16052,
"src": "1355:19:95",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 16037,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1355:5:95",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 16046,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 16043,
"name": "isLossEvent",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16034,
"src": "1393:11:95",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 16042,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1388:4:95",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 16041,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1388:4:95",
"typeDescriptions": {}
}
},
"id": 16044,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1388:17:95",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"expression": {
"id": 16039,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "1377:3:95",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 16040,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encode",
"nodeType": "MemberAccess",
"src": "1377:10:95",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 16045,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1377:29:95",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1355:51:95"
},
{
"expression": {
"arguments": [
{
"id": 16048,
"name": "requestId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 16032,
"src": "1473:9:95",
"typeDescriptions": {
"typeIdentifier": "t_uint25