@daostack/access_control
Version:
Capability-based access control for Ethereum smart contracts.
1,145 lines • 213 kB
JSON
{
"contractName": "InverseGroup",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_contract",
"type": "address"
},
{
"name": "_data",
"type": "bytes"
}
],
"name": "forward",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"name": "_group",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": true,
"inputs": [
{
"name": "_account",
"type": "address"
}
],
"name": "isMember",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50604051602080610335833981016040525160008054600160a060020a03909216600160a060020a03199092169190911790556102e3806100526000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636fadcf728114610050578063a230c524146100b9575b600080fd5b60408051602060046024803582810135601f81018590048502860185019096528585526100b795833573ffffffffffffffffffffffffffffffffffffffff169536956044949193909101919081908401838280828437509497506100fb9650505050505050565b005b3480156100c557600080fd5b506100e773ffffffffffffffffffffffffffffffffffffffff6004351661020f565b604080519115158252519081900360200190f35b60006101063361020f565b151561017357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f742061206d656d626572206f6620746869732067726f7570000000000000604482015290519081900360640190fd5b8273ffffffffffffffffffffffffffffffffffffffff168260405180828051906020019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505090503d6000803e80801561020a573d6000f35b3d6000fd5b60008054604080517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151919092169163a230c52491602480830192602092919082900301818787803b15801561028457600080fd5b505af1158015610298573d6000803e3d6000fd5b505050506040513d60208110156102ae57600080fd5b505115929150505600a165627a7a72305820ff9f0a721e815e387d1746a0f8728f76fba4c4b587b2236ce8003a63313497f10029",
"deployedBytecode": "0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636fadcf728114610050578063a230c524146100b9575b600080fd5b60408051602060046024803582810135601f81018590048502860185019096528585526100b795833573ffffffffffffffffffffffffffffffffffffffff169536956044949193909101919081908401838280828437509497506100fb9650505050505050565b005b3480156100c557600080fd5b506100e773ffffffffffffffffffffffffffffffffffffffff6004351661020f565b604080519115158252519081900360200190f35b60006101063361020f565b151561017357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f742061206d656d626572206f6620746869732067726f7570000000000000604482015290519081900360640190fd5b8273ffffffffffffffffffffffffffffffffffffffff168260405180828051906020019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505090503d6000803e80801561020a573d6000f35b3d6000fd5b60008054604080517fa230c52400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151919092169163a230c52491602480830192602092919082900301818787803b15801561028457600080fd5b505af1158015610298573d6000803e3d6000fd5b505050506040513d60208110156102ae57600080fd5b505115929150505600a165627a7a72305820ff9f0a721e815e387d1746a0f8728f76fba4c4b587b2236ce8003a63313497f10029",
"sourceMap": "2950:238:3:-;;;3005:64;8:9:-1;5:2;;;30:1;27;20:12;5:2;3005:64:3;;;;;;;;;;;;;3048:5;:14;;-1:-1:-1;;;;;3048:14:3;;;-1:-1:-1;;;;;;3048:14:3;;;;;;;;;2950:238;;;;;;",
"deployedSourceMap": "2950:238:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;674:538;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;674:538:3;;-1:-1:-1;674:538:3;;-1:-1:-1;;;;;;;674:538:3;;;3075:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3075:111:3;;;;;;;;;;;;;;;;;;;;;;;;;674:538;823:11;415:20;424:10;415:8;:20::i;:::-;407:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;837:9;:14;;852:5;837:21;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;837:21:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;823:35;;1015:14;1012:1;1009;994:36;1051:6;1110:36;;;;1179:14;1176:1;1169:25;1110:36;1129:14;1126:1;1119:25;3075:111;3131:4;3155:5;;:24;;;;;;:5;:24;;;;;;;;;:5;;;;;:14;;:24;;;;;;;;;;;;;;3131:4;3155:5;:24;;;5:2:-1;;;;30:1;27;20:12;5:2;3155:24:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3155:24:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3155:24:3;3154:25;;3075:111;-1:-1:-1;;3075:111:3:o",
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title Abstract base contract for all groups.\n */\ncontract Group {\n\n /**\n * @dev Check if an account belongs to this group.\n * @param _account the account to check.\n */\n function isMember(address _account) public view returns(bool);\n\n /**\n * @dev Modifier for restricting access to members of the group.\n */\n modifier onlyMember() {\n require(isMember(msg.sender), \"Not a member of this group\");\n _;\n }\n\n /**\n * @dev Call a method on a contract in the name of the group.\n * @param _contract contract address to call.\n * @param _data ABI encoded function call data.\n */\n function forward(address _contract, bytes _data) public payable onlyMember {\n // solium-disable-next-line security/no-low-level-calls\n bool result = _contract.call(_data);\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize)\n\n switch result\n // call returns 0 on error.\n case 0 { revert(0, returndatasize) }\n default { return(0, returndatasize) }\n }\n }\n}\n\n\n/**\n * @title Group with fixed members set at creation time.\n */\ncontract FixedGroup is Group {\n mapping(address => bool) members;\n\n /**\n * @notice Can use up to 935 members (tested with 8M block gas limit)\n */\n constructor(address[] _members) public {\n for (uint i = 0; i < _members.length; i++) {\n members[_members[i]] = true;\n }\n }\n\n function isMember(address _account) public view returns(bool) {\n return members[_account];\n }\n}\n\n\n/**\n * @title Group that comprises of all members belonging to at least one subgroup.\n */\ncontract UnionGroup is Group {\n Group[] subgroups;\n\n /**\n * @notice Can use up to 294 sub-groups (tested with 8M block gas limit)\n */\n constructor(Group[] _subgroups) public {\n subgroups = _subgroups;\n }\n\n function isMember(address _account) public view returns(bool) {\n for (uint i = 0; i < subgroups.length; i++) {\n if (subgroups[i].isMember(_account)) {\n return true;\n }\n }\n return false;\n }\n}\n\n\n/**\n * @title Group that comprises of all members belonging to all subgroups.\n */\ncontract IntersectionGroup is Group {\n Group[] subgroups;\n\n /**\n * @notice Can use up to 294 sub-groups (tested with 8M block gas limit)\n */\n constructor(Group[] _subgroups) public {\n subgroups = _subgroups;\n }\n\n function isMember(address _account) public view returns(bool) {\n for (uint i = 0; i < subgroups.length; i++) {\n if (!subgroups[i].isMember(_account)) {\n return false;\n }\n }\n return true;\n }\n}\n\n\n/**\n * @title Group that comprises of all members not belonging to a group.\n */\ncontract InverseGroup is Group {\n Group group;\n\n constructor(Group _group) public {\n group = _group;\n }\n\n function isMember(address _account) public view returns(bool) {\n return !group.isMember(_account);\n }\n}\n",
"sourcePath": "/home/tsuberim/projects/daostack/access_control/contracts/Groups.sol",
"ast": {
"absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/Groups.sol",
"exportedSymbols": {
"FixedGroup": [
225
],
"Group": [
178
],
"IntersectionGroup": [
326
],
"InverseGroup": [
355
],
"UnionGroup": [
275
]
},
"id": 356,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 140,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Abstract base contract for all groups.",
"fullyImplemented": false,
"id": 178,
"linearizedBaseContracts": [
178
],
"name": "Group",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": "@dev Check if an account belongs to this group.\n@param _account the account to check.",
"id": 147,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "isMember",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 143,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 142,
"name": "_account",
"nodeType": "VariableDeclaration",
"scope": 147,
"src": "240:16:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 141,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "240:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "239:18:3"
},
"payable": false,
"returnParameters": {
"id": 146,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 145,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 147,
"src": "278:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 144,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "278:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "277:6:3"
},
"scope": 178,
"src": "222:62:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 158,
"nodeType": "Block",
"src": "397:87:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 151,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1462,
"src": "424:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 152,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "424:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 150,
"name": "isMember",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "415:8:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "415:20:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4e6f742061206d656d626572206f6620746869732067726f7570",
"id": 154,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "437:28:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8357529da5166d0ff49b0d6f6c194fd933e0040a1faac958f58e10137eee2940",
"typeString": "literal_string \"Not a member of this group\""
},
"value": "Not a member of this group"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8357529da5166d0ff49b0d6f6c194fd933e0040a1faac958f58e10137eee2940",
"typeString": "literal_string \"Not a member of this group\""
}
],
"id": 149,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
1465,
1466
],
"referencedDeclaration": 1466,
"src": "407:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "407:59:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 156,
"nodeType": "ExpressionStatement",
"src": "407:59:3"
},
{
"id": 157,
"nodeType": "PlaceholderStatement",
"src": "476:1:3"
}
]
},
"documentation": "@dev Modifier for restricting access to members of the group.",
"id": 159,
"name": "onlyMember",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 148,
"nodeType": "ParameterList",
"parameters": [],
"src": "394:2:3"
},
"src": "375:109:3",
"visibility": "internal"
},
{
"body": {
"id": 176,
"nodeType": "Block",
"src": "749:463:3",
"statements": [
{
"assignments": [
169
],
"declarations": [
{
"constant": false,
"id": 169,
"name": "result",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "823:11:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 168,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "823:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 174,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 172,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 163,
"src": "852:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": null,
"id": 170,
"name": "_contract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "837:9:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "837:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$__$returns$_t_bool_$",
"typeString": "function () payable returns (bool)"
}
},
"id": 173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "837:21:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "823:35:3"
},
{
"externalReferences": [
{
"result": {
"declaration": 169,
"isOffset": false,
"isSlot": false,
"src": "1051:6:3",
"valueSize": 1
}
}
],
"id": 175,
"nodeType": "InlineAssembly",
"operations": "{\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}",
"src": "932:280:3"
}
]
},
"documentation": "@dev Call a method on a contract in the name of the group.\n@param _contract contract address to call.\n@param _data ABI encoded function call data.",
"id": 177,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 166,
"modifierName": {
"argumentTypes": null,
"id": 165,
"name": "onlyMember",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 159,
"src": "738:10:3",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "738:10:3"
}
],
"name": "forward",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 164,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 161,
"name": "_contract",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "691:17:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 160,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "691:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 163,
"name": "_data",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "710:11:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 162,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "710:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "690:32:3"
},
"payable": true,
"returnParameters": {
"id": 167,
"nodeType": "ParameterList",
"parameters": [],
"src": "749:0:3"
},
"scope": 178,
"src": "674:538:3",
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 356,
"src": "84:1130:3"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 179,
"name": "Group",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 178,
"src": "1305:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Group_$178",
"typeString": "contract Group"
}
},
"id": 180,
"nodeType": "InheritanceSpecifier",
"src": "1305:5:3"
}
],
"contractDependencies": [
178
],
"contractKind": "contract",
"documentation": "@title Group with fixed members set at creation time.",
"fullyImplemented": true,
"id": 225,
"linearizedBaseContracts": [
225,
178
],
"name": "FixedGroup",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 184,
"name": "members",
"nodeType": "VariableDeclaration",
"scope": 225,
"src": "1317:32:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 183,
"keyType": {
"id": 181,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1325:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1317:24:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 182,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1336:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 211,
"nodeType": "Block",
"src": "1485:111:3",
"statements": [
{
"body": {
"id": 209,
"nodeType": "Block",
"src": "1538:52:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 207,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 201,
"name": "members",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 184,
"src": "1552:7:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 205,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 202,
"name": "_members",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 187,
"src": "1560:8:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 204,
"indexExpression": {
"argumentTypes": null,
"id": 203,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "1569:1:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1560:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1552:20:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 206,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1575:4:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1552:27:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 208,
"nodeType": "ExpressionStatement",
"src": "1552:27:3"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 194,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "1512:1:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 195,
"name": "_members",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 187,
"src": "1516:8:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 196,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1516:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1512:19:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 210,
"initializationExpression": {
"assignments": [
191
],
"declarations": [
{
"constant": false,
"id": 191,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 212,
"src": "1500:6:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 190,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1500:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 193,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 192,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1509:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1500:10:3"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1533:3:3",
"subExpression": {
"argumentTypes": null,
"id": 198,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 191,
"src": "1533:1:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 200,
"nodeType": "ExpressionStatement",
"src": "1533:3:3"
},
"nodeType": "ForStatement",
"src": "1495:95:3"
}
]
},
"documentation": "@notice Can use up to 935 members (tested with 8M block gas limit)",
"id": 212,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 188,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 187,
"name": "_members",
"nodeType": "VariableDeclaration",
"scope": 212,
"src": "1458:18:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 185,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1458:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 186,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1458:9:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1457:20:3"
},
"payable": false,
"returnParameters": {
"id": 189,
"nodeType": "ParameterList",
"parameters": [],
"src": "1485:0:3"
},
"scope": 225,
"src": "1446:150:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 223,
"nodeType": "Block",
"src": "1664:41:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 219,
"name": "members",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 184,
"src": "1681:7:3",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 221,
"indexExpression": {
"argumentTypes": null,
"id": 220,
"name": "_account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 214,
"src": "1689:8:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1681:17:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 218,
"id": 222,
"nodeType": "Return",
"src": "1674:24:3"
}
]
},
"documentation": null,
"id": 224,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "isMember",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 215,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 214,
"name": "_account",
"nodeType": "VariableDeclaration",
"scope": 224,
"src": "1620:16:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 213,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1620:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1619:18:3"
},
"payable": false,
"returnParameters": {
"id": 218,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 217,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 224,
"src": "1658:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 216,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1658:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1657:6:3"
},
"scope": 225,
"src": "1602:103:3",
"stateMutability": "view",
"superFunction": 147,
"visibility": "public"
}
],
"scope": 356,
"src": "1282:425:3"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 226,
"name": "Group",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 178,
"src": "1823:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Group_$178",
"typeString": "contr