jcc-solidity-utils
Version:
jcc solidity utils
1,097 lines • 82.2 kB
JSON
{
"contractName": "MockHashList",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_hash",
"type": "bytes32"
}
],
"name": "insert",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_hash",
"type": "bytes32"
}
],
"name": "remove",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_idx",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "from",
"type": "uint256"
},
{
"name": "_count",
"type": "uint256"
}
],
"name": "getList",
"outputs": [
{
"name": "",
"type": "bytes32[]"
}
],
"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\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"insert\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"remove\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getList\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\"}],\"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/MockHashList.sol\":\"MockHashList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/HashList.sol\":{\"keccak256\":\"0xf3dbb1450bc3a8e1d0d97d15d105fff11fa689f705416ae5d314ac16e839cead\",\"urls\":[\"bzzr://3e768231f6e9bb4f62bbbe7f83653a3384732d9419a673d5d82708b6b1ec2c18\"]},\"/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/MockHashList.sol\":{\"keccak256\":\"0x36204c6b48098b37a252fd4fa889eb9a70091e9a4b38987f8c66b5b7600544d3\",\"urls\":[\"bzzr://a181c851dafe6f1296db78cbe3ace70945ecf5b3b805fe022f1eb811b2c7cd9c\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610599806100206000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780632d287e43146100985780639507d39a146100c457806395bc2673146100dc578063a9816b08146100f4575b600080fd5b34801561007d57600080fd5b5061008661015f565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b0600435610171565b604080519115158252519081900360200190f35b3480156100d057600080fd5b50610086600435610189565b3480156100e857600080fd5b506100b060043561019b565b34801561010057600080fd5b5061010f6004356024356101ad565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561014b578181015183820152602001610133565b505050509050019250505060405180910390f35b600061016b60006101c8565b90505b90565b6000610183818363ffffffff6101cf16565b92915050565b6000610183818363ffffffff61022816565b6000610183818363ffffffff6102e616565b60606101c16000848463ffffffff6103a516565b9392505050565b6001015490565b60006101db83836104bb565b156101e857506000610183565b6001838101805480830180835560009283526020909220018490556102129163ffffffff61050516565b6000928352602093909352506040902055600190565b600182015460009082106102c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600183018054839081106102d357fe5b9060005260206000200154905092915050565b60008060006102f585856104bb565b1515610304576000925061039d565b600084815260208690526040902054600180870180549294509161032d9163ffffffff61050516565b8154811061033757fe5b9060005260206000200154905080856001018381548110151561035657fe5b6000918252602080832090910192909255828152908690526040902082905560018086015461038a9163ffffffff61050516565b6103976001870182610526565b50600192505b505092915050565b60606000818180851161041957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610443578160200160208202803883390190505b5091508590505b60018701548110156104b15784831415610463576104b1565b6001870180548290811061047357fe5b9060005260206000200154828481518110151561048c57fe5b602090810290910101526104a783600163ffffffff61051716565b925060010161044a565b5095945050505050565b600182015460009015156104d157506000610183565b60008281526020849052604090205460018401805484929081106104f157fe5b600091825260209091200154149392505050565b60008282111561051157fe5b50900390565b6000828201838110156101c157fe5b81548183558181111561054a5760008381526020902061054a91810190830161054f565b505050565b61016e91905b808211156105695760008155600101610555565b50905600a165627a7a7230582068aff3f7a638ac6415315a5547bb81fde64dff0feec53389b803d4f4dc50226b0029",
"deployedBytecode": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780632d287e43146100985780639507d39a146100c457806395bc2673146100dc578063a9816b08146100f4575b600080fd5b34801561007d57600080fd5b5061008661015f565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b0600435610171565b604080519115158252519081900360200190f35b3480156100d057600080fd5b50610086600435610189565b3480156100e857600080fd5b506100b060043561019b565b34801561010057600080fd5b5061010f6004356024356101ad565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561014b578181015183820152602001610133565b505050509050019250505060405180910390f35b600061016b60006101c8565b90505b90565b6000610183818363ffffffff6101cf16565b92915050565b6000610183818363ffffffff61022816565b6000610183818363ffffffff6102e616565b60606101c16000848463ffffffff6103a516565b9392505050565b6001015490565b60006101db83836104bb565b156101e857506000610183565b6001838101805480830180835560009283526020909220018490556102129163ffffffff61050516565b6000928352602093909352506040902055600190565b600182015460009082106102c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600183018054839081106102d357fe5b9060005260206000200154905092915050565b60008060006102f585856104bb565b1515610304576000925061039d565b600084815260208690526040902054600180870180549294509161032d9163ffffffff61050516565b8154811061033757fe5b9060005260206000200154905080856001018381548110151561035657fe5b6000918252602080832090910192909255828152908690526040902082905560018086015461038a9163ffffffff61050516565b6103976001870182610526565b50600192505b505092915050565b60606000818180851161041957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610443578160200160208202803883390190505b5091508590505b60018701548110156104b15784831415610463576104b1565b6001870180548290811061047357fe5b9060005260206000200154828481518110151561048c57fe5b602090810290910101526104a783600163ffffffff61051716565b925060010161044a565b5095945050505050565b600182015460009015156104d157506000610183565b60008281526020849052604090205460018401805484929081106104f157fe5b600091825260209091200154149392505050565b60008282111561051157fe5b50900390565b6000828201838110156101c157fe5b81548183558181111561054a5760008381526020902061054a91810190830161054f565b505050565b61016e91905b808211156105695760008155600101610555565b50905600a165627a7a7230582068aff3f7a638ac6415315a5547bb81fde64dff0feec53389b803d4f4dc50226b0029",
"sourceMap": "101:604:26:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;101:604:26;;;;;;;",
"deployedSourceMap": "101:604:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:78;;8:9:-1;5:2;;;30:1;27;20:12;5:2;625:78:26;;;;;;;;;;;;;;;;;;;;194:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;194:90:26;;;;;;;;;;;;;;;;;;;;;;;382;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;382:90:26;;;;;288;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;288:90:26;;;;;476:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;476:145:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:26;;;;;;;;;;;;;;;;;625:78;663:7;685:13;:5;:11;:13::i;:::-;678:20;;625:78;;:::o;194:90::-;241:4;260:19;241:4;273:5;260:19;:12;:19;:::i;:::-;253:26;194:90;-1:-1:-1;;194:90:26:o;382:::-;430:7;452:15;430:7;462:4;452:15;:9;:15;:::i;288:90::-;335:4;354:19;335:4;367:5;354:19;:12;:19;:::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:26:o;1242:103:16:-;1324:9;;:16;;1242:103::o;563:213::-;634:4;650:18;656:4;662:5;650;:18::i;:::-;646:51;;;-1:-1:-1;685:5:16;678:12;;646:51;751:1;725:9;;;27:10:-1;;23:18;;;45:23;;;-1:-1;725:21:16;;;;;;;;;;;:28;;;:25;:28;:::i;:::-;703:12;:19;;;;;;;;-1:-1:-1;703:19:16;;;:50;767:4;;563:213::o;1349:208::-;1467:9;;;:16;1434:7;;1459:24;;1451:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1536:9;;;:16;;1546:5;;1536:16;;;;;;;;;;;;;;1529:23;;1349:208;;;;:::o;854:384::-;925:4;995:15;1038:17;942:18;948:4;954:5;942;:18::i;:::-;941:19;937:52;;;977:5;970:12;;;;937:52;1013:12;:19;;;;;;;;;;;1058:9;;;;1068:16;;1013:19;;-1:-1:-1;1058:9:16;1068:23;;;:20;:23;:::i;:::-;1058:34;;;;;;;;;;;;;;;;1038:54;;1119:9;1098:4;:9;;1108:7;1098:18;;;;;;;;;;;;;;;;;;;;;:30;;;;1134:23;;;;;;;;;;:33;;;1213:1;1192:9;;;:16;:23;;;:20;:23;:::i;:::-;1173:42;:9;;;:42;;:::i;:::-;;1229:4;1222:11;;854:384;;;;;;;:::o;1662:454::-;1770:9;1794:12;1770:9;1794:12;1824:10;;;1816:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1914:6;1900:21;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;1900:21:16;;1877:44;;1945:4;1933:16;;1928:167;1955:9;;;:16;1951:20;;1928:167;;;1998:6;1990:4;:14;1986:44;;;2016:5;;1986:44;2050:9;;;:12;;2060:1;;2050:12;;;;;;;;;;;;;;2038:3;2042:4;2038:9;;;;;;;;;;;;;;;;;;:24;2077:11;:4;2086:1;2077:11;:8;:11;:::i;:::-;2070:18;-1:-1:-1;1973:3:16;;1928:167;;;-1:-1:-1;2108:3:16;1662:454;-1:-1:-1;;;;;1662:454:16:o;295:199::-;400:9;;;:16;382:4;;400:21;396:39;;;-1:-1:-1;430:5:16;423:12;;396:39;449;459:19;;;;;;;;;;;449:9;;;:30;;483:5;;459:19;449:30;;;;;;;;;;;;;;;;:39;;295:199;-1:-1:-1;;;295:199:16: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:26;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../list/HashList.sol\";\n\n// 定义一个调用AddressList的合约\ncontract MockHashList {\n using HashList for HashList.hashMap;\n\n HashList.hashMap hashs;\n\n function insert(bytes32 _hash) public returns (bool) {\n return hashs.insert(_hash);\n }\n\n function remove(bytes32 _hash) public returns (bool) {\n return hashs.remove(_hash);\n }\n\n function get(uint256 _idx) public view returns (bytes32) {\n return hashs.get(_idx);\n }\n\n function getList(uint256 from, uint256 _count)\n public\n view\n returns (bytes32[] memory)\n {\n return hashs.getList(from, _count);\n }\n\n function count() public view returns (uint256) {\n return hashs.count();\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockHashList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockHashList.sol",
"exportedSymbols": {
"MockHashList": [
6342
]
},
"id": 6343,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6269,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:26"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/HashList.sol",
"file": "../list/HashList.sol",
"id": 6270,
"nodeType": "ImportDirective",
"scope": 6343,
"sourceUnit": 4017,
"src": "27:30:26",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 6342,
"linearizedBaseContracts": [
6342
],
"name": "MockHashList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 6273,
"libraryName": {
"contractScope": null,
"id": 6271,
"name": "HashList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4016,
"src": "133:8:26",
"typeDescriptions": {
"typeIdentifier": "t_contract$_HashList_$4016",
"typeString": "library HashList"
}
},
"nodeType": "UsingForDirective",
"src": "127:36:26",
"typeName": {
"contractScope": null,
"id": 6272,
"name": "HashList.hashMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3774,
"src": "146:16:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage_ptr",
"typeString": "struct HashList.hashMap"
}
}
},
{
"constant": false,
"id": 6275,
"name": "hashs",
"nodeType": "VariableDeclaration",
"scope": 6342,
"src": "167:22:26",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap"
},
"typeName": {
"contractScope": null,
"id": 6274,
"name": "HashList.hashMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3774,
"src": "167:16:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage_ptr",
"typeString": "struct HashList.hashMap"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 6287,
"nodeType": "Block",
"src": "247:37:26",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6284,
"name": "_hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6277,
"src": "273:5:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 6282,
"name": "hashs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "260:5:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap storage ref"
}
},
"id": 6283,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "insert",
"nodeType": "MemberAccess",
"referencedDeclaration": 3838,
"src": "260:12:26",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_hashMap_$3774_storage_ptr_$_t_bytes32_$returns$_t_bool_$bound_to$_t_struct$_hashMap_$3774_storage_ptr_$",
"typeString": "function (struct HashList.hashMap storage pointer,bytes32) returns (bool)"
}
},
"id": 6285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "260:19:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 6281,
"id": 6286,
"nodeType": "Return",
"src": "253:26:26"
}
]
},
"documentation": null,
"id": 6288,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6277,
"name": "_hash",
"nodeType": "VariableDeclaration",
"scope": 6288,
"src": "210:13:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6276,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "210:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "209:15:26"
},
"payable": false,
"returnParameters": {
"id": 6281,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6280,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6288,
"src": "241:4:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6279,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "241:4:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "240:6:26"
},
"scope": 6342,
"src": "194:90:26",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6300,
"nodeType": "Block",
"src": "341:37:26",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6297,
"name": "_hash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6290,
"src": "367:5:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"expression": {
"argumentTypes": null,
"id": 6295,
"name": "hashs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "354:5:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap storage ref"
}
},
"id": 6296,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "remove",
"nodeType": "MemberAccess",
"referencedDeclaration": 3907,
"src": "354:12:26",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_hashMap_$3774_storage_ptr_$_t_bytes32_$returns$_t_bool_$bound_to$_t_struct$_hashMap_$3774_storage_ptr_$",
"typeString": "function (struct HashList.hashMap storage pointer,bytes32) returns (bool)"
}
},
"id": 6298,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "354:19:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 6294,
"id": 6299,
"nodeType": "Return",
"src": "347:26:26"
}
]
},
"documentation": null,
"id": 6301,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6291,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6290,
"name": "_hash",
"nodeType": "VariableDeclaration",
"scope": 6301,
"src": "304:13:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6289,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "304:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "303:15:26"
},
"payable": false,
"returnParameters": {
"id": 6294,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6293,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6301,
"src": "335:4:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6292,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "335:4:26",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "334:6:26"
},
"scope": 6342,
"src": "288:90:26",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6313,
"nodeType": "Block",
"src": "439:33:26",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6310,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6303,
"src": "462:4:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6308,
"name": "hashs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "452:5:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap storage ref"
}
},
"id": 6309,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "get",
"nodeType": "MemberAccess",
"referencedDeclaration": 3943,
"src": "452:9:26",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_hashMap_$3774_storage_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_struct$_hashMap_$3774_storage_ptr_$",
"typeString": "function (struct HashList.hashMap storage pointer,uint256) view returns (bytes32)"
}
},
"id": 6311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "452:15:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 6307,
"id": 6312,
"nodeType": "Return",
"src": "445:22:26"
}
]
},
"documentation": null,
"id": 6314,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6304,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6303,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 6314,
"src": "395:12:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6302,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "395:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "394:14:26"
},
"payable": false,
"returnParameters": {
"id": 6307,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6306,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6314,
"src": "430:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6305,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "430:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "429:9:26"
},
"scope": 6342,
"src": "382:90:26",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6330,
"nodeType": "Block",
"src": "576:45:26",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6326,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6316,
"src": "603:4:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 6327,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6318,
"src": "609:6:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 6324,
"name": "hashs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "589:5:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap storage ref"
}
},
"id": 6325,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "getList",
"nodeType": "MemberAccess",
"referencedDeclaration": 4015,
"src": "589:13:26",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_hashMap_$3774_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$bound_to$_t_struct$_hashMap_$3774_storage_ptr_$",
"typeString": "function (struct HashList.hashMap storage pointer,uint256,uint256) view returns (bytes32[] memory)"
}
},
"id": 6328,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "589:27:26",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[] memory"
}
},
"functionReturnParameters": 6323,
"id": 6329,
"nodeType": "Return",
"src": "582:34:26"
}
]
},
"documentation": null,
"id": 6331,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6319,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6316,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 6331,
"src": "493:12:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6315,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "493:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6318,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 6331,
"src": "507:14:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6317,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "507:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "492:30:26"
},
"payable": false,
"returnParameters": {
"id": 6323,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6322,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6331,
"src": "556:9:26",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[]"
},
"typeName": {
"baseType": {
"id": 6320,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "556:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 6321,
"length": null,
"nodeType": "ArrayTypeName",
"src": "556:9:26",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
"typeString": "bytes32[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "555:18:26"
},
"scope": 6342,
"src": "476:145:26",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6340,
"nodeType": "Block",
"src": "672:31:26",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 6336,
"name": "hashs",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6275,
"src": "685:5:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage",
"typeString": "struct HashList.hashMap storage ref"
}
},
"id": 6337,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "count",
"nodeType": "MemberAccess",
"referencedDeclaration": 3919,
"src": "685:11:26",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_hashMap_$3774_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_hashMap_$3774_storage_ptr_$",
"typeString": "function (struct HashList.hashMap storage pointer) view returns (uint256)"
}
},
"id": 6338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "685:13:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6335,
"id": 6339,
"nodeType": "Return",
"src": "678:20:26"
}
]
},
"documentation": null,
"id": 6341,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6332,
"nodeType": "ParameterList",
"parameters": [],
"src": "639:2:26"
},
"payable": false,
"returnParameters": {
"id": 6335,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6334,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6341,
"src": "663:7:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6333,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "663:7:26",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "662:9:26"
},
"scope": 6342,
"src": "625:78:26",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 6343,
"src": "101:604:26"
}
],
"src": "0:706:26"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockHashList.sol",
"exportedSymbols": {
"MockHashList": [
6342
]
},
"id": 6343,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6269,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:26"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/HashList.sol",
"file": "../list/HashList.sol",
"id": 6270,
"nodeType": "ImportDirective",
"scope": 6343,
"sourceUnit": 4017,
"src": "27:30:26",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 6342,
"linearizedBaseContracts": [
6342
],
"name": "MockHashList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 6273,
"libraryName": {
"contractScope": null,
"id": 6271,
"name": "HashList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4016,
"src": "133:8:26",
"typeDescriptions": {
"typeIdentifier": "t_contract$_HashList_$4016",
"typeString": "library HashList"
}
},
"nodeType": "UsingForDirective",
"src": "127:36:26",
"typeName": {
"contractScope": null,
"id": 6272,
"name": "HashList.hashMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3774,
"src": "146:16:26",
"typeDescriptions": {
"typeIdentifier": "t_struct$_hashMap_$3774_storage_ptr",
"typeString": "struct HashList.hashMap"
}
}
},
{
"constan