jcc-solidity-utils
Version:
jcc solidity utils
1,098 lines (1,097 loc) • 82.2 kB
JSON
{
"contractName": "MockUintList",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_uint",
"type": "uint256"
}
],
"name": "insert",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_uint",
"type": "uint256"
}
],
"name": "remove",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_idx",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "from",
"type": "uint256"
},
{
"name": "_count",
"type": "uint256"
}
],
"name": "getList",
"outputs": [
{
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "count",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_uint\",\"type\":\"uint256\"}],\"name\":\"remove\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_uint\",\"type\":\"uint256\"}],\"name\":\"insert\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getList\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockUintList.sol\":\"MockUintList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol\":{\"keccak256\":\"0x0d3f928a6507c7b40de15cc19a3200b259082dd0a950fb60132649295270dc9e\",\"urls\":[\"bzzr://7f51ba64c60a21c86c06af8c426036ab858b4acb8bba85813981c1f685ee6fdb\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockUintList.sol\":{\"keccak256\":\"0x4eef01d31682a7c6aa6266930061685575864e625d5bcf773653497c57981cd7\",\"urls\":[\"bzzr://f320911ddc9d6fb46a0be0d315d321def4316e96ed2d61af1d0ceeb7ab9c6ae4\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610599806100206000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780634cc822151461009857806390b5561d146100c45780639507d39a146100dc578063a9816b08146100f4575b600080fd5b34801561007d57600080fd5b5061008661015f565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b0600435610171565b604080519115158252519081900360200190f35b3480156100d057600080fd5b506100b0600435610189565b3480156100e857600080fd5b5061008660043561019b565b34801561010057600080fd5b5061010f6004356024356101ad565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561014b578181015183820152602001610133565b505050509050019250505060405180910390f35b600061016b60006101c8565b90505b90565b6000610183818363ffffffff6101cf16565b92915050565b6000610183818363ffffffff61028e16565b6000610183818363ffffffff6102e716565b60606101c16000848463ffffffff6103a516565b9392505050565b6001015490565b60008060006101de85856104bb565b15156101ed5760009250610286565b60008481526020869052604090205460018087018054929450916102169163ffffffff61050516565b8154811061022057fe5b9060005260206000200154905080856001018381548110151561023f57fe5b600091825260208083209091019290925582815290869052604090208290556001808601546102739163ffffffff61050516565b6102806001870182610526565b50600192505b505092915050565b600061029a83836104bb565b156102a757506000610183565b6001838101805480830180835560009283526020909220018490556102d19163ffffffff61050516565b6000928352602093909352506040902055600190565b6001820154600090821061038257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001830180548390811061039257fe5b9060005260206000200154905092915050565b60606000818180851161041957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610443578160200160208202803883390190505b5091508590505b60018701548110156104b15784831415610463576104b1565b6001870180548290811061047357fe5b9060005260206000200154828481518110151561048c57fe5b602090810290910101526104a783600163ffffffff61051716565b925060010161044a565b5095945050505050565b600182015460009015156104d157506000610183565b60008281526020849052604090205460018401805484929081106104f157fe5b906000526020600020015414905092915050565b60008282111561051157fe5b50900390565b6000828201838110156101c157fe5b81548183558181111561054a5760008381526020902061054a91810190830161054f565b505050565b61016e91905b808211156105695760008155600101610555565b50905600a165627a7a72305820cedaa09b1c21efe12c75e7677c782ad0c84732fb72ccc2aa42d34f318a4ec0dd0029",
"deployedBytecode": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780634cc822151461009857806390b5561d146100c45780639507d39a146100dc578063a9816b08146100f4575b600080fd5b34801561007d57600080fd5b5061008661015f565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b0600435610171565b604080519115158252519081900360200190f35b3480156100d057600080fd5b506100b0600435610189565b3480156100e857600080fd5b5061008660043561019b565b34801561010057600080fd5b5061010f6004356024356101ad565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561014b578181015183820152602001610133565b505050509050019250505060405180910390f35b600061016b60006101c8565b90505b90565b6000610183818363ffffffff6101cf16565b92915050565b6000610183818363ffffffff61028e16565b6000610183818363ffffffff6102e716565b60606101c16000848463ffffffff6103a516565b9392505050565b6001015490565b60008060006101de85856104bb565b15156101ed5760009250610286565b60008481526020869052604090205460018087018054929450916102169163ffffffff61050516565b8154811061022057fe5b9060005260206000200154905080856001018381548110151561023f57fe5b600091825260208083209091019290925582815290869052604090208290556001808601546102739163ffffffff61050516565b6102806001870182610526565b50600192505b505092915050565b600061029a83836104bb565b156102a757506000610183565b6001838101805480830180835560009283526020909220018490556102d19163ffffffff61050516565b6000928352602093909352506040902055600190565b6001820154600090821061038257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001830180548390811061039257fe5b9060005260206000200154905092915050565b60606000818180851161041957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610443578160200160208202803883390190505b5091508590505b60018701548110156104b15784831415610463576104b1565b6001870180548290811061047357fe5b9060005260206000200154828481518110151561048c57fe5b602090810290910101526104a783600163ffffffff61051716565b925060010161044a565b5095945050505050565b600182015460009015156104d157506000610183565b60008281526020849052604090205460018401805484929081106104f157fe5b906000526020600020015414905092915050565b60008282111561051157fe5b50900390565b6000828201838110156101c157fe5b81548183558181111561054a5760008381526020902061054a91810190830161054f565b505050565b61016e91905b808211156105695760008155600101610555565b50905600a165627a7a72305820cedaa09b1c21efe12c75e7677c782ad0c84732fb72ccc2aa42d34f318a4ec0dd0029",
"sourceMap": "101:604:29:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;101:604:29;;;;;;;",
"deployedSourceMap": "101:604:29:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:78;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:78:29;;;;;;;;;;;;;;;;;;;;288:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;288:90:29;;;;;;;;;;;;;;;;;;;;;;;194;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;194:90:29;;;;;382;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;382:90:29;;;;;476:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;476:145:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;476:145:29;;;;;;;;;;;;;;;;;625:78;663:7;685:13;:5;:11;:13::i;:::-;678:20;;625:78;;:::o;288:90::-;335:4;354:19;335:4;367:5;354:19;:12;:19;:::i;:::-;347:26;288:90;-1:-1:-1;;288:90:29:o;194:::-;241:4;260:19;241:4;273:5;260:19;:12;:19;:::i;382:90::-;430:7;452:15;430:7;462:4;452:15;:9;:15;:::i;476:145::-;556:9;589:27;:5;603:4;609:6;589:27;:13;:27;:::i;:::-;582:34;476:145;-1:-1:-1;;;476:145:29:o;1228:103:19:-;1310:9;;:16;;1228:103::o;843:381::-;913:4;982:15;1024:17;930;936:4;942;930:5;:17::i;:::-;929:18;925:51;;;964:5;957:12;;;;925:51;1000:12;:18;;;;;;;;;;;1044:9;;;;1054:16;;1000:18;;-1:-1:-1;1044:9:19;1054:23;;;:20;:23;:::i;:::-;1044:34;;;;;;;;;;;;;;;;1024:54;;1105:9;1084:4;:9;;1094:7;1084:18;;;;;;;;;;;;;;;;;;;;;:30;;;;1120:23;;;;;;;;;;:33;;;1199:1;1178:9;;;:16;:23;;;:20;:23;:::i;:::-;1159:42;:9;;;:42;;:::i;:::-;;1215:4;1208:11;;843:381;;;;;;;:::o;544:209::-;614:4;630:17;636:4;642;630:5;:17::i;:::-;626:50;;;-1:-1:-1;664:5:19;657:12;;626:50;728:1;703:9;;;27:10:-1;;23:18;;;45:23;;;-1:-1;703:20:19;;;;;;;;;;;:27;;;:24;:27;:::i;:::-;682:12;:18;;;;;;;;-1:-1:-1;682:18:19;;;:48;744:4;;544:209::o;1335:208::-;1453:9;;;:16;1420:7;;1445:24;;1437:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1522:9;;;:16;;1532:5;;1522:16;;;;;;;;;;;;;;1515:23;;1335:208;;;;:::o;1708:454::-;1816:9;1840:12;1816:9;1840:12;1870:10;;;1862:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1960:6;1946:21;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;1946:21:19;;1923:44;;1991:4;1979:16;;1974:167;2001:9;;;:16;1997:20;;1974:167;;;2044:6;2036:4;:14;2032:44;;;2062:5;;2032:44;2096:9;;;:12;;2106:1;;2096:12;;;;;;;;;;;;;;2084:3;2088:4;2084:9;;;;;;;;;;;;;;;;;;:24;2123:11;:4;2132:1;2123:11;:8;:11;:::i;:::-;2116:18;-1:-1:-1;2019:3:19;;1974:167;;;-1:-1:-1;2154:3:19;1708:454;-1:-1:-1;;;;;1708:454:19:o;276:196::-;380:9;;;:16;362:4;;380:21;376:39;;;-1:-1:-1;410:5:19;403:12;;376:39;439:12;:18;;;;;;;;;;;429:9;;;:29;;462:4;;439:18;429:29;;;;;;;;;;;;;;:37;421:46;;276:196;;;;:::o;1093:116:20:-;1153:7;1175:8;;;;1168:16;;;;-1:-1:-1;1197:7:20;;;1093:116::o;1319:134::-;1379:7;1406;;;1426;;;;1419:15;;;101:604:29;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../list/UintList.sol\";\n\n// 定义一个调用AddressList的合约\ncontract MockUintList {\n using UintList for UintList.uintMap;\n\n UintList.uintMap uints;\n\n function insert(uint256 _uint) public returns (bool) {\n return uints.insert(_uint);\n }\n\n function remove(uint256 _uint) public returns (bool) {\n return uints.remove(_uint);\n }\n\n function get(uint256 _idx) public view returns (uint256) {\n return uints.get(_idx);\n }\n\n function getList(uint256 from, uint256 _count)\n public\n view\n returns (uint256[] memory)\n {\n return uints.getList(from, _count);\n }\n\n function count() public view returns (uint256) {\n return uints.count();\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockUintList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockUintList.sol",
"exportedSymbols": {
"MockUintList": [
6553
]
},
"id": 6554,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6480,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:29"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol",
"file": "../list/UintList.sol",
"id": 6481,
"nodeType": "ImportDirective",
"scope": 6554,
"sourceUnit": 5539,
"src": "27:30:29",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 6553,
"linearizedBaseContracts": [
6553
],
"name": "MockUintList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 6484,
"libraryName": {
"contractScope": null,
"id": 6482,
"name": "UintList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5538,
"src": "133:8:29",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UintList_$5538",
"typeString": "library UintList"
}
},
"nodeType": "UsingForDirective",
"src": "127:36:29",
"typeName": {
"contractScope": null,
"id": 6483,
"name": "UintList.uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "146:16:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
}
},
{
"constant": false,
"id": 6486,
"name": "uints",
"nodeType": "VariableDeclaration",
"scope": 6553,
"src": "167:22:29",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap"
},
"typeName": {
"contractScope": null,
"id": 6485,
"name": "UintList.uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "167:16:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 6498,
"nodeType": "Block",
"src": "247:37:29",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6495,
"name": "_uint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6488,
"src": "273:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6493,
"name": "uints",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "260:5:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap storage ref"
}
},
"id": 6494,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "insert",
"nodeType": "MemberAccess",
"referencedDeclaration": 5360,
"src": "260:12:29",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_uintMap_$5296_storage_ptr_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) returns (bool)"
}
},
"id": 6496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "260:19:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 6492,
"id": 6497,
"nodeType": "Return",
"src": "253:26:29"
}
]
},
"documentation": null,
"id": 6499,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6489,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6488,
"name": "_uint",
"nodeType": "VariableDeclaration",
"scope": 6499,
"src": "210:13:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6487,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "210:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "209:15:29"
},
"payable": false,
"returnParameters": {
"id": 6492,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6491,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6499,
"src": "241:4:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6490,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "241:4:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "240:6:29"
},
"scope": 6553,
"src": "194:90:29",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6511,
"nodeType": "Block",
"src": "341:37:29",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6508,
"name": "_uint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6501,
"src": "367:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6506,
"name": "uints",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "354:5:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap storage ref"
}
},
"id": 6507,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "remove",
"nodeType": "MemberAccess",
"referencedDeclaration": 5429,
"src": "354:12:29",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_uintMap_$5296_storage_ptr_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) returns (bool)"
}
},
"id": 6509,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "354:19:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 6505,
"id": 6510,
"nodeType": "Return",
"src": "347:26:29"
}
]
},
"documentation": null,
"id": 6512,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6502,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6501,
"name": "_uint",
"nodeType": "VariableDeclaration",
"scope": 6512,
"src": "304:13:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6500,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "304:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "303:15:29"
},
"payable": false,
"returnParameters": {
"id": 6505,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6504,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6512,
"src": "335:4:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6503,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "335:4:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "334:6:29"
},
"scope": 6553,
"src": "288:90:29",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6524,
"nodeType": "Block",
"src": "439:33:29",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6521,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6514,
"src": "462:4:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6519,
"name": "uints",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "452:5:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap storage ref"
}
},
"id": 6520,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "get",
"nodeType": "MemberAccess",
"referencedDeclaration": 5465,
"src": "452:9:29",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_uintMap_$5296_storage_ptr_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256) view returns (uint256)"
}
},
"id": 6522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "452:15:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6518,
"id": 6523,
"nodeType": "Return",
"src": "445:22:29"
}
]
},
"documentation": null,
"id": 6525,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6515,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6514,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 6525,
"src": "395:12:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6513,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "395:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "394:14:29"
},
"payable": false,
"returnParameters": {
"id": 6518,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6517,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6525,
"src": "430:7:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6516,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "430:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "429:9:29"
},
"scope": 6553,
"src": "382:90:29",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6541,
"nodeType": "Block",
"src": "576:45:29",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6537,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6527,
"src": "603:4:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 6538,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6529,
"src": "609:6:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6535,
"name": "uints",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "589:5:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap storage ref"
}
},
"id": 6536,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "getList",
"nodeType": "MemberAccess",
"referencedDeclaration": 5537,
"src": "589:13:29",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$bound_to$_t_struct$_uintMap_$5296_storage_ptr_$",
"typeString": "function (struct UintList.uintMap storage pointer,uint256,uint256) view returns (uint256[] memory)"
}
},
"id": 6539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "589:27:29",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"functionReturnParameters": 6534,
"id": 6540,
"nodeType": "Return",
"src": "582:34:29"
}
]
},
"documentation": null,
"id": 6542,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6530,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6527,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 6542,
"src": "493:12:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6526,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "493:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6529,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 6542,
"src": "507:14:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6528,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "507:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "492:30:29"
},
"payable": false,
"returnParameters": {
"id": 6534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6533,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6542,
"src": "556:9:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 6531,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "556:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6532,
"length": null,
"nodeType": "ArrayTypeName",
"src": "556:9:29",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "555:18:29"
},
"scope": 6553,
"src": "476:145:29",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6551,
"nodeType": "Block",
"src": "672:31:29",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 6547,
"name": "uints",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "685:5:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage",
"typeString": "struct UintList.uintMap storage ref"
}
},
"id": 6548,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "count",
"nodeType": "MemberAccess",
"referencedDeclaration": 5441,
"src": "685:11:29",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_uintMap_$5296_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_uintMap_$5296_storage_ptr_$",
"typeString": "function (struct UintList.uintMap storage pointer) view returns (uint256)"
}
},
"id": 6549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "685:13:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6546,
"id": 6550,
"nodeType": "Return",
"src": "678:20:29"
}
]
},
"documentation": null,
"id": 6552,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6543,
"nodeType": "ParameterList",
"parameters": [],
"src": "639:2:29"
},
"payable": false,
"returnParameters": {
"id": 6546,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6545,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6552,
"src": "663:7:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6544,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "663:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "662:9:29"
},
"scope": 6553,
"src": "625:78:29",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 6554,
"src": "101:604:29"
}
],
"src": "0:706:29"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockUintList.sol",
"exportedSymbols": {
"MockUintList": [
6553
]
},
"id": 6554,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6480,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:29"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/UintList.sol",
"file": "../list/UintList.sol",
"id": 6481,
"nodeType": "ImportDirective",
"scope": 6554,
"sourceUnit": 5539,
"src": "27:30:29",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 6553,
"linearizedBaseContracts": [
6553
],
"name": "MockUintList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 6484,
"libraryName": {
"contractScope": null,
"id": 6482,
"name": "UintList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5538,
"src": "133:8:29",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UintList_$5538",
"typeString": "library UintList"
}
},
"nodeType": "UsingForDirective",
"src": "127:36:29",
"typeName": {
"contractScope": null,
"id": 6483,
"name": "UintList.uintMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5296,
"src": "146:16:29",
"typeDescriptions": {
"typeIdentifier": "t_struct$_uintMap_$5296_storage_ptr",
"typeString": "struct UintList.uintMap"
}
}
},
{
"constant": false,