UNPKG

@gooddollar/goodcontracts

Version:
1,430 lines (1,429 loc) 237 kB
{ "contractName": "ControllerInterface", "abi": [ { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "_to", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "mintReputation", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "_from", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "burnReputation", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "_beneficiary", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "mintTokens", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_scheme", "type": "address" }, { "name": "_paramsHash", "type": "bytes32" }, { "name": "_permissions", "type": "bytes4" }, { "name": "_avatar", "type": "address" } ], "name": "registerScheme", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_scheme", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "unregisterScheme", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_avatar", "type": "address" } ], "name": "unregisterSelf", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_globalConstraint", "type": "address" }, { "name": "_params", "type": "bytes32" }, { "name": "_avatar", "type": "address" } ], "name": "addGlobalConstraint", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_globalConstraint", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "removeGlobalConstraint", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_newController", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "upgradeController", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_contract", "type": "address" }, { "name": "_data", "type": "bytes" }, { "name": "_avatar", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "genericCall", "outputs": [ { "name": "", "type": "bool" }, { "name": "", "type": "bytes" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amountInWei", "type": "uint256" }, { "name": "_to", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "sendEther", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_externalToken", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" }, { "name": "_avatar", "type": "address" } ], "name": "externalTokenTransfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_externalToken", "type": "address" }, { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" }, { "name": "_avatar", "type": "address" } ], "name": "externalTokenTransferFrom", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_externalToken", "type": "address" }, { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" }, { "name": "_avatar", "type": "address" } ], "name": "externalTokenApproval", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_metaData", "type": "string" }, { "name": "_avatar", "type": "address" } ], "name": "metaData", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_avatar", "type": "address" } ], "name": "getNativeReputation", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_scheme", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "isSchemeRegistered", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_scheme", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "getSchemeParameters", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_globalConstraint", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "getGlobalConstraintParameters", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_scheme", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "getSchemePermissions", "outputs": [ { "name": "", "type": "bytes4" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_avatar", "type": "address" } ], "name": "globalConstraintsCount", "outputs": [ { "name": "", "type": "uint256" }, { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_globalConstraint", "type": "address" }, { "name": "_avatar", "type": "address" } ], "name": "isGlobalConstraintRegistered", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.4;\n\nimport \"./Avatar.sol\";\nimport \"../globalConstraints/GlobalConstraintInterface.sol\";\n\n/**\n * @title Controller contract\n * @dev A controller controls the organizations tokens ,reputation and avatar.\n * It is subject to a set of schemes and constraints that determine its behavior.\n * Each scheme has it own parameters and operation permissions.\n */\ninterface ControllerInterface {\n\n /**\n * @dev Mint `_amount` of reputation that are assigned to `_to` .\n * @param _amount amount of reputation to mint\n * @param _to beneficiary address\n * @return bool which represents a success\n */\n function mintReputation(uint256 _amount, address _to, address _avatar)\n external\n returns(bool);\n\n /**\n * @dev Burns `_amount` of reputation from `_from`\n * @param _amount amount of reputation to burn\n * @param _from The address that will lose the reputation\n * @return bool which represents a success\n */\n function burnReputation(uint256 _amount, address _from, address _avatar)\n external\n returns(bool);\n\n /**\n * @dev mint tokens .\n * @param _amount amount of token to mint\n * @param _beneficiary beneficiary address\n * @param _avatar address\n * @return bool which represents a success\n */\n function mintTokens(uint256 _amount, address _beneficiary, address _avatar)\n external\n returns(bool);\n\n /**\n * @dev register or update a scheme\n * @param _scheme the address of the scheme\n * @param _paramsHash a hashed configuration of the usage of the scheme\n * @param _permissions the permissions the new scheme will have\n * @param _avatar address\n * @return bool which represents a success\n */\n function registerScheme(address _scheme, bytes32 _paramsHash, bytes4 _permissions, address _avatar)\n external\n returns(bool);\n\n /**\n * @dev unregister a scheme\n * @param _avatar address\n * @param _scheme the address of the scheme\n * @return bool which represents a success\n */\n function unregisterScheme(address _scheme, address _avatar)\n external\n returns(bool);\n\n /**\n * @dev unregister the caller's scheme\n * @param _avatar address\n * @return bool which represents a success\n */\n function unregisterSelf(address _avatar) external returns(bool);\n\n /**\n * @dev add or update Global Constraint\n * @param _globalConstraint the address of the global constraint to be added.\n * @param _params the constraint parameters hash.\n * @param _avatar the avatar of the organization\n * @return bool which represents a success\n */\n function addGlobalConstraint(address _globalConstraint, bytes32 _params, address _avatar)\n external returns(bool);\n\n /**\n * @dev remove Global Constraint\n * @param _globalConstraint the address of the global constraint to be remove.\n * @param _avatar the organization avatar.\n * @return bool which represents a success\n */\n function removeGlobalConstraint (address _globalConstraint, address _avatar)\n external returns(bool);\n\n /**\n * @dev upgrade the Controller\n * The function will trigger an event 'UpgradeController'.\n * @param _newController the address of the new controller.\n * @param _avatar address\n * @return bool which represents a success\n */\n function upgradeController(address _newController, Avatar _avatar)\n external returns(bool);\n\n /**\n * @dev perform a generic call to an arbitrary contract\n * @param _contract the contract's address to call\n * @param _data ABI-encoded contract call to call `_contract` address.\n * @param _avatar the controller's avatar address\n * @param _value value (ETH) to transfer with the transaction\n * @return bool -success\n * bytes - the return value of the called _contract's function.\n */\n function genericCall(address _contract, bytes calldata _data, Avatar _avatar, uint256 _value)\n external\n returns(bool, bytes memory);\n\n /**\n * @dev send some ether\n * @param _amountInWei the amount of ether (in Wei) to send\n * @param _to address of the beneficiary\n * @param _avatar address\n * @return bool which represents a success\n */\n function sendEther(uint256 _amountInWei, address payable _to, Avatar _avatar)\n external returns(bool);\n\n /**\n * @dev send some amount of arbitrary ERC20 Tokens\n * @param _externalToken the address of the Token Contract\n * @param _to address of the beneficiary\n * @param _value the amount of ether (in Wei) to send\n * @param _avatar address\n * @return bool which represents a success\n */\n function externalTokenTransfer(IERC20 _externalToken, address _to, uint256 _value, Avatar _avatar)\n external\n returns(bool);\n\n /**\n * @dev transfer token \"from\" address \"to\" address\n * One must to approve the amount of tokens which can be spend from the\n * \"from\" account.This can be done using externalTokenApprove.\n * @param _externalToken the address of the Token Contract\n * @param _from address of the account to send from\n * @param _to address of the beneficiary\n * @param _value the amount of ether (in Wei) to send\n * @param _avatar address\n * @return bool which represents a success\n */\n function externalTokenTransferFrom(\n IERC20 _externalToken,\n address _from,\n address _to,\n uint256 _value,\n Avatar _avatar)\n external\n returns(bool);\n\n /**\n * @dev externalTokenApproval approve the spender address to spend a specified amount of tokens\n * on behalf of msg.sender.\n * @param _externalToken the address of the Token Contract\n * @param _spender address\n * @param _value the amount of ether (in Wei) which the approval is referring to.\n * @return bool which represents a success\n */\n function externalTokenApproval(IERC20 _externalToken, address _spender, uint256 _value, Avatar _avatar)\n external\n returns(bool);\n\n /**\n * @dev metaData emits an event with a string, should contain the hash of some meta data.\n * @param _metaData a string representing a hash of the meta data\n * @param _avatar Avatar\n * @return bool which represents a success\n */\n function metaData(string calldata _metaData, Avatar _avatar) external returns(bool);\n\n /**\n * @dev getNativeReputation\n * @param _avatar the organization avatar.\n * @return organization native reputation\n */\n function getNativeReputation(address _avatar)\n external\n view\n returns(address);\n\n function isSchemeRegistered( address _scheme, address _avatar) external view returns(bool);\n\n function getSchemeParameters(address _scheme, address _avatar) external view returns(bytes32);\n\n function getGlobalConstraintParameters(address _globalConstraint, address _avatar) external view returns(bytes32);\n\n function getSchemePermissions(address _scheme, address _avatar) external view returns(bytes4);\n\n /**\n * @dev globalConstraintsCount return the global constraint pre and post count\n * @return uint256 globalConstraintsPre count.\n * @return uint256 globalConstraintsPost count.\n */\n function globalConstraintsCount(address _avatar) external view returns(uint, uint);\n\n function isGlobalConstraintRegistered(address _globalConstraint, address _avatar) external view returns(bool);\n}\n", "sourcePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "ast": { "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "exportedSymbols": { "ControllerInterface": [ 9005 ] }, "id": 9006, "nodeType": "SourceUnit", "nodes": [ { "id": 8774, "literals": [ "solidity", "^", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:44" }, { "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol", "file": "./Avatar.sol", "id": 8775, "nodeType": "ImportDirective", "scope": 9006, "sourceUnit": 7317, "src": "25:22:44", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol", "file": "../globalConstraints/GlobalConstraintInterface.sol", "id": 8776, "nodeType": "ImportDirective", "scope": 9006, "sourceUnit": 9116, "src": "48:60:44", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": "@title Controller contract\n@dev A controller controls the organizations tokens ,reputation and avatar.\nIt is subject to a set of schemes and constraints that determine its behavior.\nEach scheme has it own parameters and operation permissions.", "fullyImplemented": false, "id": 9005, "linearizedBaseContracts": [ 9005 ], "name": "ControllerInterface", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@dev Mint `_amount` of reputation that are assigned to `_to` .\n@param _amount amount of reputation to mint\n@param _to beneficiary address\n@return bool which represents a success", "id": 8787, "implemented": false, "kind": "function", "modifiers": [], "name": "mintReputation", "nodeType": "FunctionDefinition", "parameters": { "id": 8783, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8778, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 8787, "src": "656:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8777, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "656:7:44", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8780, "name": "_to", "nodeType": "VariableDeclaration", "scope": 8787, "src": "673:11:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8779, "name": "address", "nodeType": "ElementaryTypeName", "src": "673:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8782, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8787, "src": "686:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8781, "name": "address", "nodeType": "ElementaryTypeName", "src": "686:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "655:47:44" }, "returnParameters": { "id": 8786, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8785, "name": "", "nodeType": "VariableDeclaration", "scope": 8787, "src": "728:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8784, "name": "bool", "nodeType": "ElementaryTypeName", "src": "728:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "727:6:44" }, "scope": 9005, "src": "632:102:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev Burns `_amount` of reputation from `_from`\n@param _amount amount of reputation to burn\n@param _from The address that will lose the reputation\n@return bool which represents a success", "id": 8798, "implemented": false, "kind": "function", "modifiers": [], "name": "burnReputation", "nodeType": "FunctionDefinition", "parameters": { "id": 8794, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8789, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 8798, "src": "995:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8788, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "995:7:44", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8791, "name": "_from", "nodeType": "VariableDeclaration", "scope": 8798, "src": "1012:13:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8790, "name": "address", "nodeType": "ElementaryTypeName", "src": "1012:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8793, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8798, "src": "1027:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8792, "name": "address", "nodeType": "ElementaryTypeName", "src": "1027:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "994:49:44" }, "returnParameters": { "id": 8797, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8796, "name": "", "nodeType": "VariableDeclaration", "scope": 8798, "src": "1069:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8795, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1069:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1068:6:44" }, "scope": 9005, "src": "971:104:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev mint tokens .\n@param _amount amount of token to mint\n@param _beneficiary beneficiary address\n@param _avatar address\n@return bool which represents a success", "id": 8809, "implemented": false, "kind": "function", "modifiers": [], "name": "mintTokens", "nodeType": "FunctionDefinition", "parameters": { "id": 8805, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8800, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 8809, "src": "1314:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8799, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1314:7:44", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8802, "name": "_beneficiary", "nodeType": "VariableDeclaration", "scope": 8809, "src": "1331:20:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8801, "name": "address", "nodeType": "ElementaryTypeName", "src": "1331:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8804, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8809, "src": "1353:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8803, "name": "address", "nodeType": "ElementaryTypeName", "src": "1353:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1313:56:44" }, "returnParameters": { "id": 8808, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8807, "name": "", "nodeType": "VariableDeclaration", "scope": 8809, "src": "1395:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8806, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1395:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1394:6:44" }, "scope": 9005, "src": "1294:107:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev register or update a scheme\n@param _scheme the address of the scheme\n@param _paramsHash a hashed configuration of the usage of the scheme\n@param _permissions the permissions the new scheme will have\n@param _avatar address\n@return bool which represents a success", "id": 8822, "implemented": false, "kind": "function", "modifiers": [], "name": "registerScheme", "nodeType": "FunctionDefinition", "parameters": { "id": 8818, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8811, "name": "_scheme", "nodeType": "VariableDeclaration", "scope": 8822, "src": "1740:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8810, "name": "address", "nodeType": "ElementaryTypeName", "src": "1740:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8813, "name": "_paramsHash", "nodeType": "VariableDeclaration", "scope": 8822, "src": "1757:19:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 8812, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1757:7:44", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8815, "name": "_permissions", "nodeType": "VariableDeclaration", "scope": 8822, "src": "1778:19:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 8814, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1778:6:44", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8817, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8822, "src": "1799:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8816, "name": "address", "nodeType": "ElementaryTypeName", "src": "1799:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1739:76:44" }, "returnParameters": { "id": 8821, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8820, "name": "", "nodeType": "VariableDeclaration", "scope": 8822, "src": "1841:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8819, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1841:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1840:6:44" }, "scope": 9005, "src": "1716:131:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev unregister a scheme\n@param _avatar address\n@param _scheme the address of the scheme\n@return bool which represents a success", "id": 8831, "implemented": false, "kind": "function", "modifiers": [], "name": "unregisterScheme", "nodeType": "FunctionDefinition", "parameters": { "id": 8827, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8824, "name": "_scheme", "nodeType": "VariableDeclaration", "scope": 8831, "src": "2052:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8823, "name": "address", "nodeType": "ElementaryTypeName", "src": "2052:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8826, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8831, "src": "2069:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8825, "name": "address", "nodeType": "ElementaryTypeName", "src": "2069:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2051:34:44" }, "returnParameters": { "id": 8830, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8829, "name": "", "nodeType": "VariableDeclaration", "scope": 8831, "src": "2111:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8828, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2111:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2110:6:44" }, "scope": 9005, "src": "2026:91:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev unregister the caller's scheme\n@param _avatar address\n@return bool which represents a success", "id": 8838, "implemented": false, "kind": "function", "modifiers": [], "name": "unregisterSelf", "nodeType": "FunctionDefinition", "parameters": { "id": 8834, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8833, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 8838, "src": "2283:15:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8832, "name": "address", "nodeType": "ElementaryTypeName", "src": "2283:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2282:17:44" }, "returnParameters": { "id": 8837, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8836, "name": "", "nodeType": "VariableDeclaration", "scope": 8838, "src": "2317:4:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8835, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2317:4:44", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2316:6:44" }, "scope": 9005, "src": "2259:64:44", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@dev add or update Global Constraint\n@param _globalConstraint the address of the global constraint to be added.\n@param _params the constraint parameters hash.\n@param _avatar the avatar of the organization\n@return bool which represents a success", "id": 8849, "implemented": false, "kind": "function", "modifiers": [], "name": "addGlobalConstraint", "nodeType": "FunctionDefinition", "parameters": { "id": 8845, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8840, "name": "_globalConstraint", "nodeType": "VariableDeclaration", "scope": 8849, "src": "2654:25:44", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8839, "name": "address", "nodeType": "ElementaryTypeName", "src": "2654:7:44", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal"