UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,117 lines (1,116 loc) 121 kB
{ "contractName": "WitnetPriceSolverBase", "abi": [ { "inputs": [], "name": "class", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "delegator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "feedId", "type": "bytes4" } ], "name": "solve", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes32", "name": "tallyHash", "type": "bytes32" }, { "internalType": "enum WitnetV2.ResponseStatus", "name": "status", "type": "uint8" } ], "internalType": "struct IWitnetPriceSolver.Price", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "specs", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "feedId", "type": "bytes4" }, { "internalType": "string[]", "name": "deps", "type": "string[]" } ], "name": "validate", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"class\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delegator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"solve\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"enum WitnetV2.ResponseStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"internalType\":\"struct IWitnetPriceSolver.Price\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"specs\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"},{\"internalType\":\"string[]\",\"name\":\"deps\",\"type\":\"string[]\"}],\"name\":\"validate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/apps/WitnetPriceSolverBase.sol\":\"WitnetPriceSolverBase\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/apps/WitnetPriceSolverBase.sol\":{\"keccak256\":\"0x90d7ecc62519ed28fc34865114f743370a765c55e08d9a18aff170e6e04aac52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5edf526b249c5aa52987b000646cc8dc857202bdc7b49edb811662a17c095fed\",\"dweb:/ipfs/QmNvucZLiE2uQoRt4p2X3oGsBdDgjhpE5DcF4c3FR28Wyo\"]},\"project:/contracts/data/WitnetPriceFeedsData.sol\":{\"keccak256\":\"0x8cc848254deb42ab5c6d29d02c312c42cbee2b88f9dfed4289f990faa9079787\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://23922b87c483c75397f5a5a8837ac8feef98517893dc4f38ec3f8f830263f15c\",\"dweb:/ipfs/QmUk9Re19ft1qqpPbG4RDMuZRe9Cj7dChHhhVmvjeH3GLj\"]},\"project:/contracts/interfaces/IWitnetPriceFeeds.sol\":{\"keccak256\":\"0xa667f859734bc20c34a07c35a9fda348e4f3242a8d2391b84c4ac8534fbcdc7d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://81e6a9286ce05cbac22b05e89e6ed9395a5650d73aeef778bbf50b845539ab7d\",\"dweb:/ipfs/QmT26ovLwnCkGmXC7mF3CrmcZEJa3rxQF2YT97mnuxUyqz\"]},\"project:/contracts/interfaces/IWitnetPriceSolver.sol\":{\"keccak256\":\"0x858441dafaa0617a8d679b3cda493b418284d865899c3f235cb3f41535db7a16\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43d25f8985aede9c32cee369872a9f21db41c7b9abc87d5d4d02ff7e15879b98\",\"dweb:/ipfs/QmdoZnVpx9FZeg8KHgMjGRLmVKtdn7zzFTadFUjT8xd3dR\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x65a87375dd79d63a83fb454b7199b6c999bd59c50b3b59d521c5c4d45a7d3cc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca865b681d810c2fc5c3672ea6343c3bdf6fd71764ab824d25994744dc85866b\",\"dweb:/ipfs/QmPGcP3xGTNZfsQ9GSKdujNLRVs8dWDdubyUko1rbQqJNv\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0xa14570492eb5a313ddbacae0185c850ec99c67211eb33989a5e21d31bf06a150\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e83c11edb49cab6a767c0b685825bc22ece0d3d2897e0d54fe1923df5cc76ba5\",\"dweb:/ipfs/QmdLDgCc3tnKbgRrXwfNzsg6uUDirNmjvBB8V3iMmnD69a\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xb346547ff731163beea2c657c52675cdf7936691d566a76a045577cf9c34ade0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d4b5b6424a033584b41f1204d635db98fda9ca9bd2a614c9d82539a3e4e6529\",\"dweb:/ipfs/QmW6Qy3wWpzHSECYaCPaf9LWGfPqWDKVoP2kPSNNQu7LMQ\"]},\"project:/contracts/libs/WitnetV2.sol\":{\"keccak256\":\"0xb276a6da373bfbe9cd942dd7e59979cda898215d1e36ab3df95a6d6cc6ff770f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc4890876b9bc64f501ccdd48408bb63724865cb2ce8d2057f6b318540adce7c\",\"dweb:/ipfs/QmPMHPdbCsKBavhiLcaDgQ9EjNSvwwzv8TKffotcCv1ctP\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"../data/WitnetPriceFeedsData.sol\";\r\nimport \"../interfaces/IWitnetPriceFeeds.sol\";\r\n\r\nabstract contract WitnetPriceSolverBase\r\n is\r\n IWitnetPriceSolver,\r\n WitnetPriceFeedsData\r\n{\r\n address public immutable override delegator;\r\n\r\n modifier onlyDelegator {\r\n require(\r\n address(this) == delegator,\r\n \"WitnetPriceSolverBase: not the delegator\"\r\n );\r\n _;\r\n }\r\n\r\n constructor() {\r\n delegator = msg.sender;\r\n }\r\n\r\n function specs() external pure returns (bytes4) {\r\n return type(IWitnetPriceSolver).interfaceId;\r\n }\r\n\r\n function validate(bytes4 feedId, string[] calldata deps) virtual override external {\r\n bytes32 _depsFlag;\r\n uint256 _innerDecimals;\r\n require(\r\n deps.length <= 8,\r\n \"WitnetPriceSolverBase: too many dependencies\"\r\n );\r\n for (uint _ix = 0; _ix < deps.length; _ix ++) {\r\n bytes4 _depsId4 = bytes4(keccak256(bytes(deps[_ix])));\r\n Record storage __depsFeed = __records_(_depsId4);\r\n require(\r\n __depsFeed.index > 0, \r\n string(abi.encodePacked(\r\n \"WitnetPriceSolverBase: unsupported \",\r\n deps[_ix]\r\n ))\r\n );\r\n require(\r\n _depsId4 != feedId, \r\n string(abi.encodePacked(\r\n \"WitnetPriceSolverBase: loop on \",\r\n deps[_ix]\r\n ))\r\n );\r\n _depsFlag |= (bytes32(_depsId4) >> (32 * _ix));\r\n _innerDecimals += __depsFeed.decimals;\r\n }\r\n Record storage __feed = __records_(feedId);\r\n __feed.solverReductor = int(uint(__feed.decimals)) - int(_innerDecimals);\r\n __feed.solverDepsFlag = _depsFlag;\r\n }\r\n}", "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\apps\\WitnetPriceSolverBase.sol", "ast": { "absolutePath": "project:/contracts/apps/WitnetPriceSolverBase.sol", "exportedSymbols": { "IWitnetPriceFeeds": [ 13440 ], "IWitnetPriceSolver": [ 13485 ], "Witnet": [ 17557 ], "WitnetBuffer": [ 19191 ], "WitnetCBOR": [ 20734 ], "WitnetPriceFeedsData": [ 12523 ], "WitnetPriceSolverBase": [ 1752 ], "WitnetV2": [ 23640 ] }, "id": 1753, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 1568, "literals": [ "solidity", ">=", "0.8", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:21" }, { "absolutePath": "project:/contracts/data/WitnetPriceFeedsData.sol", "file": "../data/WitnetPriceFeedsData.sol", "id": 1569, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1753, "sourceUnit": 12524, "src": "70:42:21", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "project:/contracts/interfaces/IWitnetPriceFeeds.sol", "file": "../interfaces/IWitnetPriceFeeds.sol", "id": 1570, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1753, "sourceUnit": 13441, "src": "114:45:21", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 1571, "name": "IWitnetPriceSolver", "nameLocations": [ "220:18:21" ], "nodeType": "IdentifierPath", "referencedDeclaration": 13485, "src": "220:18:21" }, "id": 1572, "nodeType": "InheritanceSpecifier", "src": "220:18:21" }, { "baseName": { "id": 1573, "name": "WitnetPriceFeedsData", "nameLocations": [ "249:20:21" ], "nodeType": "IdentifierPath", "referencedDeclaration": 12523, "src": "249:20:21" }, "id": 1574, "nodeType": "InheritanceSpecifier", "src": "249:20:21" } ], "canonicalName": "WitnetPriceSolverBase", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": false, "id": 1752, "linearizedBaseContracts": [ 1752, 12523, 13485 ], "name": "WitnetPriceSolverBase", "nameLocation": "181:21:21", "nodeType": "ContractDefinition", "nodes": [ { "baseFunctions": [ 13463 ], "constant": false, "functionSelector": "ce9b7930", "id": 1577, "mutability": "immutable", "name": "delegator", "nameLocation": "312:9:21", "nodeType": "VariableDeclaration", "overrides": { "id": 1576, "nodeType": "OverrideSpecifier", "overrides": [], "src": "303:8:21" }, "scope": 1752, "src": "278:43:21", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1575, "name": "address", "nodeType": "ElementaryTypeName", "src": "278:7:21", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "public" }, { "body": { "id": 1590, "nodeType": "Block", "src": "353:147:21", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 1582, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "394:4:21", "typeDescriptions": { "typeIdentifier": "t_contract$_WitnetPriceSolverBase_$1752", "typeString": "contract WitnetPriceSolverBase" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_WitnetPriceSolverBase_$1752", "typeString": "contract WitnetPriceSolverBase" } ], "id": 1581, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "386:7:21", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 1580, "name": "address", "nodeType": "ElementaryTypeName", "src": "386:7:21", "typeDescriptions": {} } }, "id": 1583, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "386:13:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "id": 1584, "name": "delegator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1577, "src": "403:9:21", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "386:26:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5769746e65745072696365536f6c766572426173653a206e6f74207468652064656c656761746f72", "id": 1586, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "427:42:21", "typeDescriptions": { "typeIdentifier": "t_stringliteral_09b28d66d94b570c50ce4517d8a41eadc931aee6a9a779c80e6a2677c79ced8c", "typeString": "literal_string \"WitnetPriceSolverBase: not the delegator\"" }, "value": "WitnetPriceSolverBase: not the delegator" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_09b28d66d94b570c50ce4517d8a41eadc931aee6a9a779c80e6a2677c79ced8c", "typeString": "literal_string \"WitnetPriceSolverBase: not the delegator\"" } ], "id": 1579, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "364:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "364:116:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1588, "nodeType": "ExpressionStatement", "src": "364:116:21" }, { "id": 1589, "nodeType": "PlaceholderStatement", "src": "491:1:21" } ] }, "id": 1591, "name": "onlyDelegator", "nameLocation": "339:13:21", "nodeType": "ModifierDefinition", "parameters": { "id": 1578, "nodeType": "ParameterList", "parameters": [], "src": "353:0:21" }, "src": "330:170:21", "virtual": false, "visibility": "internal" }, { "body": { "id": 1599, "nodeType": "Block", "src": "522:41:21", "statements": [ { "expression": { "id": 1597, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 1594, "name": "delegator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1577, "src": "533:9:21", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 1595, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, "src": "545:3:21", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1596, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "549:6:21", "memberName": "sender", "nodeType": "MemberAccess", "src": "545:10:21", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "533:22:21", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1598, "nodeType": "ExpressionStatement", "src": "533:22:21" } ] }, "id": 1600, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 1592, "nodeType": "ParameterList", "parameters": [], "src": "519:2:21" }, "returnParameters": { "id": 1593, "nodeType": "ParameterList", "parameters": [], "src": "522:0:21" }, "scope": 1752, "src": "508:55:21", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "baseFunctions": [ 13476 ], "body": { "id": 1610, "nodeType": "Block", "src": "619:62:21", "statements": [ { "expression": { "expression": { "arguments": [ { "id": 1606, "name": "IWitnetPriceSolver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13485, "src": "642:18:21", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IWitnetPriceSolver_$13485_$", "typeString": "type(contract IWitnetPriceSolver)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_contract$_IWitnetPriceSolver_$13485_$", "typeString": "type(contract IWitnetPriceSolver)" } ], "id": 1605, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967269, "src": "637:4:21", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 1607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "637:24:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_contract$_IWitnetPriceSolver_$13485", "typeString": "type(contract IWitnetPriceSolver)" } }, "id": 1608, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "662:11:21", "memberName": "interfaceId", "nodeType": "MemberAccess", "src": "637:36:21", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "functionReturnParameters": 1604, "id": 1609, "nodeType": "Return", "src": "630:43:21" } ] }, "functionSelector": "adb7c3f7", "id": 1611, "implemented": true, "kind": "function", "modifiers": [], "name": "specs", "nameLocation": "580:5:21", "nodeType": "FunctionDefinition", "parameters": { "id": 1601, "nodeType": "ParameterList", "parameters": [], "src": "585:2:21" }, "returnParameters": { "id": 1604, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1603, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1611, "src": "611:6:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 1602, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "611:6:21", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "610:8:21" }, "scope": 1752, "src": "571:110:21", "stateMutability": "pure", "virtual": false, "visibility": "external" }, { "baseFunctions": [ 13484 ], "body": { "id": 1750, "nodeType": "Block", "src": "772:1138:21", "statements": [ { "assignments": [ 1621 ], "declarations": [ { "constant": false, "id": 1621, "mutability": "mutable", "name": "_depsFlag", "nameLocation": "791:9:21", "nodeType": "VariableDeclaration", "scope": 1750, "src": "783:17:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1620, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "783:7:21", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "id": 1622, "nodeType": "VariableDeclarationStatement", "src": "783:17:21" }, { "assignments": [ 1624 ], "declarations": [ { "constant": false, "id": 1624, "mutability": "mutable", "name": "_innerDecimals", "nameLocation": "819:14:21", "nodeType": "VariableDeclaration", "scope": 1750, "src": "811:22:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1623, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "811:7:21", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 1625, "nodeType": "VariableDeclarationStatement", "src": "811:22:21" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1630, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 1627, "name": "deps", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1616, "src": "866:4:21", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_calldata_ptr_$dyn_calldata_ptr", "typeString": "string calldata[] calldata" } }, "id": 1628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "871:6:21", "memberName": "length", "nodeType": "MemberAccess", "src": "866:11:21", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "hexValue": "38", "id": 1629, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "881:1:21", "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "866:16:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5769746e65745072696365536f6c766572426173653a20746f6f206d616e7920646570656e64656e63696573", "id": 1631, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "897:46:21", "typeDescriptions": { "typeIdentifier": "t_stringliteral_066add64d8d0ea07c83d46cc88e3e91cfd813ae7dfd13056cc0ea0af79ad63fb", "typeString": "literal_string \"WitnetPriceSolverBase: too many dependencies\"" }, "value": "WitnetPriceSolverBase: too many dependencies" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_066add64d8d0ea07c83d46cc88e3e91cfd813ae7dfd13056cc0ea0af79ad63fb", "typeString": "literal_string \"WitnetPriceSolverBase: too many dependencies\"" } ], "id": 1626, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "844:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1632, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "844:110:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1633, "nodeType": "ExpressionStatement", "src": "844:110:21" }, { "body": { "id": 1717, "nodeType": "Block", "src": "1011:712:21", "statements": [ { "assignments": [ 1646 ], "declarations": [ { "constant": false, "id": 1646, "mutability": "mutable", "name": "_depsId4", "nameLocation": "1033:8:21", "nodeType": "VariableDeclaration", "scope": 1717, "src": "1026:15:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 1645, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1026:6:21", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "id": 1658, "initialValue": { "arguments": [ { "arguments": [ { "arguments": [ { "baseExpression": { "id": 1652, "name": "deps", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1616, "src": "1067:4:21", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_calldata_ptr_$dyn_calldata_ptr", "typeString": "string calldata[] calldata" } }, "id": 1654, "indexExpression": { "id": 1653, "name": "_ix", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1635, "src": "1072:3:21", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1067:9:21", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } ], "id": 1651, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1061:5:21", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", "typeString": "type(bytes storage pointer)" }, "typeName": { "id": 1650, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1061:5:21", "typeDescriptions": {} } }, "id": 1655, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1061:16:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } ], "id": 1649, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967288, "src": "1051:9:21", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, "id": 1656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1051:27:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 1648, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1044:6:21", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes4_$", "typeString": "type(bytes4)" }, "typeName": { "id": 1647, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1044:6:21", "typeDescriptions": {} } }, "id": 1657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1044:35:21", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "VariableDeclarationStatement", "src": "1026:53:21" }, { "assignments": [ 1661 ], "declarations": [ { "constant": false, "id": 1661, "mutability": "mutable", "name": "__depsFeed", "nameLocation": "1109:10:21", "nodeType": "VariableDeclaration", "scope": 1717, "src": "1094:25:21", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Record" }, "typeName": { "id": 1660, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 1659, "name": "Record", "nameLocations": [