{
  "contractName": "ReentrancyGuard",
  "abi": [
    {
      "inputs": [],
      "name": "Reentrancy",
      "type": "error"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"Reentrancy\",\"type\":\"error\"}],\"devdoc\":{\"author\":\"Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/ReentrancyGuard.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Gas-optimized reentrancy protection for smart contracts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/ReentrancyGuard.sol\":{\"keccak256\":\"0x6a42732aa0a681892f66e5f7b3b3075444378bf937c8e93661df5e7443c5c3dc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://778a2ee1360d2ace549ac0f283ccf3f7279bdff8876fdc037c4bcad012652717\",\"dweb:/ipfs/QmTrnghLT57Y3jD9yNR3fycronEc9nVuYEjzxnYtJpjX1F\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas-optimized reentrancy protection for smart contracts.\n/// @author Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/ReentrancyGuard.sol)\nabstract contract ReentrancyGuard {\n    error Reentrancy();\n\n    uint256 private locked = 1;\n\n    modifier nonReentrant() virtual {\n        if (locked == 2) revert Reentrancy();\n\n        locked = 2;\n\n        _;\n\n        locked = 1;\n    }\n}\n",
  "sourcePath": "/home/ensh/dapp/truffle/contracts/ReentrancyGuard.sol",
  "ast": {
    "absolutePath": "project:/contracts/ReentrancyGuard.sol",
    "exportedSymbols": {
      "ReentrancyGuard": [
        7830
      ]
    },
    "id": 7831,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 7804,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "32:23:4"
      },
      {
        "abstract": true,
        "baseContracts": [],
        "canonicalName": "ReentrancyGuard",
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 7805,
          "nodeType": "StructuredDocumentation",
          "src": "57:166:4",
          "text": "@notice Gas-optimized reentrancy protection for smart contracts.\n @author Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/ReentrancyGuard.sol)"
        },
        "fullyImplemented": true,
        "id": 7830,
        "linearizedBaseContracts": [
          7830
        ],
        "name": "ReentrancyGuard",
        "nameLocation": "241:15:4",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "errorSelector": "ab143c06",
            "id": 7807,
            "name": "Reentrancy",
            "nameLocation": "269:10:4",
            "nodeType": "ErrorDefinition",
            "parameters": {
              "id": 7806,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "279:2:4"
            },
            "src": "263:19:4"
          },
          {
            "constant": false,
            "id": 7810,
            "mutability": "mutable",
            "name": "locked",
            "nameLocation": "304:6:4",
            "nodeType": "VariableDeclaration",
            "scope": 7830,
            "src": "288:26:4",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 7808,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "288:7:4",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "31",
              "id": 7809,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "313:1:4",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1_by_1",
                "typeString": "int_const 1"
              },
              "value": "1"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 7828,
              "nodeType": "Block",
              "src": "353:107:4",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7814,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7812,
                      "name": "locked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7810,
                      "src": "367:6:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "32",
                      "id": 7813,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "377:1:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_2_by_1",
                        "typeString": "int_const 2"
                      },
                      "value": "2"
                    },
                    "src": "367:11:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 7818,
                  "nodeType": "IfStatement",
                  "src": "363:36:4",
                  "trueBody": {
                    "errorCall": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "id": 7815,
                        "name": "Reentrancy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7807,
                        "src": "387:10:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$",
                          "typeString": "function () pure returns (error)"
                        }
                      },
                      "id": 7816,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "nameLocations": [],
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "387:12:4",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_error",
                        "typeString": "error"
                      }
                    },
                    "id": 7817,
                    "nodeType": "RevertStatement",
                    "src": "380:19:4"
                  }
                },
                {
                  "expression": {
                    "id": 7821,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 7819,
                      "name": "locked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7810,
                      "src": "410:6:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "32",
                      "id": 7820,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "419:1:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_2_by_1",
                        "typeString": "int_const 2"
                      },
                      "value": "2"
                    },
                    "src": "410:10:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 7822,
                  "nodeType": "ExpressionStatement",
                  "src": "410:10:4"
                },
                {
                  "id": 7823,
                  "nodeType": "PlaceholderStatement",
                  "src": "431:1:4"
                },
                {
                  "expression": {
                    "id": 7826,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 7824,
                      "name": "locked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7810,
                      "src": "443:6:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "31",
                      "id": 7825,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "452:1:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "443:10:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 7827,
                  "nodeType": "ExpressionStatement",
                  "src": "443:10:4"
                }
              ]
            },
            "id": 7829,
            "name": "nonReentrant",
            "nameLocation": "330:12:4",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 7811,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "342:2:4"
            },
            "src": "321:139:4",
            "virtual": true,
            "visibility": "internal"
          }
        ],
        "scope": 7831,
        "src": "223:239:4",
        "usedErrors": [
          7807
        ],
        "usedEvents": []
      }
    ],
    "src": "32:431:4"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.28+commit.7893614a.Linux.g++"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2025-02-12T06:30:13.802Z",
  "devdoc": {
    "author": "Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/ReentrancyGuard.sol)",
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "notice": "Gas-optimized reentrancy protection for smart contracts.",
    "version": 1
  }
}