UNPKG

hardlydifficult-ethereum-contracts

Version:
1,078 lines (1,077 loc) 63.7 kB
{ "contractName": "Stoppable", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" } ], "name": "AdminAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" } ], "name": "AdminRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Stopped", "type": "event" }, { "constant": true, "inputs": [], "name": "_stopped", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "addAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "_account", "type": "address" } ], "name": "isAdmin", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "stopped", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "stop", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AdminAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AdminRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Stopped\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"_stopped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"isAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stop\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stopped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{\"stop()\":{\"notice\":\"Called by a stopper to stop, triggers stopped state.\"},\"stopped()\":{\"notice\":\"Returns true if the contract is stopped, and false otherwise.\"}},\"notice\":\"Allows an operator (the `AdminRole`) to `stop` a contract. Once it's been stopped, it cannot be started again. * Original source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/lifecycle/Pausable.sol\"}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/lifecycle/Stoppable.sol\":\"Stoppable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"/home/circleci/repo/contracts/access/roles/AdminRole.sol\":{\"keccak256\":\"0x6f15262c282d670b69401ab27e7ae9e203d97b8ebd86c1a282c1f8fdc1241224\",\"urls\":[\"bzz-raw://a149786f216652b390abc9aa53ae79dc31275c8623e58b44a9266649a3224808\",\"dweb:/ipfs/QmPk2D6FEgnrsHwkNdPaRF4ad4xCfNVEVjJPfcBE8tWvFS\"]},\"/home/circleci/repo/contracts/lifecycle/Stoppable.sol\":{\"keccak256\":\"0x14e3634f51f6a66c3a55afb1caf3ecac627823b82093e1ee4adb933f6d09a866\",\"urls\":[\"bzz-raw://194b804b7ddb0d830fb64fab7cecb078ea8e2a8864a5be1e7410e230afdf3297\",\"dweb:/ipfs/QmahVS9EnyZ8BJrrWFefoYWvS5NKqq1UosqUbfaj5Un9JS\"]},\"@openzeppelin/contracts-ethereum-package/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzz-raw://00a788c4631466c220b385bdd100c571d24b2deccd657615cfbcef6cadf669a4\",\"dweb:/ipfs/QmTEwDbjJNxmMNCDMqtuou3dyM8Wtp8Q9NFvn7SAVM7Jf3\"]},\"@openzeppelin/upgrades/contracts/Initializable.sol\":{\"keccak256\":\"0x9bfec92e36234ecc99b5d37230acb6cd1f99560233753162204104a4897e8721\",\"urls\":[\"bzz-raw://5cf7c208583d4d046d75bd99f5507412ab01cce9dd9f802ce9768a416d93ea2f\",\"dweb:/ipfs/QmcQS1BBMPpVEkXP3qzwSjxHNrqDek8YeR7xbVWDC9ApC7\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50610640806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063704802751161005057806370480275146100d057806375f12b21146101035780638bad0c0a1461010b57610072565b806307da68f514610077578063141762971461008157806324d7806c1461009d575b600080fd5b61007f610113565b005b610089610243565b604080519115158252519081900360200190f35b610089600480360360208110156100b357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661024c565b61007f600480360360208110156100e657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610265565b6100896102cf565b61007f6102d8565b61011c3361024c565b610171576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806105de602e913960400191505060405180910390fd5b60345460ff16156101e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805133815290517f55c4adf1f68f084b809304657594a92ba835ada8d3b5340955bf05746723c05b9181900360200190a1565b60345460ff1681565b600061025f60338363ffffffff6102e316565b92915050565b61026e3361024c565b6102c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806105de602e913960400191505060405180910390fd5b6102cc8161037e565b50565b60345460ff1690565b6102e1336103d3565b565b600073ffffffffffffffffffffffffffffffffffffffff8216610351576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806105bc6022913960400191505060405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff166000908152602091909152604090205460ff1690565b61038f60338263ffffffff61042816565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b6103e460338263ffffffff6104ee16565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b61043282826102e3565b1561049e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6104f882826102e3565b61054d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061059b6021913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905556fe526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737341646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65a265627a7a72315820177962fb179d2b030ff9d9260f55ecbda124edd274cbdf3675f80674dbf38ffb64736f6c63430005110032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063704802751161005057806370480275146100d057806375f12b21146101035780638bad0c0a1461010b57610072565b806307da68f514610077578063141762971461008157806324d7806c1461009d575b600080fd5b61007f610113565b005b610089610243565b604080519115158252519081900360200190f35b610089600480360360208110156100b357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661024c565b61007f600480360360208110156100e657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610265565b6100896102cf565b61007f6102d8565b61011c3361024c565b610171576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806105de602e913960400191505060405180910390fd5b60345460ff16156101e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805133815290517f55c4adf1f68f084b809304657594a92ba835ada8d3b5340955bf05746723c05b9181900360200190a1565b60345460ff1681565b600061025f60338363ffffffff6102e316565b92915050565b61026e3361024c565b6102c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806105de602e913960400191505060405180910390fd5b6102cc8161037e565b50565b60345460ff1690565b6102e1336103d3565b565b600073ffffffffffffffffffffffffffffffffffffffff8216610351576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806105bc6022913960400191505060405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff166000908152602091909152604090205460ff1690565b61038f60338263ffffffff61042816565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b6103e460338263ffffffff6104ee16565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b61043282826102e3565b1561049e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6104f882826102e3565b61054d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061059b6021913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905556fe526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737341646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65a265627a7a72315820177962fb179d2b030ff9d9260f55ecbda124edd274cbdf3675f80674dbf38ffb64736f6c63430005110032", "sourceMap": "322:909:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;322:909:3;;;;;;;", "deployedSourceMap": "322:909:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;322:909:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1123:106;;;:::i;:::-;;479:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;803:111:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;803:111:0;;;;:::i;918:83::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;918:83:0;;;;:::i;591:74:3:-;;;:::i;1005:69:0:-;;;:::i;1123:106:3:-;717:19:0;725:10;717:7;:19::i;:::-;709:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;810:8:3;;;;809:9;801:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1179:8;:15;;;;1190:4;1179:15;;;1205:19;;;1213:10;1205:19;;;;;;;;;;;;;1123:106::o;479:20::-;;;;;;:::o;803:111:0:-;867:4;888:21;:7;900:8;888:21;:11;:21;:::i;:::-;881:28;803:111;-1:-1:-1;;803:111:0:o;918:83::-;717:19;725:10;717:7;:19::i;:::-;709:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;978:18;988:7;978:9;:18::i;:::-;918:83;:::o;591:74:3:-;652:8;;;;591:74;:::o;1005:69:0:-;1045:24;1058:10;1045:12;:24::i;:::-;1005:69::o;779:200:24:-;851:4;875:21;;;867:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;952:20:24;;:11;:20;;;;;;;;;;;;;;;779:200::o;1078:108:0:-;1131:20;:7;1143;1131:20;:11;:20;:::i;:::-;1162:19;;;;;;;;;;;1078:108;:::o;1190:116::-;1246:23;:7;1261;1246:23;:14;:23;:::i;:::-;1280:21;;;;;;;;;;;1190:116;:::o;260:175:24:-;337:18;341:4;347:7;337:3;:18::i;:::-;336:19;328:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;401:20;;:11;:20;;;;;;;;;;;:27;;;;424:4;401:27;;;260:175::o;510:180::-;589:18;593:4;599:7;589:3;:18::i;:::-;581:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;655:20;;678:5;655:20;;;;;;;;;;;:28;;;;;;510:180::o", "source": "pragma solidity ^0.5.0;\n\nimport '../access/roles/AdminRole.sol';\n\n/**\n * @notice Allows an operator (the `AdminRole`) to `stop` a contract.\n * Once it's been stopped, it cannot be started again.\n *\n * Original source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/lifecycle/Pausable.sol\n */\ncontract Stoppable is AdminRole\n{\n /**\n * @notice Emitted when the stop is triggered by a stopper (`account`).\n */\n event Stopped(address account);\n\n bool public _stopped;\n\n /**\n * @notice Returns true if the contract is stopped, and false otherwise.\n */\n function stopped() public view returns (bool)\n {\n return _stopped;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not stopped.\n */\n modifier whenNotStopped()\n {\n require(!_stopped, 'Stoppable: stopped');\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is stopped.\n */\n modifier whenStopped()\n {\n require(_stopped, 'Stoppable: not stopped');\n _;\n }\n\n /**\n * @notice Called by a stopper to stop, triggers stopped state.\n */\n function stop() public onlyAdmin whenNotStopped\n {\n _stopped = true;\n emit Stopped(msg.sender);\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/lifecycle/Stoppable.sol", "ast": { "absolutePath": "/home/circleci/repo/contracts/lifecycle/Stoppable.sol", "exportedSymbols": { "Stoppable": [ 618 ] }, "id": 619, "nodeType": "SourceUnit", "nodes": [ { "id": 564, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:3" }, { "absolutePath": "/home/circleci/repo/contracts/access/roles/AdminRole.sol", "file": "../access/roles/AdminRole.sol", "id": 565, "nodeType": "ImportDirective", "scope": 619, "sourceUnit": 110, "src": "25:39:3", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 566, "name": "AdminRole", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 109, "src": "344:9:3", "typeDescriptions": { "typeIdentifier": "t_contract$_AdminRole_$109", "typeString": "contract AdminRole" } }, "id": 567, "nodeType": "InheritanceSpecifier", "src": "344:9:3" } ], "contractDependencies": [ 109, 2248 ], "contractKind": "contract", "documentation": "@notice Allows an operator (the `AdminRole`) to `stop` a contract.\nOnce it's been stopped, it cannot be started again.\n * Original source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/lifecycle/Pausable.sol", "fullyImplemented": true, "id": 618, "linearizedBaseContracts": [ 618, 109, 2248 ], "name": "Stoppable", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": "@notice Emitted when the stop is triggered by a stopper (`account`).", "id": 571, "name": "Stopped", "nodeType": "EventDefinition", "parameters": { "id": 570, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 569, "indexed": false, "name": "account", "nodeType": "VariableDeclaration", "scope": 571, "src": "458:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 568, "name": "address", "nodeType": "ElementaryTypeName", "src": "458:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "457:17:3" }, "src": "444:31:3" }, { "constant": false, "id": 573, "name": "_stopped", "nodeType": "VariableDeclaration", "scope": 618, "src": "479:20:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 572, "name": "bool", "nodeType": "ElementaryTypeName", "src": "479:4:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 580, "nodeType": "Block", "src": "639:26:3", "statements": [ { "expression": { "argumentTypes": null, "id": 578, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "652:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 577, "id": 579, "nodeType": "Return", "src": "645:15:3" } ] }, "documentation": "@notice Returns true if the contract is stopped, and false otherwise.", "id": 581, "implemented": true, "kind": "function", "modifiers": [], "name": "stopped", "nodeType": "FunctionDefinition", "parameters": { "id": 574, "nodeType": "ParameterList", "parameters": [], "src": "607:2:3" }, "returnParameters": { "id": 577, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 576, "name": "", "nodeType": "VariableDeclaration", "scope": 581, "src": "631:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 575, "name": "bool", "nodeType": "ElementaryTypeName", "src": "631:4:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "630:6:3" }, "scope": 618, "src": "591:74:3", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 590, "nodeType": "Block", "src": "795:58:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "809:9:3", "subExpression": { "argumentTypes": null, "id": 584, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "810:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "53746f707061626c653a2073746f70706564", "id": 586, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "820:20:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_82c07981adebd5fea813f621df87458cd74c6f071d6f6b4f40ce8c0a6ea9daa2", "typeString": "literal_string \"Stoppable: stopped\"" }, "value": "Stoppable: stopped" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_82c07981adebd5fea813f621df87458cd74c6f071d6f6b4f40ce8c0a6ea9daa2", "typeString": "literal_string \"Stoppable: stopped\"" } ], "id": 583, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "801:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "801:40:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 588, "nodeType": "ExpressionStatement", "src": "801:40:3" }, { "id": 589, "nodeType": "PlaceholderStatement", "src": "847:1:3" } ] }, "documentation": "@dev Modifier to make a function callable only when the contract is not stopped.", "id": 591, "name": "whenNotStopped", "nodeType": "ModifierDefinition", "parameters": { "id": 582, "nodeType": "ParameterList", "parameters": [], "src": "790:2:3" }, "src": "767:86:3", "visibility": "internal" }, { "body": { "id": 599, "nodeType": "Block", "src": "978:61:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 594, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "992:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "53746f707061626c653a206e6f742073746f70706564", "id": 595, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1002:24:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_0e6dc9a1497c79e311275cb0515509a40ce697c5ef3c0090c1cbc78fb5e50ab0", "typeString": "literal_string \"Stoppable: not stopped\"" }, "value": "Stoppable: not stopped" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_0e6dc9a1497c79e311275cb0515509a40ce697c5ef3c0090c1cbc78fb5e50ab0", "typeString": "literal_string \"Stoppable: not stopped\"" } ], "id": 593, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "984:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 596, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "984:43:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 597, "nodeType": "ExpressionStatement", "src": "984:43:3" }, { "id": 598, "nodeType": "PlaceholderStatement", "src": "1033:1:3" } ] }, "documentation": "@dev Modifier to make a function callable only when the contract is stopped.", "id": 600, "name": "whenStopped", "nodeType": "ModifierDefinition", "parameters": { "id": 592, "nodeType": "ParameterList", "parameters": [], "src": "973:2:3" }, "src": "953:86:3", "visibility": "internal" }, { "body": { "id": 616, "nodeType": "Block", "src": "1173:56:3", "statements": [ { "expression": { "argumentTypes": null, "id": 609, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 607, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "1179:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 608, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1190:4:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1179:15:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 610, "nodeType": "ExpressionStatement", "src": "1179:15:3" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 612, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2263, "src": "1213:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 613, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1213:10:3", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 611, "name": "Stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 571, "src": "1205:7:3", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 614, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1205:19:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 615, "nodeType": "EmitStatement", "src": "1200:24:3" } ] }, "documentation": "@notice Called by a stopper to stop, triggers stopped state.", "id": 617, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 603, "modifierName": { "argumentTypes": null, "id": 602, "name": "onlyAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 42, "src": "1146:9:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1146:9:3" }, { "arguments": null, "id": 605, "modifierName": { "argumentTypes": null, "id": 604, "name": "whenNotStopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 591, "src": "1156:14:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1156:14:3" } ], "name": "stop", "nodeType": "FunctionDefinition", "parameters": { "id": 601, "nodeType": "ParameterList", "parameters": [], "src": "1136:2:3" }, "returnParameters": { "id": 606, "nodeType": "ParameterList", "parameters": [], "src": "1173:0:3" }, "scope": 618, "src": "1123:106:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 619, "src": "322:909:3" } ], "src": "0:1232:3" }, "legacyAST": { "absolutePath": "/home/circleci/repo/contracts/lifecycle/Stoppable.sol", "exportedSymbols": { "Stoppable": [ 618 ] }, "id": 619, "nodeType": "SourceUnit", "nodes": [ { "id": 564, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:3" }, { "absolutePath": "/home/circleci/repo/contracts/access/roles/AdminRole.sol", "file": "../access/roles/AdminRole.sol", "id": 565, "nodeType": "ImportDirective", "scope": 619, "sourceUnit": 110, "src": "25:39:3", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 566, "name": "AdminRole", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 109, "src": "344:9:3", "typeDescriptions": { "typeIdentifier": "t_contract$_AdminRole_$109", "typeString": "contract AdminRole" } }, "id": 567, "nodeType": "InheritanceSpecifier", "src": "344:9:3" } ], "contractDependencies": [ 109, 2248 ], "contractKind": "contract", "documentation": "@notice Allows an operator (the `AdminRole`) to `stop` a contract.\nOnce it's been stopped, it cannot be started again.\n * Original source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/lifecycle/Pausable.sol", "fullyImplemented": true, "id": 618, "linearizedBaseContracts": [ 618, 109, 2248 ], "name": "Stoppable", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": "@notice Emitted when the stop is triggered by a stopper (`account`).", "id": 571, "name": "Stopped", "nodeType": "EventDefinition", "parameters": { "id": 570, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 569, "indexed": false, "name": "account", "nodeType": "VariableDeclaration", "scope": 571, "src": "458:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 568, "name": "address", "nodeType": "ElementaryTypeName", "src": "458:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "457:17:3" }, "src": "444:31:3" }, { "constant": false, "id": 573, "name": "_stopped", "nodeType": "VariableDeclaration", "scope": 618, "src": "479:20:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 572, "name": "bool", "nodeType": "ElementaryTypeName", "src": "479:4:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 580, "nodeType": "Block", "src": "639:26:3", "statements": [ { "expression": { "argumentTypes": null, "id": 578, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "652:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 577, "id": 579, "nodeType": "Return", "src": "645:15:3" } ] }, "documentation": "@notice Returns true if the contract is stopped, and false otherwise.", "id": 581, "implemented": true, "kind": "function", "modifiers": [], "name": "stopped", "nodeType": "FunctionDefinition", "parameters": { "id": 574, "nodeType": "ParameterList", "parameters": [], "src": "607:2:3" }, "returnParameters": { "id": 577, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 576, "name": "", "nodeType": "VariableDeclaration", "scope": 581, "src": "631:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 575, "name": "bool", "nodeType": "ElementaryTypeName", "src": "631:4:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "630:6:3" }, "scope": 618, "src": "591:74:3", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 590, "nodeType": "Block", "src": "795:58:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "809:9:3", "subExpression": { "argumentTypes": null, "id": 584, "name": "_stopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "810:8:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "53746f707061626c653a2073746f70706564", "id": 586, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "820:20:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_82c07981adebd5fea813f621df87458cd74c6f071d6f6b4f40ce8c0a6ea9daa2", "typeString": "literal_string \"Stoppable: stopped\"" }, "value": "Stoppable: stopped" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_82c07981adebd5fea813f621df87458cd74c6f071d6f6b4f40ce8c0a6ea9daa2", "typeString": "literal_string \"Stoppable: stopped\"" } ], "id": 583, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "801:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } },