UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,174 lines (1,173 loc) 69.7 kB
{ "contractName": "WitnetPriceFeedsData", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"The Witnet Foundation.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"WitnetFeeds data model.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/data/WitnetPriceFeedsData.sol\":\"WitnetPriceFeedsData\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/data/WitnetPriceFeedsData.sol\":{\"keccak256\":\"0x8cc848254deb42ab5c6d29d02c312c42cbee2b88f9dfed4289f990faa9079787\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://23922b87c483c75397f5a5a8837ac8feef98517893dc4f38ec3f8f830263f15c\",\"dweb:/ipfs/QmUk9Re19ft1qqpPbG4RDMuZRe9Cj7dChHhhVmvjeH3GLj\"]}},\"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\n/// @title WitnetFeeds data model.\r\n/// @author The Witnet Foundation.\r\nabstract contract WitnetPriceFeedsData {\r\n \r\n bytes32 private constant _WITNET_FEEDS_DATA_SLOTHASH =\r\n /* keccak256(\"io.witnet.feeds.data\") */\r\n 0xe36ea87c48340f2c23c9e1c9f72f5c5165184e75683a4d2a19148e5964c1d1ff;\r\n\r\n struct Storage {\r\n bytes32 reserved;\r\n bytes4[] ids;\r\n mapping (bytes4 => Record) records;\r\n }\r\n\r\n struct Record {\r\n string caption;\r\n uint8 decimals;\r\n uint256 index;\r\n uint256 lastValidQueryId;\r\n uint256 latestUpdateQueryId;\r\n bytes32 radHash;\r\n address solver; // logic contract address for reducing values on routed feeds.\r\n int256 solverReductor; // as to reduce resulting number of decimals on routed feeds.\r\n bytes32 solverDepsFlag; // as to store ids of up to 8 depending feeds.\r\n }\r\n\r\n // ================================================================================================\r\n // --- Internal functions -------------------------------------------------------------------------\r\n \r\n /// @notice Returns storage pointer to where Storage data is located. \r\n function __storage()\r\n internal pure\r\n returns (Storage storage _ptr)\r\n {\r\n assembly {\r\n _ptr.slot := _WITNET_FEEDS_DATA_SLOTHASH\r\n }\r\n }\r\n\r\n /// @notice Returns storage pointer to where Record for given feedId is located.\r\n function __records_(bytes4 feedId) internal view returns (Record storage) {\r\n return __storage().records[feedId];\r\n }\r\n\r\n /// @notice Returns array of feed ids from which given feed's value depends.\r\n /// @dev Returns empty array on either unsupported or not-routed feeds.\r\n /// @dev The maximum number of dependencies is hard-limited to 8, as to limit number\r\n /// @dev of SSTORE operations (`__storage().records[feedId].solverDepsFlag`), \r\n /// @dev no matter the actual number of depending feeds involved.\r\n function _depsOf(bytes4 feedId) internal view returns (bytes4[] memory _deps) {\r\n bytes32 _solverDepsFlag = __storage().records[feedId].solverDepsFlag;\r\n _deps = new bytes4[](8);\r\n uint _len;\r\n for (_len = 0; _len < 8; _len ++) {\r\n _deps[_len] = bytes4(_solverDepsFlag);\r\n if (_deps[_len] == 0) {\r\n break;\r\n } else {\r\n _solverDepsFlag <<= 32;\r\n }\r\n }\r\n assembly {\r\n // reset length to actual number of dependencies:\r\n mstore(_deps, _len)\r\n }\r\n }\r\n}", "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\data\\WitnetPriceFeedsData.sol", "ast": { "absolutePath": "project:/contracts/data/WitnetPriceFeedsData.sol", "exportedSymbols": { "WitnetPriceFeedsData": [ 12523 ] }, "id": 12524, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 12398, "literals": [ "solidity", ">=", "0.8", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:42" }, { "abstract": true, "baseContracts": [], "canonicalName": "WitnetPriceFeedsData", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 12399, "nodeType": "StructuredDocumentation", "src": "70:72:42", "text": "@title WitnetFeeds data model.\n @author The Witnet Foundation." }, "fullyImplemented": true, "id": 12523, "linearizedBaseContracts": [ 12523 ], "name": "WitnetPriceFeedsData", "nameLocation": "160:20:42", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 12402, "mutability": "constant", "name": "_WITNET_FEEDS_DATA_SLOTHASH", "nameLocation": "219:27:42", "nodeType": "VariableDeclaration", "scope": 12523, "src": "194:179:42", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12400, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "194:7:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "hexValue": "307865333665613837633438333430663263323363396531633966373266356335313635313834653735363833613464326131393134386535393634633164316666", "id": 12401, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "307:66:42", "typeDescriptions": { "typeIdentifier": "t_rational_102870532649550640918916337984399476240450370322567595419840603618230916993535_by_1", "typeString": "int_const 1028...(70 digits omitted)...3535" }, "value": "0xe36ea87c48340f2c23c9e1c9f72f5c5165184e75683a4d2a19148e5964c1d1ff" }, "visibility": "private" }, { "canonicalName": "WitnetPriceFeedsData.Storage", "id": 12413, "members": [ { "constant": false, "id": 12404, "mutability": "mutable", "name": "reserved", "nameLocation": "416:8:42", "nodeType": "VariableDeclaration", "scope": 12413, "src": "408:16:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12403, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "408:7:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 12407, "mutability": "mutable", "name": "ids", "nameLocation": "444:3:42", "nodeType": "VariableDeclaration", "scope": 12413, "src": "435:12:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr", "typeString": "bytes4[]" }, "typeName": { "baseType": { "id": 12405, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "435:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "id": 12406, "nodeType": "ArrayTypeName", "src": "435:8:42", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr", "typeString": "bytes4[]" } }, "visibility": "internal" }, { "constant": false, "id": 12412, "mutability": "mutable", "name": "records", "nameLocation": "485:7:42", "nodeType": "VariableDeclaration", "scope": 12413, "src": "458:34:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_Record_$12432_storage_$", "typeString": "mapping(bytes4 => struct WitnetPriceFeedsData.Record)" }, "typeName": { "id": 12411, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { "id": 12408, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "467:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "Mapping", "src": "458:26:42", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_Record_$12432_storage_$", "typeString": "mapping(bytes4 => struct WitnetPriceFeedsData.Record)" }, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { "id": 12410, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12409, "name": "Record", "nameLocations": [ "477:6:42" ], "nodeType": "IdentifierPath", "referencedDeclaration": 12432, "src": "477:6:42" }, "referencedDeclaration": 12432, "src": "477:6:42", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Record" } } }, "visibility": "internal" } ], "name": "Storage", "nameLocation": "389:7:42", "nodeType": "StructDefinition", "scope": 12523, "src": "382:118:42", "visibility": "public" }, { "canonicalName": "WitnetPriceFeedsData.Record", "id": 12432, "members": [ { "constant": false, "id": 12415, "mutability": "mutable", "name": "caption", "nameLocation": "541:7:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "533:15:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" }, "typeName": { "id": 12414, "name": "string", "nodeType": "ElementaryTypeName", "src": "533:6:42", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" }, { "constant": false, "id": 12417, "mutability": "mutable", "name": "decimals", "nameLocation": "567:8:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "559:16:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 12416, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "559:5:42", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "visibility": "internal" }, { "constant": false, "id": 12419, "mutability": "mutable", "name": "index", "nameLocation": "594:5:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "586:13:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12418, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "586:7:42", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 12421, "mutability": "mutable", "name": "lastValidQueryId", "nameLocation": "618:16:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "610:24:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12420, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "610:7:42", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 12423, "mutability": "mutable", "name": "latestUpdateQueryId", "nameLocation": "653:19:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "645:27:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12422, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "645:7:42", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 12425, "mutability": "mutable", "name": "radHash", "nameLocation": "691:7:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "683:15:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12424, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "683:7:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 12427, "mutability": "mutable", "name": "solver", "nameLocation": "717:6:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "709:14:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 12426, "name": "address", "nodeType": "ElementaryTypeName", "src": "709:7:42", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 12429, "mutability": "mutable", "name": "solverReductor", "nameLocation": "813:14:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "805:22:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 12428, "name": "int256", "nodeType": "ElementaryTypeName", "src": "805:6:42", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" }, { "constant": false, "id": 12431, "mutability": "mutable", "name": "solverDepsFlag", "nameLocation": "908:14:42", "nodeType": "VariableDeclaration", "scope": 12432, "src": "900:22:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12430, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "900:7:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "name": "Record", "nameLocation": "515:6:42", "nodeType": "StructDefinition", "scope": 12523, "src": "508:469:42", "visibility": "public" }, { "body": { "id": 12440, "nodeType": "Block", "src": "1362:93:42", "statements": [ { "AST": { "nativeSrc": "1382:66:42", "nodeType": "YulBlock", "src": "1382:66:42", "statements": [ { "nativeSrc": "1397:40:42", "nodeType": "YulAssignment", "src": "1397:40:42", "value": { "name": "_WITNET_FEEDS_DATA_SLOTHASH", "nativeSrc": "1410:27:42", "nodeType": "YulIdentifier", "src": "1410:27:42" }, "variableNames": [ { "name": "_ptr.slot", "nativeSrc": "1397:9:42", "nodeType": "YulIdentifier", "src": "1397:9:42" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 12402, "isOffset": false, "isSlot": false, "src": "1410:27:42", "valueSize": 1 }, { "declaration": 12437, "isOffset": false, "isSlot": true, "src": "1397:9:42", "suffix": "slot", "valueSize": 1 } ], "id": 12439, "nodeType": "InlineAssembly", "src": "1373:75:42" } ] }, "documentation": { "id": 12433, "nodeType": "StructuredDocumentation", "src": "1201:70:42", "text": "@notice Returns storage pointer to where Storage data is located. " }, "id": 12441, "implemented": true, "kind": "function", "modifiers": [], "name": "__storage", "nameLocation": "1286:9:42", "nodeType": "FunctionDefinition", "parameters": { "id": 12434, "nodeType": "ParameterList", "parameters": [], "src": "1295:2:42" }, "returnParameters": { "id": 12438, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 12437, "mutability": "mutable", "name": "_ptr", "nameLocation": "1351:4:42", "nodeType": "VariableDeclaration", "scope": 12441, "src": "1335:20:42", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Storage_$12413_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Storage" }, "typeName": { "id": 12436, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12435, "name": "Storage", "nameLocations": [ "1335:7:42" ], "nodeType": "IdentifierPath", "referencedDeclaration": 12413, "src": "1335:7:42" }, "referencedDeclaration": 12413, "src": "1335:7:42", "typeDescriptions": { "typeIdentifier": "t_struct$_Storage_$12413_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Storage" } }, "visibility": "internal" } ], "src": "1334:22:42" }, "scope": 12523, "src": "1277:178:42", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 12456, "nodeType": "Block", "src": "1623:53:42", "statements": [ { "expression": { "baseExpression": { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 12450, "name": "__storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12441, "src": "1641:9:42", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$12413_storage_ptr_$", "typeString": "function () pure returns (struct WitnetPriceFeedsData.Storage storage pointer)" } }, "id": 12451, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1641:11:42", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_Storage_$12413_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Storage storage pointer" } }, "id": 12452, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1653:7:42", "memberName": "records", "nodeType": "MemberAccess", "referencedDeclaration": 12412, "src": "1641:19:42", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_Record_$12432_storage_$", "typeString": "mapping(bytes4 => struct WitnetPriceFeedsData.Record storage ref)" } }, "id": 12454, "indexExpression": { "id": 12453, "name": "feedId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12444, "src": "1661:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1641:27:42", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage", "typeString": "struct WitnetPriceFeedsData.Record storage ref" } }, "functionReturnParameters": 12449, "id": 12455, "nodeType": "Return", "src": "1634:34:42" } ] }, "documentation": { "id": 12442, "nodeType": "StructuredDocumentation", "src": "1463:80:42", "text": "@notice Returns storage pointer to where Record for given feedId is located." }, "id": 12457, "implemented": true, "kind": "function", "modifiers": [], "name": "__records_", "nameLocation": "1558:10:42", "nodeType": "FunctionDefinition", "parameters": { "id": 12445, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 12444, "mutability": "mutable", "name": "feedId", "nameLocation": "1576:6:42", "nodeType": "VariableDeclaration", "scope": 12457, "src": "1569:13:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 12443, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1569:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "1568:15:42" }, "returnParameters": { "id": 12449, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 12448, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 12457, "src": "1607:14:42", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Record" }, "typeName": { "id": 12447, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12446, "name": "Record", "nameLocations": [ "1607:6:42" ], "nodeType": "IdentifierPath", "referencedDeclaration": 12432, "src": "1607:6:42" }, "referencedDeclaration": 12432, "src": "1607:6:42", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Record" } }, "visibility": "internal" } ], "src": "1606:16:42" }, "scope": 12523, "src": "1549:127:42", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 12521, "nodeType": "Block", "src": "2166:515:42", "statements": [ { "assignments": [ 12467 ], "declarations": [ { "constant": false, "id": 12467, "mutability": "mutable", "name": "_solverDepsFlag", "nameLocation": "2185:15:42", "nodeType": "VariableDeclaration", "scope": 12521, "src": "2177:23:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12466, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2177:7:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "id": 12474, "initialValue": { "expression": { "baseExpression": { "expression": { "arguments": [], "expression": { "argumentTypes": [], "id": 12468, "name": "__storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12441, "src": "2203:9:42", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$12413_storage_ptr_$", "typeString": "function () pure returns (struct WitnetPriceFeedsData.Storage storage pointer)" } }, "id": 12469, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2203:11:42", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_Storage_$12413_storage_ptr", "typeString": "struct WitnetPriceFeedsData.Storage storage pointer" } }, "id": 12470, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2215:7:42", "memberName": "records", "nodeType": "MemberAccess", "referencedDeclaration": 12412, "src": "2203:19:42", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes4_$_t_struct$_Record_$12432_storage_$", "typeString": "mapping(bytes4 => struct WitnetPriceFeedsData.Record storage ref)" } }, "id": 12472, "indexExpression": { "id": 12471, "name": "feedId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12460, "src": "2223:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2203:27:42", "typeDescriptions": { "typeIdentifier": "t_struct$_Record_$12432_storage", "typeString": "struct WitnetPriceFeedsData.Record storage ref" } }, "id": 12473, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2231:14:42", "memberName": "solverDepsFlag", "nodeType": "MemberAccess", "referencedDeclaration": 12431, "src": "2203:42:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", "src": "2177:68:42" }, { "expression": { "id": 12481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 12475, "name": "_deps", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12464, "src": "2256:5:42", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr", "typeString": "bytes4[] memory" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "hexValue": "38", "id": 12479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2277:1:42", "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" } ], "id": 12478, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "2264:12:42", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes4_$dyn_memory_ptr_$", "typeString": "function (uint256) pure returns (bytes4[] memory)" }, "typeName": { "baseType": { "id": 12476, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2268:6:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "id": 12477, "nodeType": "ArrayTypeName", "src": "2268:8:42", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_storage_ptr", "typeString": "bytes4[]" } } }, "id": 12480, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2264:15:42", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr", "typeString": "bytes4[] memory" } }, "src": "2256:23:42", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr", "typeString": "bytes4[] memory" } }, "id": 12482, "nodeType": "ExpressionStatement", "src": "2256:23:42" }, { "assignments": [ 12484 ], "declarations": [ { "constant": false, "id": 12484, "mutability": "mutable", "name": "_len", "nameLocation": "2295:4:42", "nodeType": "VariableDeclaration", "scope": 12521, "src": "2290:9:42", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12483, "name": "uint", "nodeType": "ElementaryTypeName", "src": "2290:4:42", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 12485, "nodeType": "VariableDeclarationStatement", "src": "2290:9:42" }, { "body": { "id": 12518, "nodeType": "Block", "src": "2344:203:42", "statements": [ { "expression": { "id": 12503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "id": 12496, "name": "_deps", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12464, "src": "2359:5:42", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr", "typeString": "bytes4[] memory" } }, "id": 12498, "indexExpression": { "id": 12497, "name": "_len", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12484, "src": "2365:4:42", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "2359:11:42", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 12501, "name": "_solverDepsFlag", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12467, "src": "2380:15:42", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 12500, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2373:6:42", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes4_$", "typeString": "type(bytes4)" }, "typeName": { "id": 12499, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2373:6:42", "typeDescriptions": {} } }, "id": 12502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false,