jcc-solidity-utils
Version:
jcc solidity utils
10,892 lines • 470 kB
JSON
{
"contractName": "ChainList",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/ChainList.sol\":\"ChainList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/ChainList.sol\":{\"keccak256\":\"0x89f2e8957412795e5e4296a8f83b787736a043280dcf1d032170838a849e461c\",\"urls\":[\"bzzr://2787c91383da9eabe221e7058451a9e7ed6c75b44e656b0a235888701ed836e6\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]}},\"version\":1}",
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820f82cbac49dbe027212f1999d62475398aec32aa4703bb417ef0df66421216b650029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820f82cbac49dbe027212f1999d62475398aec32aa4703bb417ef0df66421216b650029",
"sourceMap": "91:3335:14:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
"deployedSourceMap": "91:3335:14:-;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @dev 区块链列表\n */\nlibrary ChainList {\n using SafeMath for uint256;\n\n // 遵循BIP44\n struct element {\n // 索引id\n uint256 idx;\n // chain id\n uint256 id;\n string symbol;\n }\n struct chainMap {\n // chain id => index\n mapping(uint256 => uint256) mapId;\n // symbol hash => index\n mapping(bytes32 => uint256) mapSymbol;\n // data array\n element[] list;\n }\n\n function exist(chainMap storage self, uint256 _id)\n internal\n view\n returns (bool)\n {\n if (self.list.length == 0) return false;\n return (self.list[self.mapId[_id]].id == _id &&\n getStringLen(self.list[self.mapId[_id]].symbol) > 0);\n }\n\n function getStringLen(string _str) internal pure returns (uint256) {\n bytes memory b = bytes(_str);\n require(b.length <= 1024, \"too large string make overflow risk\");\n return b.length;\n }\n\n function getHash(string _symbol) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_symbol));\n }\n\n /**\n @dev 增加新定时定义,重复的ID返回失败\n */\n function insert(\n chainMap storage self,\n uint256 _id,\n string _symbol\n ) internal returns (bool) {\n if (exist(self, _id)) {\n return false;\n }\n\n element memory e =\n element({idx: self.list.length, id: _id, symbol: _symbol});\n\n self.list.push(e);\n self.mapId[_id] = e.idx;\n self.mapSymbol[getHash(_symbol)] = e.idx;\n\n return true;\n }\n\n function remove(chainMap storage self, uint256 _id) internal returns (bool) {\n if (!exist(self, _id)) {\n return false;\n }\n\n uint256 row2Del = self.mapId[_id];\n element storage keyToMove = self.list[self.list.length.sub(1)];\n self.list[row2Del] = keyToMove;\n self.mapId[keyToMove.id] = row2Del;\n self.mapSymbol[getHash(keyToMove.symbol)] = row2Del;\n self.list.length = self.list.length.sub(1);\n\n return true;\n }\n\n function count(chainMap storage self) internal view returns (uint256) {\n return self.list.length;\n }\n\n function get(chainMap storage self, uint256 index)\n internal\n view\n returns (ChainList.element)\n {\n require(index < self.list.length, \"index must small than current count\");\n return self.list[index];\n }\n\n function getById(chainMap storage self, uint256 _id)\n internal\n view\n returns (ChainList.element)\n {\n require(exist(self, _id), \"chain data must exist\");\n return self.list[self.mapId[_id]];\n }\n\n function getBySymbol(chainMap storage self, string _symbol)\n internal\n view\n returns (ChainList.element)\n {\n ChainList.element storage e = self.list[self.mapSymbol[getHash(_symbol)]];\n // 因为删除增加操作,map对应的存储未动,要校验一次\n require(exist(self, e.id), \"chain data must exist\");\n return e;\n }\n\n /**\n @dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺\n */\n function getList(\n chainMap storage self,\n uint256 from,\n uint256 _count\n ) internal view returns (ChainList.element[] memory) {\n uint256 _idx = 0;\n require(_count > 0, \"return number must bigger than 0\");\n ChainList.element[] memory res = new ChainList.element[](_count);\n\n for (uint256 i = from; i < self.list.length; i++) {\n if (_idx == _count) {\n break;\n }\n\n res[_idx] = self.list[i];\n _idx = _idx.add(1);\n }\n\n return res;\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/ChainList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/ChainList.sol",
"exportedSymbols": {
"ChainList": [
2746
]
},
"id": 2747,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2328,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:14"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 2329,
"nodeType": "ImportDirective",
"scope": 2747,
"sourceUnit": 5658,
"src": "27:30:14",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 区块链列表",
"fullyImplemented": true,
"id": 2746,
"linearizedBaseContracts": [
2746
],
"name": "ChainList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 2332,
"libraryName": {
"contractScope": null,
"id": 2330,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "119:8:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "113:27:14",
"typeName": {
"id": 2331,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "132:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "ChainList.element",
"id": 2339,
"members": [
{
"constant": false,
"id": 2334,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "198:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2333,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "198:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2336,
"name": "id",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "231:10:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2335,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "231:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2338,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "247:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
},
"typeName": {
"id": 2337,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "247:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 2746,
"src": "161:104:14",
"visibility": "public"
},
{
"canonicalName": "ChainList.chainMap",
"id": 2351,
"members": [
{
"constant": false,
"id": 2343,
"name": "mapId",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "315:33:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 2342,
"keyType": {
"id": 2340,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "323:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "315:27:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 2341,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "334:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2347,
"name": "mapSymbol",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "382:37:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"typeName": {
"id": 2346,
"keyType": {
"id": 2344,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "390:7:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "382:27:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"valueType": {
"id": 2345,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "401:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2350,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "443:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2348,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "443:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2349,
"length": null,
"nodeType": "ArrayTypeName",
"src": "443:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "chainMap",
"nodeType": "StructDefinition",
"scope": 2746,
"src": "268:194:14",
"visibility": "public"
},
{
"body": {
"id": 2393,
"nodeType": "Block",
"src": "560:162:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2360,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "570:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2361,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "570:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2362,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "570:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2363,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "590:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "570:21:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2367,
"nodeType": "IfStatement",
"src": "566:39:14",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2365,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "600:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2359,
"id": 2366,
"nodeType": "Return",
"src": "593:12:14"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2377,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2368,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "619:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2369,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "619:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2374,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2370,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "629:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2371,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "629:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2373,
"indexExpression": {
"argumentTypes": null,
"id": 2372,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "640:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "629:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "619:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2375,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "619:29:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2376,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "652:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "619:36:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2379,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "678:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2380,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "678:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2385,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2381,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "688:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2382,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "688:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2384,
"indexExpression": {
"argumentTypes": null,
"id": 2383,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "699:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "688:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "678:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2386,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "symbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2338,
"src": "678:33:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
],
"id": 2378,
"name": "getStringLen",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2419,
"src": "665:12:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_uint256_$",
"typeString": "function (string memory) pure returns (uint256)"
}
},
"id": 2387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "665:47:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2388,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "715:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "665:51:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "619:97:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 2391,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "618:99:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2359,
"id": 2392,
"nodeType": "Return",
"src": "611:106:14"
}
]
},
"documentation": null,
"id": 2394,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2356,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2353,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "481:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2352,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "481:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2355,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "504:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2354,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "504:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:36:14"
},
"payable": false,
"returnParameters": {
"id": 2359,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2358,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "552:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2357,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "552:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "551:6:14"
},
"scope": 2746,
"src": "466:256:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2418,
"nodeType": "Block",
"src": "793:130:14",
"statements": [
{
"assignments": [
2402
],
"declarations": [
{
"constant": false,
"id": 2402,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "799:14:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2401,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "799:5:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2406,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2404,
"name": "_str",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2396,
"src": "822:4:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2403,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "816:5:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": "bytes"
},
"id": 2405,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "816:11:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "799:28:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2408,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2402,
"src": "841:1:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "841:8:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31303234",
"id": 2410,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "853:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1024_by_1",
"typeString": "int_const 1024"
},
"value": "1024"
},
"src": "841:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "746f6f206c6172676520737472696e67206d616b65206f766572666c6f77207269736b",
"id": 2412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "859:37:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a04837239c708b9348717c3349e4803b1f78ce229ff9fadb01d3b10ea6e3573e",
"typeString": "literal_string \"too large string make overflow risk\""
},
"value": "too large string make overflow risk"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a04837239c708b9348717c3349e4803b1f78ce229ff9fadb01d3b10ea6e3573e",
"typeString": "literal_string \"too large string make overflow risk\""
}
],
"id": 2407,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "833:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "833:64:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2414,
"nodeType": "ExpressionStatement",
"src": "833:64:14"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2415,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2402,
"src": "910:1:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2416,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "910:8:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2400,
"id": 2417,
"nodeType": "Return",
"src": "903:15:14"
}
]
},
"documentation": null,
"id": 2419,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getStringLen",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2397,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2396,
"name": "_str",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "748:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2395,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "748:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "747:13:14"
},
"payable": false,
"returnParameters": {
"id": 2400,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2399,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "784:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2398,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "784:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "783:9:14"
},
"scope": 2746,
"src": "726:197:14",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2433,
"nodeType": "Block",
"src": "992:54:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2429,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2421,
"src": "1032:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"expression": {
"argumentTypes": null,
"id": 2427,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9028,
"src": "1015:3:14",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1015:16:14",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 2430,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1015:25:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2426,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9035,
"src": "1005:9:14",
"typeDescriptions": {
"typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
"typeString": "function () pure returns (bytes32)"
}
},
"id": 2431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1005:36:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 2425,
"id": 2432,
"nodeType": "Return",
"src": "998:43:14"
}
]
},
"documentation": null,
"id": 2434,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2422,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2421,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2434,
"src": "944:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2420,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "944:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "943:16:14"
},
"payable": false,
"returnParameters": {
"id": 2425,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2424,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2434,
"src": "983:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2423,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "983:7:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "982:9:14"
},
"scope": 2746,
"src": "927:119:14",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2493,
"nodeType": "Block",
"src": "1225:266:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2446,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1241:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2447,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1247:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2445,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "1235:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1235:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2452,
"nodeType": "IfStatement",
"src": "1231:49:14",
"trueBody": {
"id": 2451,
"nodeType": "Block",
"src": "1253:27:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2449,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1268:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2444,
"id": 2450,
"nodeType": "Return",
"src": "1261:12:14"
}
]
}
},
{
"assignments": [
2454
],
"declarations": [
{
"constant": false,
"id": 2454,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1286:16:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2453,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "1286:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2462,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2456,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1325:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2457,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1325:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2458,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1325:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2459,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1347:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2460,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2440,
"src": "1360:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": null,
"id": 2455,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2339,
"src": "1311:7:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$2339_storage_ptr_$",
"typeString": "type(struct ChainList.element storage pointer)"
}
},
"id": 2461,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"idx",
"id",
"symbol"
],
"nodeType": "FunctionCall",
"src": "1311:58:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1286:83:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2468,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1391:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2463,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1376:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2466,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1376:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2467,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1376:14:14",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$2339_storage_$returns$_t_uint256_$",
"typeString": "function (struct ChainList.element storage ref) returns (uint256)"
}
},
"id": 2469,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1376:17:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2470,
"nodeType": "ExpressionStatement",
"src": "1376:17:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2471,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1399:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2474,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1399:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2475,
"indexExpression": {
"argumentTypes": null,
"id": 2473,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1410:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1399:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2476,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1417:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
},
"id": 2477,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "1417:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1399:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2479,
"nodeType": "ExpressionStatement",
"src": "1399:23:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2480,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1428:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2485,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "1428:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2486,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2483,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2440,
"src": "1451:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2482,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "1443:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1443:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1428:32:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2487,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1463:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
},
"id": 2488,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "1463:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1428:40:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2490,
"nodeType": "ExpressionStatement",
"src": "1428:40:14"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2491,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1482:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2444,
"id": 2492,
"nodeType": "Return",
"src": "1475:11:14"
}
]
},
"documentation": "@dev 增加新定时定义,重复的ID返回失败",
"id": 2494,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2441,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2436,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1138:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2435,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1138:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2438,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1165:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2437,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1165:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2440,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1182:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2439,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1182:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1132:68:14"
},
"payable": false,
"returnParameters": {
"id": 2444,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2443,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1219:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2442,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1219:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1218:6:14"
},
"scope": 2746,
"src": "1117:374:14",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2574,
"nodeType": "Block",
"src": "1571:367:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 2507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1581:17:14",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2504,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1588:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2505,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2498,
"src": "1594:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2503,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "1582:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1582:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2511,
"nodeType": "IfStatement",
"src": "1577:50:14",
"trueBody": {
"id": 2510,
"nodeType": "Block",
"src": "1600:27:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2508,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1615:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2502,
"id": 2509,
"nodeType": "Return",
"src": "1608:12:14"
}
]
}
},
{
"assignments": [
2513
],
"declarations": [
{
"constant": false,
"id": 2513,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1633:15:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2512,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1633:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2518,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2514,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1651:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2515,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1651:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2517,
"indexExpression": {
"argumentTypes": null,
"id": 2516,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2498,
"src": "1662:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1651:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1633:33:14"
},
{
"assignments": [
2520
],
"declarations": [
{
"constant": false,
"id": 2520,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1672:25:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2519,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "1672:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2530,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2521,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1700:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2522,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1700:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2529,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2527,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1731:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2523,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1710:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2524,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1710:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2525,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1710:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1710:20:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1710:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1700:34:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1672:62:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2531,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1740:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2534,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1740:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2535,
"indexExpression": {
"argumentTypes": null,
"id": 2533,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1750:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1740:18:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2536,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1761:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"src": "1740:30:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2538,
"nodeType": "ExpressionStatement",
"src": "1740:30:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2539,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1776:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2543,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1776:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2544,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2541,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1787:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2542,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "1787:12:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1776:24:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2545,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1803:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1776:34:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2547,
"nodeType": "ExpressionStatement",
"src": "1776:34:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2557,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2548,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1816:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2554,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "1816:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2555,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2551,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1839:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2552,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "symbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2338,
"src": "1839:16:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
],
"id": 2550,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "1831:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1831:25:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1816:41:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2556,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1860:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1816:51:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2558,
"nodeType": "ExpressionStatement",
"src": "1816:51:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2570,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2559,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1873:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2562,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1873:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2563,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1873:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1913:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2564,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1892:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2565,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1892:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2566,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1892:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2567,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1892:20:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1892:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1873:42:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2571,
"nodeType": "ExpressionStatement",
"src": "1873:42:14"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2572,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1929:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2502,
"id": 2573,
"nodeType": "Return",
"src": "1922:11:14"
}
]
},
"documentation": null,
"id": 2575,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2499,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2496,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1511:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2495,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1511:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2498,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1534:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2497,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1534:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1510:36:14"
},
"payable": false,
"returnParameters": {
"id": 2502,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2501,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1565:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2500,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1565:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1564:6:14"
},
"scope": 2746,
"src": "1495:443:14",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2586,
"nodeType": "Block",
"src": "2012:34:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2582,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2577,
"src": "2025:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2583,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2025:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2584,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2025:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2581,
"id": 2585,
"nodeType": "Return",
"src": "2018:23:14"
}
]
},
"documentation": null,
"id": 2587,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2578,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2577,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2587,
"src": "1957:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2576,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1957:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1956:23:14"
},
"payable": false,
"returnParameters": {
"id": 2581,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2580,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2587,
"src": "2003:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2579,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2003:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2002:9:14"
},
"scope": 2746,
"src": "1942:104:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2610,
"nodeType": "Block",
"src": "2157:112:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2601,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2597,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2591,
"src": "2171:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2598,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2589,
"src": "2179:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2179:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2600,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2179:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2171:24:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 2602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2197:37:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ced05a9863658d26be4f7cbaeffebfa53821dabbe1077d21241580b1e9ea74c5",
"typeString": "literal_string \"index must small than current count\""
},
"value": "index must small than current count"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ced05a9863658d26be4f7cbaeffebfa53821dabbe1077d21241580b1e9ea74c5",
"typeString": "literal_string \"index must small than current count\""
}
],
"id": 2596,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2163:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2163:72:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2604,
"nodeType": "ExpressionStatement",
"src": "2163:72:14"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2605,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2589,
"src": "2248:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2606,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2248:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2608,
"indexExpression": {
"argumentTypes": null,
"id": 2607,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2591,
"src": "2258:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2248:16:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"functionReturnParameters": 2595,
"id": 2609,
"nodeType": "Return",
"src": "2241:23:14"
}
]
},
"documentation": null,
"id": 2611,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2592,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2589,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2063:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2588,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2063:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2591,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2086:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2590,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2086:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2062:38:14"
},
"payable": false,
"returnParameters": {
"id": 2595,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2594,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2136:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2593,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2136:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2135:19:14"
},
"scope": 2746,
"src": "2050:219:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2636,
"nodeType": "Block",
"src": "2382:100:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2622,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2402:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2623,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2615,
"src": "2408:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2621,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "2396:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2396:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636861696e2064617461206d757374206578697374",
"id": 2625,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2414:23:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
},
"value": "chain data must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
}
],
"id": 2620,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2388:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2626,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2388:50:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2627,
"nodeType": "ExpressionStatement",
"src": "2388:50:14"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2628,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2451:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2629,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2451:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2634,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2630,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2461:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2631,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "2461:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2633,
"indexExpression": {
"argumentTypes": null,
"id": 2632,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2615,
"src": "2472:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2461:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2451:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"functionReturnParameters": 2619,
"id": 2635,
"nodeType": "Return",
"src": "2444:33:14"
}
]
},
"documentation": null,
"id": 2637,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getById",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2616,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2613,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2290:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2612,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2290:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2615,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2313:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2614,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2313:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2289:36:14"
},
"payable": false,
"returnParameters": {
"id": 2619,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2618,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2361:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2617,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2361:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2360:19:14"
},
"scope": 2746,
"src": "2273:209:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2671,
"nodeType": "Block",
"src": "2602:232:14",
"statements": [
{
"assignments": [
2649
],
"declarations": [
{
"constant": false,
"id": 2649,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2608:27:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2648,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2608:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2659,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2650,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2638:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2651,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2638:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2658,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2652,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2648:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2653,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "2648:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2657,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2655,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2641,
"src": "2671:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2654,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "2663:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2663:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2648:32:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2638:43:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2608:73:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2662,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2778:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2663,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2649,
"src": "2784:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2664,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "2784:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2661,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "2772:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2772:17:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636861696e2064617461206d757374206578697374",
"id": 2666,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2791:23:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
},
"value": "chain data must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
}
],
"id": 2660,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2764:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2764:51:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2668,
"nodeType": "ExpressionStatement",
"src": "2764:51:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2669,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2649,
"src": "2828:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"functionReturnParameters": 2645,
"id": 2670,
"nodeType": "Return",
"src": "2821:8:14"
}
]
},
"documentation": null,
"id": 2672,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getBySymbol",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2642,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2639,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2507:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2638,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2507:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2641,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2530:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2640,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2530:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2506:39:14"
},
"payable": false,
"returnParameters": {
"id": 2645,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2644,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2581:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2643,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2581:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2580:19:14"
},
"scope": 2746,
"src": "2486:348:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2744,
"nodeType": "Block",
"src": "3076:348:14",
"statements": [
{
"assignments": [
2685
],
"declarations": [
{
"constant": false,
"id": 2685,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3082:12:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2684,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3082:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2687,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2686,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3097:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3082:16:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2689,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3112:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2690,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3121:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3112:10:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 2692,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3124:34:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
},
"value": "return number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
}
],
"id": 2688,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "3104:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3104:55:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2694,
"nodeType": "ExpressionStatement",
"src": "3104:55:14"
},
{
"assignments": [
2699
],
"declarations": [
{
"constant": false,
"id": 2699,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3165:30:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2697,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3165:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2698,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3165:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2705,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2703,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3222:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3198:23:14",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$2339_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct ChainList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2700,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3202:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2701,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3202:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
}
},
"id": 2704,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3198:31:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory",
"typeString": "struct ChainList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3165:64:14"
},
{
"body": {
"id": 2740,
"nodeType": "Block",
"src": "3286:117:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2718,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3298:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2719,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3306:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3298:14:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2723,
"nodeType": "IfStatement",
"src": "3294:44:14",
"trueBody": {
"id": 2722,
"nodeType": "Block",
"src": "3314:24:14",
"statements": [
{
"id": 2721,
"nodeType": "Break",
"src": "3324:5:14"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2724,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2699,
"src": "3346:3:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element memory[] memory"
}
},
"id": 2726,
"indexExpression": {
"argumentTypes": null,
"id": 2725,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3350:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3346:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2727,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2674,
"src": "3358:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2728,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "3358:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2730,
"indexExpression": {
"argumentTypes": null,
"id": 2729,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3368:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3358:12:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"src": "3346:24:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"id": 2732,
"nodeType": "ExpressionStatement",
"src": "3346:24:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2733,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3378:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2736,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3394:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"id": 2734,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3385:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2735,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "3385:8:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3385:11:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3378:18:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2739,
"nodeType": "ExpressionStatement",
"src": "3378:18:14"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2710,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3259:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2711,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2674,
"src": "3263:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2712,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "3263:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2713,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3263:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3259:20:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2741,
"initializationExpression": {
"assignments": [
2707
],
"declarations": [
{
"constant": false,
"id": 2707,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3241:9:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2706,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3241:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2709,
"initialValue": {
"argumentTypes": null,
"id": 2708,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2676,
"src": "3253:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3241:16:14"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3281:3:14",
"subExpression": {
"argumentTypes": null,
"id": 2715,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3281:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2717,
"nodeType": "ExpressionStatement",
"src": "3281:3:14"
},
"nodeType": "ForStatement",
"src": "3236:167:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2742,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2699,
"src": "3416:3:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element memory[] memory"
}
},
"functionReturnParameters": 2683,
"id": 2743,
"nodeType": "Return",
"src": "3409:10:14"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺",
"id": 2745,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2679,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2674,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "2961:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2673,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2961:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2676,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "2988:12:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2675,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2988:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2678,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3006:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2677,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3006:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2955:69:14"
},
"payable": false,
"returnParameters": {
"id": 2683,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2682,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3048:19:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2680,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3048:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2681,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3048:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3047:28:14"
},
"scope": 2746,
"src": "2939:485:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2747,
"src": "91:3335:14"
}
],
"src": "0:3427:14"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/ChainList.sol",
"exportedSymbols": {
"ChainList": [
2746
]
},
"id": 2747,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2328,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:14"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 2329,
"nodeType": "ImportDirective",
"scope": 2747,
"sourceUnit": 5658,
"src": "27:30:14",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 区块链列表",
"fullyImplemented": true,
"id": 2746,
"linearizedBaseContracts": [
2746
],
"name": "ChainList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 2332,
"libraryName": {
"contractScope": null,
"id": 2330,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "119:8:14",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "113:27:14",
"typeName": {
"id": 2331,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "132:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "ChainList.element",
"id": 2339,
"members": [
{
"constant": false,
"id": 2334,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "198:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2333,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "198:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2336,
"name": "id",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "231:10:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2335,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "231:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2338,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 2339,
"src": "247:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
},
"typeName": {
"id": 2337,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "247:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 2746,
"src": "161:104:14",
"visibility": "public"
},
{
"canonicalName": "ChainList.chainMap",
"id": 2351,
"members": [
{
"constant": false,
"id": 2343,
"name": "mapId",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "315:33:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 2342,
"keyType": {
"id": 2340,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "323:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "315:27:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 2341,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "334:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2347,
"name": "mapSymbol",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "382:37:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"typeName": {
"id": 2346,
"keyType": {
"id": 2344,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "390:7:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "382:27:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"valueType": {
"id": 2345,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "401:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2350,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 2351,
"src": "443:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2348,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "443:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2349,
"length": null,
"nodeType": "ArrayTypeName",
"src": "443:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "chainMap",
"nodeType": "StructDefinition",
"scope": 2746,
"src": "268:194:14",
"visibility": "public"
},
{
"body": {
"id": 2393,
"nodeType": "Block",
"src": "560:162:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2360,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "570:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2361,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "570:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2362,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "570:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2363,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "590:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "570:21:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2367,
"nodeType": "IfStatement",
"src": "566:39:14",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2365,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "600:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2359,
"id": 2366,
"nodeType": "Return",
"src": "593:12:14"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2377,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2368,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "619:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2369,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "619:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2374,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2370,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "629:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2371,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "629:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2373,
"indexExpression": {
"argumentTypes": null,
"id": 2372,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "640:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "629:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "619:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2375,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "619:29:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2376,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "652:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "619:36:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2379,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "678:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2380,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "678:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2385,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2381,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2353,
"src": "688:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2382,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "688:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2384,
"indexExpression": {
"argumentTypes": null,
"id": 2383,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2355,
"src": "699:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "688:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "678:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2386,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "symbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2338,
"src": "678:33:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
],
"id": 2378,
"name": "getStringLen",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2419,
"src": "665:12:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_uint256_$",
"typeString": "function (string memory) pure returns (uint256)"
}
},
"id": 2387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "665:47:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2388,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "715:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "665:51:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "619:97:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 2391,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "618:99:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2359,
"id": 2392,
"nodeType": "Return",
"src": "611:106:14"
}
]
},
"documentation": null,
"id": 2394,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2356,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2353,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "481:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2352,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "481:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2355,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "504:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2354,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "504:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:36:14"
},
"payable": false,
"returnParameters": {
"id": 2359,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2358,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2394,
"src": "552:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2357,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "552:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "551:6:14"
},
"scope": 2746,
"src": "466:256:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2418,
"nodeType": "Block",
"src": "793:130:14",
"statements": [
{
"assignments": [
2402
],
"declarations": [
{
"constant": false,
"id": 2402,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "799:14:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2401,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "799:5:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2406,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2404,
"name": "_str",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2396,
"src": "822:4:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2403,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "816:5:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": "bytes"
},
"id": 2405,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "816:11:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "799:28:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2408,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2402,
"src": "841:1:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "841:8:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31303234",
"id": 2410,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "853:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1024_by_1",
"typeString": "int_const 1024"
},
"value": "1024"
},
"src": "841:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "746f6f206c6172676520737472696e67206d616b65206f766572666c6f77207269736b",
"id": 2412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "859:37:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a04837239c708b9348717c3349e4803b1f78ce229ff9fadb01d3b10ea6e3573e",
"typeString": "literal_string \"too large string make overflow risk\""
},
"value": "too large string make overflow risk"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a04837239c708b9348717c3349e4803b1f78ce229ff9fadb01d3b10ea6e3573e",
"typeString": "literal_string \"too large string make overflow risk\""
}
],
"id": 2407,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "833:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "833:64:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2414,
"nodeType": "ExpressionStatement",
"src": "833:64:14"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2415,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2402,
"src": "910:1:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 2416,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "910:8:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2400,
"id": 2417,
"nodeType": "Return",
"src": "903:15:14"
}
]
},
"documentation": null,
"id": 2419,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getStringLen",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2397,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2396,
"name": "_str",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "748:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2395,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "748:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "747:13:14"
},
"payable": false,
"returnParameters": {
"id": 2400,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2399,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2419,
"src": "784:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2398,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "784:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "783:9:14"
},
"scope": 2746,
"src": "726:197:14",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2433,
"nodeType": "Block",
"src": "992:54:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2429,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2421,
"src": "1032:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"expression": {
"argumentTypes": null,
"id": 2427,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9028,
"src": "1015:3:14",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1015:16:14",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 2430,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1015:25:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2426,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9035,
"src": "1005:9:14",
"typeDescriptions": {
"typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
"typeString": "function () pure returns (bytes32)"
}
},
"id": 2431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1005:36:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 2425,
"id": 2432,
"nodeType": "Return",
"src": "998:43:14"
}
]
},
"documentation": null,
"id": 2434,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2422,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2421,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2434,
"src": "944:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2420,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "944:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "943:16:14"
},
"payable": false,
"returnParameters": {
"id": 2425,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2424,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2434,
"src": "983:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2423,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "983:7:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "982:9:14"
},
"scope": 2746,
"src": "927:119:14",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2493,
"nodeType": "Block",
"src": "1225:266:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2446,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1241:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2447,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1247:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2445,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "1235:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1235:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2452,
"nodeType": "IfStatement",
"src": "1231:49:14",
"trueBody": {
"id": 2451,
"nodeType": "Block",
"src": "1253:27:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2449,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1268:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2444,
"id": 2450,
"nodeType": "Return",
"src": "1261:12:14"
}
]
}
},
{
"assignments": [
2454
],
"declarations": [
{
"constant": false,
"id": 2454,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1286:16:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2453,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "1286:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2462,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2456,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1325:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2457,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1325:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2458,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1325:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2459,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1347:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2460,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2440,
"src": "1360:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": null,
"id": 2455,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2339,
"src": "1311:7:14",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$2339_storage_ptr_$",
"typeString": "type(struct ChainList.element storage pointer)"
}
},
"id": 2461,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"idx",
"id",
"symbol"
],
"nodeType": "FunctionCall",
"src": "1311:58:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1286:83:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2468,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1391:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2463,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1376:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2466,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1376:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2467,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1376:14:14",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$2339_storage_$returns$_t_uint256_$",
"typeString": "function (struct ChainList.element storage ref) returns (uint256)"
}
},
"id": 2469,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1376:17:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2470,
"nodeType": "ExpressionStatement",
"src": "1376:17:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2471,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1399:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2474,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1399:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2475,
"indexExpression": {
"argumentTypes": null,
"id": 2473,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2438,
"src": "1410:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1399:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2476,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1417:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
},
"id": 2477,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "1417:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1399:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2479,
"nodeType": "ExpressionStatement",
"src": "1399:23:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2480,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2436,
"src": "1428:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2485,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "1428:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2486,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2483,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2440,
"src": "1451:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2482,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "1443:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1443:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1428:32:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2487,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2454,
"src": "1463:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element memory"
}
},
"id": 2488,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "1463:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1428:40:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2490,
"nodeType": "ExpressionStatement",
"src": "1428:40:14"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2491,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1482:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2444,
"id": 2492,
"nodeType": "Return",
"src": "1475:11:14"
}
]
},
"documentation": "@dev 增加新定时定义,重复的ID返回失败",
"id": 2494,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2441,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2436,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1138:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2435,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1138:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2438,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1165:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2437,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1165:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2440,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1182:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2439,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1182:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1132:68:14"
},
"payable": false,
"returnParameters": {
"id": 2444,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2443,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2494,
"src": "1219:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2442,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1219:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1218:6:14"
},
"scope": 2746,
"src": "1117:374:14",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2574,
"nodeType": "Block",
"src": "1571:367:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 2507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1581:17:14",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2504,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1588:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2505,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2498,
"src": "1594:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2503,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "1582:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1582:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2511,
"nodeType": "IfStatement",
"src": "1577:50:14",
"trueBody": {
"id": 2510,
"nodeType": "Block",
"src": "1600:27:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2508,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1615:5:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2502,
"id": 2509,
"nodeType": "Return",
"src": "1608:12:14"
}
]
}
},
{
"assignments": [
2513
],
"declarations": [
{
"constant": false,
"id": 2513,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1633:15:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2512,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1633:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2518,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2514,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1651:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2515,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1651:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2517,
"indexExpression": {
"argumentTypes": null,
"id": 2516,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2498,
"src": "1662:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1651:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1633:33:14"
},
{
"assignments": [
2520
],
"declarations": [
{
"constant": false,
"id": 2520,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1672:25:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2519,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "1672:7:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2530,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2521,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1700:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2522,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1700:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2529,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2527,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1731:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2523,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1710:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2524,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1710:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2525,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1710:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1710:20:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1710:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1700:34:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1672:62:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2531,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1740:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2534,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1740:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2535,
"indexExpression": {
"argumentTypes": null,
"id": 2533,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1750:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1740:18:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2536,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1761:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"src": "1740:30:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"id": 2538,
"nodeType": "ExpressionStatement",
"src": "1740:30:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2539,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1776:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2543,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "1776:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2544,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2541,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1787:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2542,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "1787:12:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1776:24:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2545,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1803:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1776:34:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2547,
"nodeType": "ExpressionStatement",
"src": "1776:34:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2557,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2548,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1816:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2554,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "1816:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2555,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2551,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2520,
"src": "1839:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2552,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "symbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2338,
"src": "1839:16:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
],
"id": 2550,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "1831:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1831:25:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1816:41:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2556,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2513,
"src": "1860:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1816:51:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2558,
"nodeType": "ExpressionStatement",
"src": "1816:51:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2570,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2559,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1873:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2562,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1873:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2563,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1873:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1913:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2564,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2496,
"src": "1892:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2565,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "1892:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2566,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1892:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2567,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1892:20:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1892:23:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1873:42:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2571,
"nodeType": "ExpressionStatement",
"src": "1873:42:14"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2572,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1929:4:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2502,
"id": 2573,
"nodeType": "Return",
"src": "1922:11:14"
}
]
},
"documentation": null,
"id": 2575,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2499,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2496,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1511:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2495,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1511:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2498,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1534:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2497,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1534:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1510:36:14"
},
"payable": false,
"returnParameters": {
"id": 2502,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2501,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2575,
"src": "1565:4:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2500,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1565:4:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1564:6:14"
},
"scope": 2746,
"src": "1495:443:14",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2586,
"nodeType": "Block",
"src": "2012:34:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2582,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2577,
"src": "2025:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2583,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2025:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2584,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2025:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2581,
"id": 2585,
"nodeType": "Return",
"src": "2018:23:14"
}
]
},
"documentation": null,
"id": 2587,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2578,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2577,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2587,
"src": "1957:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2576,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "1957:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1956:23:14"
},
"payable": false,
"returnParameters": {
"id": 2581,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2580,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2587,
"src": "2003:7:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2579,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2003:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2002:9:14"
},
"scope": 2746,
"src": "1942:104:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2610,
"nodeType": "Block",
"src": "2157:112:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2601,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2597,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2591,
"src": "2171:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2598,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2589,
"src": "2179:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2179:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2600,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2179:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2171:24:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 2602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2197:37:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ced05a9863658d26be4f7cbaeffebfa53821dabbe1077d21241580b1e9ea74c5",
"typeString": "literal_string \"index must small than current count\""
},
"value": "index must small than current count"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ced05a9863658d26be4f7cbaeffebfa53821dabbe1077d21241580b1e9ea74c5",
"typeString": "literal_string \"index must small than current count\""
}
],
"id": 2596,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2163:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2163:72:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2604,
"nodeType": "ExpressionStatement",
"src": "2163:72:14"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2605,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2589,
"src": "2248:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2606,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2248:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2608,
"indexExpression": {
"argumentTypes": null,
"id": 2607,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2591,
"src": "2258:5:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2248:16:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"functionReturnParameters": 2595,
"id": 2609,
"nodeType": "Return",
"src": "2241:23:14"
}
]
},
"documentation": null,
"id": 2611,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2592,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2589,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2063:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2588,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2063:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2591,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2086:13:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2590,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2086:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2062:38:14"
},
"payable": false,
"returnParameters": {
"id": 2595,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2594,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2611,
"src": "2136:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2593,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2136:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2135:19:14"
},
"scope": 2746,
"src": "2050:219:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2636,
"nodeType": "Block",
"src": "2382:100:14",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2622,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2402:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2623,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2615,
"src": "2408:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2621,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "2396:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2396:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636861696e2064617461206d757374206578697374",
"id": 2625,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2414:23:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
},
"value": "chain data must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
}
],
"id": 2620,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2388:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2626,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2388:50:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2627,
"nodeType": "ExpressionStatement",
"src": "2388:50:14"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2628,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2451:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2629,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2451:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2634,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2630,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2613,
"src": "2461:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2631,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapId",
"nodeType": "MemberAccess",
"referencedDeclaration": 2343,
"src": "2461:10:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2633,
"indexExpression": {
"argumentTypes": null,
"id": 2632,
"name": "_id",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2615,
"src": "2472:3:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2461:15:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2451:26:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"functionReturnParameters": 2619,
"id": 2635,
"nodeType": "Return",
"src": "2444:33:14"
}
]
},
"documentation": null,
"id": 2637,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getById",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2616,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2613,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2290:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2612,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2290:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2615,
"name": "_id",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2313:11:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2614,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2313:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2289:36:14"
},
"payable": false,
"returnParameters": {
"id": 2619,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2618,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2637,
"src": "2361:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2617,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2361:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2360:19:14"
},
"scope": 2746,
"src": "2273:209:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2671,
"nodeType": "Block",
"src": "2602:232:14",
"statements": [
{
"assignments": [
2649
],
"declarations": [
{
"constant": false,
"id": 2649,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2608:27:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2648,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2608:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2659,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2650,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2638:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2651,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "2638:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2658,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2652,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2648:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2653,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapSymbol",
"nodeType": "MemberAccess",
"referencedDeclaration": 2347,
"src": "2648:14:14",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 2657,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2655,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2641,
"src": "2671:7:14",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 2654,
"name": "getHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2434,
"src": "2663:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (string memory) pure returns (bytes32)"
}
},
"id": 2656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2663:16:14",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2648:32:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2638:43:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2608:73:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2662,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2639,
"src": "2778:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2663,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2649,
"src": "2784:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"id": 2664,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 2336,
"src": "2784:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2661,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2394,
"src": "2772:5:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_chainMap_$2351_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct ChainList.chainMap storage pointer,uint256) view returns (bool)"
}
},
"id": 2665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2772:17:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636861696e2064617461206d757374206578697374",
"id": 2666,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2791:23:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
},
"value": "chain data must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_63ef866f92f57c53a825995c97d4387dea8284cc9cb80242ec3074af059ec6e8",
"typeString": "literal_string \"chain data must exist\""
}
],
"id": 2660,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2764:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2764:51:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2668,
"nodeType": "ExpressionStatement",
"src": "2764:51:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2669,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2649,
"src": "2828:1:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element storage pointer"
}
},
"functionReturnParameters": 2645,
"id": 2670,
"nodeType": "Return",
"src": "2821:8:14"
}
]
},
"documentation": null,
"id": 2672,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getBySymbol",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2642,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2639,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2507:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2638,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2507:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2641,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2530:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2640,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2530:6:14",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2506:39:14"
},
"payable": false,
"returnParameters": {
"id": 2645,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2644,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2672,
"src": "2581:17:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory_ptr",
"typeString": "struct ChainList.element"
},
"typeName": {
"contractScope": null,
"id": 2643,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "2581:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2580:19:14"
},
"scope": 2746,
"src": "2486:348:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2744,
"nodeType": "Block",
"src": "3076:348:14",
"statements": [
{
"assignments": [
2685
],
"declarations": [
{
"constant": false,
"id": 2685,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3082:12:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2684,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3082:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2687,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2686,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3097:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3082:16:14"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2689,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3112:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2690,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3121:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3112:10:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 2692,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3124:34:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
},
"value": "return number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
}
],
"id": 2688,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "3104:7:14",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3104:55:14",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2694,
"nodeType": "ExpressionStatement",
"src": "3104:55:14"
},
{
"assignments": [
2699
],
"declarations": [
{
"constant": false,
"id": 2699,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3165:30:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2697,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3165:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2698,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3165:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2705,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2703,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3222:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3198:23:14",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$2339_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct ChainList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2700,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3202:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2701,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3202:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
}
},
"id": 2704,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3198:31:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory",
"typeString": "struct ChainList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3165:64:14"
},
{
"body": {
"id": 2740,
"nodeType": "Block",
"src": "3286:117:14",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2718,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3298:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2719,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2678,
"src": "3306:6:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3298:14:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2723,
"nodeType": "IfStatement",
"src": "3294:44:14",
"trueBody": {
"id": 2722,
"nodeType": "Block",
"src": "3314:24:14",
"statements": [
{
"id": 2721,
"nodeType": "Break",
"src": "3324:5:14"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2724,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2699,
"src": "3346:3:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element memory[] memory"
}
},
"id": 2726,
"indexExpression": {
"argumentTypes": null,
"id": 2725,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3350:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3346:9:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2727,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2674,
"src": "3358:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2728,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "3358:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2730,
"indexExpression": {
"argumentTypes": null,
"id": 2729,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3368:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3358:12:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage",
"typeString": "struct ChainList.element storage ref"
}
},
"src": "3346:24:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_memory",
"typeString": "struct ChainList.element memory"
}
},
"id": 2732,
"nodeType": "ExpressionStatement",
"src": "3346:24:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2733,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3378:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2736,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3394:1:14",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"expression": {
"argumentTypes": null,
"id": 2734,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "3385:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2735,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "3385:8:14",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3385:11:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3378:18:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2739,
"nodeType": "ExpressionStatement",
"src": "3378:18:14"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2710,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3259:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2711,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2674,
"src": "3263:4:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap storage pointer"
}
},
"id": 2712,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 2350,
"src": "3263:9:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage",
"typeString": "struct ChainList.element storage ref[] storage ref"
}
},
"id": 2713,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3263:16:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3259:20:14",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2741,
"initializationExpression": {
"assignments": [
2707
],
"declarations": [
{
"constant": false,
"id": 2707,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3241:9:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2706,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3241:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2709,
"initialValue": {
"argumentTypes": null,
"id": 2708,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2676,
"src": "3253:4:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3241:16:14"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3281:3:14",
"subExpression": {
"argumentTypes": null,
"id": 2715,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2707,
"src": "3281:1:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2717,
"nodeType": "ExpressionStatement",
"src": "3281:3:14"
},
"nodeType": "ForStatement",
"src": "3236:167:14"
},
{
"expression": {
"argumentTypes": null,
"id": 2742,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2699,
"src": "3416:3:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element memory[] memory"
}
},
"functionReturnParameters": 2683,
"id": 2743,
"nodeType": "Return",
"src": "3409:10:14"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺",
"id": 2745,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2679,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2674,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "2961:21:14",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
},
"typeName": {
"contractScope": null,
"id": 2673,
"name": "chainMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2351,
"src": "2961:8:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_chainMap_$2351_storage_ptr",
"typeString": "struct ChainList.chainMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2676,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "2988:12:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2675,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2988:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2678,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3006:14:14",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2677,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3006:7:14",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2955:69:14"
},
"payable": false,
"returnParameters": {
"id": 2683,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2682,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2745,
"src": "3048:19:14",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_memory_$dyn_memory_ptr",
"typeString": "struct ChainList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2680,
"name": "ChainList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2339,
"src": "3048:17:14",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$2339_storage_ptr",
"typeString": "struct ChainList.element"
}
},
"id": 2681,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3048:19:14",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$2339_storage_$dyn_storage_ptr",
"typeString": "struct ChainList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3047:28:14"
},
"scope": 2746,
"src": "2939:485:14",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2747,
"src": "91:3335:14"
}
],
"src": "0:3427:14"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.16",
"updatedAt": "2021-03-06T09:30:00.977Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}