UNPKG

hardlydifficult-ethereum-contracts

Version:
1,036 lines 51.3 kB
{ "contractName": "StoppableMock", "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": [], "name": "count", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "drasticMeasureTaken", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "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" }, { "constant": false, "inputs": [], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "normalProcess", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "drasticMeasure", "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\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"drasticMeasure\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"drasticMeasureTaken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"initialize\",\"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\":\"normalProcess\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":\"Original source: https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/mocks/PausableMock.sol\"}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/test-artifacts/StoppableMock.sol\":\"StoppableMock\"},\"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\"]},\"/home/circleci/repo/contracts/test-artifacts/StoppableMock.sol\":{\"keccak256\":\"0x45018db4fa0eb227f1bff5d4f315dc147112772b616769cbe1991f7170761c92\",\"urls\":[\"bzz-raw://5be46f252813de024d2017447f8e9446d518046aae673128fa298e730d58fe76\",\"dweb:/ipfs/QmPfbgmwV1XLn1rLSdELF5NdhygFn4SQQ9PfeG6dxxYCua\"]},\"@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": "0x608060405234801561001057600080fd5b5061095c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806375f12b21116100815780638bad0c0a1161005b5780638bad0c0a1461018c5780639958f04514610194578063e7651d7a1461019c576100c9565b806375f12b211461017457806376657b8e1461017c5780638129fc1c14610184576100c9565b806314176297116100b257806314176297146100f257806324d7806c1461010e5780637048027514610141576100c9565b806306661abd146100ce57806307da68f5146100e8575b600080fd5b6100d66101a4565b60408051918252519081900360200190f35b6100f06101aa565b005b6100fa6102da565b604080519115158252519081900360200190f35b6100fa6004803603602081101561012457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102e3565b6100f06004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102fc565b6100fa610366565b6100fa61036f565b6100f061037d565b6100f0610388565b6100f0610391565b6100f0610430565b60355481565b6101b3336102e3565b610208576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108fa602e913960400191505060405180910390fd5b60345460ff161561027a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805133815290517f55c4adf1f68f084b809304657594a92ba835ada8d3b5340955bf05746723c05b9181900360200190a1565b60345460ff1681565b60006102f660338363ffffffff6104ad16565b92915050565b610305336102e3565b61035a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108fa602e913960400191505060405180910390fd5b61036381610548565b50565b60345460ff1690565b603454610100900460ff1681565b6103863361059d565b565b610386336106bb565b60345460ff1661040257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53746f707061626c653a206e6f742073746f7070656400000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60345460ff16156104a257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603580546001019055565b600073ffffffffffffffffffffffffffffffffffffffff821661051b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806108aa6022913960400191505060405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff166000908152602091909152604090205460ff1690565b61055960338263ffffffff61071016565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b600054610100900460ff16806105b657506105b66107d6565b806105c4575060005460ff16155b610619576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108cc602e913960400191505060405180910390fd5b600054610100900460ff1615801561067f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61068882610548565b80156106b757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b6106cc60338263ffffffff6107dc16565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b61071a82826104ad565b1561078657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b303b1590565b6107e682826104ad565b61083b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806108896021913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905556fe526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656441646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65a265627a7a72315820d08ee3a74d447c3487f28cbc4d50a5f120b5237425a1dfb929fc7ba8fb9bb22664736f6c63430005110032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c806375f12b21116100815780638bad0c0a1161005b5780638bad0c0a1461018c5780639958f04514610194578063e7651d7a1461019c576100c9565b806375f12b211461017457806376657b8e1461017c5780638129fc1c14610184576100c9565b806314176297116100b257806314176297146100f257806324d7806c1461010e5780637048027514610141576100c9565b806306661abd146100ce57806307da68f5146100e8575b600080fd5b6100d66101a4565b60408051918252519081900360200190f35b6100f06101aa565b005b6100fa6102da565b604080519115158252519081900360200190f35b6100fa6004803603602081101561012457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102e3565b6100f06004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102fc565b6100fa610366565b6100fa61036f565b6100f061037d565b6100f0610388565b6100f0610391565b6100f0610430565b60355481565b6101b3336102e3565b610208576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108fa602e913960400191505060405180910390fd5b60345460ff161561027a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805133815290517f55c4adf1f68f084b809304657594a92ba835ada8d3b5340955bf05746723c05b9181900360200190a1565b60345460ff1681565b60006102f660338363ffffffff6104ad16565b92915050565b610305336102e3565b61035a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108fa602e913960400191505060405180910390fd5b61036381610548565b50565b60345460ff1690565b603454610100900460ff1681565b6103863361059d565b565b610386336106bb565b60345460ff1661040257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53746f707061626c653a206e6f742073746f7070656400000000000000000000604482015290519081900360640190fd5b603480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60345460ff16156104a257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f53746f707061626c653a2073746f707065640000000000000000000000000000604482015290519081900360640190fd5b603580546001019055565b600073ffffffffffffffffffffffffffffffffffffffff821661051b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806108aa6022913960400191505060405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff166000908152602091909152604090205460ff1690565b61055960338263ffffffff61071016565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b600054610100900460ff16806105b657506105b66107d6565b806105c4575060005460ff16155b610619576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806108cc602e913960400191505060405180910390fd5b600054610100900460ff1615801561067f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61068882610548565b80156106b757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b6106cc60338263ffffffff6107dc16565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b61071a82826104ad565b1561078657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b303b1590565b6107e682826104ad565b61083b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806108896021913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905556fe526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656441646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65a265627a7a72315820d08ee3a74d447c3487f28cbc4d50a5f120b5237425a1dfb929fc7ba8fb9bb22664736f6c63430005110032", "sourceMap": "262:338:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:338:18;;;;;;;", "deployedSourceMap": "262:338:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:338:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;337:17;;;:::i;:::-;;;;;;;;;;;;;;;;1123:106:3;;;:::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;302:31:18:-;;;:::i;359:76::-;;;:::i;1005:69:0:-;;;:::i;512:86:18:-;;;:::i;439:69::-;;;:::i;337:17::-;;;;:::o;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;302:31:18:-;;;;;;;;;:::o;359:76::-;398:32;419:10;398:20;:32::i;:::-;359:76::o;1005:69:0:-;1045:24;1058:10;1045:12;:24::i;512:86:18:-;992:8:3;;;;984:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;567:19:18;:26;;;;;;;;512:86::o;439:69::-;810:8:3;;;;809:9;801:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;496:5:18;:7;;;;;;439: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;577:99::-;1024:12:27;;;;;;;;:31;;;1040:15;:13;:15::i;:::-;1024:47;;;-1:-1:-1;1060:11:27;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;1151:13;1170:80;;;;1198:12;:19;;1225:18;1198:19;;;;;;1225:18;1213:4;1225:18;;;1170:80;654:17:0;664:6;654:9;:17::i;:::-;1268:14:27;1264:55;;;1307:5;1292:20;;;;;;1264:55;577:99:0;;:::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;1409:498:27:-;1820:4;1864:17;1895:7;1409:498;:::o;510:180:24:-;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 '@openzeppelin/upgrades/contracts/Initializable.sol';\nimport '../lifecycle/Stoppable.sol';\n\n/**\n * Original source: https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/mocks/PausableMock.sol\n */\ncontract StoppableMock is Stoppable\n{\n bool public drasticMeasureTaken;\n uint public count;\n\n function initialize() external\n {\n _initializeAdminRole(msg.sender);\n }\n\n function normalProcess() external whenNotStopped\n {\n count++;\n }\n\n function drasticMeasure() external whenStopped\n {\n drasticMeasureTaken = true;\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/test-artifacts/StoppableMock.sol", "ast": { "absolutePath": "/home/circleci/repo/contracts/test-artifacts/StoppableMock.sol", "exportedSymbols": { "StoppableMock": [ 1697 ] }, "id": 1698, "nodeType": "SourceUnit", "nodes": [ { "id": 1660, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:18" }, { "absolutePath": "@openzeppelin/upgrades/contracts/Initializable.sol", "file": "@openzeppelin/upgrades/contracts/Initializable.sol", "id": 1661, "nodeType": "ImportDirective", "scope": 1698, "sourceUnit": 2249, "src": "25:60:18", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/circleci/repo/contracts/lifecycle/Stoppable.sol", "file": "../lifecycle/Stoppable.sol", "id": 1662, "nodeType": "ImportDirective", "scope": 1698, "sourceUnit": 619, "src": "86:36:18", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1663, "name": "Stoppable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 618, "src": "288:9:18", "typeDescriptions": { "typeIdentifier": "t_contract$_Stoppable_$618", "typeString": "contract Stoppable" } }, "id": 1664, "nodeType": "InheritanceSpecifier", "src": "288:9:18" } ], "contractDependencies": [ 109, 618, 2248 ], "contractKind": "contract", "documentation": "Original source: https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/mocks/PausableMock.sol", "fullyImplemented": true, "id": 1697, "linearizedBaseContracts": [ 1697, 618, 109, 2248 ], "name": "StoppableMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 1666, "name": "drasticMeasureTaken", "nodeType": "VariableDeclaration", "scope": 1697, "src": "302:31:18", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1665, "name": "bool", "nodeType": "ElementaryTypeName", "src": "302:4:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1668, "name": "count", "nodeType": "VariableDeclaration", "scope": 1697, "src": "337:17:18", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1667, "name": "uint", "nodeType": "ElementaryTypeName", "src": "337:4:18", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 1676, "nodeType": "Block", "src": "392:43:18", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1672, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2263, "src": "419:3:18", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1673, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "419:10:18", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 1671, "name": "_initializeAdminRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 30, "src": "398:20:18", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 1674, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "398:32:18", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1675, "nodeType": "ExpressionStatement", "src": "398:32:18" } ] }, "documentation": null, "id": 1677, "implemented": true, "kind": "function", "modifiers": [], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 1669, "nodeType": "ParameterList", "parameters": [], "src": "378:2:18" }, "returnParameters": { "id": 1670, "nodeType": "ParameterList", "parameters": [], "src": "392:0:18" }, "scope": 1697, "src": "359:76:18", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 1685, "nodeType": "Block", "src": "490:18:18", "statements": [ { "expression": { "argumentTypes": null, "id": 1683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "496:7:18", "subExpression": { "argumentTypes": null, "id": 1682, "name": "count", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1668, "src": "496:5:18", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1684, "nodeType": "ExpressionStatement", "src": "496:7:18" } ] }, "documentation": null, "id": 1686, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 1680, "modifierName": { "argumentTypes": null, "id": 1679, "name": "whenNotStopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 591, "src": "473:14:18", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "473:14:18" } ], "name": "normalProcess", "nodeType": "FunctionDefinition", "parameters": { "id": 1678, "nodeType": "ParameterList", "parameters": [], "src": "461:2:18" }, "returnParameters": { "id": 1681, "nodeType": "ParameterList", "parameters": [], "src": "490:0:18" }, "scope": 1697, "src": "439:69:18", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 1695, "nodeType": "Block", "src": "561:37:18", "statements": [ { "expression": { "argumentTypes": null, "id": 1693, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1691, "name": "drasticMeasureTaken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1666, "src": "567:19:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 1692, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "589:4:18", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "567:26:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1694, "nodeType": "ExpressionStatement", "src": "567:26:18" } ] }, "documentation": null, "id": 1696, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 1689, "modifierName": { "argumentTypes": null, "id": 1688, "name": "whenStopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 600, "src": "547:11:18", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "547:11:18" } ], "name": "drasticMeasure", "nodeType": "FunctionDefinition", "parameters": { "id": 1687, "nodeType": "ParameterList", "parameters": [], "src": "535:2:18" }, "returnParameters": { "id": 1690, "nodeType": "ParameterList", "parameters": [], "src": "561:0:18" }, "scope": 1697, "src": "512:86:18", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 1698, "src": "262:338:18" } ], "src": "0:601:18" }, "legacyAST": { "absolutePath": "/home/circleci/repo/contracts/test-artifacts/StoppableMock.sol", "exportedSymbols": { "StoppableMock": [ 1697 ] }, "id": 1698, "nodeType": "SourceUnit", "nodes": [ { "id": 1660, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:18" }, { "absolutePath": "@openzeppelin/upgrades/contracts/Initializable.sol", "file": "@openzeppelin/upgrades/contracts/Initializable.sol", "id": 1661, "nodeType": "ImportDirective", "scope": 1698, "sourceUnit": 2249, "src": "25:60:18", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/circleci/repo/contracts/lifecycle/Stoppable.sol", "file": "../lifecycle/Stoppable.sol", "id": 1662, "nodeType": "ImportDirective", "scope": 1698, "sourceUnit": 619, "src": "86:36:18", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1663, "name": "Stoppable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 618, "src": "288:9:18", "typeDescriptions": { "typeIdentifier": "t_contract$_Stoppable_$618", "typeString": "contract Stoppable" } }, "id": 1664, "nodeType": "InheritanceSpecifier", "src": "288:9:18" } ], "contractDependencies": [ 109, 618, 2248 ], "contractKind": "contract", "documentation": "Original source: https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/mocks/PausableMock.sol", "fullyImplemented": true, "id": 1697, "linearizedBaseContracts": [ 1697, 618, 109, 2248 ], "name": "StoppableMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 1666, "name": "drasticMeasureTaken", "nodeType": "VariableDeclaration", "scope": 1697, "src": "302:31:18", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1665, "name": "bool", "nodeType": "ElementaryTypeName", "src": "302:4:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1668, "name": "count", "nodeType": "VariableDeclaration", "scope": 1697, "src": "337:17:18", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1667, "name": "uint", "nodeType": "ElementaryTypeName", "src": "337:4:18", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 1676, "nodeType": "Block", "src": "392:43:18", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1672, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2263, "src": "419:3:18", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1673, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "419:10:18", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 1671, "name": "_initializeAdminRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 30, "src": "398:20:18", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 1674, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "398:32:18", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1675, "nodeType": "ExpressionStatement", "src": "398:32:18" } ] }, "documentation": null, "id": 1677, "implemented": true, "kind": "function", "modifiers": [], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 1669, "nodeType": "ParameterList", "parameters": [], "src": "378:2:18" }, "returnParameters": { "id": 1670, "nodeType": "ParameterList", "parameters": [], "src": "392:0:18" }, "scope": 1697, "src": "359:76:18", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 1685, "nodeType": "Block", "src": "490:18:18", "statements": [ { "expression": { "argumentTypes": null, "id": 1683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "496:7:18", "subExpression": { "argumentTypes": null, "id": 1682, "name": "count", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1668, "src": "496:5:18", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1684, "nodeType": "ExpressionStatement", "src": "496:7:18" } ] }, "documentation": null, "id": 1686, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 1680, "modifierName": { "argumentTypes": null, "id": 1679, "name": "whenNotStopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 591, "src": "473:14:18", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "473:14:18" } ], "name": "normalProcess", "nodeType": "FunctionDefinition", "parameters": { "id": 1678, "nodeType": "ParameterList", "parameters": [], "src": "461:2:18" }, "returnParameters": { "id": 1681, "nodeType": "ParameterList", "parameters": [], "src": "490:0:18" }, "scope": 1697, "src": "439:69:18", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 1695, "nodeType": "Block", "src": "561:37:18", "statements": [ { "expression": { "argumentTypes": null, "id": 1693, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1691, "name": "drasticMeasureTaken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1666, "src": "567:19:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 1692, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "589:4:18", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "567:26:18", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1694, "nodeType": "ExpressionStatement", "src": "567:26:18" } ] }, "documentation": null, "id": 1696, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 1689, "modifierName": { "argumentTypes": null, "id": 1688, "name": "whenStopped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 600, "src": "547:11:18", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "547:11:18" } ], "name": "drasticMeasure", "nodeType": "FunctionDefi