UNPKG

secretstore-contracts

Version:

Secret Store permissioning and service contracts collection and toolkit.

1,268 lines (1,267 loc) 66.9 kB
{ "contractName": "PermissioningFireAndForget", "abi": [ { "constant": true, "inputs": [], "name": "documentKeyId", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "addresses", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "docKeyId", "type": "bytes32" }, { "name": "_addresses", "type": "address[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [ { "name": "user", "type": "address" }, { "name": "document", "type": "bytes32" } ], "name": "checkPermissions", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b506040516102ea3803806102ea833981016040528051602080830151600083905590920180519192909161004a9160019190840190610052565b5050506100de565b8280548282559060005260206000209081019282156100a7579160200282015b828111156100a75782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190610072565b506100b39291506100b7565b5090565b6100db91905b808211156100b3578054600160a060020a03191681556001016100bd565b90565b6101fd806100ed6000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166346af6cb2811461005b578063b36a9a7c14610082578063edf26d9b146100c7575b600080fd5b34801561006757600080fd5b50610070610108565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100b373ffffffffffffffffffffffffffffffffffffffff6004351660243561010e565b604080519115158252519081900360200190f35b3480156100d357600080fd5b506100df60043561019c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005481565b60008054819083146101235760009150610195565b5060005b600154811015610190578373ffffffffffffffffffffffffffffffffffffffff1660018281548110151561015757fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156101885760019150610195565b600101610127565b600091505b5092915050565b60018054829081106101aa57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050815600a165627a7a7230582053795b2a4e933d271421e5329f382348caafec596336fdd966533d91c71fbb2f0029", "deployedBytecode": "0x6080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166346af6cb2811461005b578063b36a9a7c14610082578063edf26d9b146100c7575b600080fd5b34801561006757600080fd5b50610070610108565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100b373ffffffffffffffffffffffffffffffffffffffff6004351660243561010e565b604080519115158252519081900360200190f35b3480156100d357600080fd5b506100df60043561019c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005481565b60008054819083146101235760009150610195565b5060005b600154811015610190578373ffffffffffffffffffffffffffffffffffffffff1660018281548110151561015757fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156101885760019150610195565b600101610127565b600091505b5092915050565b60018054829081106101aa57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050815600a165627a7a7230582053795b2a4e933d271421e5329f382348caafec596336fdd966533d91c71fbb2f0029", "sourceMap": "223:605:9:-;;;361:139;8:9:-1;5:2;;;30:1;27;20:12;5:2;361:139:9;;;;;;;;;;;;;;;;;;;;;437:13;:24;;;361:139;;;471:22;;361:139;;;;471:22;;:9;;:22;;;;;:::i;:::-;;361:139;;223:605;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;223:605:9;-1:-1:-1;;;;;223:605:9;;;;;;;;;;;-1:-1:-1;223:605:9;;;;;;;-1:-1:-1;223:605:9;;;-1:-1:-1;223:605:9;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;223:605:9;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "223:605:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;294:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;294:28:9;;;;;;;;;;;;;;;;;;;;506:320;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;506:320:9;;;;;;;;;;;;;;;;;;;;;;;;;;;328:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;328:26:9;;;;;;;;;;;;;;;;;;;;;;;;294:28;;;;:::o;506:320::-;585:4;617:13;;585:4;;605:25;;601:55;;651:5;644:12;;;;601:55;-1:-1:-1;681:1:9;667:122;688:9;:16;684:20;;667:122;;;745:4;729:20;;:9;739:1;729:12;;;;;;;;;;;;;;;;;;;;;;:20;725:53;;;774:4;767:11;;;;725:53;706:3;;667:122;;;814:5;807:12;;506:320;;;;;;:::o;328:26::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;328:26:9;:::o", "source": "pragma solidity ^0.4.24;\n\nimport \"../interfaces/ISecretStorePermissioning.sol\";\n\n\n// FIre-and-forget permissioning contract for one document key\n// Allows you to specify a doc key and permitted addresses in the constructor\ncontract PermissioningFireAndForget is ISecretStorePermissioning {\n bytes32 public documentKeyId;\n address[] public addresses;\n\n constructor(bytes32 docKeyId, address[] memory _addresses) public {\n documentKeyId = docKeyId;\n addresses = _addresses;\n }\n\n function checkPermissions(address user, bytes32 document) public view returns (bool) {\n if (document != documentKeyId)\n return false;\n\n for (uint i = 0; i < addresses.length; i++) {\n if (addresses[i] == user)\n return true;\n }\n \n return false;\n }\n}\n", "sourcePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningFireAndForget.sol", "ast": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningFireAndForget.sol", "exportedSymbols": { "PermissioningFireAndForget": [ 2202 ] }, "id": 2203, "nodeType": "SourceUnit", "nodes": [ { "id": 2137, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:9" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol", "file": "../interfaces/ISecretStorePermissioning.sol", "id": 2138, "nodeType": "ImportDirective", "scope": 2203, "sourceUnit": 725, "src": "26:53:9", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2139, "name": "ISecretStorePermissioning", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 724, "src": "262:25:9", "typeDescriptions": { "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724", "typeString": "contract ISecretStorePermissioning" } }, "id": 2140, "nodeType": "InheritanceSpecifier", "src": "262:25:9" } ], "contractDependencies": [ 724 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2202, "linearizedBaseContracts": [ 2202, 724 ], "name": "PermissioningFireAndForget", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2142, "name": "documentKeyId", "nodeType": "VariableDeclaration", "scope": 2202, "src": "294:28:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2141, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "294:7:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2145, "name": "addresses", "nodeType": "VariableDeclaration", "scope": 2202, "src": "328:26:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2143, "name": "address", "nodeType": "ElementaryTypeName", "src": "328:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2144, "length": null, "nodeType": "ArrayTypeName", "src": "328:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 2161, "nodeType": "Block", "src": "427:73:9", "statements": [ { "expression": { "argumentTypes": null, "id": 2155, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2153, "name": "documentKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2142, "src": "437:13:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2154, "name": "docKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2147, "src": "453:8:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "437:24:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "id": 2156, "nodeType": "ExpressionStatement", "src": "437:24:9" }, { "expression": { "argumentTypes": null, "id": 2159, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2157, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "471:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2158, "name": "_addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2150, "src": "483:10:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "src": "471:22:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2160, "nodeType": "ExpressionStatement", "src": "471:22:9" } ] }, "documentation": null, "id": 2162, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2151, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2147, "name": "docKeyId", "nodeType": "VariableDeclaration", "scope": 2162, "src": "373:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2146, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "373:7:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2150, "name": "_addresses", "nodeType": "VariableDeclaration", "scope": 2162, "src": "391:27:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2148, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2149, "length": null, "nodeType": "ArrayTypeName", "src": "391:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "372:47:9" }, "payable": false, "returnParameters": { "id": 2152, "nodeType": "ParameterList", "parameters": [], "src": "427:0:9" }, "scope": 2202, "src": "361:139:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2200, "nodeType": "Block", "src": "591:235:9", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "id": 2173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2171, "name": "document", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2166, "src": "605:8:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "id": 2172, "name": "documentKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2142, "src": "617:13:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "605:25:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2176, "nodeType": "IfStatement", "src": "601:55:9", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2174, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "651:5:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 2170, "id": 2175, "nodeType": "Return", "src": "644:12:9" } }, { "body": { "id": 2196, "nodeType": "Block", "src": "711:78:9", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2192, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2188, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "729:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2190, "indexExpression": { "argumentTypes": null, "id": 2189, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2178, "src": "739:1:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "729:12:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2191, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2164, "src": "745:4:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "729:20:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2195, "nodeType": "IfStatement", "src": "725:53:9", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2193, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "774:4:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2170, "id": 2194, "nodeType": "Return", "src": "767:11:9" } } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2184, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2181, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2178, "src": "684:1:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2182, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "688:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2183, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "688:16:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "684:20:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 2197, "initializationExpression": { "assignments": [ 2178 ], "declarations": [ { "constant": false, "id": 2178, "name": "i", "nodeType": "VariableDeclaration", "scope": 2201, "src": "672:6:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2177, "name": "uint", "nodeType": "ElementaryTypeName", "src": "672:4:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2180, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 2179, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "681:1:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "672:10:9" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 2186, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "706:3:9", "subExpression": { "argumentTypes": null, "id": 2185, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2178, "src": "706:1:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2187, "nodeType": "ExpressionStatement", "src": "706:3:9" }, "nodeType": "ForStatement", "src": "667:122:9" }, { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "814:5:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 2170, "id": 2199, "nodeType": "Return", "src": "807:12:9" } ] }, "documentation": null, "id": 2201, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "checkPermissions", "nodeType": "FunctionDefinition", "parameters": { "id": 2167, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2164, "name": "user", "nodeType": "VariableDeclaration", "scope": 2201, "src": "532:12:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2163, "name": "address", "nodeType": "ElementaryTypeName", "src": "532:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2166, "name": "document", "nodeType": "VariableDeclaration", "scope": 2201, "src": "546:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2165, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "546:7:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "531:32:9" }, "payable": false, "returnParameters": { "id": 2170, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2169, "name": "", "nodeType": "VariableDeclaration", "scope": 2201, "src": "585:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2168, "name": "bool", "nodeType": "ElementaryTypeName", "src": "585:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "584:6:9" }, "scope": 2202, "src": "506:320:9", "stateMutability": "view", "superFunction": 723, "visibility": "public" } ], "scope": 2203, "src": "223:605:9" } ], "src": "0:829:9" }, "legacyAST": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningFireAndForget.sol", "exportedSymbols": { "PermissioningFireAndForget": [ 2202 ] }, "id": 2203, "nodeType": "SourceUnit", "nodes": [ { "id": 2137, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:9" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol", "file": "../interfaces/ISecretStorePermissioning.sol", "id": 2138, "nodeType": "ImportDirective", "scope": 2203, "sourceUnit": 725, "src": "26:53:9", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2139, "name": "ISecretStorePermissioning", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 724, "src": "262:25:9", "typeDescriptions": { "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724", "typeString": "contract ISecretStorePermissioning" } }, "id": 2140, "nodeType": "InheritanceSpecifier", "src": "262:25:9" } ], "contractDependencies": [ 724 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2202, "linearizedBaseContracts": [ 2202, 724 ], "name": "PermissioningFireAndForget", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2142, "name": "documentKeyId", "nodeType": "VariableDeclaration", "scope": 2202, "src": "294:28:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2141, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "294:7:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2145, "name": "addresses", "nodeType": "VariableDeclaration", "scope": 2202, "src": "328:26:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2143, "name": "address", "nodeType": "ElementaryTypeName", "src": "328:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2144, "length": null, "nodeType": "ArrayTypeName", "src": "328:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 2161, "nodeType": "Block", "src": "427:73:9", "statements": [ { "expression": { "argumentTypes": null, "id": 2155, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2153, "name": "documentKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2142, "src": "437:13:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2154, "name": "docKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2147, "src": "453:8:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "437:24:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "id": 2156, "nodeType": "ExpressionStatement", "src": "437:24:9" }, { "expression": { "argumentTypes": null, "id": 2159, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2157, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "471:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2158, "name": "_addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2150, "src": "483:10:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "src": "471:22:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2160, "nodeType": "ExpressionStatement", "src": "471:22:9" } ] }, "documentation": null, "id": 2162, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2151, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2147, "name": "docKeyId", "nodeType": "VariableDeclaration", "scope": 2162, "src": "373:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2146, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "373:7:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2150, "name": "_addresses", "nodeType": "VariableDeclaration", "scope": 2162, "src": "391:27:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2148, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2149, "length": null, "nodeType": "ArrayTypeName", "src": "391:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "372:47:9" }, "payable": false, "returnParameters": { "id": 2152, "nodeType": "ParameterList", "parameters": [], "src": "427:0:9" }, "scope": 2202, "src": "361:139:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2200, "nodeType": "Block", "src": "591:235:9", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "id": 2173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2171, "name": "document", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2166, "src": "605:8:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "id": 2172, "name": "documentKeyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2142, "src": "617:13:9", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "605:25:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2176, "nodeType": "IfStatement", "src": "601:55:9", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2174, "isConstant": false, "isLValue": false, "isPure": true,