mirror of https://github.com/certusone/oyster.git
1001 lines
42 KiB
JSON
1001 lines
42 KiB
JSON
{
|
|
"contractName": "ReentrancyGuard",
|
|
"abi": [],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"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/utils/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b95e56c1640d0ef789fc5c16269e141e992f6c8ac97cc6d377bd3825e9cab182\",\"dweb:/ipfs/QmVzaxJZY51EhagrcNnkxoU6Uq17RhATe7aHvtkC6wUkgK\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <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 () internal {\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 make 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/utils/ReentrancyGuard.sol",
|
|
"ast": {
|
|
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
|
|
"exportedSymbols": {
|
|
"ReentrancyGuard": [3658]
|
|
},
|
|
"id": 3659,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 3620,
|
|
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "33:31:10"
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 3621,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "66:750:10",
|
|
"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": 3658,
|
|
"linearizedBaseContracts": [3658],
|
|
"name": "ReentrancyGuard",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 3624,
|
|
"mutability": "constant",
|
|
"name": "_NOT_ENTERED",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"src": "1605:41:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3622,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1605:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 3623,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1645:1:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 3627,
|
|
"mutability": "constant",
|
|
"name": "_ENTERED",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"src": "1652:37:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3625,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1652:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 3626,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1688:1:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 3629,
|
|
"mutability": "mutable",
|
|
"name": "_status",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"src": "1696:23:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 3628,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1696:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3636,
|
|
"nodeType": "Block",
|
|
"src": "1750:39:10",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3634,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3632,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3629,
|
|
"src": "1760:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3633,
|
|
"name": "_NOT_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3624,
|
|
"src": "1770:12:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1760:22:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3635,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1760:22:10"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 3637,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 3630,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1738:2:10"
|
|
},
|
|
"returnParameters": {
|
|
"id": 3631,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1750:0:10"
|
|
},
|
|
"scope": 3658,
|
|
"src": "1726:63:10",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 3656,
|
|
"nodeType": "Block",
|
|
"src": "2188:421:10",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 3643,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3641,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3629,
|
|
"src": "2277:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 3642,
|
|
"name": "_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3627,
|
|
"src": "2288:8:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2277:19:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c",
|
|
"id": 3644,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2298:33:10",
|
|
"subdenomination": null,
|
|
"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": 3640,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [-18, -18],
|
|
"referencedDeclaration": -18,
|
|
"src": "2269:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 3645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2269:63:10",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 3646,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2269:63:10"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3647,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3629,
|
|
"src": "2407:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3648,
|
|
"name": "_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3627,
|
|
"src": "2417:8:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2407:18:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3650,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2407:18:10"
|
|
},
|
|
{
|
|
"id": 3651,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "2436:1:10"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 3654,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3652,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3629,
|
|
"src": "2580:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 3653,
|
|
"name": "_NOT_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3624,
|
|
"src": "2590:12:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2580:22:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 3655,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2580:22:10"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 3638,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1795:364:10",
|
|
"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 make it call a\n `private` function that does the actual work."
|
|
},
|
|
"id": 3657,
|
|
"name": "nonReentrant",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 3639,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2185:2:10"
|
|
},
|
|
"src": "2164:445:10",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 3659,
|
|
"src": "817:1794:10"
|
|
}
|
|
],
|
|
"src": "33:2579:10"
|
|
},
|
|
"legacyAST": {
|
|
"attributes": {
|
|
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
|
|
"exportedSymbols": {
|
|
"ReentrancyGuard": [3658]
|
|
},
|
|
"license": "MIT"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"]
|
|
},
|
|
"id": 3620,
|
|
"name": "PragmaDirective",
|
|
"src": "33:31:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"abstract": true,
|
|
"baseContracts": [null],
|
|
"contractDependencies": [null],
|
|
"contractKind": "contract",
|
|
"fullyImplemented": true,
|
|
"linearizedBaseContracts": [3658],
|
|
"name": "ReentrancyGuard",
|
|
"scope": 3659
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"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]."
|
|
},
|
|
"id": 3621,
|
|
"name": "StructuredDocumentation",
|
|
"src": "66:750:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"constant": true,
|
|
"mutability": "constant",
|
|
"name": "_NOT_ENTERED",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"type": "uint256",
|
|
"visibility": "private"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"name": "uint256",
|
|
"type": "uint256"
|
|
},
|
|
"id": 3622,
|
|
"name": "ElementaryTypeName",
|
|
"src": "1605:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"hexvalue": "31",
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"subdenomination": null,
|
|
"token": "number",
|
|
"type": "int_const 1",
|
|
"value": "1"
|
|
},
|
|
"id": 3623,
|
|
"name": "Literal",
|
|
"src": "1645:1:10"
|
|
}
|
|
],
|
|
"id": 3624,
|
|
"name": "VariableDeclaration",
|
|
"src": "1605:41:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"constant": true,
|
|
"mutability": "constant",
|
|
"name": "_ENTERED",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"type": "uint256",
|
|
"visibility": "private"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"name": "uint256",
|
|
"type": "uint256"
|
|
},
|
|
"id": 3625,
|
|
"name": "ElementaryTypeName",
|
|
"src": "1652:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"hexvalue": "32",
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"subdenomination": null,
|
|
"token": "number",
|
|
"type": "int_const 2",
|
|
"value": "2"
|
|
},
|
|
"id": 3626,
|
|
"name": "Literal",
|
|
"src": "1688:1:10"
|
|
}
|
|
],
|
|
"id": 3627,
|
|
"name": "VariableDeclaration",
|
|
"src": "1652:37:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"constant": false,
|
|
"mutability": "mutable",
|
|
"name": "_status",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"type": "uint256",
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"name": "uint256",
|
|
"type": "uint256"
|
|
},
|
|
"id": 3628,
|
|
"name": "ElementaryTypeName",
|
|
"src": "1696:7:10"
|
|
}
|
|
],
|
|
"id": 3629,
|
|
"name": "VariableDeclaration",
|
|
"src": "1696:23:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"documentation": null,
|
|
"implemented": true,
|
|
"isConstructor": true,
|
|
"kind": "constructor",
|
|
"modifiers": [null],
|
|
"name": "",
|
|
"overrides": null,
|
|
"scope": 3658,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"parameters": [null]
|
|
},
|
|
"children": [],
|
|
"id": 3630,
|
|
"name": "ParameterList",
|
|
"src": "1738:2:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"parameters": [null]
|
|
},
|
|
"children": [],
|
|
"id": 3631,
|
|
"name": "ParameterList",
|
|
"src": "1750:0:10"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"operator": "=",
|
|
"type": "uint256"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3629,
|
|
"type": "uint256",
|
|
"value": "_status"
|
|
},
|
|
"id": 3632,
|
|
"name": "Identifier",
|
|
"src": "1760:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3624,
|
|
"type": "uint256",
|
|
"value": "_NOT_ENTERED"
|
|
},
|
|
"id": 3633,
|
|
"name": "Identifier",
|
|
"src": "1770:12:10"
|
|
}
|
|
],
|
|
"id": 3634,
|
|
"name": "Assignment",
|
|
"src": "1760:22:10"
|
|
}
|
|
],
|
|
"id": 3635,
|
|
"name": "ExpressionStatement",
|
|
"src": "1760:22:10"
|
|
}
|
|
],
|
|
"id": 3636,
|
|
"name": "Block",
|
|
"src": "1750:39:10"
|
|
}
|
|
],
|
|
"id": 3637,
|
|
"name": "FunctionDefinition",
|
|
"src": "1726:63:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"name": "nonReentrant",
|
|
"overrides": null,
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"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 make it call a\n `private` function that does the actual work."
|
|
},
|
|
"id": 3638,
|
|
"name": "StructuredDocumentation",
|
|
"src": "1795:364:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"parameters": [null]
|
|
},
|
|
"children": [],
|
|
"id": 3639,
|
|
"name": "ParameterList",
|
|
"src": "2185:2:10"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"isStructConstructorCall": false,
|
|
"lValueRequested": false,
|
|
"names": [null],
|
|
"tryCall": false,
|
|
"type": "tuple()",
|
|
"type_conversion": false
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
|
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
|
}
|
|
],
|
|
"overloadedDeclarations": [-18, -18],
|
|
"referencedDeclaration": -18,
|
|
"type": "function (bool,string memory) pure",
|
|
"value": "require"
|
|
},
|
|
"id": 3640,
|
|
"name": "Identifier",
|
|
"src": "2269:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"operator": "!=",
|
|
"type": "bool"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3629,
|
|
"type": "uint256",
|
|
"value": "_status"
|
|
},
|
|
"id": 3641,
|
|
"name": "Identifier",
|
|
"src": "2277:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3627,
|
|
"type": "uint256",
|
|
"value": "_ENTERED"
|
|
},
|
|
"id": 3642,
|
|
"name": "Identifier",
|
|
"src": "2288:8:10"
|
|
}
|
|
],
|
|
"id": 3643,
|
|
"name": "BinaryOperation",
|
|
"src": "2277:19:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"hexvalue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c",
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"subdenomination": null,
|
|
"token": "string",
|
|
"type": "literal_string \"ReentrancyGuard: reentrant call\"",
|
|
"value": "ReentrancyGuard: reentrant call"
|
|
},
|
|
"id": 3644,
|
|
"name": "Literal",
|
|
"src": "2298:33:10"
|
|
}
|
|
],
|
|
"id": 3645,
|
|
"name": "FunctionCall",
|
|
"src": "2269:63:10"
|
|
}
|
|
],
|
|
"id": 3646,
|
|
"name": "ExpressionStatement",
|
|
"src": "2269:63:10"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"operator": "=",
|
|
"type": "uint256"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3629,
|
|
"type": "uint256",
|
|
"value": "_status"
|
|
},
|
|
"id": 3647,
|
|
"name": "Identifier",
|
|
"src": "2407:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3627,
|
|
"type": "uint256",
|
|
"value": "_ENTERED"
|
|
},
|
|
"id": 3648,
|
|
"name": "Identifier",
|
|
"src": "2417:8:10"
|
|
}
|
|
],
|
|
"id": 3649,
|
|
"name": "Assignment",
|
|
"src": "2407:18:10"
|
|
}
|
|
],
|
|
"id": 3650,
|
|
"name": "ExpressionStatement",
|
|
"src": "2407:18:10"
|
|
},
|
|
{
|
|
"id": 3651,
|
|
"name": "PlaceholderStatement",
|
|
"src": "2436:1:10"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"operator": "=",
|
|
"type": "uint256"
|
|
},
|
|
"children": [
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3629,
|
|
"type": "uint256",
|
|
"value": "_status"
|
|
},
|
|
"id": 3652,
|
|
"name": "Identifier",
|
|
"src": "2580:7:10"
|
|
},
|
|
{
|
|
"attributes": {
|
|
"argumentTypes": null,
|
|
"overloadedDeclarations": [null],
|
|
"referencedDeclaration": 3624,
|
|
"type": "uint256",
|
|
"value": "_NOT_ENTERED"
|
|
},
|
|
"id": 3653,
|
|
"name": "Identifier",
|
|
"src": "2590:12:10"
|
|
}
|
|
],
|
|
"id": 3654,
|
|
"name": "Assignment",
|
|
"src": "2580:22:10"
|
|
}
|
|
],
|
|
"id": 3655,
|
|
"name": "ExpressionStatement",
|
|
"src": "2580:22:10"
|
|
}
|
|
],
|
|
"id": 3656,
|
|
"name": "Block",
|
|
"src": "2188:421:10"
|
|
}
|
|
],
|
|
"id": 3657,
|
|
"name": "ModifierDefinition",
|
|
"src": "2164:445:10"
|
|
}
|
|
],
|
|
"id": 3658,
|
|
"name": "ContractDefinition",
|
|
"src": "817:1794:10"
|
|
}
|
|
],
|
|
"id": 3659,
|
|
"name": "SourceUnit",
|
|
"src": "33:2579:10"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.3.4",
|
|
"updatedAt": "2021-04-12T21:53:29.930Z",
|
|
"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
|
|
}
|
|
}
|