jcc-solidity-utils
Version:
jcc solidity utils
1,051 lines (1,050 loc) • 83.8 kB
JSON
{
"contractName": "MockAddressList",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "insert",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "remove",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_idx",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "from",
"type": "uint256"
},
{
"name": "_count",
"type": "uint256"
}
],
"name": "getList",
"outputs": [
{
"name": "",
"type": "address[]"
}
],
"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\":\"_addr\",\"type\":\"address\"}],\"name\":\"remove\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getList\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"insert\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockAddressList.sol\":\"MockAddressList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AddressList.sol\":{\"keccak256\":\"0xbc8bf46cc8846bafbd17f6926882a3bc061c4c493f07eea3b83fca83bfb643eb\",\"urls\":[\"bzzr://9de428f8afb50d490792706bbeff0ff3792cd0b116671bd828063629a32fa94f\"]},\"/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/MockAddressList.sol\":{\"keccak256\":\"0xdf3f360c2aefd90dabad9d6daf404bb815f75ff40bbef59d80e28af43742967d\",\"urls\":[\"bzzr://1482b0244d8be410a2556439192054e92cc9a20a74b5a9221a0f96c646435648\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061065c806100206000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd811461007157806329092d0e146100985780639507d39a146100cd578063a9816b0814610101578063bc902ad21461016c575b600080fd5b34801561007d57600080fd5b5061008661018d565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b9600160a060020a036004351661019f565b604080519115158252519081900360200190f35b3480156100d957600080fd5b506100e56004356101b7565b60408051600160a060020a039092168252519081900360200190f35b34801561010d57600080fd5b5061011c6004356024356101c9565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610158578181015183820152602001610140565b505050509050019250505060405180910390f35b34801561017857600080fd5b506100b9600160a060020a03600435166101e4565b600061019960006101f6565b90505b90565b60006101b1818363ffffffff6101fd16565b92915050565b60006101b1818363ffffffff6102f216565b60606101dd6000848463ffffffff6103b916565b9392505050565b60006101b1818363ffffffff6104e916565b6001015490565b600080600061020c858561056b565b151561021b57600092506102ea565b600160a060020a038416600090815260208690526040902054600180870180549294509161024e9163ffffffff6105c816565b8154811061025857fe5b600091825260209091200154600186018054600160a060020a03909216925082918490811061028357fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03948516179055918316815290869052604090208290556001858101546102d7916105c8565b6102e460018701826105e9565b50600192505b505092915050565b6001820154600090821061038d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001830180548390811061039d57fe5b600091825260209091200154600160a060020a03169392505050565b60606000818180851161042d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610457578160200160208202803883390190505b5091508590505b60018701548110156104df5784831415610477576104df565b6001870180548290811061048757fe5b6000918252602090912001548251600160a060020a03909116908390859081106104ad57fe5b600160a060020a039092166020928302909101909101526104d583600163ffffffff6105da16565b925060010161045e565b5095945050505050565b60006104f5838361056b565b15610502575060006101b1565b600183810180548083018083556000928352602090922001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038616179055610549916105c8565b600160a060020a03831660009081526020859052604090205550600192915050565b60018201546000901515610581575060006101b1565b600160a060020a03821660008181526020859052604090205460018501805490919081106105ab57fe5b600091825260209091200154600160a060020a0316149392505050565b6000828211156105d457fe5b50900390565b6000828201838110156101dd57fe5b81548183558181111561060d5760008381526020902061060d918101908301610612565b505050565b61019c91905b8082111561062c5760008155600101610618565b50905600a165627a7a723058207e36a51de704dd857acc7cd7f697fa9d705ec36c66df1c7a026218bb74017ab90029",
"deployedBytecode": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd811461007157806329092d0e146100985780639507d39a146100cd578063a9816b0814610101578063bc902ad21461016c575b600080fd5b34801561007d57600080fd5b5061008661018d565b60408051918252519081900360200190f35b3480156100a457600080fd5b506100b9600160a060020a036004351661019f565b604080519115158252519081900360200190f35b3480156100d957600080fd5b506100e56004356101b7565b60408051600160a060020a039092168252519081900360200190f35b34801561010d57600080fd5b5061011c6004356024356101c9565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610158578181015183820152602001610140565b505050509050019250505060405180910390f35b34801561017857600080fd5b506100b9600160a060020a03600435166101e4565b600061019960006101f6565b90505b90565b60006101b1818363ffffffff6101fd16565b92915050565b60006101b1818363ffffffff6102f216565b60606101dd6000848463ffffffff6103b916565b9392505050565b60006101b1818363ffffffff6104e916565b6001015490565b600080600061020c858561056b565b151561021b57600092506102ea565b600160a060020a038416600090815260208690526040902054600180870180549294509161024e9163ffffffff6105c816565b8154811061025857fe5b600091825260209091200154600186018054600160a060020a03909216925082918490811061028357fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03948516179055918316815290869052604090208290556001858101546102d7916105c8565b6102e460018701826105e9565b50600192505b505092915050565b6001820154600090821061038d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60448201527f756e740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001830180548390811061039d57fe5b600091825260209091200154600160a060020a03169392505050565b60606000818180851161042d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f72657475726e206e756d626572206d75737420626967676572207468616e2030604482015290519081900360640190fd5b84604051908082528060200260200182016040528015610457578160200160208202803883390190505b5091508590505b60018701548110156104df5784831415610477576104df565b6001870180548290811061048757fe5b6000918252602090912001548251600160a060020a03909116908390859081106104ad57fe5b600160a060020a039092166020928302909101909101526104d583600163ffffffff6105da16565b925060010161045e565b5095945050505050565b60006104f5838361056b565b15610502575060006101b1565b600183810180548083018083556000928352602090922001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038616179055610549916105c8565b600160a060020a03831660009081526020859052604090205550600192915050565b60018201546000901515610581575060006101b1565b600160a060020a03821660008181526020859052604090205460018501805490919081106105ab57fe5b600091825260209091200154600160a060020a0316149392505050565b6000828211156105d457fe5b50900390565b6000828201838110156101dd57fe5b81548183558181111561060d5760008381526020902061060d918101908301610612565b505050565b61019c91905b8082111561062c5760008155600101610618565b50905600a165627a7a723058207e36a51de704dd857acc7cd7f697fa9d705ec36c66df1c7a026218bb74017ab90029",
"sourceMap": "104:646:21:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;104:646:21;;;;;;;",
"deployedSourceMap": "104:646:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:82;;8:9:-1;5:2;;;30:1;27;20:12;5:2;666:82:21;;;;;;;;;;;;;;;;;;;;317:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;317:94:21;-1:-1:-1;;;;;317:94:21;;;;;;;;;;;;;;;;;;;;;;;415;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;415:94:21;;;;;;;;;-1:-1:-1;;;;;415:94:21;;;;;;;;;;;;;;513:149;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;513:149:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;513:149:21;;;;;;;;;;;;;;;;;219:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;219:94:21;-1:-1:-1;;;;;219:94:21;;;;;666:82;704:7;726:17;:9;:15;:17::i;:::-;719:24;;666:82;;:::o;317:94::-;364:4;383:23;364:4;400:5;383:23;:16;:23;:::i;:::-;376:30;317:94;-1:-1:-1;;317:94:21:o;415:::-;463:7;485:19;463:7;499:4;485:19;:13;:19;:::i;513:149::-;593:9;626:31;:9;644:4;650:6;626:31;:17;:31;:::i;:::-;619:38;513:149;-1:-1:-1;;;513:149:21:o;219:94::-;266:4;285:23;266:4;302:5;285:23;:16;:23;:::i;1279:106:11:-;1364:9;;:16;;1279:106::o;878:397::-;960:4;1032:15;1075:17;979:18;985:4;991:5;979;:18::i;:::-;978:19;974:52;;;1014:5;1007:12;;;;974:52;-1:-1:-1;;;;;1050:19:11;;:12;:19;;;;;;;;;;;1095:9;;;;1105:16;;1050:19;;-1:-1:-1;1095:9:11;1105:23;;;:20;:23;:::i;:::-;1095:34;;;;;;;;;;;;;;;;;;;1135:9;;:18;;-1:-1:-1;;;;;1095:34:11;;;;-1:-1:-1;1095:34:11;;1145:7;;1135:18;;;;;;;;;;;;;;;;;;:30;;-1:-1:-1;;1135:30:11;-1:-1:-1;;;;;1135:30:11;;;;;;1171:23;;;;;;;;;;;;:33;;;-1:-1:-1;1229:9:11;;;:16;:23;;:20;:23::i;:::-;1210:42;:9;;;:42;;:::i;:::-;;1266:4;1259:11;;878:397;;;;;;;:::o;1389:211::-;1510:9;;;:16;1477:7;;1502:24;;1494:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1579:9;;;:16;;1589:5;;1579:16;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1579:16:11;;1389:211;-1:-1:-1;;;1389:211:11:o;1705:457::-;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:11;;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:9;;-1:-1:-1;;;;;2096:12:11;;;;2084:3;;2088:4;;2084:9;;;;;;-1:-1:-1;;;;;2084:24:11;;;:9;;;;;;;;;;:24;2123:11;:4;2132:1;2123:11;:8;:11;:::i;:::-;2116:18;-1:-1:-1;2019:3:11;;1974:167;;;-1:-1:-1;2154:3:11;1705:457;-1:-1:-1;;;;;1705:457:11:o;574:226::-;656:4;674:18;680:4;686:5;674;:18::i;:::-;670:51;;;-1:-1:-1;709:5:11;702:12;;670:51;775:1;749:9;;;27:10:-1;;23:18;;;45:23;;;-1:-1;749:21:11;;;;;;;;;;-1:-1:-1;;749:21:11;-1:-1:-1;;;;;749:21:11;;;;;:28;;:25;:28::i;:::-;-1:-1:-1;;;;;727:19:11;;:12;:19;;;;;;;;;;:50;-1:-1:-1;791:4:11;574:226;;;;:::o;303:202::-;411:9;;;:16;393:4;;411:21;407:39;;;-1:-1:-1;441:5:11;434:12;;407:39;-1:-1:-1;;;;;460:39:11;;470:12;:19;;;;;;;;;;;460:9;;;:30;;:9;;470:19;460:30;;;;;;;;;;;;;;;;-1:-1:-1;;;;;460:30:11;:39;;303:202;-1:-1:-1;;;303:202:11: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;;;104:646:21;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;",
"source": "pragma solidity >=0.4.24;\n\nimport \"../list/AddressList.sol\";\n\n// 定义一个调用AddressList的合约\ncontract MockAddressList {\n using AddressList for AddressList.addressMap;\n\n AddressList.addressMap planUsers;\n\n function insert(address _addr) public returns (bool) {\n return planUsers.insert(_addr);\n }\n\n function remove(address _addr) public returns (bool) {\n return planUsers.remove(_addr);\n }\n\n function get(uint256 _idx) public view returns (address) {\n return planUsers.get(_idx);\n }\n\n function getList(uint256 from, uint256 _count)\n public\n view\n returns (address[] memory)\n {\n return planUsers.getList(from, _count);\n }\n\n function count() public view returns (uint256) {\n return planUsers.count();\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockAddressList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockAddressList.sol",
"exportedSymbols": {
"MockAddressList": [
5732
]
},
"id": 5733,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5659,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:21"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AddressList.sol",
"file": "../list/AddressList.sol",
"id": 5660,
"nodeType": "ImportDirective",
"scope": 5733,
"sourceUnit": 1564,
"src": "27:33:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 5732,
"linearizedBaseContracts": [
5732
],
"name": "MockAddressList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5663,
"libraryName": {
"contractScope": null,
"id": 5661,
"name": "AddressList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1563,
"src": "139:11:21",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AddressList_$1563",
"typeString": "library AddressList"
}
},
"nodeType": "UsingForDirective",
"src": "133:45:21",
"typeName": {
"contractScope": null,
"id": 5662,
"name": "AddressList.addressMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1321,
"src": "155:22:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage_ptr",
"typeString": "struct AddressList.addressMap"
}
}
},
{
"constant": false,
"id": 5665,
"name": "planUsers",
"nodeType": "VariableDeclaration",
"scope": 5732,
"src": "182:32:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap"
},
"typeName": {
"contractScope": null,
"id": 5664,
"name": "AddressList.addressMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1321,
"src": "182:22:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage_ptr",
"typeString": "struct AddressList.addressMap"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 5677,
"nodeType": "Block",
"src": "272:41:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5674,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5667,
"src": "302:5:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 5672,
"name": "planUsers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5665,
"src": "285:9:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap storage ref"
}
},
"id": 5673,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "insert",
"nodeType": "MemberAccess",
"referencedDeclaration": 1385,
"src": "285:16:21",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_addressMap_$1321_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_addressMap_$1321_storage_ptr_$",
"typeString": "function (struct AddressList.addressMap storage pointer,address) returns (bool)"
}
},
"id": 5675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "285:23:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 5671,
"id": 5676,
"nodeType": "Return",
"src": "278:30:21"
}
]
},
"documentation": null,
"id": 5678,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "insert",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5668,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5667,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 5678,
"src": "235:13:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5666,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "235:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "234:15:21"
},
"payable": false,
"returnParameters": {
"id": 5671,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5670,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5678,
"src": "266:4:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5669,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "266:4:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "265:6:21"
},
"scope": 5732,
"src": "219:94:21",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5690,
"nodeType": "Block",
"src": "370:41:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5687,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5680,
"src": "400:5:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 5685,
"name": "planUsers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5665,
"src": "383:9:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap storage ref"
}
},
"id": 5686,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "remove",
"nodeType": "MemberAccess",
"referencedDeclaration": 1454,
"src": "383:16:21",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_addressMap_$1321_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_addressMap_$1321_storage_ptr_$",
"typeString": "function (struct AddressList.addressMap storage pointer,address) returns (bool)"
}
},
"id": 5688,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "383:23:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 5684,
"id": 5689,
"nodeType": "Return",
"src": "376:30:21"
}
]
},
"documentation": null,
"id": 5691,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5681,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5680,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 5691,
"src": "333:13:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "333:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "332:15:21"
},
"payable": false,
"returnParameters": {
"id": 5684,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5683,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5691,
"src": "364:4:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 5682,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "364:4:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "363:6:21"
},
"scope": 5732,
"src": "317:94:21",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5703,
"nodeType": "Block",
"src": "472:37:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5700,
"name": "_idx",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5693,
"src": "499:4:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 5698,
"name": "planUsers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5665,
"src": "485:9:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap storage ref"
}
},
"id": 5699,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "get",
"nodeType": "MemberAccess",
"referencedDeclaration": 1490,
"src": "485:13:21",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_addressMap_$1321_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_addressMap_$1321_storage_ptr_$",
"typeString": "function (struct AddressList.addressMap storage pointer,uint256) view returns (address)"
}
},
"id": 5701,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "485:19:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 5697,
"id": 5702,
"nodeType": "Return",
"src": "478:26:21"
}
]
},
"documentation": null,
"id": 5704,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "get",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5694,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5693,
"name": "_idx",
"nodeType": "VariableDeclaration",
"scope": 5704,
"src": "428:12:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5692,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "428:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "427:14:21"
},
"payable": false,
"returnParameters": {
"id": 5697,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5696,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5704,
"src": "463:7:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5695,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "463:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "462:9:21"
},
"scope": 5732,
"src": "415:94:21",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5720,
"nodeType": "Block",
"src": "613:49:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5716,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5706,
"src": "644:4:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 5717,
"name": "_count",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5708,
"src": "650:6:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 5714,
"name": "planUsers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5665,
"src": "626:9:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap storage ref"
}
},
"id": 5715,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "getList",
"nodeType": "MemberAccess",
"referencedDeclaration": 1562,
"src": "626:17:21",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_addressMap_$1321_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_addressMap_$1321_storage_ptr_$",
"typeString": "function (struct AddressList.addressMap storage pointer,uint256,uint256) view returns (address[] memory)"
}
},
"id": 5718,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "626:31:21",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"functionReturnParameters": 5713,
"id": 5719,
"nodeType": "Return",
"src": "619:38:21"
}
]
},
"documentation": null,
"id": 5721,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getList",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5706,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "530:12:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5705,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "530:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5708,
"name": "_count",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "544:14:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "544:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "529:30:21"
},
"payable": false,
"returnParameters": {
"id": 5713,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5712,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "593:9:21",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 5710,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "593:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 5711,
"length": null,
"nodeType": "ArrayTypeName",
"src": "593:9:21",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "592:18:21"
},
"scope": 5732,
"src": "513:149:21",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5730,
"nodeType": "Block",
"src": "713:35:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 5726,
"name": "planUsers",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5665,
"src": "726:9:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_addressMap_$1321_storage",
"typeString": "struct AddressList.addressMap storage ref"
}
},
"id": 5727,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "count",
"nodeType": "MemberAccess",
"referencedDeclaration": 1466,
"src": "726:15:21",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_addressMap_$1321_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_addressMap_$1321_storage_ptr_$",
"typeString": "function (struct AddressList.addressMap storage pointer) view returns (uint256)"
}
},
"id": 5728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "726:17:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5725,
"id": 5729,
"nodeType": "Return",
"src": "719:24:21"
}
]
},
"documentation": null,
"id": 5731,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "count",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5722,
"nodeType": "ParameterList",
"parameters": [],
"src": "680:2:21"
},
"payable": false,
"returnParameters": {
"id": 5725,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5724,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5731,
"src": "704:7:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5723,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "704:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "703:9:21"
},
"scope": 5732,
"src": "666:82:21",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 5733,
"src": "104:646:21"
}
],
"src": "0:751:21"
},
"legacyAST": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockAddressList.sol",
"exportedSymbols": {
"MockAddressList": [
5732
]
},
"id": 5733,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5659,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:21"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/AddressList.sol",
"file": "../list/AddressList.sol",
"id": 5660,
"nodeType": "ImportDirective",
"scope": 5733,
"sourceUnit": 1564,
"src": "27:33:21",