UNPKG

@andrekorol/kollateral-contracts

Version:

Kollateral protocol, the flash loan building block

1,298 lines (1,297 loc) 82.1 kB
{ "contractName": "Pausable", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account. This module is used through inheritance. It will make available the modifiers `whenNotPaused` and `whenPaused`, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.\",\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract in unpaused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Pausable.sol\":\"Pausable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x910a2e625b71168563edf9eeef55a50d6d699acfe27ceba3921f291829a8f938\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://248246ac66e6479dce1ad7d4945ec5540c98ceb09881e93c93f7c48d5772925c\",\"dweb:/ipfs/QmXr8tmUiZgEYid6ixeeBRmTdUnASWjKzhP3KRxMPy8fRt\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x2a245b797741f05f91212b1c2155a1b99a8884e6fd4c27953c4d3073732737f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://76325ec3159cd859da98cab114513ec81095fa38e1412ffffb9b789bf14d6b38\",\"dweb:/ipfs/QmNdE2779u3DdRczjpx6RoevVa9kVJsCyEfnXWjkUw79jo\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n", "sourcePath": "@openzeppelin/contracts/utils/Pausable.sol", "ast": { "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", "exportedSymbols": { "Context": [ 5279 ], "Pausable": [ 6255 ] }, "id": 6256, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 6167, "literals": [ "solidity", "^", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "33:23:43" }, { "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", "file": "../GSN/Context.sol", "id": 6168, "nodeType": "ImportDirective", "scope": 6256, "sourceUnit": 5280, "src": "58:28:43", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 6170, "name": "Context", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5279, "src": "558:7:43", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$5279", "typeString": "contract Context" } }, "id": 6171, "nodeType": "InheritanceSpecifier", "src": "558:7:43" } ], "contractDependencies": [ 5279 ], "contractKind": "contract", "documentation": { "id": 6169, "nodeType": "StructuredDocumentation", "src": "88:439:43", "text": " @dev Contract module which allows children to implement an emergency stop\n mechanism that can be triggered by an authorized account.\n This module is used through inheritance. It will make available the\n modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n the functions of your contract. Note that they will not be pausable by\n simply including this module, only once the modifiers are put in place." }, "fullyImplemented": true, "id": 6255, "linearizedBaseContracts": [ 6255, 5279 ], "name": "Pausable", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": { "id": 6172, "nodeType": "StructuredDocumentation", "src": "572:73:43", "text": " @dev Emitted when the pause is triggered by `account`." }, "id": 6176, "name": "Paused", "nodeType": "EventDefinition", "parameters": { "id": 6175, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6174, "indexed": false, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "scope": 6176, "src": "663:15:43", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6173, "name": "address", "nodeType": "ElementaryTypeName", "src": "663:7:43", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "662:17:43" }, "src": "650:30:43" }, { "anonymous": false, "documentation": { "id": 6177, "nodeType": "StructuredDocumentation", "src": "686:70:43", "text": " @dev Emitted when the pause is lifted by `account`." }, "id": 6181, "name": "Unpaused", "nodeType": "EventDefinition", "parameters": { "id": 6180, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6179, "indexed": false, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "scope": 6181, "src": "776:15:43", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6178, "name": "address", "nodeType": "ElementaryTypeName", "src": "776:7:43", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "775:17:43" }, "src": "761:32:43" }, { "constant": false, "id": 6183, "mutability": "mutable", "name": "_paused", "nodeType": "VariableDeclaration", "scope": 6255, "src": "799:20:43", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6182, "name": "bool", "nodeType": "ElementaryTypeName", "src": "799:4:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "private" }, { "body": { "id": 6191, "nodeType": "Block", "src": "913:32:43", "statements": [ { "expression": { "id": 6189, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6187, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "923:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "66616c7365", "id": 6188, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "933:5:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "923:15:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6190, "nodeType": "ExpressionStatement", "src": "923:15:43" } ] }, "documentation": { "id": 6184, "nodeType": "StructuredDocumentation", "src": "826:67:43", "text": " @dev Initializes the contract in unpaused state." }, "id": 6192, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 6185, "nodeType": "ParameterList", "parameters": [], "src": "910:2:43" }, "returnParameters": { "id": 6186, "nodeType": "ParameterList", "parameters": [], "src": "913:0:43" }, "scope": 6255, "src": "898:47:43", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 6200, "nodeType": "Block", "src": "1085:31:43", "statements": [ { "expression": { "id": 6198, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "1102:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 6197, "id": 6199, "nodeType": "Return", "src": "1095:14:43" } ] }, "documentation": { "id": 6193, "nodeType": "StructuredDocumentation", "src": "951:84:43", "text": " @dev Returns true if the contract is paused, and false otherwise." }, "functionSelector": "5c975abb", "id": 6201, "implemented": true, "kind": "function", "modifiers": [], "name": "paused", "nodeType": "FunctionDefinition", "parameters": { "id": 6194, "nodeType": "ParameterList", "parameters": [], "src": "1055:2:43" }, "returnParameters": { "id": 6197, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6196, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 6201, "src": "1079:4:43", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6195, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1079:4:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "1078:6:43" }, "scope": 6255, "src": "1040:76:43", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 6211, "nodeType": "Block", "src": "1327:65:43", "statements": [ { "expression": { "arguments": [ { "id": 6206, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1345:8:43", "subExpression": { "id": 6205, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "1346:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5061757361626c653a20706175736564", "id": 6207, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1355:18:43", "typeDescriptions": { "typeIdentifier": "t_stringliteral_68571e1369f7a6dcdcd736cb0343b35a58ed0f64d245c2ed839c98d412744f8a", "typeString": "literal_string \"Pausable: paused\"" }, "value": "Pausable: paused" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_68571e1369f7a6dcdcd736cb0343b35a58ed0f64d245c2ed839c98d412744f8a", "typeString": "literal_string \"Pausable: paused\"" } ], "id": 6204, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1337:7:43", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 6208, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1337:37:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6209, "nodeType": "ExpressionStatement", "src": "1337:37:43" }, { "id": 6210, "nodeType": "PlaceholderStatement", "src": "1384:1:43" } ] }, "documentation": { "id": 6202, "nodeType": "StructuredDocumentation", "src": "1122:175:43", "text": " @dev Modifier to make a function callable only when the contract is not paused.\n Requirements:\n - The contract must not be paused." }, "id": 6212, "name": "whenNotPaused", "nodeType": "ModifierDefinition", "parameters": { "id": 6203, "nodeType": "ParameterList", "parameters": [], "src": "1324:2:43" }, "src": "1302:90:43", "virtual": false, "visibility": "internal" }, { "body": { "id": 6221, "nodeType": "Block", "src": "1592:68:43", "statements": [ { "expression": { "arguments": [ { "id": 6216, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "1610:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5061757361626c653a206e6f7420706175736564", "id": 6217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1619:22:43", "typeDescriptions": { "typeIdentifier": "t_stringliteral_0d1d997348c4b502650619e51f7d09f80514d98b6993be5051d07f703984619a", "typeString": "literal_string \"Pausable: not paused\"" }, "value": "Pausable: not paused" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_0d1d997348c4b502650619e51f7d09f80514d98b6993be5051d07f703984619a", "typeString": "literal_string \"Pausable: not paused\"" } ], "id": 6215, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1602:7:43", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 6218, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1602:40:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6219, "nodeType": "ExpressionStatement", "src": "1602:40:43" }, { "id": 6220, "nodeType": "PlaceholderStatement", "src": "1652:1:43" } ] }, "documentation": { "id": 6213, "nodeType": "StructuredDocumentation", "src": "1398:167:43", "text": " @dev Modifier to make a function callable only when the contract is paused.\n Requirements:\n - The contract must be paused." }, "id": 6222, "name": "whenPaused", "nodeType": "ModifierDefinition", "parameters": { "id": 6214, "nodeType": "ParameterList", "parameters": [], "src": "1589:2:43" }, "src": "1570:90:43", "virtual": false, "visibility": "internal" }, { "body": { "id": 6237, "nodeType": "Block", "src": "1844:66:43", "statements": [ { "expression": { "id": 6230, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6228, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "1854:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 6229, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1864:4:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1854:14:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6231, "nodeType": "ExpressionStatement", "src": "1854:14:43" }, { "eventCall": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 6233, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5267, "src": "1890:10:43", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", "typeString": "function () view returns (address payable)" } }, "id": 6234, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1890:12:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 6232, "name": "Paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6176, "src": "1883:6:43", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 6235, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1883:20:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6236, "nodeType": "EmitStatement", "src": "1878:25:43" } ] }, "documentation": { "id": 6223, "nodeType": "StructuredDocumentation", "src": "1666:124:43", "text": " @dev Triggers stopped state.\n Requirements:\n - The contract must not be paused." }, "id": 6238, "implemented": true, "kind": "function", "modifiers": [ { "id": 6226, "modifierName": { "id": 6225, "name": "whenNotPaused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6212, "src": "1830:13:43", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1830:13:43" } ], "name": "_pause", "nodeType": "FunctionDefinition", "parameters": { "id": 6224, "nodeType": "ParameterList", "parameters": [], "src": "1810:2:43" }, "returnParameters": { "id": 6227, "nodeType": "ParameterList", "parameters": [], "src": "1844:0:43" }, "scope": 6255, "src": "1795:115:43", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" }, { "body": { "id": 6253, "nodeType": "Block", "src": "2090:69:43", "statements": [ { "expression": { "id": 6246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6244, "name": "_paused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6183, "src": "2100:7:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "66616c7365", "id": 6245, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2110:5:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2100:15:43", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6247, "nodeType": "ExpressionStatement", "src": "2100:15:43" }, { "eventCall": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 6249, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5267, "src": "2139:10:43", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", "typeString": "function () view returns (address payable)" } }, "id": 6250, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2139:12:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 6248, "name": "Unpaused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6181, "src": "2130:8:43", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 6251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2130:22:43", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6252, "nodeType": "EmitStatement", "src": "2125:27:43" } ] }, "documentation": { "id": 6239, "nodeType": "StructuredDocumentation", "src": "1916:121:43", "text": " @dev Returns to normal state.\n Requirements:\n - The contract must be paused." }, "id": 6254, "implemented": true, "kind": "function", "modifiers": [ { "id": 6242, "modifierName": { "id": 6241, "name": "whenPaused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6222, "src": "2079:10:43", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2079:10:43" } ], "name": "_unpause", "nodeType": "FunctionDefinition", "parameters": { "id": 6240, "nodeType": "ParameterList", "parameters": [], "src": "2059:2:43" }, "returnParameters": { "id": 6243, "nodeType": "ParameterList", "parameters": [], "src": "2090:0:43" }, "scope": 6255, "src": "2042:117:43", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" } ], "scope": 6256, "src": "528:1633:43" } ], "src": "33:2129:43" }, "legacyAST": { "attributes": { "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", "exportedSymbols": { "Context": [ 5279 ], "Pausable": [ 6255 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.7", ".0" ] }, "id": 6167, "name": "PragmaDirective", "src": "33:23:43" }, { "attributes": { "SourceUnit": 5280, "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", "file": "../GSN/Context.sol", "scope": 6256, "symbolAliases": [ null ], "unitAlias": "" }, "id": 6168, "name": "ImportDirective", "src": "58:28:43" }, { "attributes": { "abstract": true, "contractDependencies": [ 5279 ], "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ 6255, 5279 ], "name": "Pausable", "scope": 6256 }, "children": [ { "attributes": { "text": " @dev Contract module which allows children to implement an emergency stop\n mechanism that can be triggered by an authorized account.\n This module is used through inheritance. It will make available the\n modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n the functions of your contract. Note that they will not be pausable by\n simply including this module, only once the modifiers are put in place." }, "id": 6169, "name": "StructuredDocumentation", "src": "88:439:43" }, { "attributes": {}, "children": [ { "attributes": { "name": "Context", "referencedDeclaration": 5279, "type": "contract Context" }, "id": 6170, "name": "UserDefinedTypeName", "src": "558:7:43" } ], "id": 6171, "name": "InheritanceSpecifier", "src": "558:7:43" }, { "attributes": { "anonymous": false, "name": "Paused" }, "children": [ { "attributes": { "text": " @dev Emitted when the pause is triggered by `account`." }, "id": 6172, "name": "StructuredDocumentation", "src": "572:73:43" }, { "children": [ { "attributes": { "constant": false, "indexed": false, "mutability": "mutable", "name": "account", "scope": 6176, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 6173, "name": "ElementaryTypeName", "src": "663:7:43" } ], "id": 6174, "name": "VariableDeclaration", "src": "663:15:43" } ], "id": 6175, "name": "ParameterList", "src": "662:17:43" } ], "id": 6176, "name": "EventDefinition", "src": "650:30:43" }, { "attributes": { "anonymous": false, "name": "Unpaused" }, "children": [ { "attributes": { "text": " @dev Emitted when the pause is lifted by `account`." }, "id": 6177, "name": "StructuredDocumentation", "src": "686:70:43" }, { "children": [ { "attributes": { "constant": false, "indexed": false, "mutability": "mutable", "name": "account", "scope": 6181, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 6178, "name": "ElementaryTypeName", "src": "776:7:43" } ], "id": 6179, "name": "VariableDeclaration", "src": "776:15:43" } ], "id": 6180, "name": "ParameterList", "src": "775:17:43" } ], "id": 6181, "name": "EventDefinition", "src": "761:32:43" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "_paused", "scope": 6255, "stateVariable": true, "storageLocation": "default", "type": "bool", "visibility": "private" }, "children": [ { "attributes": { "name": "bool", "type": "bool" }, "id": 6182, "name": "ElementaryTypeName", "src": "799:4:43" } ], "id": 6183, "name": "VariableDeclaration", "src": "799:20:43" }, { "attributes": { "implemented": true, "isConstructor": true, "kind": "constructor", "modifiers": [ null ], "name": "", "scope": 6255, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, "children": [ { "attributes": { "text": " @dev Initializes the contract in unpaused state." }, "id": 6184, "name": "StructuredDocumentation", "src": "826:67:43" }, { "attributes": { "parameters": [ null ] }, "children": [], "id": 6185, "name": "ParameterList", "src": "910:2:43" }, { "attributes": { "parameters": [ null ] }, "children": [], "id": 6186, "name": "ParameterList", "src": "913:0:43" }, { "children": [ { "children": [ { "attributes": { "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "=", "type": "bool" }, "children": [ { "attributes": { "overloadedDeclarations": [ null ], "referencedDeclaration": 6183, "type": "bool", "value": "_paused" }, "id": 6187, "name": "Identifier", "src": "923:7:43" }, { "attributes": {