jcc-solidity-utils
Version:
jcc solidity utils
8,224 lines • 349 kB
JSON
{
"contractName": "AlarmList",
"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/AlarmList.sol\":\"AlarmList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AlarmList.sol\":{\"keccak256\":\"0x2f63a437b679cf16f84d1e92c14432fd29fb4a3a4990d393abb928b7b8641fc8\",\"urls\":[\"bzzr://7b44df42b6b1bca22f8c9e5bb7197e78871a34246089d6aa0a5a31eb8fc95ef0\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]}},\"version\":1}",
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058202fc136656b2a8d9e9cbe1616cd239df1c6daf005f2008652e6d9368a07589b820029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058202fc136656b2a8d9e9cbe1616cd239df1c6daf005f2008652e6d9368a07589b820029",
"sourceMap": "94:2893:12:-;;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": "94:2893:12:-;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @dev 定时任务列表\n */\nlibrary AlarmList {\n using SafeMath for uint256;\n\n // 定时任务定义\n struct element {\n // 合约地址\n address contractAddr;\n // 创建者地址\n address creatorAddr;\n // 索引id\n uint256 idx;\n // 类型:0:一次性, 1:周期性\n uint256 alarmType;\n // 起始时间\n uint256 begin;\n // 周期\n uint256 peroid;\n }\n struct alarmMap {\n mapping(address => uint256) mapList;\n element[] list;\n }\n\n function exist(alarmMap 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]].contractAddr == _addr);\n }\n\n /**\n @dev 增加新定时定义,重复的地址返回失败\n */\n function insert(\n alarmMap storage self,\n address _addr,\n address _creator,\n uint256 _type,\n uint256 _begin,\n uint256 _peroid\n ) internal returns (bool) {\n if (exist(self, _addr)) {\n return false;\n }\n\n element memory e =\n element({\n contractAddr: _addr,\n creatorAddr: _creator,\n idx: self.list.length,\n alarmType: _type,\n begin: _begin,\n peroid: _peroid\n });\n self.list.push(e);\n self.mapList[_addr] = e.idx;\n return true;\n }\n\n /**\n @dev 删除地址,相应的下标索引数组自动缩减\n */\n function remove(alarmMap storage self, address _addr)\n internal\n returns (bool)\n {\n if (!exist(self, _addr)) {\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.contractAddr] = row2Del;\n self.list.length = self.list.length.sub(1);\n\n return true;\n }\n\n function count(alarmMap storage self) internal view returns (uint256) {\n return self.list.length;\n }\n\n function get(alarmMap storage self, uint256 index)\n internal\n view\n returns (AlarmList.element)\n {\n require(index < self.list.length, \"index must small than current count\");\n return self.list[index];\n }\n\n function getByAddr(alarmMap storage self, address _addr)\n internal\n view\n returns (AlarmList.element)\n {\n require(exist(self, _addr), \"alarm must exist\");\n return self.list[self.mapList[_addr]];\n }\n\n /**\n @dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺\n */\n function getList(\n alarmMap storage self,\n uint256 from,\n uint256 _count\n ) internal view returns (AlarmList.element[] memory) {\n uint256 _idx = 0;\n require(_count > 0, \"return number must bigger than 0\");\n AlarmList.element[] memory res = new AlarmList.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/AlarmList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AlarmList.sol",
"exportedSymbols": {
"AlarmList": [
1884
]
},
"id": 1885,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1565,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:12"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 1566,
"nodeType": "ImportDirective",
"scope": 1885,
"sourceUnit": 5658,
"src": "27:30:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 定时任务列表",
"fullyImplemented": true,
"id": 1884,
"linearizedBaseContracts": [
1884
],
"name": "AlarmList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1569,
"libraryName": {
"contractScope": null,
"id": 1567,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "122:8:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "116:27:12",
"typeName": {
"id": 1568,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "135:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "AlarmList.element",
"id": 1582,
"members": [
{
"constant": false,
"id": 1571,
"name": "contractAddr",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "212:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1570,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "212:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1573,
"name": "creatorAddr",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "261:19:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1572,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "261:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1575,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "302:11:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1574,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "302:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1577,
"name": "alarmType",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "360:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1576,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "360:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1579,
"name": "begin",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "403:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1578,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "403:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1581,
"name": "peroid",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "436:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1580,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "436:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 1884,
"src": "171:284:12",
"visibility": "public"
},
{
"canonicalName": "AlarmList.alarmMap",
"id": 1590,
"members": [
{
"constant": false,
"id": 1586,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 1590,
"src": "480:35:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 1585,
"keyType": {
"id": 1583,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "480:27:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1584,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "499:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1589,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 1590,
"src": "521:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1587,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "521:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1588,
"length": null,
"nodeType": "ArrayTypeName",
"src": "521:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "alarmMap",
"nodeType": "StructDefinition",
"scope": 1884,
"src": "458:82:12",
"visibility": "public"
},
{
"body": {
"id": 1619,
"nodeType": "Block",
"src": "640:117:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1599,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "650:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1600,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "650:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1601,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "650:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "670:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "650:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1606,
"nodeType": "IfStatement",
"src": "646:39:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1604,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "680:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1598,
"id": 1605,
"nodeType": "Return",
"src": "673:12:12"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1616,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1607,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "699:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1608,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "699:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1613,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1609,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "709:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1610,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "709:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1612,
"indexExpression": {
"argumentTypes": null,
"id": 1611,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1594,
"src": "722:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "709:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "699:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"id": 1614,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "contractAddr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1571,
"src": "699:43:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1615,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1594,
"src": "746:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "699:52:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 1617,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "698:54:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1598,
"id": 1618,
"nodeType": "Return",
"src": "691:61:12"
}
]
},
"documentation": null,
"id": 1620,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1595,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1592,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "559:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1591,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "559:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1594,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "582:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1593,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "582:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "558:38:12"
},
"payable": false,
"returnParameters": {
"id": 1598,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1597,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "632:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1596,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "632:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "631:6:12"
},
"scope": 1884,
"src": "544:213:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1677,
"nodeType": "Block",
"src": "1004:348:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1638,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1020:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1639,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1026:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1637,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "1014:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1014:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1644,
"nodeType": "IfStatement",
"src": "1010:51:12",
"trueBody": {
"id": 1643,
"nodeType": "Block",
"src": "1034:27:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1641,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1049:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1636,
"id": 1642,
"nodeType": "Return",
"src": "1042:12:12"
}
]
}
},
{
"assignments": [
1646
],
"declarations": [
{
"constant": false,
"id": 1646,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "1067:16:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1645,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "1067:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1657,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1648,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1124:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1649,
"name": "_creator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1626,
"src": "1152:8:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1650,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1175:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1651,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1175:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1652,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1175:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1653,
"name": "_type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1628,
"src": "1212:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1654,
"name": "_begin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1630,
"src": "1234:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1655,
"name": "_peroid",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1632,
"src": "1258:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": null,
"id": 1647,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1582,
"src": "1092:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$1582_storage_ptr_$",
"typeString": "type(struct AlarmList.element storage pointer)"
}
},
"id": 1656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"contractAddr",
"creatorAddr",
"idx",
"alarmType",
"begin",
"peroid"
],
"nodeType": "FunctionCall",
"src": "1092:182:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1067:207:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1663,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1646,
"src": "1295:1:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1658,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1280:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1661,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1280:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1662,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1280:14:12",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$1582_storage_$returns$_t_uint256_$",
"typeString": "function (struct AlarmList.element storage ref) returns (uint256)"
}
},
"id": 1664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1280:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1665,
"nodeType": "ExpressionStatement",
"src": "1280:17:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1673,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1666,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1303:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1669,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1303:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1670,
"indexExpression": {
"argumentTypes": null,
"id": 1668,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1316:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1303:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1671,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1646,
"src": "1325:1:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
},
"id": 1672,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 1575,
"src": "1325:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1303:27:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1674,
"nodeType": "ExpressionStatement",
"src": "1303:27:12"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1675,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1343:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1636,
"id": 1676,
"nodeType": "Return",
"src": "1336:11:12"
}
]
},
"documentation": "@dev 增加新定时定义,重复的地址返回失败",
"id": 1678,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1633,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1622,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "853:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1621,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "853:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1624,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "880:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1623,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "880:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1626,
"name": "_creator",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "899:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1625,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "899:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1628,
"name": "_type",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "921:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1627,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "921:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1630,
"name": "_begin",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "940:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1629,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "940:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1632,
"name": "_peroid",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "960:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1631,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "960:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "847:132:12"
},
"payable": false,
"returnParameters": {
"id": 1636,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1635,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "998:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1634,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "998:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "997:6:12"
},
"scope": 1884,
"src": "832:520:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1747,
"nodeType": "Block",
"src": "1518:328:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 1691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1528:19:12",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1688,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1535:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1689,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "1541:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1687,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "1529:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1690,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1529:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1695,
"nodeType": "IfStatement",
"src": "1524:52:12",
"trueBody": {
"id": 1694,
"nodeType": "Block",
"src": "1549:27:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1692,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1564:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1686,
"id": 1693,
"nodeType": "Return",
"src": "1557:12:12"
}
]
}
},
{
"assignments": [
1697
],
"declarations": [
{
"constant": false,
"id": 1697,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1582:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1696,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1582:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1702,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1698,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1600:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1699,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1600:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1701,
"indexExpression": {
"argumentTypes": null,
"id": 1700,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "1613:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1600:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1582:37:12"
},
{
"assignments": [
1704
],
"declarations": [
{
"constant": false,
"id": 1704,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1625:25:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1703,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "1625:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1714,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1705,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1653:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1706,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1653:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1713,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1711,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1684:1:12",
"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": 1707,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1663:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1708,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1663:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1709,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1663:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1663:20:12",
"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": 1712,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1663:23:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1653:34:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1625:62:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1715,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1693:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1718,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1693:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1719,
"indexExpression": {
"argumentTypes": null,
"id": 1717,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1697,
"src": "1703:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1693:18:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1720,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1704,
"src": "1714:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element storage pointer"
}
},
"src": "1693:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"id": 1722,
"nodeType": "ExpressionStatement",
"src": "1693:30:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1723,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1729:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1727,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1729:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1728,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1725,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1704,
"src": "1742:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element storage pointer"
}
},
"id": 1726,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "contractAddr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1571,
"src": "1742:22:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1729:36:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1729,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1697,
"src": "1768:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1729:46:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1731,
"nodeType": "ExpressionStatement",
"src": "1729:46:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1732,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1781:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1735,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1781:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1736,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1781:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1741,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1821:1:12",
"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": 1737,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1800:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1738,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1800:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1739,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1800:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1800:20:12",
"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": 1742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1800:23:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1781:42:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1744,
"nodeType": "ExpressionStatement",
"src": "1781:42:12"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1745,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1837:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1686,
"id": 1746,
"nodeType": "Return",
"src": "1830:11:12"
}
]
},
"documentation": "@dev 删除地址,相应的下标索引数组自动缩减",
"id": 1748,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1683,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1680,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1446:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1679,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1446:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1682,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1469:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1681,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1469:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1445:38:12"
},
"payable": false,
"returnParameters": {
"id": 1686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1685,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1510:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1684,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1510:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1509:6:12"
},
"scope": 1884,
"src": "1430:416:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1759,
"nodeType": "Block",
"src": "1920:34:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1755,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1750,
"src": "1933:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1756,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1933:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1757,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1933:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1754,
"id": 1758,
"nodeType": "Return",
"src": "1926:23:12"
}
]
},
"documentation": null,
"id": 1760,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1751,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1750,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1760,
"src": "1865:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1749,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1865:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1864:23:12"
},
"payable": false,
"returnParameters": {
"id": 1754,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1753,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1760,
"src": "1911:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1752,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1911:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1910:9:12"
},
"scope": 1884,
"src": "1850:104:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1783,
"nodeType": "Block",
"src": "2065:112:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1770,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2079:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1771,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2087:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1772,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2087:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1773,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2087:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2079:24:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 1775,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2105:37:12",
"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": 1769,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2071:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2071:72:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1777,
"nodeType": "ExpressionStatement",
"src": "2071:72:12"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1778,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2156:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1779,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2156:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1781,
"indexExpression": {
"argumentTypes": null,
"id": 1780,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2166:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2156:16:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"functionReturnParameters": 1768,
"id": 1782,
"nodeType": "Return",
"src": "2149:23:12"
}
]
},
"documentation": null,
"id": 1784,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1762,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "1971:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1761,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1971:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1764,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "1994:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1763,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1970:38:12"
},
"payable": false,
"returnParameters": {
"id": 1768,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1767,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "2044:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1766,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2044:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2043:19:12"
},
"scope": 1884,
"src": "1958:219:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1809,
"nodeType": "Block",
"src": "2294:101:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1795,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2314:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1796,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1788,
"src": "2320:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1794,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "2308:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1797,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2308:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616c61726d206d757374206578697374",
"id": 1798,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2328:18:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_16ce8e1de9991a4b59771df2ba4da4ce0d4a6175a5c1523a00aa77e724413dba",
"typeString": "literal_string \"alarm must exist\""
},
"value": "alarm must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_16ce8e1de9991a4b59771df2ba4da4ce0d4a6175a5c1523a00aa77e724413dba",
"typeString": "literal_string \"alarm must exist\""
}
],
"id": 1793,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2300:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1799,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2300:47:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1800,
"nodeType": "ExpressionStatement",
"src": "2300:47:12"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1801,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2360:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1802,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2360:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1807,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1803,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2370:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1804,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "2370:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1806,
"indexExpression": {
"argumentTypes": null,
"id": 1805,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1788,
"src": "2383:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2370:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2360:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"functionReturnParameters": 1792,
"id": 1808,
"nodeType": "Return",
"src": "2353:37:12"
}
]
},
"documentation": null,
"id": 1810,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getByAddr",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1789,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1786,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2200:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1785,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "2200:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1788,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2223:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1787,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2223:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2199:38:12"
},
"payable": false,
"returnParameters": {
"id": 1792,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1791,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2273:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1790,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2273:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2272:19:12"
},
"scope": 1884,
"src": "2181:214:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1882,
"nodeType": "Block",
"src": "2637:348:12",
"statements": [
{
"assignments": [
1823
],
"declarations": [
{
"constant": false,
"id": 1823,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2643:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1822,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2643:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1825,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2658:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2643:16:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1829,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1827,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2673:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1828,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2682:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2673:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 1830,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2685:34:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
},
"value": "return number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
}
],
"id": 1826,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2665:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1831,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2665:55:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1832,
"nodeType": "ExpressionStatement",
"src": "2665:55:12"
},
{
"assignments": [
1837
],
"declarations": [
{
"constant": false,
"id": 1837,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2726:30:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1835,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2726:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1836,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2726:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1843,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1841,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2783:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1840,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "2759:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$1582_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct AlarmList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1838,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2763:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1839,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2763:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
}
},
"id": 1842,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2759:31:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2726:64:12"
},
{
"body": {
"id": 1878,
"nodeType": "Block",
"src": "2847:117:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1858,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1856,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2859:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1857,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2867:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2859:14:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1861,
"nodeType": "IfStatement",
"src": "2855:44:12",
"trueBody": {
"id": 1860,
"nodeType": "Block",
"src": "2875:24:12",
"statements": [
{
"id": 1859,
"nodeType": "Break",
"src": "2885:5:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 1869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1862,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1837,
"src": "2907:3:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"id": 1864,
"indexExpression": {
"argumentTypes": null,
"id": 1863,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2911:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2907:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1865,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1812,
"src": "2919:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1866,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2919:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1868,
"indexExpression": {
"argumentTypes": null,
"id": 1867,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2929:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2919:12:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"src": "2907:24:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"id": 1870,
"nodeType": "ExpressionStatement",
"src": "2907:24:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1876,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1871,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2939:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1874,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2955:1:12",
"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": 1872,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2946:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1873,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "2946:8:12",
"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": 1875,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2946:11:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2939:18:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1877,
"nodeType": "ExpressionStatement",
"src": "2939:18:12"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1852,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1848,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2820:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1849,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1812,
"src": "2824:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1850,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2824:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1851,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2824:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2820:20:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1879,
"initializationExpression": {
"assignments": [
1845
],
"declarations": [
{
"constant": false,
"id": 1845,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2802:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1844,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2802:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1847,
"initialValue": {
"argumentTypes": null,
"id": 1846,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1814,
"src": "2814:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2802:16:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2842:3:12",
"subExpression": {
"argumentTypes": null,
"id": 1853,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2842:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1855,
"nodeType": "ExpressionStatement",
"src": "2842:3:12"
},
"nodeType": "ForStatement",
"src": "2797:167:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1880,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1837,
"src": "2977:3:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"functionReturnParameters": 1821,
"id": 1881,
"nodeType": "Return",
"src": "2970:10:12"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺",
"id": 1883,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1817,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1812,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2522:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1811,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "2522:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1814,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2549:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1813,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2549:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1816,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2567:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1815,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2567:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2516:69:12"
},
"payable": false,
"returnParameters": {
"id": 1821,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1820,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2609:19:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1818,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2609:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1819,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2609:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2608:28:12"
},
"scope": 1884,
"src": "2500:485:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 1885,
"src": "94:2893:12"
}
],
"src": "0:2988:12"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AlarmList.sol",
"exportedSymbols": {
"AlarmList": [
1884
]
},
"id": 1885,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1565,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:12"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol",
"file": "../math/SafeMath.sol",
"id": 1566,
"nodeType": "ImportDirective",
"scope": 1885,
"sourceUnit": 5658,
"src": "27:30:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev 定时任务列表",
"fullyImplemented": true,
"id": 1884,
"linearizedBaseContracts": [
1884
],
"name": "AlarmList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1569,
"libraryName": {
"contractScope": null,
"id": 1567,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5657,
"src": "122:8:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$5657",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "116:27:12",
"typeName": {
"id": 1568,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "135:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"canonicalName": "AlarmList.element",
"id": 1582,
"members": [
{
"constant": false,
"id": 1571,
"name": "contractAddr",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "212:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1570,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "212:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1573,
"name": "creatorAddr",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "261:19:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1572,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "261:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1575,
"name": "idx",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "302:11:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1574,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "302:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1577,
"name": "alarmType",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "360:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1576,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "360:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1579,
"name": "begin",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "403:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1578,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "403:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1581,
"name": "peroid",
"nodeType": "VariableDeclaration",
"scope": 1582,
"src": "436:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1580,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "436:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "element",
"nodeType": "StructDefinition",
"scope": 1884,
"src": "171:284:12",
"visibility": "public"
},
{
"canonicalName": "AlarmList.alarmMap",
"id": 1590,
"members": [
{
"constant": false,
"id": 1586,
"name": "mapList",
"nodeType": "VariableDeclaration",
"scope": 1590,
"src": "480:35:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 1585,
"keyType": {
"id": 1583,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "480:27:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1584,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "499:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1589,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 1590,
"src": "521:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1587,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "521:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1588,
"length": null,
"nodeType": "ArrayTypeName",
"src": "521:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "alarmMap",
"nodeType": "StructDefinition",
"scope": 1884,
"src": "458:82:12",
"visibility": "public"
},
{
"body": {
"id": 1619,
"nodeType": "Block",
"src": "640:117:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1599,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "650:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1600,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "650:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1601,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "650:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "670:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "650:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1606,
"nodeType": "IfStatement",
"src": "646:39:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1604,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "680:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1598,
"id": 1605,
"nodeType": "Return",
"src": "673:12:12"
}
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1616,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1607,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "699:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1608,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "699:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1613,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1609,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1592,
"src": "709:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1610,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "709:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1612,
"indexExpression": {
"argumentTypes": null,
"id": 1611,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1594,
"src": "722:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "709:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "699:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"id": 1614,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "contractAddr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1571,
"src": "699:43:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1615,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1594,
"src": "746:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "699:52:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 1617,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "698:54:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1598,
"id": 1618,
"nodeType": "Return",
"src": "691:61:12"
}
]
},
"documentation": null,
"id": 1620,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "exist",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1595,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1592,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "559:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1591,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "559:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1594,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "582:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1593,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "582:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "558:38:12"
},
"payable": false,
"returnParameters": {
"id": 1598,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1597,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1620,
"src": "632:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1596,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "632:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "631:6:12"
},
"scope": 1884,
"src": "544:213:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1677,
"nodeType": "Block",
"src": "1004:348:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1638,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1020:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1639,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1026:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1637,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "1014:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1640,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1014:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1644,
"nodeType": "IfStatement",
"src": "1010:51:12",
"trueBody": {
"id": 1643,
"nodeType": "Block",
"src": "1034:27:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1641,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1049:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1636,
"id": 1642,
"nodeType": "Return",
"src": "1042:12:12"
}
]
}
},
{
"assignments": [
1646
],
"declarations": [
{
"constant": false,
"id": 1646,
"name": "e",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "1067:16:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1645,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "1067:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1657,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1648,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1124:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1649,
"name": "_creator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1626,
"src": "1152:8:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1650,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1175:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1651,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1175:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1652,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1175:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1653,
"name": "_type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1628,
"src": "1212:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1654,
"name": "_begin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1630,
"src": "1234:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1655,
"name": "_peroid",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1632,
"src": "1258:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": null,
"id": 1647,
"name": "element",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1582,
"src": "1092:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_element_$1582_storage_ptr_$",
"typeString": "type(struct AlarmList.element storage pointer)"
}
},
"id": 1656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"contractAddr",
"creatorAddr",
"idx",
"alarmType",
"begin",
"peroid"
],
"nodeType": "FunctionCall",
"src": "1092:182:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1067:207:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1663,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1646,
"src": "1295:1:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
],
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1658,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1280:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1661,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1280:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1662,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1280:14:12",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_element_$1582_storage_$returns$_t_uint256_$",
"typeString": "function (struct AlarmList.element storage ref) returns (uint256)"
}
},
"id": 1664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1280:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1665,
"nodeType": "ExpressionStatement",
"src": "1280:17:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1673,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1666,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1622,
"src": "1303:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1669,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1303:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1670,
"indexExpression": {
"argumentTypes": null,
"id": 1668,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1624,
"src": "1316:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1303:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1671,
"name": "e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1646,
"src": "1325:1:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element memory"
}
},
"id": 1672,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "idx",
"nodeType": "MemberAccess",
"referencedDeclaration": 1575,
"src": "1325:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1303:27:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1674,
"nodeType": "ExpressionStatement",
"src": "1303:27:12"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1675,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1343:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1636,
"id": 1676,
"nodeType": "Return",
"src": "1336:11:12"
}
]
},
"documentation": "@dev 增加新定时定义,重复的地址返回失败",
"id": 1678,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1633,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1622,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "853:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1621,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "853:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1624,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "880:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1623,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "880:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1626,
"name": "_creator",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "899:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1625,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "899:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1628,
"name": "_type",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "921:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1627,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "921:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1630,
"name": "_begin",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "940:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1629,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "940:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1632,
"name": "_peroid",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "960:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1631,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "960:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "847:132:12"
},
"payable": false,
"returnParameters": {
"id": 1636,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1635,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1678,
"src": "998:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1634,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "998:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "997:6:12"
},
"scope": 1884,
"src": "832:520:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1747,
"nodeType": "Block",
"src": "1518:328:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 1691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1528:19:12",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1688,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1535:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1689,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "1541:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1687,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "1529:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1690,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1529:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1695,
"nodeType": "IfStatement",
"src": "1524:52:12",
"trueBody": {
"id": 1694,
"nodeType": "Block",
"src": "1549:27:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1692,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1564:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1686,
"id": 1693,
"nodeType": "Return",
"src": "1557:12:12"
}
]
}
},
{
"assignments": [
1697
],
"declarations": [
{
"constant": false,
"id": 1697,
"name": "row2Del",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1582:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1696,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1582:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1702,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1698,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1600:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1699,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1600:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1701,
"indexExpression": {
"argumentTypes": null,
"id": 1700,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "1613:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1600:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1582:37:12"
},
{
"assignments": [
1704
],
"declarations": [
{
"constant": false,
"id": 1704,
"name": "keyToMove",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1625:25:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1703,
"name": "element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "1625:7:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1714,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1705,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1653:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1706,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1653:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1713,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1711,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1684:1:12",
"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": 1707,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1663:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1708,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1663:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1709,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1663:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1710,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1663:20:12",
"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": 1712,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1663:23:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1653:34:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1625:62:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1715,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1693:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1718,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1693:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1719,
"indexExpression": {
"argumentTypes": null,
"id": 1717,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1697,
"src": "1703:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1693:18:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1720,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1704,
"src": "1714:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element storage pointer"
}
},
"src": "1693:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"id": 1722,
"nodeType": "ExpressionStatement",
"src": "1693:30:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1723,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1729:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1727,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "1729:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1728,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1725,
"name": "keyToMove",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1704,
"src": "1742:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element storage pointer"
}
},
"id": 1726,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "contractAddr",
"nodeType": "MemberAccess",
"referencedDeclaration": 1571,
"src": "1742:22:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1729:36:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1729,
"name": "row2Del",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1697,
"src": "1768:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1729:46:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1731,
"nodeType": "ExpressionStatement",
"src": "1729:46:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1732,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1781:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1735,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1781:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1736,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1781:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1741,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1821:1:12",
"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": 1737,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "1800:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1738,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1800:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1739,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1800:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 5611,
"src": "1800:20:12",
"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": 1742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1800:23:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1781:42:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1744,
"nodeType": "ExpressionStatement",
"src": "1781:42:12"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1745,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1837:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1686,
"id": 1746,
"nodeType": "Return",
"src": "1830:11:12"
}
]
},
"documentation": "@dev 删除地址,相应的下标索引数组自动缩减",
"id": 1748,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1683,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1680,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1446:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1679,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1446:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1682,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1469:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1681,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1469:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1445:38:12"
},
"payable": false,
"returnParameters": {
"id": 1686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1685,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1748,
"src": "1510:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1684,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1510:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1509:6:12"
},
"scope": 1884,
"src": "1430:416:12",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1759,
"nodeType": "Block",
"src": "1920:34:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1755,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1750,
"src": "1933:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1756,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "1933:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1757,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1933:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1754,
"id": 1758,
"nodeType": "Return",
"src": "1926:23:12"
}
]
},
"documentation": null,
"id": 1760,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1751,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1750,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1760,
"src": "1865:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1749,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1865:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1864:23:12"
},
"payable": false,
"returnParameters": {
"id": 1754,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1753,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1760,
"src": "1911:7:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1752,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1911:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1910:9:12"
},
"scope": 1884,
"src": "1850:104:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1783,
"nodeType": "Block",
"src": "2065:112:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1770,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2079:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1771,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2087:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1772,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2087:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1773,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2087:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2079:24:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e646578206d75737420736d616c6c207468616e2063757272656e7420636f756e74",
"id": 1775,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2105:37:12",
"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": 1769,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2071:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2071:72:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1777,
"nodeType": "ExpressionStatement",
"src": "2071:72:12"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1778,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2156:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1779,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2156:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1781,
"indexExpression": {
"argumentTypes": null,
"id": 1780,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2166:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2156:16:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"functionReturnParameters": 1768,
"id": 1782,
"nodeType": "Return",
"src": "2149:23:12"
}
]
},
"documentation": null,
"id": 1784,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1762,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "1971:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1761,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "1971:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1764,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "1994:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1763,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1994:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1970:38:12"
},
"payable": false,
"returnParameters": {
"id": 1768,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1767,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "2044:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1766,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2044:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2043:19:12"
},
"scope": 1884,
"src": "1958:219:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1809,
"nodeType": "Block",
"src": "2294:101:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1795,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2314:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
{
"argumentTypes": null,
"id": 1796,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1788,
"src": "2320:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1794,
"name": "exist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1620,
"src": "2308:5:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_alarmMap_$1590_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct AlarmList.alarmMap storage pointer,address) view returns (bool)"
}
},
"id": 1797,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2308:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "616c61726d206d757374206578697374",
"id": 1798,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2328:18:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_16ce8e1de9991a4b59771df2ba4da4ce0d4a6175a5c1523a00aa77e724413dba",
"typeString": "literal_string \"alarm must exist\""
},
"value": "alarm must exist"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_16ce8e1de9991a4b59771df2ba4da4ce0d4a6175a5c1523a00aa77e724413dba",
"typeString": "literal_string \"alarm must exist\""
}
],
"id": 1793,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2300:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1799,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2300:47:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1800,
"nodeType": "ExpressionStatement",
"src": "2300:47:12"
},
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1801,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2360:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1802,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2360:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1807,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1803,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1786,
"src": "2370:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1804,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "mapList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1586,
"src": "2370:12:12",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1806,
"indexExpression": {
"argumentTypes": null,
"id": 1805,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1788,
"src": "2383:5:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2370:19:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2360:30:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"functionReturnParameters": 1792,
"id": 1808,
"nodeType": "Return",
"src": "2353:37:12"
}
]
},
"documentation": null,
"id": 1810,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getByAddr",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1789,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1786,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2200:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1785,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "2200:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1788,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2223:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1787,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2223:7:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2199:38:12"
},
"payable": false,
"returnParameters": {
"id": 1792,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1791,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1810,
"src": "2273:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory_ptr",
"typeString": "struct AlarmList.element"
},
"typeName": {
"contractScope": null,
"id": 1790,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2273:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2272:19:12"
},
"scope": 1884,
"src": "2181:214:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1882,
"nodeType": "Block",
"src": "2637:348:12",
"statements": [
{
"assignments": [
1823
],
"declarations": [
{
"constant": false,
"id": 1823,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2643:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1822,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2643:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1825,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2658:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2643:16:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1829,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1827,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2673:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1828,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2682:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2673:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "72657475726e206e756d626572206d75737420626967676572207468616e2030",
"id": 1830,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2685:34:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
},
"value": "return number must bigger than 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77e7c3b7b2e897d6d61c9adadd03e672f46f1501428d9e7f585ea1fd64517a2b",
"typeString": "literal_string \"return number must bigger than 0\""
}
],
"id": 1826,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9044,
9045
],
"referencedDeclaration": 9045,
"src": "2665:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1831,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2665:55:12",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1832,
"nodeType": "ExpressionStatement",
"src": "2665:55:12"
},
{
"assignments": [
1837
],
"declarations": [
{
"constant": false,
"id": 1837,
"name": "res",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2726:30:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1835,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2726:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1836,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2726:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1843,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1841,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2783:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1840,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "2759:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_element_$1582_memory_$dyn_memory_$",
"typeString": "function (uint256) pure returns (struct AlarmList.element memory[] memory)"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1838,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2763:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1839,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2763:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
}
},
"id": 1842,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2759:31:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2726:64:12"
},
{
"body": {
"id": 1878,
"nodeType": "Block",
"src": "2847:117:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1858,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1856,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2859:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1857,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1816,
"src": "2867:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2859:14:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1861,
"nodeType": "IfStatement",
"src": "2855:44:12",
"trueBody": {
"id": 1860,
"nodeType": "Block",
"src": "2875:24:12",
"statements": [
{
"id": 1859,
"nodeType": "Break",
"src": "2885:5:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 1869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1862,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1837,
"src": "2907:3:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"id": 1864,
"indexExpression": {
"argumentTypes": null,
"id": 1863,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2911:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2907:9:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1865,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1812,
"src": "2919:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1866,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2919:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1868,
"indexExpression": {
"argumentTypes": null,
"id": 1867,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2929:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2919:12:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage",
"typeString": "struct AlarmList.element storage ref"
}
},
"src": "2907:24:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_memory",
"typeString": "struct AlarmList.element memory"
}
},
"id": 1870,
"nodeType": "ExpressionStatement",
"src": "2907:24:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1876,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1871,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2939:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "31",
"id": 1874,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2955:1:12",
"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": 1872,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "2946:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1873,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 5635,
"src": "2946:8:12",
"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": 1875,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2946:11:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2939:18:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1877,
"nodeType": "ExpressionStatement",
"src": "2939:18:12"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1852,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1848,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2820:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1849,
"name": "self",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1812,
"src": "2824:4:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap storage pointer"
}
},
"id": 1850,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "list",
"nodeType": "MemberAccess",
"referencedDeclaration": 1589,
"src": "2824:9:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage",
"typeString": "struct AlarmList.element storage ref[] storage ref"
}
},
"id": 1851,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2824:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2820:20:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1879,
"initializationExpression": {
"assignments": [
1845
],
"declarations": [
{
"constant": false,
"id": 1845,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2802:9:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1844,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2802:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1847,
"initialValue": {
"argumentTypes": null,
"id": 1846,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1814,
"src": "2814:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2802:16:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2842:3:12",
"subExpression": {
"argumentTypes": null,
"id": 1853,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1845,
"src": "2842:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1855,
"nodeType": "ExpressionStatement",
"src": "2842:3:12"
},
"nodeType": "ForStatement",
"src": "2797:167:12"
},
{
"expression": {
"argumentTypes": null,
"id": 1880,
"name": "res",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1837,
"src": "2977:3:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element memory[] memory"
}
},
"functionReturnParameters": 1821,
"id": 1881,
"nodeType": "Return",
"src": "2970:10:12"
}
]
},
"documentation": "@dev 从指定位置返回多条(不多于count)地址记录,如果不足则空缺",
"id": 1883,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1817,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1812,
"name": "self",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2522:21:12",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
},
"typeName": {
"contractScope": null,
"id": 1811,
"name": "alarmMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1590,
"src": "2522:8:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_alarmMap_$1590_storage_ptr",
"typeString": "struct AlarmList.alarmMap"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1814,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2549:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1813,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2549:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1816,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2567:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1815,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2567:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2516:69:12"
},
"payable": false,
"returnParameters": {
"id": 1821,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1820,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1883,
"src": "2609:19:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_memory_$dyn_memory_ptr",
"typeString": "struct AlarmList.element[]"
},
"typeName": {
"baseType": {
"contractScope": null,
"id": 1818,
"name": "AlarmList.element",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "2609:17:12",
"typeDescriptions": {
"typeIdentifier": "t_struct$_element_$1582_storage_ptr",
"typeString": "struct AlarmList.element"
}
},
"id": 1819,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2609:19:12",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_struct$_element_$1582_storage_$dyn_storage_ptr",
"typeString": "struct AlarmList.element[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2608:28:12"
},
"scope": 1884,
"src": "2500:485:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 1885,
"src": "94:2893:12"
}
],
"src": "0:2988:12"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.16",
"updatedAt": "2021-03-06T09:30:00.960Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}