UNPKG

@alpsfinance/core

Version:

This is the official Alps Finance smart contract repository.

962 lines 40.7 kB
{ "contractName": "ReentrancyGuard", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://287a2f8d5814dd0f05f22b740f18ca8321acc21c9bd03a6cb2203ea626e2f3f2\",\"dweb:/ipfs/QmZRQv9iuwU817VuqkA2WweiaibKii69x9QxYBBEfbNEud\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n", "sourcePath": "@openzeppelin/contracts/security/ReentrancyGuard.sol", "ast": { "absolutePath": "@openzeppelin/contracts/security/ReentrancyGuard.sol", "exportedSymbols": { "ReentrancyGuard": [ 742 ] }, "id": 743, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 704, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "97:23:6" }, { "abstract": true, "baseContracts": [], "canonicalName": "ReentrancyGuard", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 705, "nodeType": "StructuredDocumentation", "src": "122:750:6", "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]." }, "fullyImplemented": true, "id": 742, "linearizedBaseContracts": [ 742 ], "name": "ReentrancyGuard", "nameLocation": "891:15:6", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 708, "mutability": "constant", "name": "_NOT_ENTERED", "nameLocation": "1686:12:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1661:41:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 706, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1661:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "31", "id": 707, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1701:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "visibility": "private" }, { "constant": true, "id": 711, "mutability": "constant", "name": "_ENTERED", "nameLocation": "1733:8:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1708:37:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 709, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1708:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "32", "id": 710, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1744:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "visibility": "private" }, { "constant": false, "id": 713, "mutability": "mutable", "name": "_status", "nameLocation": "1768:7:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1752:23:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 712, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1752:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "body": { "id": 720, "nodeType": "Block", "src": "1796:39:6", "statements": [ { "expression": { "id": 718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 716, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "1806:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 717, "name": "_NOT_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 708, "src": "1816:12:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1806:22:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 719, "nodeType": "ExpressionStatement", "src": "1806:22:6" } ] }, "id": 721, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 714, "nodeType": "ParameterList", "parameters": [], "src": "1793:2:6" }, "returnParameters": { "id": 715, "nodeType": "ParameterList", "parameters": [], "src": "1796:0:6" }, "scope": 742, "src": "1782:53:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 740, "nodeType": "Block", "src": "2236:421:6", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 727, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 725, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2325:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "id": 726, "name": "_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 711, "src": "2336:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2325:19:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", "id": 728, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2346:33:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" }, "value": "ReentrancyGuard: reentrant call" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" } ], "id": 724, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2317:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2317:63:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 730, "nodeType": "ExpressionStatement", "src": "2317:63:6" }, { "expression": { "id": 733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 731, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2455:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 732, "name": "_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 711, "src": "2465:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2455:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 734, "nodeType": "ExpressionStatement", "src": "2455:18:6" }, { "id": 735, "nodeType": "PlaceholderStatement", "src": "2484:1:6" }, { "expression": { "id": 738, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 736, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2628:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 737, "name": "_NOT_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 708, "src": "2638:12:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2628:22:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 739, "nodeType": "ExpressionStatement", "src": "2628:22:6" } ] }, "documentation": { "id": 722, "nodeType": "StructuredDocumentation", "src": "1841:366:6", "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and making it call a\n `private` function that does the actual work." }, "id": 741, "name": "nonReentrant", "nameLocation": "2221:12:6", "nodeType": "ModifierDefinition", "parameters": { "id": 723, "nodeType": "ParameterList", "parameters": [], "src": "2233:2:6" }, "src": "2212:445:6", "virtual": false, "visibility": "internal" } ], "scope": 743, "src": "873:1786:6", "usedErrors": [] } ], "src": "97:2563:6" }, "legacyAST": { "absolutePath": "@openzeppelin/contracts/security/ReentrancyGuard.sol", "exportedSymbols": { "ReentrancyGuard": [ 742 ] }, "id": 743, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 704, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "97:23:6" }, { "abstract": true, "baseContracts": [], "canonicalName": "ReentrancyGuard", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 705, "nodeType": "StructuredDocumentation", "src": "122:750:6", "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]." }, "fullyImplemented": true, "id": 742, "linearizedBaseContracts": [ 742 ], "name": "ReentrancyGuard", "nameLocation": "891:15:6", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 708, "mutability": "constant", "name": "_NOT_ENTERED", "nameLocation": "1686:12:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1661:41:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 706, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1661:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "31", "id": 707, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1701:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "visibility": "private" }, { "constant": true, "id": 711, "mutability": "constant", "name": "_ENTERED", "nameLocation": "1733:8:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1708:37:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 709, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1708:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "32", "id": 710, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1744:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "visibility": "private" }, { "constant": false, "id": 713, "mutability": "mutable", "name": "_status", "nameLocation": "1768:7:6", "nodeType": "VariableDeclaration", "scope": 742, "src": "1752:23:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 712, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1752:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "body": { "id": 720, "nodeType": "Block", "src": "1796:39:6", "statements": [ { "expression": { "id": 718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 716, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "1806:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 717, "name": "_NOT_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 708, "src": "1816:12:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1806:22:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 719, "nodeType": "ExpressionStatement", "src": "1806:22:6" } ] }, "id": 721, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 714, "nodeType": "ParameterList", "parameters": [], "src": "1793:2:6" }, "returnParameters": { "id": 715, "nodeType": "ParameterList", "parameters": [], "src": "1796:0:6" }, "scope": 742, "src": "1782:53:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 740, "nodeType": "Block", "src": "2236:421:6", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 727, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 725, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2325:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "id": 726, "name": "_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 711, "src": "2336:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2325:19:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", "id": 728, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2346:33:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" }, "value": "ReentrancyGuard: reentrant call" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" } ], "id": 724, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2317:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2317:63:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 730, "nodeType": "ExpressionStatement", "src": "2317:63:6" }, { "expression": { "id": 733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 731, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2455:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 732, "name": "_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 711, "src": "2465:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2455:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 734, "nodeType": "ExpressionStatement", "src": "2455:18:6" }, { "id": 735, "nodeType": "PlaceholderStatement", "src": "2484:1:6" }, { "expression": { "id": 738, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 736, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 713, "src": "2628:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 737, "name": "_NOT_ENTERED", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 708, "src": "2638:12:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2628:22:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 739, "nodeType": "ExpressionStatement", "src": "2628:22:6" } ] }, "documentation": { "id": 722, "nodeType": "StructuredDocumentation", "src": "1841:366:6", "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and making it call a\n `private` function that does the actual work." }, "id": 741, "name": "nonReentrant", "nameLocation": "2221:12:6", "nodeType": "ModifierDefinition", "parameters": { "id": 723, "nodeType": "ParameterList", "parameters": [], "src": "2233:2:6" }, "src": "2212:445:6", "virtual": false, "visibility": "internal" } ], "scope": 743, "src": "873:1786:6", "usedErrors": [] } ], "src": "97:2563:6" }, "compiler": { "name": "solc", "version": "0.8.11+commit.d7f03943.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.4", "updatedAt": "2022-03-06T23:47:10.980Z", "devdoc": { "details": "Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].", "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }