jcc-solidity-utils
Version:
jcc solidity utils
11,598 lines • 513 kB
JSON
{
"contractName": "BalanceList",
"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/BalanceList.sol\":\"BalanceList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol\":{\"keccak256\":\"0x2906ed3a67d18deb64a973c72383c5973e99261b580f35334358687019259d1d\",\"urls\":[\"bzzr://b0b2d9f12203b12bc44278243e2855d059a7a369f1606e25aff9ac639fa13468\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]}},\"version\":1}",
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582078e39fc140c21e65d3b39f351a70bca948bac5ec93f1686f2f954d4b9e1e25600029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582078e39fc140c21e65d3b39f351a70bca948bac5ec93f1686f2f954d4b9e1e25600029",
"sourceMap": "173:3238:13:-;;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": "173:3238:13:-;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @dev 资产列表共通,除资产负债之外提供一个账目清单数组,便于统计和查找.\n */\nlibrary BalanceList {\n using SafeMath for uint256;\n\n struct element {\n address addr;\n uint256 idx;\n uint256 balance;\n }\n struct balanceMap {\n mapping(address => uint256) mapList;\n element[] list;\n }\n\n function exist(balanceMap storage self, address _addr)\n internal\n view\n returns (bool)\n {\n if (self.list.length == 0) return false;\n return (self.list[self.mapList[_addr]].addr == _addr);\n }\n\n function insert(\n balanceMap storage self,\n address _addr,\n uint256 _amount\n ) internal returns (bool) {\n element memory e =\n element({addr: _addr, idx: self.list.length, balance: _amount});\n self.list.push(e);\n self.mapList[_addr] = e.idx;\n return true;\n }\n\n function remove(balanceMap storage self, address _addr)\n internal\n returns (bool)\n {\n if (!exist(self, _addr)) {\n return false;\n }\n if (self.list[self.mapList[_addr]].balance > 0) {\n return false;\n }\n\n uint256 row2Del = self.mapList[_addr];\n element storage keyToMove = self.list[self.list.length.sub(1)];\n self.list[row2Del] = keyToMove;\n self.mapList[keyToMove.addr] = row2Del;\n self.list.length = self.list.length.sub(1);\n\n return true;\n }\n\n function add(\n balanceMap storage self,\n address _addr,\n uint256 _amount\n ) internal returns (uint256) {\n // 对于已经存在的数据更新状态即可\n if (exist(self, _addr)) {\n self.list[self.mapList[_addr]].balance = self.list[self.mapList[_addr]]\n .balance\n .add(_amount);\n } else {\n // 新建数据\n require(insert(self, _addr, _amount), \"insert data fail\");\n }\n\n return self.list[self.mapList[_addr]].balance;\n }\n\n function sub(\n balanceMap storage self,\n address _addr,\n uint256 _amount\n ) internal returns (uint256) {\n require(exist(self, _addr), \"can not sub no exist element\");\n\n self.list[self.mapList[_addr]].balance = self.list[self.mapList[_addr]]\n .balance\n .sub(_amount);\n\n if (self.list[self.mapList[_addr]].balance == 0) {\n require(remove(self, _addr), \"remove data fail\");\n return 0;\n }\n\n return self.list[self.mapList[_addr]].balance;\n }\n\n function count(balanceMap storage self) internal view returns (uint256) {\n return self.list.length;\n }\n\n function balance(balanceMap storage self, address _addr)\n internal\n view\n returns (uint256)\n {\n return exist(self, _addr) ? self.list[self.mapList[_addr]].balance : 0;\n }\n\n function get(balanceMap storage self, uint256 index)\n internal\n view\n returns (element memory)\n {\n require(index < self.list.length, \"index must small than current count\");\n\n return self.list[index];\n }\n\n // 获取指定下标范围的数据,本函数可以用于分页查询\n function getList(\n balanceMap storage self,\n uint256 from,\n uint256 _count\n ) internal view returns (element[] memory) {\n require(_count > 0, \"count number must bigger than 0\");\n\n uint256 _idx = 0;\n element[] memory res = new element[](_count);\n\n for (uint256 i = from; i < self.list.length; i++) {\n if (_idx == _count) {\n break;\n }\n\n res[_idx] = self.list[i];\n _idx = _idx.add(1);\n }\n\n return res;\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol",
"exportedSymbols": {
"BalanceList": [
2326
]
},
"id": 2327,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1886,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:13"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 1887,
"nodeType": "ImportDirective",
"scope": 2327,
"sourceUnit": 5658,
"src": "27:30:13",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 资产列表共通,除资产负债之外提供一个账目清单数组,便于统计和查找.",
"fullyImplemented": true,
"id": 2326,
"linearizedBaseContracts": [
2326
],
"name": "BalanceList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1890,
"libraryName": {
"contractScope": null,
"id": 1888,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "203:8:13",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "197:27:13",
"typeName": {
"id": 1889,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "216:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "BalanceList.element",
"id": 1897,
"members": [
{
"constant": false,
"id": 1892,
"name": "addr",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "249:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1891,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "249:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1894,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "267:11:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "267:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1896,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "284:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1895,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "284:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 2326,
"src": "228:76:13",
"visibility": "public"
},
{
"canonicalName": "BalanceList.balanceMap",
"id": 1905,
"members": [
{
"constant": false,
"id": 1901,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 1905,
"src": "331:35:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 1900,
"keyType": {
"id": 1898,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "339:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "331:27:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1899,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "350:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1904,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 1905,
"src": "372:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1902,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "372:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 1903,
"length": null,
"nodeType": "ArrayTypeName",
"src": "372:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "balanceMap",
"nodeType": "StructDefinition",
"scope": 2326,
"src": "307:84:13",
"visibility": "public"
},
{
"body": {
"id": 1934,
"nodeType": "Block",
"src": "493:109:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1918,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1914,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "503:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1915,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "503:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1916,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "503:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1917,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "523:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "503:21:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1921,
"nodeType": "IfStatement",
"src": "499:39:13",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1919,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "533:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1913,
"id": 1920,
"nodeType": "Return",
"src": "526:12:13"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1922,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "552:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1923,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "552:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1928,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1924,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "562:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1925,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "562:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1927,
"indexExpression": {
"argumentTypes": null,
"id": 1926,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "575:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "562:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "552:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 1929,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "addr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1892,
"src": "552:35:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1930,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "591:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "552:44:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 1932,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "551:46:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1913,
"id": 1933,
"nodeType": "Return",
"src": "544:53:13"
}
]
},
"documentation": null,
"id": 1935,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1910,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1907,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "410:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1906,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "410:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1909,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "435:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1908,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "435:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "409:40:13"
},
"payable": false,
"returnParameters": {
"id": 1913,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1912,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "485:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1911,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "485:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "484:6:13"
},
"scope": 2326,
"src": "395:207:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1975,
"nodeType": "Block",
"src": "719:172:13",
"statements": [
{
"assignments": [
1947
],
"declarations": [
{
"constant": false,
"id": 1947,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "725:16:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 1946,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "725:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1955,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1949,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "765:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1950,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "777:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1951,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "777:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1952,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "777:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1953,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1941,
"src": "804:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": null,
"id": 1948,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1897,
"src": "750:7:13",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$1897_storage_ptr_$",
"typeString": "type(struct BalanceList.element storage pointer)"
}
},
"id": 1954,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"addr",
"idx",
"balance"
],
"nodeType": "FunctionCall",
"src": "750:63:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "725:88:13"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1961,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1947,
"src": "834:1:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1956,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "819:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1959,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "819:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1960,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "819:14:13",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$1897_storage_$returns$_t_uint256_$",
"typeString": "function (struct BalanceList.element storage ref) returns (uint256)"
}
},
"id": 1962,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "819:17:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1963,
"nodeType": "ExpressionStatement",
"src": "819:17:13"
},
{
"expression": {
"argumentTypes": null,
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1964,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "842:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1967,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "842:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1968,
"indexExpression": {
"argumentTypes": null,
"id": 1966,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "855:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "842:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1969,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1947,
"src": "864:1:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
},
"id": 1970,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 1894,
"src": "864:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "842:27:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1972,
"nodeType": "ExpressionStatement",
"src": "842:27:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "882:4:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1945,
"id": 1974,
"nodeType": "Return",
"src": "875:11:13"
}
]
},
"documentation": null,
"id": 1976,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1942,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1937,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "627:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1936,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "627:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1939,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "656:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1938,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "656:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1941,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "675:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1940,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "675:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "621:73:13"
},
"payable": false,
"returnParameters": {
"id": 1945,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1944,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "713:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1943,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "713:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "712:6:13"
},
"scope": 2326,
"src": "606:285:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2059,
"nodeType": "Block",
"src": "985:400:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "995:19:13",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1986,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1002:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1987,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1008:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1985,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "996:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 1988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "996:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1993,
"nodeType": "IfStatement",
"src": "991:52:13",
"trueBody": {
"id": 1992,
"nodeType": "Block",
"src": "1016:27:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1990,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1031:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1984,
"id": 1991,
"nodeType": "Return",
"src": "1024:12:13"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1994,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1052:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1995,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1052:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2000,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1996,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1062:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1997,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1062:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1999,
"indexExpression": {
"argumentTypes": null,
"id": 1998,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1075:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1062:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1052:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2001,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1052:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1093:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1052:42:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2007,
"nodeType": "IfStatement",
"src": "1048:75:13",
"trueBody": {
"id": 2006,
"nodeType": "Block",
"src": "1096:27:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1111:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1984,
"id": 2005,
"nodeType": "Return",
"src": "1104:12:13"
}
]
}
},
{
"assignments": [
2009
],
"declarations": [
{
"constant": false,
"id": 2009,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "1129:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2008,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1129:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2014,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2010,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1147:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2011,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1147:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2013,
"indexExpression": {
"argumentTypes": null,
"id": 2012,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1160:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1147:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1129:37:13"
},
{
"assignments": [
2016
],
"declarations": [
{
"constant": false,
"id": 2016,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "1172:25:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 2015,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "1172:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2026,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2017,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1200:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2018,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1200:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2025,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2023,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1231:1:13",
"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": 2019,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1210:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2020,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1210:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2021,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1210:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2022,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1210:20:13",
"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": 2024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1210:23:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1200:34:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1172:62:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2027,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1240:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2030,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1240:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2031,
"indexExpression": {
"argumentTypes": null,
"id": 2029,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2009,
"src": "1250:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1240:18:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2032,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "1261:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element storage pointer"
}
},
"src": "1240:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2034,
"nodeType": "ExpressionStatement",
"src": "1240:30:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2035,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1276:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2039,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1276:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2040,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2037,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "1289:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element storage pointer"
}
},
"id": 2038,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "addr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1892,
"src": "1289:14:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1276:28:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2041,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2009,
"src": "1307:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1276:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2043,
"nodeType": "ExpressionStatement",
"src": "1276:38:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2044,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1320:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2047,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1320:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2048,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1320:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2053,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1360:1:13",
"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": 2049,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1339:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2050,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1339:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2051,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1339:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2052,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1339:20:13",
"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": 2054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1339:23:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1320:42:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2056,
"nodeType": "ExpressionStatement",
"src": "1320:42:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2057,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1376:4:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1984,
"id": 2058,
"nodeType": "Return",
"src": "1369:11:13"
}
]
},
"documentation": null,
"id": 2060,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1981,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1978,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "911:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1977,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "911:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1980,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "936:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1979,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "936:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "910:40:13"
},
"payable": false,
"returnParameters": {
"id": 1984,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1983,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "977:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1982,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "977:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "976:6:13"
},
"scope": 2326,
"src": "895:490:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2118,
"nodeType": "Block",
"src": "1502:364:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2072,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1571:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2073,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1577:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2071,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "1565:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1565:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2107,
"nodeType": "Block",
"src": "1716:94:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2100,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1761:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2101,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1767:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2102,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2066,
"src": "1774:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2099,
"name": "insert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1976,
"src": "1754:6:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address,uint256) returns (bool)"
}
},
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1754:28:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e736572742064617461206661696c",
"id": 2104,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1784:18:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5973eea7903479741094ffc328b827a6b77b4fd420fcdf986446a64783596dc",
"typeString": "literal_string \"insert data fail\""
},
"value": "insert data fail"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c5973eea7903479741094ffc328b827a6b77b4fd420fcdf986446a64783596dc",
"typeString": "literal_string \"insert data fail\""
}
],
"id": 2098,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1746:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1746:57:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2106,
"nodeType": "ExpressionStatement",
"src": "1746:57:13"
}
]
},
"id": 2108,
"nodeType": "IfStatement",
"src": "1561:249:13",
"trueBody": {
"id": 2097,
"nodeType": "Block",
"src": "1585:125:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1593:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2081,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1593:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2082,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2077,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1603:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2078,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1603:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2080,
"indexExpression": {
"argumentTypes": null,
"id": 2079,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1616:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1603:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1593:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2083,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1593:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2093,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2066,
"src": "1695:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2084,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1634:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2085,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1634:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2090,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2086,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1644:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2087,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1644:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2089,
"indexExpression": {
"argumentTypes": null,
"id": 2088,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1657:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1644:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1634:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2091,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1634:47:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2092,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "1634:60:13",
"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": 2094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1634:69:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1593:110:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2096,
"nodeType": "ExpressionStatement",
"src": "1593:110:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2109,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1823:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2110,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1823:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2115,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2111,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1833:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2112,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1833:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2114,
"indexExpression": {
"argumentTypes": null,
"id": 2113,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1846:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1833:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1823:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2116,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1823:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2070,
"id": 2117,
"nodeType": "Return",
"src": "1816:45:13"
}
]
},
"documentation": null,
"id": 2119,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2067,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2062,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1407:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2061,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "1407:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2064,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1436:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2063,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1436:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2066,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1455:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2065,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1455:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1401:73:13"
},
"payable": false,
"returnParameters": {
"id": 2070,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2069,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1493:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2068,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1493:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1492:9:13"
},
"scope": 2326,
"src": "1389:477:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2191,
"nodeType": "Block",
"src": "1983:369:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2132,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2003:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2133,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2009:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2131,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "1997:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1997:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206e6f7420737562206e6f20657869737420656c656d656e74",
"id": 2135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2017:30:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_609eca32e9c2a15fe34f2e470823c390d365127d0029c6605b14bfb41e794c06",
"typeString": "literal_string \"can not sub no exist element\""
},
"value": "can not sub no exist element"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_609eca32e9c2a15fe34f2e470823c390d365127d0029c6605b14bfb41e794c06",
"typeString": "literal_string \"can not sub no exist element\""
}
],
"id": 2130,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1989:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1989:59:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2137,
"nodeType": "ExpressionStatement",
"src": "1989:59:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2138,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2055:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2144,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2055:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2145,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2140,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2065:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2141,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2065:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2143,
"indexExpression": {
"argumentTypes": null,
"id": 2142,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2078:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2065:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2055:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2146,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2055:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2156,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2125,
"src": "2153:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2147,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2096:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2148,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2096:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2153,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2149,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2106:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2150,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2106:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2152,
"indexExpression": {
"argumentTypes": null,
"id": 2151,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2119:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2106:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2096:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2154,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2096:45:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "2096:56:13",
"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": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:65:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2055:106:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2159,
"nodeType": "ExpressionStatement",
"src": "2055:106:13"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2160,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2172:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2161,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2172:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2166,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2162,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2182:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2163,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2182:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2165,
"indexExpression": {
"argumentTypes": null,
"id": 2164,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2195:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2182:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2172:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2167,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2172:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2168,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2214:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2172:43:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2181,
"nodeType": "IfStatement",
"src": "2168:128:13",
"trueBody": {
"id": 2180,
"nodeType": "Block",
"src": "2217:79:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2172,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2240:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2173,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2246:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2171,
"name": "remove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2060,
"src": "2233:6:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) returns (bool)"
}
},
"id": 2174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2233:19:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72656d6f76652064617461206661696c",
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2254:18:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38026fcce4161dbd654c0f6dc97926a12cb87c91fbd8c3ec8adbc55ee0684310",
"typeString": "literal_string \"remove data fail\""
},
"value": "remove data fail"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38026fcce4161dbd654c0f6dc97926a12cb87c91fbd8c3ec8adbc55ee0684310",
"typeString": "literal_string \"remove data fail\""
}
],
"id": 2170,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2225:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2225:48:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2177,
"nodeType": "ExpressionStatement",
"src": "2225:48:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2178,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2288:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 2129,
"id": 2179,
"nodeType": "Return",
"src": "2281:8:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2182,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2309:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2183,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2309:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2188,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2184,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2319:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2185,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2319:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2187,
"indexExpression": {
"argumentTypes": null,
"id": 2186,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2332:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2319:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2309:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2189,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2309:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2129,
"id": 2190,
"nodeType": "Return",
"src": "2302:45:13"
}
]
},
"documentation": null,
"id": 2192,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2126,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2121,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1888:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2120,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "1888:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2123,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1917:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2122,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1917:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2125,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1936:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2124,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1936:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1882:73:13"
},
"payable": false,
"returnParameters": {
"id": 2129,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2128,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1974:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2127,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1974:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1973:9:13"
},
"scope": 2326,
"src": "1870:482:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2203,
"nodeType": "Block",
"src": "2428:34:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2199,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2194,
"src": "2441:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2200,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2441:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2201,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2441:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2198,
"id": 2202,
"nodeType": "Return",
"src": "2434:23:13"
}
]
},
"documentation": null,
"id": 2204,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2195,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2194,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2204,
"src": "2371:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2193,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2371:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2370:25:13"
},
"payable": false,
"returnParameters": {
"id": 2198,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2197,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2204,
"src": "2419:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2419:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2418:9:13"
},
"scope": 2326,
"src": "2356:106:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2228,
"nodeType": "Block",
"src": "2569:81:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2214,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2588:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2215,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2208,
"src": "2594:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2213,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "2582:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2582:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2225,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2644:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 2226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "2582:63:13",
"trueExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2217,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2603:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2218,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2603:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2223,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2219,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2613:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2220,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2613:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2222,
"indexExpression": {
"argumentTypes": null,
"id": 2221,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2208,
"src": "2626:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2613:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2603:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2224,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2603:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2212,
"id": 2227,
"nodeType": "Return",
"src": "2575:70:13"
}
]
},
"documentation": null,
"id": 2229,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "balance",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2209,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2206,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2483:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2205,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2483:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2208,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2508:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2207,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2508:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2482:40:13"
},
"payable": false,
"returnParameters": {
"id": 2212,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2211,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2558:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2210,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2558:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2557:9:13"
},
"scope": 2326,
"src": "2466:184:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2252,
"nodeType": "Block",
"src": "2760:113:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2243,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2239,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2233,
"src": "2774:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2240,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2231,
"src": "2782:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2241,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2782:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2782:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2774:24:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 2244,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2800:37:13",
"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": 2238,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2766:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2245,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2766:72:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2246,
"nodeType": "ExpressionStatement",
"src": "2766:72:13"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2247,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2231,
"src": "2852:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2248,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2852:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2250,
"indexExpression": {
"argumentTypes": null,
"id": 2249,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2233,
"src": "2862:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2852:16:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"functionReturnParameters": 2237,
"id": 2251,
"nodeType": "Return",
"src": "2845:23:13"
}
]
},
"documentation": null,
"id": 2253,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2234,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2231,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2667:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2230,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2667:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2233,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2692:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2232,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2692:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2666:40:13"
},
"payable": false,
"returnParameters": {
"id": 2237,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2236,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2742:7:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 2235,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "2742:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2741:16:13"
},
"scope": 2326,
"src": "2654:219:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2324,
"nodeType": "Block",
"src": "3081:328:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2266,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3095:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2267,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3104:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3095:10:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f756e74206e756d626572206d75737420626967676572207468616e2030",
"id": 2269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3107:33:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_519c921f2574d34d10900adccf193a1a43a5057663f5e7bdc898f2babbaaf737",
"typeString": "literal_string \"count number must bigger than 0\""
},
"value": "count number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_519c921f2574d34d10900adccf193a1a43a5057663f5e7bdc898f2babbaaf737",
"typeString": "literal_string \"count number must bigger than 0\""
}
],
"id": 2265,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "3087:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3087:54:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2271,
"nodeType": "ExpressionStatement",
"src": "3087:54:13"
},
{
"assignments": [
2273
],
"declarations": [
{
"constant": false,
"id": 2273,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3148:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2272,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3148:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2275,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2274,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3163:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3148:16:13"
},
{
"assignments": [
2279
],
"declarations": [
{
"constant": false,
"id": 2279,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3170:20:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2277,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3170:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2278,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3170:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2285,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2283,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3207:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2282,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3193:13:13",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$1897_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct BalanceList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2280,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3197:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2281,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3197:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
}
},
"id": 2284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3193:21:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3170:44:13"
},
{
"body": {
"id": 2320,
"nodeType": "Block",
"src": "3271:117:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2300,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2298,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3283:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2299,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3291:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:14:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2303,
"nodeType": "IfStatement",
"src": "3279:44:13",
"trueBody": {
"id": 2302,
"nodeType": "Block",
"src": "3299:24:13",
"statements": [
{
"id": 2301,
"nodeType": "Break",
"src": "3309:5:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2304,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2279,
"src": "3331:3:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"id": 2306,
"indexExpression": {
"argumentTypes": null,
"id": 2305,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3335:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3331:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2307,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2255,
"src": "3343:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2308,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "3343:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2310,
"indexExpression": {
"argumentTypes": null,
"id": 2309,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3353:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:12:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"src": "3331:24:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"id": 2312,
"nodeType": "ExpressionStatement",
"src": "3331:24:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2318,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2313,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3363:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3379:1:13",
"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": 2314,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3370:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "3370:8:13",
"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": 2317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3370:11:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3363:18:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2319,
"nodeType": "ExpressionStatement",
"src": "3363:18:13"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2290,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3244:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2291,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2255,
"src": "3248:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2292,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "3248:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2293,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3248:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3244:20:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2321,
"initializationExpression": {
"assignments": [
2287
],
"declarations": [
{
"constant": false,
"id": 2287,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3226:9:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2286,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3226:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2289,
"initialValue": {
"argumentTypes": null,
"id": 2288,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2257,
"src": "3238:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3226:16:13"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3266:3:13",
"subExpression": {
"argumentTypes": null,
"id": 2295,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3266:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2297,
"nodeType": "ExpressionStatement",
"src": "3266:3:13"
},
"nodeType": "ForStatement",
"src": "3221:167:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2322,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2279,
"src": "3401:3:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"functionReturnParameters": 2264,
"id": 2323,
"nodeType": "Return",
"src": "3394:10:13"
}
]
},
"documentation": null,
"id": 2325,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2260,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2255,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "2974:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2254,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2974:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2257,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3003:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2256,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3003:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2259,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3021:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2258,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3021:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2968:71:13"
},
"payable": false,
"returnParameters": {
"id": 2264,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2263,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3063:9:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2261,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3063:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2262,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3063:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3062:18:13"
},
"scope": 2326,
"src": "2952:457:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2327,
"src": "173:3238:13"
}
],
"src": "0:3412:13"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol",
"exportedSymbols": {
"BalanceList": [
2326
]
},
"id": 2327,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1886,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:13"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 1887,
"nodeType": "ImportDirective",
"scope": 2327,
"sourceUnit": 5658,
"src": "27:30:13",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 资产列表共通,除资产负债之外提供一个账目清单数组,便于统计和查找.",
"fullyImplemented": true,
"id": 2326,
"linearizedBaseContracts": [
2326
],
"name": "BalanceList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1890,
"libraryName": {
"contractScope": null,
"id": 1888,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "203:8:13",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "197:27:13",
"typeName": {
"id": 1889,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "216:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "BalanceList.element",
"id": 1897,
"members": [
{
"constant": false,
"id": 1892,
"name": "addr",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "249:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1891,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "249:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1894,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "267:11:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "267:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1896,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 1897,
"src": "284:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1895,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "284:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 2326,
"src": "228:76:13",
"visibility": "public"
},
{
"canonicalName": "BalanceList.balanceMap",
"id": 1905,
"members": [
{
"constant": false,
"id": 1901,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 1905,
"src": "331:35:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 1900,
"keyType": {
"id": 1898,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "339:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "331:27:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1899,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "350:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1904,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 1905,
"src": "372:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1902,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "372:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 1903,
"length": null,
"nodeType": "ArrayTypeName",
"src": "372:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "balanceMap",
"nodeType": "StructDefinition",
"scope": 2326,
"src": "307:84:13",
"visibility": "public"
},
{
"body": {
"id": 1934,
"nodeType": "Block",
"src": "493:109:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1918,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1914,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "503:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1915,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "503:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1916,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "503:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1917,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "523:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "503:21:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1921,
"nodeType": "IfStatement",
"src": "499:39:13",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1919,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "533:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1913,
"id": 1920,
"nodeType": "Return",
"src": "526:12:13"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1922,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "552:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1923,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "552:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1928,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1924,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1907,
"src": "562:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1925,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "562:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1927,
"indexExpression": {
"argumentTypes": null,
"id": 1926,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "575:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "562:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "552:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 1929,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "addr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1892,
"src": "552:35:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1930,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "591:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "552:44:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 1932,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "551:46:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1913,
"id": 1933,
"nodeType": "Return",
"src": "544:53:13"
}
]
},
"documentation": null,
"id": 1935,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1910,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1907,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "410:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1906,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "410:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1909,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "435:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1908,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "435:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "409:40:13"
},
"payable": false,
"returnParameters": {
"id": 1913,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1912,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1935,
"src": "485:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1911,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "485:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "484:6:13"
},
"scope": 2326,
"src": "395:207:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1975,
"nodeType": "Block",
"src": "719:172:13",
"statements": [
{
"assignments": [
1947
],
"declarations": [
{
"constant": false,
"id": 1947,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "725:16:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 1946,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "725:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1955,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1949,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "765:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1950,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "777:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1951,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "777:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1952,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "777:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1953,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1941,
"src": "804:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": null,
"id": 1948,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1897,
"src": "750:7:13",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$1897_storage_ptr_$",
"typeString": "type(struct BalanceList.element storage pointer)"
}
},
"id": 1954,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"addr",
"idx",
"balance"
],
"nodeType": "FunctionCall",
"src": "750:63:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "725:88:13"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1961,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1947,
"src": "834:1:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1956,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "819:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1959,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "819:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 1960,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "819:14:13",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$1897_storage_$returns$_t_uint256_$",
"typeString": "function (struct BalanceList.element storage ref) returns (uint256)"
}
},
"id": 1962,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "819:17:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1963,
"nodeType": "ExpressionStatement",
"src": "819:17:13"
},
{
"expression": {
"argumentTypes": null,
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1964,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "842:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1967,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "842:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1968,
"indexExpression": {
"argumentTypes": null,
"id": 1966,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1939,
"src": "855:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "842:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1969,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1947,
"src": "864:1:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element memory"
}
},
"id": 1970,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 1894,
"src": "864:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "842:27:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1972,
"nodeType": "ExpressionStatement",
"src": "842:27:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "882:4:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1945,
"id": 1974,
"nodeType": "Return",
"src": "875:11:13"
}
]
},
"documentation": null,
"id": 1976,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1942,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1937,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "627:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1936,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "627:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1939,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "656:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1938,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "656:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1941,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "675:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1940,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "675:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "621:73:13"
},
"payable": false,
"returnParameters": {
"id": 1945,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1944,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1976,
"src": "713:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1943,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "713:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "712:6:13"
},
"scope": 2326,
"src": "606:285:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2059,
"nodeType": "Block",
"src": "985:400:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "995:19:13",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1986,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1002:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1987,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1008:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1985,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "996:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 1988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "996:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1993,
"nodeType": "IfStatement",
"src": "991:52:13",
"trueBody": {
"id": 1992,
"nodeType": "Block",
"src": "1016:27:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1990,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1031:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1984,
"id": 1991,
"nodeType": "Return",
"src": "1024:12:13"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1994,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1052:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1995,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1052:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2000,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1996,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1062:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 1997,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1062:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1999,
"indexExpression": {
"argumentTypes": null,
"id": 1998,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1075:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1062:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1052:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2001,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1052:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1093:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1052:42:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2007,
"nodeType": "IfStatement",
"src": "1048:75:13",
"trueBody": {
"id": 2006,
"nodeType": "Block",
"src": "1096:27:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1111:5:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1984,
"id": 2005,
"nodeType": "Return",
"src": "1104:12:13"
}
]
}
},
{
"assignments": [
2009
],
"declarations": [
{
"constant": false,
"id": 2009,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "1129:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2008,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1129:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2014,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2010,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1147:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2011,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1147:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2013,
"indexExpression": {
"argumentTypes": null,
"id": 2012,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1980,
"src": "1160:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1147:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1129:37:13"
},
{
"assignments": [
2016
],
"declarations": [
{
"constant": false,
"id": 2016,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "1172:25:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 2015,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "1172:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2026,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2017,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1200:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2018,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1200:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2025,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2023,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1231:1:13",
"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": 2019,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1210:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2020,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1210:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2021,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1210:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2022,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1210:20:13",
"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": 2024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1210:23:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1200:34:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1172:62:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2027,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1240:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2030,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1240:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2031,
"indexExpression": {
"argumentTypes": null,
"id": 2029,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2009,
"src": "1250:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1240:18:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2032,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "1261:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element storage pointer"
}
},
"src": "1240:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2034,
"nodeType": "ExpressionStatement",
"src": "1240:30:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2035,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1276:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2039,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1276:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2040,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2037,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "1289:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element storage pointer"
}
},
"id": 2038,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "addr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1892,
"src": "1289:14:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1276:28:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2041,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2009,
"src": "1307:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1276:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2043,
"nodeType": "ExpressionStatement",
"src": "1276:38:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2044,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1320:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2047,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1320:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2048,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1320:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2053,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1360:1:13",
"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": 2049,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1978,
"src": "1339:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2050,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1339:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2051,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1339:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2052,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1339:20:13",
"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": 2054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1339:23:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1320:42:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2056,
"nodeType": "ExpressionStatement",
"src": "1320:42:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2057,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1376:4:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1984,
"id": 2058,
"nodeType": "Return",
"src": "1369:11:13"
}
]
},
"documentation": null,
"id": 2060,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1981,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1978,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "911:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 1977,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "911:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1980,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "936:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1979,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "936:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "910:40:13"
},
"payable": false,
"returnParameters": {
"id": 1984,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1983,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2060,
"src": "977:4:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1982,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "977:4:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "976:6:13"
},
"scope": 2326,
"src": "895:490:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2118,
"nodeType": "Block",
"src": "1502:364:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2072,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1571:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2073,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1577:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2071,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "1565:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1565:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2107,
"nodeType": "Block",
"src": "1716:94:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2100,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1761:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2101,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1767:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2102,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2066,
"src": "1774:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2099,
"name": "insert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1976,
"src": "1754:6:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address,uint256) returns (bool)"
}
},
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1754:28:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e736572742064617461206661696c",
"id": 2104,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1784:18:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5973eea7903479741094ffc328b827a6b77b4fd420fcdf986446a64783596dc",
"typeString": "literal_string \"insert data fail\""
},
"value": "insert data fail"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c5973eea7903479741094ffc328b827a6b77b4fd420fcdf986446a64783596dc",
"typeString": "literal_string \"insert data fail\""
}
],
"id": 2098,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1746:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1746:57:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2106,
"nodeType": "ExpressionStatement",
"src": "1746:57:13"
}
]
},
"id": 2108,
"nodeType": "IfStatement",
"src": "1561:249:13",
"trueBody": {
"id": 2097,
"nodeType": "Block",
"src": "1585:125:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1593:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2081,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1593:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2082,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2077,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1603:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2078,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1603:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2080,
"indexExpression": {
"argumentTypes": null,
"id": 2079,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1616:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1603:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1593:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2083,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1593:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2093,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2066,
"src": "1695:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2084,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1634:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2085,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1634:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2090,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2086,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1644:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2087,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1644:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2089,
"indexExpression": {
"argumentTypes": null,
"id": 2088,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1657:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1644:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1634:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2091,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1634:47:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2092,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "1634:60:13",
"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": 2094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1634:69:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1593:110:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2096,
"nodeType": "ExpressionStatement",
"src": "1593:110:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2109,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1823:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2110,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "1823:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2115,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2111,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2062,
"src": "1833:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2112,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "1833:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2114,
"indexExpression": {
"argumentTypes": null,
"id": 2113,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2064,
"src": "1846:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1833:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1823:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2116,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "1823:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2070,
"id": 2117,
"nodeType": "Return",
"src": "1816:45:13"
}
]
},
"documentation": null,
"id": 2119,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2067,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2062,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1407:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2061,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "1407:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2064,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1436:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2063,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1436:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2066,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1455:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2065,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1455:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1401:73:13"
},
"payable": false,
"returnParameters": {
"id": 2070,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2069,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2119,
"src": "1493:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2068,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1493:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1492:9:13"
},
"scope": 2326,
"src": "1389:477:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2191,
"nodeType": "Block",
"src": "1983:369:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2132,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2003:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2133,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2009:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2131,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "1997:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1997:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e206e6f7420737562206e6f20657869737420656c656d656e74",
"id": 2135,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2017:30:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_609eca32e9c2a15fe34f2e470823c390d365127d0029c6605b14bfb41e794c06",
"typeString": "literal_string \"can not sub no exist element\""
},
"value": "can not sub no exist element"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_609eca32e9c2a15fe34f2e470823c390d365127d0029c6605b14bfb41e794c06",
"typeString": "literal_string \"can not sub no exist element\""
}
],
"id": 2130,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "1989:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1989:59:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2137,
"nodeType": "ExpressionStatement",
"src": "1989:59:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2138,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2055:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2144,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2055:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2145,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2140,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2065:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2141,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2065:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2143,
"indexExpression": {
"argumentTypes": null,
"id": 2142,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2078:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2065:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2055:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2146,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2055:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2156,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2125,
"src": "2153:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2147,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2096:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2148,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2096:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2153,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2149,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2106:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2150,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2106:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2152,
"indexExpression": {
"argumentTypes": null,
"id": 2151,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2119:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2106:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2096:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2154,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2096:45:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "2096:56:13",
"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": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:65:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2055:106:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2159,
"nodeType": "ExpressionStatement",
"src": "2055:106:13"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2160,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2172:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2161,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2172:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2166,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2162,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2182:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2163,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2182:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2165,
"indexExpression": {
"argumentTypes": null,
"id": 2164,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2195:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2182:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2172:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2167,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2172:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2168,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2214:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2172:43:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2181,
"nodeType": "IfStatement",
"src": "2168:128:13",
"trueBody": {
"id": 2180,
"nodeType": "Block",
"src": "2217:79:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2172,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2240:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2173,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2246:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2171,
"name": "remove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2060,
"src": "2233:6:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) returns (bool)"
}
},
"id": 2174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2233:19:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72656d6f76652064617461206661696c",
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2254:18:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38026fcce4161dbd654c0f6dc97926a12cb87c91fbd8c3ec8adbc55ee0684310",
"typeString": "literal_string \"remove data fail\""
},
"value": "remove data fail"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38026fcce4161dbd654c0f6dc97926a12cb87c91fbd8c3ec8adbc55ee0684310",
"typeString": "literal_string \"remove data fail\""
}
],
"id": 2170,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2225:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2225:48:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2177,
"nodeType": "ExpressionStatement",
"src": "2225:48:13"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2178,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2288:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 2129,
"id": 2179,
"nodeType": "Return",
"src": "2281:8:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2182,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2309:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2183,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2309:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2188,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2184,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2121,
"src": "2319:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2185,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2319:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2187,
"indexExpression": {
"argumentTypes": null,
"id": 2186,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2123,
"src": "2332:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2319:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2309:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2189,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2309:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2129,
"id": 2190,
"nodeType": "Return",
"src": "2302:45:13"
}
]
},
"documentation": null,
"id": 2192,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2126,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2121,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1888:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2120,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "1888:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2123,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1917:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2122,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1917:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2125,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1936:15:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2124,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1936:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1882:73:13"
},
"payable": false,
"returnParameters": {
"id": 2129,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2128,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2192,
"src": "1974:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2127,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1974:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1973:9:13"
},
"scope": 2326,
"src": "1870:482:13",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2203,
"nodeType": "Block",
"src": "2428:34:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2199,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2194,
"src": "2441:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2200,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2441:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2201,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2441:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2198,
"id": 2202,
"nodeType": "Return",
"src": "2434:23:13"
}
]
},
"documentation": null,
"id": 2204,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2195,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2194,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2204,
"src": "2371:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2193,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2371:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2370:25:13"
},
"payable": false,
"returnParameters": {
"id": 2198,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2197,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2204,
"src": "2419:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2196,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2419:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2418:9:13"
},
"scope": 2326,
"src": "2356:106:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2228,
"nodeType": "Block",
"src": "2569:81:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2214,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2588:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 2215,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2208,
"src": "2594:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2213,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "2582:5:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (bool)"
}
},
"id": 2216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2582:18:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2225,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2644:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"id": 2226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "2582:63:13",
"trueExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2217,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2603:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2218,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2603:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2223,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2219,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2206,
"src": "2613:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2220,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1901,
"src": "2613:12:13",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 2222,
"indexExpression": {
"argumentTypes": null,
"id": 2221,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2208,
"src": "2626:5:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2613:19:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2603:30:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"id": 2224,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1896,
"src": "2603:38:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2212,
"id": 2227,
"nodeType": "Return",
"src": "2575:70:13"
}
]
},
"documentation": null,
"id": 2229,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "balance",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2209,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2206,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2483:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2205,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2483:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2208,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2508:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2207,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2508:7:13",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2482:40:13"
},
"payable": false,
"returnParameters": {
"id": 2212,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2211,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2229,
"src": "2558:7:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2210,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2558:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2557:9:13"
},
"scope": 2326,
"src": "2466:184:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2252,
"nodeType": "Block",
"src": "2760:113:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2243,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2239,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2233,
"src": "2774:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2240,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2231,
"src": "2782:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2241,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2782:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2782:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2774:24:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 2244,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2800:37:13",
"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": 2238,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2766:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2245,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2766:72:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2246,
"nodeType": "ExpressionStatement",
"src": "2766:72:13"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2247,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2231,
"src": "2852:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2248,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "2852:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2250,
"indexExpression": {
"argumentTypes": null,
"id": 2249,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2233,
"src": "2862:5:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2852:16:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"functionReturnParameters": 2237,
"id": 2251,
"nodeType": "Return",
"src": "2845:23:13"
}
]
},
"documentation": null,
"id": 2253,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2234,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2231,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2667:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2230,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2667:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2233,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2692:13:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2232,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2692:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2666:40:13"
},
"payable": false,
"returnParameters": {
"id": 2237,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2236,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2253,
"src": "2742:7:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory_ptr",
"typeString": "struct BalanceList.element"
},
"typeName": {
"contractScope": null,
"id": 2235,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "2742:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2741:16:13"
},
"scope": 2326,
"src": "2654:219:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2324,
"nodeType": "Block",
"src": "3081:328:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2266,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3095:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2267,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3104:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3095:10:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f756e74206e756d626572206d75737420626967676572207468616e2030",
"id": 2269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3107:33:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_519c921f2574d34d10900adccf193a1a43a5057663f5e7bdc898f2babbaaf737",
"typeString": "literal_string \"count number must bigger than 0\""
},
"value": "count number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_519c921f2574d34d10900adccf193a1a43a5057663f5e7bdc898f2babbaaf737",
"typeString": "literal_string \"count number must bigger than 0\""
}
],
"id": 2265,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "3087:7:13",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3087:54:13",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2271,
"nodeType": "ExpressionStatement",
"src": "3087:54:13"
},
{
"assignments": [
2273
],
"declarations": [
{
"constant": false,
"id": 2273,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3148:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2272,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3148:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2275,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2274,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3163:1:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3148:16:13"
},
{
"assignments": [
2279
],
"declarations": [
{
"constant": false,
"id": 2279,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3170:20:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2277,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3170:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2278,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3170:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2285,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2283,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3207:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2282,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "3193:13:13",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$1897_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct BalanceList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2280,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3197:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2281,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3197:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
}
},
"id": 2284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3193:21:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3170:44:13"
},
{
"body": {
"id": 2320,
"nodeType": "Block",
"src": "3271:117:13",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2300,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2298,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3283:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2299,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2259,
"src": "3291:6:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:14:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2303,
"nodeType": "IfStatement",
"src": "3279:44:13",
"trueBody": {
"id": 2302,
"nodeType": "Block",
"src": "3299:24:13",
"statements": [
{
"id": 2301,
"nodeType": "Break",
"src": "3309:5:13"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2304,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2279,
"src": "3331:3:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"id": 2306,
"indexExpression": {
"argumentTypes": null,
"id": 2305,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3335:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3331:9:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2307,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2255,
"src": "3343:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2308,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "3343:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2310,
"indexExpression": {
"argumentTypes": null,
"id": 2309,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3353:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:12:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage",
"typeString": "struct BalanceList.element storage ref"
}
},
"src": "3331:24:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_memory",
"typeString": "struct BalanceList.element memory"
}
},
"id": 2312,
"nodeType": "ExpressionStatement",
"src": "3331:24:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2318,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2313,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3363:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 2316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3379:1:13",
"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": 2314,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "3370:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "3370:8:13",
"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": 2317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3370:11:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3363:18:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2319,
"nodeType": "ExpressionStatement",
"src": "3363:18:13"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2290,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3244:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2291,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2255,
"src": "3248:4:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap storage pointer"
}
},
"id": 2292,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1904,
"src": "3248:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage",
"typeString": "struct BalanceList.element storage ref[] storage ref"
}
},
"id": 2293,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3248:16:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3244:20:13",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2321,
"initializationExpression": {
"assignments": [
2287
],
"declarations": [
{
"constant": false,
"id": 2287,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3226:9:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2286,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3226:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2289,
"initialValue": {
"argumentTypes": null,
"id": 2288,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2257,
"src": "3238:4:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3226:16:13"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3266:3:13",
"subExpression": {
"argumentTypes": null,
"id": 2295,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2287,
"src": "3266:1:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2297,
"nodeType": "ExpressionStatement",
"src": "3266:3:13"
},
"nodeType": "ForStatement",
"src": "3221:167:13"
},
{
"expression": {
"argumentTypes": null,
"id": 2322,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2279,
"src": "3401:3:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element memory[] memory"
}
},
"functionReturnParameters": 2264,
"id": 2323,
"nodeType": "Return",
"src": "3394:10:13"
}
]
},
"documentation": null,
"id": 2325,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2260,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2255,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "2974:23:13",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 2254,
"name": "balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "2974:10:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2257,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3003:12:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2256,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3003:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2259,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3021:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2258,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3021:7:13",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2968:71:13"
},
"payable": false,
"returnParameters": {
"id": 2264,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2263,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2325,
"src": "3063:9:13",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_memory_$dyn_memory_ptr",
"typeString": "struct BalanceList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 2261,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1897,
"src": "3063:7:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1897_storage_ptr",
"typeString": "struct BalanceList.element"
}
},
"id": 2262,
"length": null,
"nodeType": "ArrayTypeName",
"src": "3063:9:13",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1897_storage_$dyn_storage_ptr",
"typeString": "struct BalanceList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3062:18:13"
},
"scope": 2326,
"src": "2952:457:13",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2327,
"src": "173:3238:13"
}
],
"src": "0:3412:13"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.16",
"updatedAt": "2021-03-06T09:30:00.966Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}