@netvote/elections-solidity
Version:
Elections Contracts
1,192 lines • 126 kB
JSON
{
"contractName": "AddressSet",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
},
{
"name": "a",
"type": "address"
}
],
"name": "indexOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
},
{
"name": "index",
"type": "uint256"
}
],
"name": "getAt",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
},
{
"name": "a",
"type": "address"
}
],
"name": "contains",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
}
],
"name": "size",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
},
{
"name": "a",
"type": "address"
}
],
"name": "remove",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "self",
"type": "AddressSet.SetData storage"
},
{
"name": "a",
"type": "address"
}
],
"name": "put",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x6060604052341561000f57600080fd5b6103ff8061001e6000396000f3006060604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318c40249811461007c5780635c2125a7146100a5578063758241e0146100cf578063913aa6cd146100fa578063e134066a14610105578063f9802f851461011e575b600080fd5b610093600435600160a060020a0360243516610135565b60405190815260200160405180910390f35b6100b3600435602435610154565b604051600160a060020a03909116815260200160405180910390f35b6100e6600435600160a060020a0360243516610183565b604051901515815260200160405180910390f35b6100936004356101a2565b61011c600435600160a060020a03602435166101a9565b005b61011c600435600160a060020a03602435166102d4565b600160a060020a03166000908152600191909101602052604090205490565b6000826002018281548110151561016757fe5b600091825260209091200154600160a060020a03169392505050565b600160a060020a03166000908152602091909152604090205460ff1690565b6002015490565b600160a060020a038116600090815260208390526040812054819060ff16156102ce57600160a060020a0383166000908152600180860160205260409091205492506101f4856101a2565b0382101561028c5783600201600161020b866101a2565b0381548110151561021857fe5b600091825260209091200154600285018054600160a060020a03909216925082918490811061024357fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03948516179055918316815260018601909152604090208290555b600284018054906102a1906000198301610389565b50600160a060020a038316600090815260208581526040808320805460ff19169055600187019091528120555b50505050565b600160a060020a03811660009081526020839052604090205460ff16151561038557600160a060020a0381166000908152602083905260409020805460ff19166001908117909155600283018054909181016103308382610389565b506000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038516908117909155600285015490835260018501909152604090912060001990910190555b5050565b8154818355818115116103ad576000838152602090206103ad9181019083016103b2565b505050565b6103d091905b808211156103cc57600081556001016103b8565b5090565b905600a165627a7a72305820a0065dfdc78ddaa20c48875e0884f5e5c5644ea9deb37e6db9da9370d5a970f70029",
"deployedBytecode": "0x6060604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318c40249811461007c5780635c2125a7146100a5578063758241e0146100cf578063913aa6cd146100fa578063e134066a14610105578063f9802f851461011e575b600080fd5b610093600435600160a060020a0360243516610135565b60405190815260200160405180910390f35b6100b3600435602435610154565b604051600160a060020a03909116815260200160405180910390f35b6100e6600435600160a060020a0360243516610183565b604051901515815260200160405180910390f35b6100936004356101a2565b61011c600435600160a060020a03602435166101a9565b005b61011c600435600160a060020a03602435166102d4565b600160a060020a03166000908152600191909101602052604090205490565b6000826002018281548110151561016757fe5b600091825260209091200154600160a060020a03169392505050565b600160a060020a03166000908152602091909152604090205460ff1690565b6002015490565b600160a060020a038116600090815260208390526040812054819060ff16156102ce57600160a060020a0383166000908152600180860160205260409091205492506101f4856101a2565b0382101561028c5783600201600161020b866101a2565b0381548110151561021857fe5b600091825260209091200154600285018054600160a060020a03909216925082918490811061024357fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03948516179055918316815260018601909152604090208290555b600284018054906102a1906000198301610389565b50600160a060020a038316600090815260208581526040808320805460ff19169055600187019091528120555b50505050565b600160a060020a03811660009081526020839052604090205460ff16151561038557600160a060020a0381166000908152602083905260409020805460ff19166001908117909155600283018054909181016103308382610389565b506000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038516908117909155600285015490835260018501909152604090912060001990910190555b5050565b8154818355818115116103ad576000838152602090206103ad9181019083016103b2565b505050565b6103d091905b808211156103cc57600081556001016103b8565b5090565b905600a165627a7a72305820a0065dfdc78ddaa20c48875e0884f5e5c5644ea9deb37e6db9da9370d5a970f70029",
"sourceMap": "1035:1521:12:-;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "1035:1521:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1210:126;;;;-1:-1:-1;;;;;1210:126:12;;;;;;;;;;;;;;;;;;;;1342:129;;;;;;;;;;;-1:-1:-1;;;;;1342:129:12;;;;;;;;;;;;;;1477:125;;;;-1:-1:-1;;;;;1477:125:12;;;;;;;;;;;;;;;;;;;;;;1608:113;;;;;;1971:583;;;;-1:-1:-1;;;;;1971:583:12;;;;;;;1727:238;;;;-1:-1:-1;;;;;1727:238:12;;;;;1210:126;-1:-1:-1;;;;;1311:18:12;1285:7;1311:18;;;:15;;;;;:18;;;;;;;1210:126::o;1342:129::-;1419:7;1445:4;:12;;1458:5;1445:19;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1445:19:12;;1342:129;-1:-1:-1;;;1342:129:12:o;1477:125::-;-1:-1:-1;;;;;1576:19:12;1553:4;1576:19;;;;;;;;;;;;;;;1477:125::o;1608:113::-;1695:12;;:19;;1608:113::o;1971:583::-;-1:-1:-1;;;;;2041:19:12;;2076:13;2041:19;;;;;;;;;;;2076:13;;2041:19;;2037:511;;;-1:-1:-1;;;;;2092:18:12;;;;;;:15;;;;:18;;;;;;;;-1:-1:-1;2200:10:12;2092:4;2200;:10::i;:::-;:14;2192:5;:22;2188:208;;;2254:4;:12;;2278:1;2267:10;2272:4;2267;:10::i;:::-;:12;2254:26;;;;;;;;;;;;;;;;;;;;2298:12;;;:19;;-1:-1:-1;;;;;2254:26:12;;;;-1:-1:-1;2254:26:12;;2311:5;;2298:19;;;;;;;;;;;;;;;;;;:31;;-1:-1:-1;;2298:31:12;-1:-1:-1;;;;;2298:31:12;;;;;;2347:26;;;;;-1:-1:-1;2347:15:12;;:26;;;;;;:34;;;2188:208;2437:12;;;:21;;;;;-1:-1:-1;;2437:21:12;;;:::i;:::-;-1:-1:-1;;;;;;2479:19:12;;:16;:19;;;;;;;;;;;2472:26;;-1:-1:-1;;2472:26:12;;;;2519:15;;:18;;;;;2512:25;2037:511;1971:583;;;;:::o;1727:238::-;-1:-1:-1;;;;;1795:19:12;;:16;:19;;;;;;;;;;;;;1794:20;1790:169;;;-1:-1:-1;;;;;1830:19:12;;:16;:19;;;;;;;;;;:26;;-1:-1:-1;;1830:26:12;1852:4;1830:26;;;;;;1870:12;;;:20;;:12;;:20;;;:12;:20;;:::i;:::-;-1:-1:-1;1870:20:12;;;;;;;;;;;;;;-1:-1:-1;;1870:20:12;-1:-1:-1;;;;;1870:20:12;;;;;;;;1925:12;;;:19;1904:18;;;-1:-1:-1;1904:15:12;;:18;;;;;;;-1:-1:-1;;1925:23:12;;;1904:44;;1790:169;1727:238;;:::o;1035:1521::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o",
"source": "// ------------------------------------------------------------------------------\n// This file is part of netvote.\n//\n// netvote is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// netvote is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with solidity. If not, see <http://www.gnu.org/licenses/>\n//\n// (c) 2017 netvote contributors.\n//------------------------------------------------------------------------------\n\npragma solidity ^0.4.17;\n\n\n/**\n * @title AddressSet\n * @dev iterable map of addresses that modifies size upon removal\n * Note that the order changes upon removal.\n */\nlibrary AddressSet {\n\n struct SetData {\n mapping(address => bool) entryExists;\n mapping(address => uint256) entryIndex;\n address[] entries;\n }\n\n function indexOf(SetData storage self, address a) public constant returns (uint256) {\n return self.entryIndex[a];\n }\n\n function getAt(SetData storage self, uint256 index) public constant returns (address) {\n return self.entries[index];\n }\n\n function contains(SetData storage self, address a) public constant returns (bool) {\n return self.entryExists[a];\n }\n\n function size(SetData storage self) public constant returns (uint256) {\n return self.entries.length;\n }\n\n function put(SetData storage self, address a) public {\n if (!self.entryExists[a]) {\n self.entryExists[a] = true;\n self.entries.push(a);\n self.entryIndex[a] = self.entries.length - 1;\n }\n }\n\n function remove(SetData storage self, address a) public {\n if (self.entryExists[a]) {\n uint256 index = self.entryIndex[a];\n // if not last entry, copy last entry into a's slot\n if (index < size(self) - 1) {\n address lastEntry = self.entries[size(self)-1];\n self.entries[index] = lastEntry;\n self.entryIndex[lastEntry] = index;\n }\n // resize array\n self.entries.length--;\n delete self.entryExists[a];\n delete self.entryIndex[a];\n }\n }\n}",
"sourcePath": "/Users/slanders/netvote/elections-solidity/contracts/lib/AddressSet.sol",
"ast": {
"attributes": {
"absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/lib/AddressSet.sol",
"exportedSymbols": {
"AddressSet": [
1733
]
}
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.4",
".17"
]
},
"id": 1544,
"name": "PragmaDirective",
"src": "868:24:12"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "library",
"documentation": "@title AddressSet\n@dev iterable map of addresses that modifies size upon removal\nNote that the order changes upon removal.",
"fullyImplemented": true,
"linearizedBaseContracts": [
1733
],
"name": "AddressSet",
"scope": 1734
},
"children": [
{
"attributes": {
"canonicalName": "AddressSet.SetData",
"name": "SetData",
"scope": 1733,
"visibility": "public"
},
"children": [
{
"attributes": {
"constant": false,
"name": "entryExists",
"scope": 1556,
"stateVariable": false,
"storageLocation": "default",
"type": "mapping(address => bool)",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "mapping(address => bool)"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1545,
"name": "ElementaryTypeName",
"src": "1094:7:12"
},
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 1546,
"name": "ElementaryTypeName",
"src": "1105:4:12"
}
],
"id": 1547,
"name": "Mapping",
"src": "1086:24:12"
}
],
"id": 1548,
"name": "VariableDeclaration",
"src": "1086:36:12"
},
{
"attributes": {
"constant": false,
"name": "entryIndex",
"scope": 1556,
"stateVariable": false,
"storageLocation": "default",
"type": "mapping(address => uint256)",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1549,
"name": "ElementaryTypeName",
"src": "1140:7:12"
},
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1550,
"name": "ElementaryTypeName",
"src": "1151:7:12"
}
],
"id": 1551,
"name": "Mapping",
"src": "1132:27:12"
}
],
"id": 1552,
"name": "VariableDeclaration",
"src": "1132:38:12"
},
{
"attributes": {
"constant": false,
"name": "entries",
"scope": 1556,
"stateVariable": false,
"storageLocation": "default",
"type": "address[] storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"length": null,
"type": "address[] storage pointer"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1553,
"name": "ElementaryTypeName",
"src": "1180:7:12"
}
],
"id": 1554,
"name": "ArrayTypeName",
"src": "1180:9:12"
}
],
"id": 1555,
"name": "VariableDeclaration",
"src": "1180:17:12"
}
],
"id": 1556,
"name": "StructDefinition",
"src": "1061:143:12"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "indexOf",
"payable": false,
"scope": 1733,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "self",
"scope": 1571,
"stateVariable": false,
"storageLocation": "storage",
"type": "struct AddressSet.SetData storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "SetData",
"referencedDeclaration": 1556,
"type": "struct AddressSet.SetData storage pointer"
},
"id": 1557,
"name": "UserDefinedTypeName",
"src": "1227:7:12"
}
],
"id": 1558,
"name": "VariableDeclaration",
"src": "1227:20:12"
},
{
"attributes": {
"constant": false,
"name": "a",
"scope": 1571,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1559,
"name": "ElementaryTypeName",
"src": "1249:7:12"
}
],
"id": 1560,
"name": "VariableDeclaration",
"src": "1249:9:12"
}
],
"id": 1561,
"name": "ParameterList",
"src": "1226:33:12"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 1571,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1562,
"name": "ElementaryTypeName",
"src": "1285:7:12"
}
],
"id": 1563,
"name": "VariableDeclaration",
"src": "1285:7:12"
}
],
"id": 1564,
"name": "ParameterList",
"src": "1284:9:12"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 1564
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "entryIndex",
"referencedDeclaration": 1552,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1558,
"type": "struct AddressSet.SetData storage pointer",
"value": "self"
},
"id": 1565,
"name": "Identifier",
"src": "1311:4:12"
}
],
"id": 1566,
"name": "MemberAccess",
"src": "1311:15:12"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1560,
"type": "address",
"value": "a"
},
"id": 1567,
"name": "Identifier",
"src": "1327:1:12"
}
],
"id": 1568,
"name": "IndexAccess",
"src": "1311:18:12"
}
],
"id": 1569,
"name": "Return",
"src": "1304:25:12"
}
],
"id": 1570,
"name": "Block",
"src": "1294:42:12"
}
],
"id": 1571,
"name": "FunctionDefinition",
"src": "1210:126:12"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getAt",
"payable": false,
"scope": 1733,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "self",
"scope": 1586,
"stateVariable": false,
"storageLocation": "storage",
"type": "struct AddressSet.SetData storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "SetData",
"referencedDeclaration": 1556,
"type": "struct AddressSet.SetData storage pointer"
},
"id": 1572,
"name": "UserDefinedTypeName",
"src": "1357:7:12"
}
],
"id": 1573,
"name": "VariableDeclaration",
"src": "1357:20:12"
},
{
"attributes": {
"constant": false,
"name": "index",
"scope": 1586,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1574,
"name": "ElementaryTypeName",
"src": "1379:7:12"
}
],
"id": 1575,
"name": "VariableDeclaration",
"src": "1379:13:12"
}
],
"id": 1576,
"name": "ParameterList",
"src": "1356:37:12"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 1586,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1577,
"name": "ElementaryTypeName",
"src": "1419:7:12"
}
],
"id": 1578,
"name": "VariableDeclaration",
"src": "1419:7:12"
}
],
"id": 1579,
"name": "ParameterList",
"src": "1418:9:12"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 1579
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "entries",
"referencedDeclaration": 1555,
"type": "address[] storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1573,
"type": "struct AddressSet.SetData storage pointer",
"value": "self"
},
"id": 1580,
"name": "Identifier",
"src": "1445:4:12"
}
],
"id": 1581,
"name": "MemberAccess",
"src": "1445:12:12"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1575,
"type": "uint256",
"value": "index"
},
"id": 1582,
"name": "Identifier",
"src": "1458:5:12"
}
],
"id": 1583,
"name": "IndexAccess",
"src": "1445:19:12"
}
],
"id": 1584,
"name": "Return",
"src": "1438:26:12"
}
],
"id": 1585,
"name": "Block",
"src": "1428:43:12"
}
],
"id": 1586,
"name": "FunctionDefinition",
"src": "1342:129:12"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "contains",
"payable": false,
"scope": 1733,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "self",
"scope": 1601,
"stateVariable": false,
"storageLocation": "storage",
"type": "struct AddressSet.SetData storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "SetData",
"referencedDeclaration": 1556,
"type": "struct AddressSet.SetData storage pointer"
},
"id": 1587,
"name": "UserDefinedTypeName",
"src": "1495:7:12"
}
],
"id": 1588,
"name": "VariableDeclaration",
"src": "1495:20:12"
},
{
"attributes": {
"constant": false,
"name": "a",
"scope": 1601,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1589,
"name": "ElementaryTypeName",
"src": "1517:7:12"
}
],
"id": 1590,
"name": "VariableDeclaration",
"src": "1517:9:12"
}
],
"id": 1591,
"name": "ParameterList",
"src": "1494:33:12"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 1601,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 1592,
"name": "ElementaryTypeName",
"src": "1553:4:12"
}
],
"id": 1593,
"name": "VariableDeclaration",
"src": "1553:4:12"
}
],
"id": 1594,
"name": "ParameterList",
"src": "1552:6:12"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 1594
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "entryExists",
"referencedDeclaration": 1548,
"type": "mapping(address => bool)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1588,
"type": "struct AddressSet.SetData storage pointer",
"value": "self"
},
"id": 1595,
"name": "Identifier",
"src": "1576:4:12"
}
],
"id": 1596,
"name": "MemberAccess",
"src": "1576:16:12"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1590,
"type": "address",
"value": "a"
},
"id": 1597,
"name": "Identifier",
"src": "1593:1:12"
}
],
"id": 1598,
"name": "IndexAccess",
"src": "1576:19:12"
}
],
"id": 1599,
"name": "Return",
"src": "1569:26:12"
}
],
"id": 1600,
"name": "Block",
"src": "1559:43:12"
}
],
"id": 1601,
"name": "FunctionDefinition",
"src": "1477:125:12"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "size",
"payable": false,
"scope": 1733,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "self",
"scope": 1613,
"stateVariable": false,
"storageLocation": "storage",
"type": "struct AddressSet.SetData storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "SetData",
"referencedDeclaration": 1556,
"type": "struct AddressSet.SetData storage pointer"
},
"id": 1602,
"name": "UserDefinedTypeName",
"src": "1622:7:12"
}
],
"id": 1603,
"name": "VariableDeclaration",
"src": "1622:20:12"
}
],
"id": 1604,
"name": "ParameterList",
"src": "1621:22:12"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 1613,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1605,
"name": "ElementaryTypeName",
"src": "1669:7:12"
}
],
"id": 1606,
"name": "VariableDeclaration",
"src": "1669:7:12"
}
],
"id": 1607,
"name": "ParameterList",
"src": "1668:9:12"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 1607
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "length",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "entries",
"referencedDeclaration": 1555,
"type": "address[] storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1603,
"type": "struct AddressSet.SetData storage pointer",
"value": "self"
},
"id": 1608,
"name": "Identifier",
"src": "1695:4:12"
}
],
"id": 1609,
"name": "MemberAccess",
"src": "1695:12:12"
}
],
"id": 1610,
"name": "MemberAccess",
"src": "1695:19:12"
}
],
"id": 1611,
"name": "Return",
"src": "1688:26:12"
}
],
"id": 1612,
"name": "Block",
"src": "1678:43:12"
}
],
"id": 1613,
"name": "FunctionDefinition",
"src": "1608:113:12"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "put",
"payable": false,
"scope": 1733,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "self",
"scope": 1656,
"stateVariable": false,
"storageLocation": "storage",
"type": "struct AddressSet.SetData storage pointer",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "SetData",
"referencedDeclaration": 1556,
"type": "struct AddressSet.SetData storage pointer"
},
"id": 1614,
"name": "UserDefinedTypeName",
"src": "1740:7:12"
}
],
"id": 1615,
"name": "VariableDeclaration",
"src": "1740:20:12"
},
{
"attributes": {
"constant": false,
"name": "a",
"scope": 1656,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 1616,
"name": "ElementaryTypeName",
"src": "1762:7:12"
}
],
"id": 1617,
"name": "VariableDeclaration",
"src": "1762:9:12"
}
],
"id": 1618,
"name": "ParameterList",
"src": "1739:33:12"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 1619,
"name": "ParameterList",
"src": "1780:0:12"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!",
"prefix": true,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"member_name": "entryExists",
"referencedDeclaration": 1548,
"type": "mapping(address => bool)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 1615,
"type": "struct AddressSet.SetData storage pointer",
"value": "self"
},
"id": 1620,
"name": "Identifier",
"src": "1795:4:12"
}
],
"id": 1621,
"name": "MemberAccess",
"src": "1795:16:12"