jcc-solidity-utils
Version:
jcc solidity utils
6,556 lines • 277 kB
JSON
{
"contractName": "UintList",
"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/UintList.sol\":\"UintList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol\":{\"keccak256\":\"0x0d3f928a6507c7b40de15cc19a3200b259082dd0a950fb60132649295270dc9e\",\"urls\":[\"bzzr://7f51ba64c60a21c86c06af8c426036ab858b4acb8bba85813981c1f685ee6fdb\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]}},\"version\":1}",
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c707c58e2c152cce9462ee8d2287f08abf8b465bc86560003809916666f408fd0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c707c58e2c152cce9462ee8d2287f08abf8b465bc86560003809916666f408fd0029",
"sourceMap": "139:2025:19:-;;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": "139:2025:19:-;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @dev 无符号整型数列表共通,只能顺序增加且不重复\n */\nlibrary UintList {\n using SafeMath for uint256;\n\n struct uintMap {\n mapping(uint256 => uint256) mapList;\n uint256[] list;\n }\n\n function exist(uintMap storage self, uint256 _num)\n internal\n view\n returns (bool)\n {\n if (self.list.length == 0) return false;\n return (self.list[self.mapList[_num]] == _num);\n }\n\n /**\n @dev 增加新的数据,重复的数据返回失败\n */\n function insert(uintMap storage self, uint256 _num) internal returns (bool) {\n if (exist(self, _num)) {\n return false;\n }\n\n self.mapList[_num] = self.list.push(_num).sub(1);\n\n return true;\n }\n\n /**\n @dev 删除无符号整型数,相应的下标索引数组自动缩减\n */\n function remove(uintMap storage self, uint256 _num) internal returns (bool) {\n if (!exist(self, _num)) {\n return false;\n }\n\n uint256 row2Del = self.mapList[_num];\n uint256 keyToMove = self.list[self.list.length.sub(1)];\n self.list[row2Del] = keyToMove;\n self.mapList[keyToMove] = row2Del;\n self.list.length = self.list.length.sub(1);\n\n return true;\n }\n\n function count(uintMap storage self) internal view returns (uint256) {\n return self.list.length;\n }\n\n function get(uintMap storage self, uint256 index)\n internal\n view\n returns (uint256)\n {\n require(index < self.list.length, \"index must small than current count\");\n return self.list[index];\n }\n\n /**\n @dev 从指定位置返回多条(不多于count)记录,如果不足则空缺,为避免该情况,应该先获取数据量后再决定参数\n */\n function getList(\n uintMap storage self,\n uint256 from,\n uint256 _count\n ) internal view returns (uint256[] memory) {\n uint256 _idx = 0;\n require(_count > 0, \"return number must bigger than 0\");\n uint256[] memory res = new uint256[](_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/UintList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol",
"exportedSymbols": {
"UintList": [
5538
]
},
"id": 5539,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5284,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:19"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 5285,
"nodeType": "ImportDirective",
"scope": 5539,
"sourceUnit": 5658,
"src": "27:30:19",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 无符号整型数列表共通,只能顺序增加且不重复",
"fullyImplemented": true,
"id": 5538,
"linearizedBaseContracts": [
5538
],
"name": "UintList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5288,
"libraryName": {
"contractScope": null,
"id": 5286,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "166:8:19",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "160:27:19",
"typeName": {
"id": 5287,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "179:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "UintList.uintMap",
"id": 5296,
"members": [
{
"constant": false,
"id": 5292,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 5296,
"src": "212:35:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 5291,
"keyType": {
"id": 5289,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "220:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "212:27:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 5290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "231:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5295,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 5296,
"src": "253:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5293,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "253:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5294,
"length": null,
"nodeType": "ArrayTypeName",
"src": "253:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "uintMap",
"nodeType": "StructDefinition",
"scope": 5538,
"src": "191:81:19",
"visibility": "public"
},
{
"body": {
"id": 5324,
"nodeType": "Block",
"src": "370:102:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5309,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5305,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "380:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5306,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "380:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5307,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "380:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 5308,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "400:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "380:21:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5312,
"nodeType": "IfStatement",
"src": "376:39:19",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5310,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "410:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5304,
"id": 5311,
"nodeType": "Return",
"src": "403:12:19"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5321,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5313,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "429:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5314,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "429:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5319,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5315,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "439:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5316,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "439:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5318,
"indexExpression": {
"argumentTypes": null,
"id": 5317,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5300,
"src": "452:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "439:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "429:29:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 5320,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5300,
"src": "462:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "429:37:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 5322,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "428:39:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 5304,
"id": 5323,
"nodeType": "Return",
"src": "421:46:19"
}
]
},
"documentation": null,
"id": 5325,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5301,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5298,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "291:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5297,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "291:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5300,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "313:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5299,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "313:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "290:36:19"
},
"payable": false,
"returnParameters": {
"id": 5304,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5303,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "362:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5302,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "362:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "361:6:19"
},
"scope": 5538,
"src": "276:196:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5359,
"nodeType": "Block",
"src": "620:133:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5335,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "636:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 5336,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "642:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5334,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5325,
"src": "630:5:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) view returns (bool)"
}
},
"id": 5337,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "630:17:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5341,
"nodeType": "IfStatement",
"src": "626:50:19",
"trueBody": {
"id": 5340,
"nodeType": "Block",
"src": "649:27:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5338,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "664:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5333,
"id": 5339,
"nodeType": "Return",
"src": "657:12:19"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 5355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5342,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "682:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5345,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "682:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5346,
"indexExpression": {
"argumentTypes": null,
"id": 5344,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "695:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "682:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5353,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "728:1:19",
"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,
"arguments": [
{
"argumentTypes": null,
"id": 5350,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "718:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5347,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "703:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5348,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "703:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5349,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "703:14:19",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) returns (uint256)"
}
},
"id": 5351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "703:20:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "703:24:19",
"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": 5354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "703:27:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "682:48:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5356,
"nodeType": "ExpressionStatement",
"src": "682:48:19"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 5357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "744:4:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 5333,
"id": 5358,
"nodeType": "Return",
"src": "737:11:19"
}
]
},
"documentation": "@dev 增加新的数据,重复的数据返回失败",
"id": 5360,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5330,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5327,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "560:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5326,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "560:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5329,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "582:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5328,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "582:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "559:36:19"
},
"payable": false,
"returnParameters": {
"id": 5333,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5332,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "614:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5331,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "614:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "613:6:19"
},
"scope": 5538,
"src": "544:209:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5428,
"nodeType": "Block",
"src": "919:305:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 5373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "929:18:19",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5370,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "936:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 5371,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5364,
"src": "942:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5369,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5325,
"src": "930:5:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) view returns (bool)"
}
},
"id": 5372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "930:17:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5377,
"nodeType": "IfStatement",
"src": "925:51:19",
"trueBody": {
"id": 5376,
"nodeType": "Block",
"src": "949:27:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5374,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "964:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5368,
"id": 5375,
"nodeType": "Return",
"src": "957:12:19"
}
]
}
},
{
"assignments": [
5379
],
"declarations": [
{
"constant": false,
"id": 5379,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "982:15:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5378,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "982:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5384,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5380,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1000:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5381,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "1000:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5383,
"indexExpression": {
"argumentTypes": null,
"id": 5382,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5364,
"src": "1013:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1000:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "982:36:19"
},
{
"assignments": [
5386
],
"declarations": [
{
"constant": false,
"id": 5386,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "1024:17:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5385,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1024:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5396,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5387,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1044:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5388,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1044:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5395,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5393,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1075:1:19",
"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": 5389,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1054:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5390,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1054:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5391,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1054:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5392,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1054:20:19",
"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": 5394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1054:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1044:34:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1024:54:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5397,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1084:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5400,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1084:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5401,
"indexExpression": {
"argumentTypes": null,
"id": 5399,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5379,
"src": "1094:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1084:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5402,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "1105:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1084:30:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5404,
"nodeType": "ExpressionStatement",
"src": "1084:30:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5405,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1120:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5408,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "1120:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5409,
"indexExpression": {
"argumentTypes": null,
"id": 5407,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "1133:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1120:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5410,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5379,
"src": "1146:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1120:33:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5412,
"nodeType": "ExpressionStatement",
"src": "1120:33:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5424,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5413,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1159:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5416,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1159:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5417,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1159:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5422,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1199:1:19",
"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": 5418,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1178:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5419,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1178:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5420,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1178:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1178:20:19",
"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": 5423,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1178:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1159:42:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5425,
"nodeType": "ExpressionStatement",
"src": "1159:42:19"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 5426,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:4:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 5368,
"id": 5427,
"nodeType": "Return",
"src": "1208:11:19"
}
]
},
"documentation": "@dev 删除无符号整型数,相应的下标索引数组自动缩减",
"id": 5429,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5365,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5362,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "859:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5361,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "859:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5364,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "881:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5363,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "881:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "858:36:19"
},
"payable": false,
"returnParameters": {
"id": 5368,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5367,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "913:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5366,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "913:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "912:6:19"
},
"scope": 5538,
"src": "843:381:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5440,
"nodeType": "Block",
"src": "1297:34:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5436,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5431,
"src": "1310:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5437,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1310:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5438,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1310:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5435,
"id": 5439,
"nodeType": "Return",
"src": "1303:23:19"
}
]
},
"documentation": null,
"id": 5441,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5432,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5431,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5441,
"src": "1243:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5430,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1243:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1242:22:19"
},
"payable": false,
"returnParameters": {
"id": 5435,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5434,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5441,
"src": "1288:7:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1288:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1287:9:19"
},
"scope": 5538,
"src": "1228:103:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5464,
"nodeType": "Block",
"src": "1431:112:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5455,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5451,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5445,
"src": "1445:5:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5452,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5443,
"src": "1453:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5453,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1453:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5454,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1453:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1445:24:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 5456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1471:37:19",
"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": 5450,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1437:7:19",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1437:72:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5458,
"nodeType": "ExpressionStatement",
"src": "1437:72:19"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5459,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5443,
"src": "1522:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5460,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1522:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5462,
"indexExpression": {
"argumentTypes": null,
"id": 5461,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5445,
"src": "1532:5:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1522:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5449,
"id": 5463,
"nodeType": "Return",
"src": "1515:23:19"
}
]
},
"documentation": null,
"id": 5465,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5446,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5443,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1348:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5442,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1348:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5445,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1370:13:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5444,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1370:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1347:37:19"
},
"payable": false,
"returnParameters": {
"id": 5449,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5448,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1420:7:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5447,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1420:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1419:9:19"
},
"scope": 5538,
"src": "1335:208:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5536,
"nodeType": "Block",
"src": "1834:328:19",
"statements": [
{
"assignments": [
5478
],
"declarations": [
{
"constant": false,
"id": 5478,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1840:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5477,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1840:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5480,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 5479,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1855:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1840:16:19"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5482,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "1870:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 5483,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1879:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1870:10:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 5485,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1882:34:19",
"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": 5481,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1862:7:19",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5486,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1862:55:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5487,
"nodeType": "ExpressionStatement",
"src": "1862:55:19"
},
{
"assignments": [
5491
],
"declarations": [
{
"constant": false,
"id": 5491,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1923:20:19",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5489,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1923:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5490,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1923:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5497,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5495,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "1960:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5494,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1946:13:19",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$",
"typeString": "function (uint256) pure returns (uint256[] memory)"
},
"typeName": {
"baseType": {
"id": 5492,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1950:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5493,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1950:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
}
},
"id": 5496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1946:21:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1923:44:19"
},
{
"body": {
"id": 5532,
"nodeType": "Block",
"src": "2024:117:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5512,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5510,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2036:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 5511,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "2044:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2036:14:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5515,
"nodeType": "IfStatement",
"src": "2032:44:19",
"trueBody": {
"id": 5514,
"nodeType": "Block",
"src": "2052:24:19",
"statements": [
{
"id": 5513,
"nodeType": "Break",
"src": "2062:5:19"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 5523,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 5516,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5491,
"src": "2084:3:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 5518,
"indexExpression": {
"argumentTypes": null,
"id": 5517,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2088:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2084:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5519,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5467,
"src": "2096:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5520,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "2096:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5522,
"indexExpression": {
"argumentTypes": null,
"id": 5521,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "2106:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2096:12:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2084:24:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5524,
"nodeType": "ExpressionStatement",
"src": "2084:24:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 5525,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2116:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2132:1:19",
"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": 5526,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2123:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "2123:8:19",
"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": 5529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2123:11:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2116:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5531,
"nodeType": "ExpressionStatement",
"src": "2116:18:19"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5502,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "1997:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5503,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5467,
"src": "2001:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5504,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "2001:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5505,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2001:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1997:20:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5533,
"initializationExpression": {
"assignments": [
5499
],
"declarations": [
{
"constant": false,
"id": 5499,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1979:9:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5498,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1979:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5501,
"initialValue": {
"argumentTypes": null,
"id": 5500,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5469,
"src": "1991:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1979:16:19"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 5508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2019:3:19",
"subExpression": {
"argumentTypes": null,
"id": 5507,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "2019:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5509,
"nodeType": "ExpressionStatement",
"src": "2019:3:19"
},
"nodeType": "ForStatement",
"src": "1974:167:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5534,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5491,
"src": "2154:3:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 5476,
"id": 5535,
"nodeType": "Return",
"src": "2147:10:19"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)记录,如果不足则空缺,为避免该情况,应该先获取数据量后再决定参数",
"id": 5537,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5472,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5467,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1730:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5466,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1730:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5469,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1756:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5468,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1756:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5471,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1774:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5470,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1774:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1724:68:19"
},
"payable": false,
"returnParameters": {
"id": 5476,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5475,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1816:9:19",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5473,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1816:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5474,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1816:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1815:18:19"
},
"scope": 5538,
"src": "1708:454:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 5539,
"src": "139:2025:19"
}
],
"src": "0:2165:19"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol",
"exportedSymbols": {
"UintList": [
5538
]
},
"id": 5539,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5284,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:19"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 5285,
"nodeType": "ImportDirective",
"scope": 5539,
"sourceUnit": 5658,
"src": "27:30:19",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 无符号整型数列表共通,只能顺序增加且不重复",
"fullyImplemented": true,
"id": 5538,
"linearizedBaseContracts": [
5538
],
"name": "UintList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5288,
"libraryName": {
"contractScope": null,
"id": 5286,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "166:8:19",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "160:27:19",
"typeName": {
"id": 5287,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "179:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "UintList.uintMap",
"id": 5296,
"members": [
{
"constant": false,
"id": 5292,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 5296,
"src": "212:35:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 5291,
"keyType": {
"id": 5289,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "220:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "212:27:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 5290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "231:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5295,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 5296,
"src": "253:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5293,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "253:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5294,
"length": null,
"nodeType": "ArrayTypeName",
"src": "253:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "uintMap",
"nodeType": "StructDefinition",
"scope": 5538,
"src": "191:81:19",
"visibility": "public"
},
{
"body": {
"id": 5324,
"nodeType": "Block",
"src": "370:102:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5309,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5305,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "380:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5306,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "380:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5307,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "380:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 5308,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "400:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "380:21:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5312,
"nodeType": "IfStatement",
"src": "376:39:19",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5310,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "410:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5304,
"id": 5311,
"nodeType": "Return",
"src": "403:12:19"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5321,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5313,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "429:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5314,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "429:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5319,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5315,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5298,
"src": "439:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5316,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "439:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5318,
"indexExpression": {
"argumentTypes": null,
"id": 5317,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5300,
"src": "452:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "439:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "429:29:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 5320,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5300,
"src": "462:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "429:37:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 5322,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "428:39:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 5304,
"id": 5323,
"nodeType": "Return",
"src": "421:46:19"
}
]
},
"documentation": null,
"id": 5325,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5301,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5298,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "291:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5297,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "291:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5300,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "313:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5299,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "313:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "290:36:19"
},
"payable": false,
"returnParameters": {
"id": 5304,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5303,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5325,
"src": "362:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5302,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "362:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "361:6:19"
},
"scope": 5538,
"src": "276:196:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5359,
"nodeType": "Block",
"src": "620:133:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5335,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "636:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 5336,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "642:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5334,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5325,
"src": "630:5:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) view returns (bool)"
}
},
"id": 5337,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "630:17:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5341,
"nodeType": "IfStatement",
"src": "626:50:19",
"trueBody": {
"id": 5340,
"nodeType": "Block",
"src": "649:27:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5338,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "664:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5333,
"id": 5339,
"nodeType": "Return",
"src": "657:12:19"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 5355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5342,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "682:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5345,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "682:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5346,
"indexExpression": {
"argumentTypes": null,
"id": 5344,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "695:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "682:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5353,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "728:1:19",
"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,
"arguments": [
{
"argumentTypes": null,
"id": 5350,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5329,
"src": "718:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5347,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5327,
"src": "703:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5348,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "703:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5349,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "703:14:19",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) returns (uint256)"
}
},
"id": 5351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "703:20:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "703:24:19",
"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": 5354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "703:27:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "682:48:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5356,
"nodeType": "ExpressionStatement",
"src": "682:48:19"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 5357,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "744:4:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 5333,
"id": 5358,
"nodeType": "Return",
"src": "737:11:19"
}
]
},
"documentation": "@dev 增加新的数据,重复的数据返回失败",
"id": 5360,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5330,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5327,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "560:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5326,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "560:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5329,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "582:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5328,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "582:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "559:36:19"
},
"payable": false,
"returnParameters": {
"id": 5333,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5332,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5360,
"src": "614:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5331,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "614:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "613:6:19"
},
"scope": 5538,
"src": "544:209:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5428,
"nodeType": "Block",
"src": "919:305:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 5373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "929:18:19",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5370,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "936:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 5371,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5364,
"src": "942:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5369,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5325,
"src": "930:5:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) view returns (bool)"
}
},
"id": 5372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "930:17:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5377,
"nodeType": "IfStatement",
"src": "925:51:19",
"trueBody": {
"id": 5376,
"nodeType": "Block",
"src": "949:27:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 5374,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "964:5:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 5368,
"id": 5375,
"nodeType": "Return",
"src": "957:12:19"
}
]
}
},
{
"assignments": [
5379
],
"declarations": [
{
"constant": false,
"id": 5379,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "982:15:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5378,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "982:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5384,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5380,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1000:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5381,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "1000:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5383,
"indexExpression": {
"argumentTypes": null,
"id": 5382,
"name": "_num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5364,
"src": "1013:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1000:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "982:36:19"
},
{
"assignments": [
5386
],
"declarations": [
{
"constant": false,
"id": 5386,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "1024:17:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5385,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1024:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5396,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5387,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1044:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5388,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1044:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5395,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5393,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1075:1:19",
"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": 5389,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1054:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5390,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1054:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5391,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1054:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5392,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1054:20:19",
"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": 5394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1054:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1044:34:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1024:54:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5397,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1084:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5400,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1084:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5401,
"indexExpression": {
"argumentTypes": null,
"id": 5399,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5379,
"src": "1094:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1084:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5402,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "1105:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1084:30:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5404,
"nodeType": "ExpressionStatement",
"src": "1084:30:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5405,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1120:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5408,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5292,
"src": "1120:12:19",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 5409,
"indexExpression": {
"argumentTypes": null,
"id": 5407,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "1133:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1120:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 5410,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5379,
"src": "1146:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1120:33:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5412,
"nodeType": "ExpressionStatement",
"src": "1120:33:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5424,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5413,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1159:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5416,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1159:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5417,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1159:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5422,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1199:1:19",
"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": 5418,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5362,
"src": "1178:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5419,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1178:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5420,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1178:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1178:20:19",
"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": 5423,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1178:23:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1159:42:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5425,
"nodeType": "ExpressionStatement",
"src": "1159:42:19"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 5426,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:4:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 5368,
"id": 5427,
"nodeType": "Return",
"src": "1208:11:19"
}
]
},
"documentation": "@dev 删除无符号整型数,相应的下标索引数组自动缩减",
"id": 5429,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5365,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5362,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "859:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5361,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "859:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5364,
"name": "_num",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "881:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5363,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "881:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "858:36:19"
},
"payable": false,
"returnParameters": {
"id": 5368,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5367,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5429,
"src": "913:4:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5366,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "913:4:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "912:6:19"
},
"scope": 5538,
"src": "843:381:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5440,
"nodeType": "Block",
"src": "1297:34:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5436,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5431,
"src": "1310:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5437,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1310:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5438,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1310:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5435,
"id": 5439,
"nodeType": "Return",
"src": "1303:23:19"
}
]
},
"documentation": null,
"id": 5441,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5432,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5431,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5441,
"src": "1243:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5430,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1243:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1242:22:19"
},
"payable": false,
"returnParameters": {
"id": 5435,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5434,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5441,
"src": "1288:7:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1288:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1287:9:19"
},
"scope": 5538,
"src": "1228:103:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5464,
"nodeType": "Block",
"src": "1431:112:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5455,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5451,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5445,
"src": "1445:5:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5452,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5443,
"src": "1453:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5453,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1453:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5454,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1453:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1445:24:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 5456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1471:37:19",
"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": 5450,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1437:7:19",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1437:72:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5458,
"nodeType": "ExpressionStatement",
"src": "1437:72:19"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5459,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5443,
"src": "1522:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5460,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "1522:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5462,
"indexExpression": {
"argumentTypes": null,
"id": 5461,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5445,
"src": "1532:5:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1522:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5449,
"id": 5463,
"nodeType": "Return",
"src": "1515:23:19"
}
]
},
"documentation": null,
"id": 5465,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5446,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5443,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1348:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5442,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1348:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5445,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1370:13:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5444,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1370:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1347:37:19"
},
"payable": false,
"returnParameters": {
"id": 5449,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5448,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5465,
"src": "1420:7:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5447,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1420:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1419:9:19"
},
"scope": 5538,
"src": "1335:208:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 5536,
"nodeType": "Block",
"src": "1834:328:19",
"statements": [
{
"assignments": [
5478
],
"declarations": [
{
"constant": false,
"id": 5478,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1840:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5477,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1840:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5480,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 5479,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1855:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1840:16:19"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5482,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "1870:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 5483,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1879:1:19",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1870:10:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 5485,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1882:34:19",
"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": 5481,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1862:7:19",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5486,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1862:55:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5487,
"nodeType": "ExpressionStatement",
"src": "1862:55:19"
},
{
"assignments": [
5491
],
"declarations": [
{
"constant": false,
"id": 5491,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1923:20:19",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5489,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1923:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5490,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1923:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5497,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5495,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "1960:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5494,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1946:13:19",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$",
"typeString": "function (uint256) pure returns (uint256[] memory)"
},
"typeName": {
"baseType": {
"id": 5492,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1950:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5493,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1950:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
}
},
"id": 5496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1946:21:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory",
"typeString": "uint256[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1923:44:19"
},
{
"body": {
"id": 5532,
"nodeType": "Block",
"src": "2024:117:19",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5512,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5510,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2036:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 5511,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5471,
"src": "2044:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2036:14:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 5515,
"nodeType": "IfStatement",
"src": "2032:44:19",
"trueBody": {
"id": 5514,
"nodeType": "Block",
"src": "2052:24:19",
"statements": [
{
"id": 5513,
"nodeType": "Break",
"src": "2062:5:19"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 5523,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 5516,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5491,
"src": "2084:3:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 5518,
"indexExpression": {
"argumentTypes": null,
"id": 5517,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2088:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2084:9:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5519,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5467,
"src": "2096:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5520,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "2096:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5522,
"indexExpression": {
"argumentTypes": null,
"id": 5521,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "2106:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2096:12:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2084:24:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5524,
"nodeType": "ExpressionStatement",
"src": "2084:24:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 5525,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2116:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 5528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2132:1:19",
"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": 5526,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "2123:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "2123:8:19",
"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": 5529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2123:11:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2116:18:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5531,
"nodeType": "ExpressionStatement",
"src": "2116:18:19"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5506,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 5502,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "1997:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5503,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5467,
"src": "2001:4:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap storage pointer"
}
},
"id": 5504,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 5295,
"src": "2001:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 5505,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2001:16:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1997:20:19",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5533,
"initializationExpression": {
"assignments": [
5499
],
"declarations": [
{
"constant": false,
"id": 5499,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1979:9:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5498,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1979:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 5501,
"initialValue": {
"argumentTypes": null,
"id": 5500,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5469,
"src": "1991:4:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1979:16:19"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 5508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2019:3:19",
"subExpression": {
"argumentTypes": null,
"id": 5507,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5499,
"src": "2019:1:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5509,
"nodeType": "ExpressionStatement",
"src": "2019:3:19"
},
"nodeType": "ForStatement",
"src": "1974:167:19"
},
{
"expression": {
"argumentTypes": null,
"id": 5534,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5491,
"src": "2154:3:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 5476,
"id": 5535,
"nodeType": "Return",
"src": "2147:10:19"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)记录,如果不足则空缺,为避免该情况,应该先获取数据量后再决定参数",
"id": 5537,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5472,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5467,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1730:20:19",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 5466,
"name": "uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "1730:7:19",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5469,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1756:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5468,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1756:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5471,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1774:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5470,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1774:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1724:68:19"
},
"payable": false,
"returnParameters": {
"id": 5476,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5475,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5537,
"src": "1816:9:19",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 5473,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1816:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5474,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1816:9:19",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1815:18:19"
},
"scope": 5538,
"src": "1708:454:19",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 5539,
"src": "139:2025:19"
}
],
"src": "0:2165:19"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.16",
"updatedAt": "2021-03-06T09:30:01.026Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}