kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
1,029 lines (1,028 loc) • 191 kB
JSON
{
"contractName": "KittyAccessControl",
"abi": [
{
"constant": true,
"inputs": [],
"name": "cfoAddress",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ceoAddress",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "paused",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "cooAddress",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "newContract",
"type": "address"
}
],
"name": "ContractUpgrade",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_newCEO",
"type": "address"
}
],
"name": "setCEO",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newCFO",
"type": "address"
}
],
"name": "setCFO",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newCOO",
"type": "address"
}
],
"name": "setCOO",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "withdrawBalance",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "pause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "unpause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60806040526002805460a060020a60ff021916905534801561002057600080fd5b506104b1806100306000396000f3006080604052600436106100a35763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630519ce7981146100a85780630a0f8168146100d957806327d7874c146100ee5780632ba73c15146101115780633f4ba83a146101325780634e0a3379146101475780635c975abb146101685780635fd8c710146101915780638456cb59146101a6578063b047fb50146101bb575b600080fd5b3480156100b457600080fd5b506100bd6101d0565b60408051600160a060020a039092168252519081900360200190f35b3480156100e557600080fd5b506100bd6101df565b3480156100fa57600080fd5b5061010f600160a060020a03600435166101ee565b005b34801561011d57600080fd5b5061010f600160a060020a0360043516610249565b34801561013e57600080fd5b5061010f6102a4565b34801561015357600080fd5b5061010f600160a060020a0360043516610304565b34801561017457600080fd5b5061017d61035f565b604080519115158252519081900360200190f35b34801561019d57600080fd5b5061010f610380565b3480156101b257600080fd5b5061010f6103d4565b3480156101c757600080fd5b506100bd610476565b600154600160a060020a031681565b600054600160a060020a031681565b600054600160a060020a0316331461020557600080fd5b600160a060020a038116151561021a57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461026057600080fd5b600160a060020a038116151561027557600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146102bb57600080fd5b60025474010000000000000000000000000000000000000000900460ff1615156102e457600080fd5b6002805474ff000000000000000000000000000000000000000019169055565b600054600160a060020a0316331461031b57600080fd5b600160a060020a038116151561033057600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025474010000000000000000000000000000000000000000900460ff1681565b600154600160a060020a0316331461039757600080fd5b600154604051600160a060020a0390911690303180156108fc02916000818181858888f193505050501580156103d1573d6000803e3d6000fd5b50565b600254600160a060020a03163314806103f75750600054600160a060020a031633145b8061040c5750600154600160a060020a031633145b151561041757600080fd5b60025474010000000000000000000000000000000000000000900460ff161561043f57600080fd5b6002805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600254600160a060020a0316815600a165627a7a72305820e8373fc5f0f490bde877017cc2765deb11b9f2aa462e1a292c3cbd9592c192a80029",
"deployedBytecode": "0x6080604052600436106100a35763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630519ce7981146100a85780630a0f8168146100d957806327d7874c146100ee5780632ba73c15146101115780633f4ba83a146101325780634e0a3379146101475780635c975abb146101685780635fd8c710146101915780638456cb59146101a6578063b047fb50146101bb575b600080fd5b3480156100b457600080fd5b506100bd6101d0565b60408051600160a060020a039092168252519081900360200190f35b3480156100e557600080fd5b506100bd6101df565b3480156100fa57600080fd5b5061010f600160a060020a03600435166101ee565b005b34801561011d57600080fd5b5061010f600160a060020a0360043516610249565b34801561013e57600080fd5b5061010f6102a4565b34801561015357600080fd5b5061010f600160a060020a0360043516610304565b34801561017457600080fd5b5061017d61035f565b604080519115158252519081900360200190f35b34801561019d57600080fd5b5061010f610380565b3480156101b257600080fd5b5061010f6103d4565b3480156101c757600080fd5b506100bd610476565b600154600160a060020a031681565b600054600160a060020a031681565b600054600160a060020a0316331461020557600080fd5b600160a060020a038116151561021a57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461026057600080fd5b600160a060020a038116151561027557600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146102bb57600080fd5b60025474010000000000000000000000000000000000000000900460ff1615156102e457600080fd5b6002805474ff000000000000000000000000000000000000000019169055565b600054600160a060020a0316331461031b57600080fd5b600160a060020a038116151561033057600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025474010000000000000000000000000000000000000000900460ff1681565b600154600160a060020a0316331461039757600080fd5b600154604051600160a060020a0390911690303180156108fc02916000818181858888f193505050501580156103d1573d6000803e3d6000fd5b50565b600254600160a060020a03163314806103f75750600054600160a060020a031633145b8061040c5750600154600160a060020a031633145b151561041757600080fd5b60025474010000000000000000000000000000000000000000900460ff161561043f57600080fd5b6002805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600254600160a060020a0316815600a165627a7a72305820e8373fc5f0f490bde877017cc2765deb11b9f2aa462e1a292c3cbd9592c192a80029",
"sourceMap": "546:4048:21:-;;;2135:26;;;-1:-1:-1;;;;;;2135:26:21;;;546:4048;5:2:-1;;;;30:1;27;20:12;5:2;546:4048:21;;;;;;;",
"deployedSourceMap": "546:4048:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1972:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1972:25:21;;;;;;;;-1:-1:-1;;;;;1972:25:21;;;;;;;;;;;;;;1941;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1941:25:21;;;;2924:126;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2924:126:21;-1:-1:-1;;;;;2924:126:21;;;;;;;3466;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3466:126:21;-1:-1:-1;;;;;3466:126:21;;;;;4466;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4466:126:21;;;;3195;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3195:126:21;-1:-1:-1;;;;;3195:126:21;;;;;2135:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2135:26:21;;;;;;;;;;;;;;;;;;;;;;3598:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3598:94:21;;;;4202:79;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4202:79:21;;;;2003:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2003:25:21;;;;1972;;;-1:-1:-1;;;;;1972:25:21;;:::o;1941:::-;;;-1:-1:-1;;;;;1941:25:21;;:::o;2924:126::-;2275:10;;-1:-1:-1;;;;;2275:10:21;2261;:24;2253:33;;;;;;-1:-1:-1;;;;;2990:21:21;;;;2982:30;;;;;;3023:10;:20;;-1:-1:-1;;3023:20:21;-1:-1:-1;;;;;3023:20:21;;;;;;;;;;2924:126::o;3466:::-;2275:10;;-1:-1:-1;;;;;2275:10:21;2261;:24;2253:33;;;;;;-1:-1:-1;;;;;3532:21:21;;;;3524:30;;;;;;3565:10;:20;;-1:-1:-1;;3565:20:21;-1:-1:-1;;;;;3565:20:21;;;;;;;;;;3466:126::o;4466:::-;2275:10;;-1:-1:-1;;;;;2275:10:21;2261;:24;2253:33;;;;;;4024:6;;;;;;;4016:15;;;;;;;;4571:6;:14;;-1:-1:-1;;4571:14:21;;;4466:126::o;3195:::-;2275:10;;-1:-1:-1;;;;;2275:10:21;2261;:24;2253:33;;;;;;-1:-1:-1;;;;;3261:21:21;;;;3253:30;;;;;;3294:10;:20;;-1:-1:-1;;3294:20:21;-1:-1:-1;;;;;3294:20:21;;;;;;;;;;3195:126::o;2135:26::-;;;;;;;;;:::o;3598:94::-;2417:10;;-1:-1:-1;;;;;2417:10:21;2403;:24;2395:33;;;;;;3652:10;;:33;;-1:-1:-1;;;;;3652:10:21;;;;3672:4;:12;3652:33;;;;;:10;:33;:10;:33;3672:12;3652:10;:33;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3652:33:21;3598:94::o;4202:79::-;2661:10;;-1:-1:-1;;;;;2661:10:21;2647;:24;;:64;;-1:-1:-1;2701:10:21;;-1:-1:-1;;;;;2701:10:21;2687;:24;2647:64;:104;;;-1:-1:-1;2741:10:21;;-1:-1:-1;;;;;2741:10:21;2727;:24;2647:104;2626:135;;;;;;;;3883:6;;;;;;;3882:7;3874:16;;;;;;4261:6;:13;;-1:-1:-1;;4261:13:21;;;;;4202:79::o;2003:25::-;;;-1:-1:-1;;;;;2003:25:21;;:::o",
"source": "/* solium-disable */\n/**\n * @title A facet of KittyCore that manages special access privileges.\n * @author Axiom Zen (https://www.axiomzen.co)\n * This code was taken from https://github.com/dapperlabs at\n * https://github.com/dapperlabs/cryptokitties-bounty and is NOT kleros code.\n */\npragma solidity ^0.4.18;\n\n/// @title A facet of KittyCore that manages special access privileges.\n/// @author Axiom Zen (https://www.axiomzen.co)\n/// @dev See the KittyCore contract documentation to understand how the various contract facets are arranged.\ncontract KittyAccessControl {\n // This facet controls access control for CryptoKitties. There are four roles managed here:\n //\n // - The CEO: The CEO can reassign other roles and change the addresses of our dependent smart\n // contracts. It is also the only role that can unpause the smart contract. It is initially\n // set to the address that created the smart contract in the KittyCore constructor.\n //\n // - The CFO: The CFO can withdraw funds from KittyCore and its auction contracts.\n //\n // - The COO: The COO can release gen0 kitties to auction, and mint promo cats.\n //\n // It should be noted that these roles are distinct without overlap in their access abilities, the\n // abilities listed for each role above are exhaustive. In particular, while the CEO can assign any\n // address to any role, the CEO address itself doesn't have the ability to act in those roles. This\n // restriction is intentional so that we aren't tempted to use the CEO address frequently out of\n // convenience. The less we use an address, the less likely it is that we somehow compromise the\n // account.\n\n /// @dev Emited when contract is upgraded - See README.md for updgrade plan\n event ContractUpgrade(address newContract);\n\n // The addresses of the accounts (or contracts) that can execute actions within each roles.\n address public ceoAddress;\n address public cfoAddress;\n address public cooAddress;\n\n // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked\n bool public paused = false;\n\n /// @dev Access modifier for CEO-only functionality\n modifier onlyCEO() {\n require(msg.sender == ceoAddress);\n _;\n }\n\n /// @dev Access modifier for CFO-only functionality\n modifier onlyCFO() {\n require(msg.sender == cfoAddress);\n _;\n }\n\n /// @dev Access modifier for COO-only functionality\n modifier onlyCOO() {\n require(msg.sender == cooAddress);\n _;\n }\n\n modifier onlyCLevel() {\n require(\n msg.sender == cooAddress ||\n msg.sender == ceoAddress ||\n msg.sender == cfoAddress\n );\n _;\n }\n\n /// @dev Assigns a new address to act as the CEO. Only available to the current CEO.\n /// @param _newCEO The address of the new CEO\n function setCEO(address _newCEO) public onlyCEO {\n require(_newCEO != address(0));\n\n ceoAddress = _newCEO;\n }\n\n /// @dev Assigns a new address to act as the CFO. Only available to the current CEO.\n /// @param _newCFO The address of the new CFO\n function setCFO(address _newCFO) public onlyCEO {\n require(_newCFO != address(0));\n\n cfoAddress = _newCFO;\n }\n\n /// @dev Assigns a new address to act as the COO. Only available to the current CEO.\n /// @param _newCOO The address of the new COO\n function setCOO(address _newCOO) public onlyCEO {\n require(_newCOO != address(0));\n\n cooAddress = _newCOO;\n }\n\n function withdrawBalance() external onlyCFO {\n cfoAddress.transfer(this.balance);\n }\n\n\n /*** Pausable functionality adapted from OpenZeppelin ***/\n\n /// @dev Modifier to allow actions only when the contract IS NOT paused\n modifier whenNotPaused() {\n require(!paused);\n _;\n }\n\n /// @dev Modifier to allow actions only when the contract IS paused\n modifier whenPaused {\n require(paused);\n _;\n }\n\n /// @dev Called by any \"C-level\" role to pause the contract. Used only when\n /// a bug or exploit is detected and we need to limit damage.\n function pause() public onlyCLevel whenNotPaused {\n paused = true;\n }\n\n /// @dev Unpauses the smart contract. Can only be called by the CEO, since\n /// one reason we may pause the contract is when CFO or COO accounts are\n /// compromised.\n function unpause() public onlyCEO whenPaused {\n // can't unpause if contract was upgraded\n paused = false;\n }\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/CriptoKitties/KittyAccessControl.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/CriptoKitties/KittyAccessControl.sol",
"exportedSymbols": {
"KittyAccessControl": [
6662
]
},
"id": 6663,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6480,
"literals": [
"solidity",
"^",
"0.4",
".18"
],
"nodeType": "PragmaDirective",
"src": "290:24:21"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title A facet of KittyCore that manages special access privileges.\n @author Axiom Zen (https://www.axiomzen.co)\n @dev See the KittyCore contract documentation to understand how the various contract facets are arranged.",
"fullyImplemented": true,
"id": 6662,
"linearizedBaseContracts": [
6662
],
"name": "KittyAccessControl",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": "@dev Emited when contract is upgraded - See README.md for updgrade plan",
"id": 6484,
"name": "ContractUpgrade",
"nodeType": "EventDefinition",
"parameters": {
"id": 6483,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6482,
"indexed": false,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 6484,
"src": "1818:19:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6481,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1818:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1817:21:21"
},
"src": "1796:43:21"
},
{
"constant": false,
"id": 6486,
"name": "ceoAddress",
"nodeType": "VariableDeclaration",
"scope": 6662,
"src": "1941:25:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6485,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1941:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 6488,
"name": "cfoAddress",
"nodeType": "VariableDeclaration",
"scope": 6662,
"src": "1972:25:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6487,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1972:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 6490,
"name": "cooAddress",
"nodeType": "VariableDeclaration",
"scope": 6662,
"src": "2003:25:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6489,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2003:7:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 6493,
"name": "paused",
"nodeType": "VariableDeclaration",
"scope": 6662,
"src": "2135:26:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6491,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2135:4:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 6492,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2156:5:21",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"visibility": "public"
},
{
"body": {
"id": 6503,
"nodeType": "Block",
"src": "2243:61:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6499,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6496,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2261:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6497,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2261:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6498,
"name": "ceoAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "2275:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2261:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6495,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
20642,
20643
],
"referencedDeclaration": 20642,
"src": "2253:7:21",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6500,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2253:33:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6501,
"nodeType": "ExpressionStatement",
"src": "2253:33:21"
},
{
"id": 6502,
"nodeType": "PlaceholderStatement",
"src": "2296:1:21"
}
]
},
"documentation": "@dev Access modifier for CEO-only functionality",
"id": 6504,
"name": "onlyCEO",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 6494,
"nodeType": "ParameterList",
"parameters": [],
"src": "2240:2:21"
},
"src": "2224:80:21",
"visibility": "internal"
},
{
"body": {
"id": 6514,
"nodeType": "Block",
"src": "2385:61:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6507,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2403:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2403:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6509,
"name": "cfoAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6488,
"src": "2417:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2403:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6506,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
20642,
20643
],
"referencedDeclaration": 20642,
"src": "2395:7:21",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6511,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2395:33:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6512,
"nodeType": "ExpressionStatement",
"src": "2395:33:21"
},
{
"id": 6513,
"nodeType": "PlaceholderStatement",
"src": "2438:1:21"
}
]
},
"documentation": "@dev Access modifier for CFO-only functionality",
"id": 6515,
"name": "onlyCFO",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 6505,
"nodeType": "ParameterList",
"parameters": [],
"src": "2382:2:21"
},
"src": "2366:80:21",
"visibility": "internal"
},
{
"body": {
"id": 6525,
"nodeType": "Block",
"src": "2527:61:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6521,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6518,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2545:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2545:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6520,
"name": "cooAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6490,
"src": "2559:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2545:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6517,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
20642,
20643
],
"referencedDeclaration": 20642,
"src": "2537:7:21",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2537:33:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6523,
"nodeType": "ExpressionStatement",
"src": "2537:33:21"
},
{
"id": 6524,
"nodeType": "PlaceholderStatement",
"src": "2580:1:21"
}
]
},
"documentation": "@dev Access modifier for COO-only functionality",
"id": 6526,
"name": "onlyCOO",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 6516,
"nodeType": "ParameterList",
"parameters": [],
"src": "2524:2:21"
},
"src": "2508:80:21",
"visibility": "internal"
},
{
"body": {
"id": 6546,
"nodeType": "Block",
"src": "2616:163:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 6542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 6537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6532,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6529,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2647:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2647:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6531,
"name": "cooAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6490,
"src": "2661:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2647:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6536,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6533,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2687:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2687:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6535,
"name": "ceoAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "2701:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2687:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2647:64:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6541,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6538,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "2727:3:21",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2727:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6540,
"name": "cfoAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6488,
"src": "2741:10:21",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2727:24:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2647:104:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6528,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
20642,
20643
],
"referencedDeclaration": 20642,
"src": "2626:7:21",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2626:135:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6544,
"nodeType": "ExpressionStatement",
"src": "2626:135:21"
},
{
"id": 6545,
"nodeType": "PlaceholderStatement",
"src": "2771:1:21"
}
]
},
"documentation": null,
"id": 6547,
"name": "onlyCLevel",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 6527,
"nodeType": "ParameterList",
"parameters": [],
"src": "2613:2:21"
},
"src": "2594:185:21",
"visibility": "internal"
},