{ "contractName": "ReentrancyGuard", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"DODO Breeder\",\"methods\":{},\"title\":\"ReentrancyGuard\"},\"userdoc\":{\"methods\":{},\"notice\":\"Protect functions from Reentrancy Attack\"}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol\":{\"keccak256\":\"0xc9c3fc946350fd72083a9d5b1327ff923533ef37b054bc7b6007562b20b0faaf\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://fc140417457139fb240427629673bfaf970c5d4568ad1cfe582764c6e4855bbb\",\"dweb:/ipfs/Qmd7ESYe5kyM6NYiSzeFE74f1YGGPXzpdVd5qnYg2AvgH8\"]}},\"version\":1}", "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212209469d56347db7a53cb85062c49206c7bbc51a24fa41c5e625c5289740992784964736f6c63430006090033", "deployedBytecode": "0x6080604052600080fdfea26469706673582212209469d56347db7a53cb85062c49206c7bbc51a24fa41c5e625c5289740992784964736f6c63430006090033", "immutableReferences": {}, "sourceMap": "249:362:39:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "249:362:39:-:0;;;;;", "source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\n/**\n * @title ReentrancyGuard\n * @author DODO Breeder\n *\n * @notice Protect functions from Reentrancy Attack\n */\ncontract ReentrancyGuard {\n // https://solidity.readthedocs.io/en/latest/control-structures.html?highlight=zero-state#scoping-and-declarations\n // zero-state of _ENTERED_ is false\n bool private _ENTERED_;\n\n modifier preventReentrant() {\n require(!_ENTERED_, \"REENTRANT\");\n _ENTERED_ = true;\n _;\n _ENTERED_ = false;\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol", "exportedSymbols": { "ReentrancyGuard": [ 11296 ] }, "id": 11297, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 11273, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:39" }, { "id": 11274, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:39" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 11275, "nodeType": "StructuredDocumentation", "src": "136:112:39", "text": " @title ReentrancyGuard\n @author DODO Breeder\n @notice Protect functions from Reentrancy Attack" }, "fullyImplemented": true, "id": 11296, "linearizedBaseContracts": [ 11296 ], "name": "ReentrancyGuard", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11277, "mutability": "mutable", "name": "_ENTERED_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 11296, "src": "439:22:39", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 11276, "name": "bool", "nodeType": "ElementaryTypeName", "src": "439:4:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "private" }, { "body": { "id": 11294, "nodeType": "Block", "src": "496:113:39", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "514:10:39", "subExpression": { "argumentTypes": null, "id": 11280, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "515:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "5245454e5452414e54", "id": 11282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "526:11:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_40d1ed539991cf8f0c0e2cf9c325da6c7b687870b5825a46b3a1bc60970fec73", "typeString": "literal_string \"REENTRANT\"" }, "value": "REENTRANT" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_40d1ed539991cf8f0c0e2cf9c325da6c7b687870b5825a46b3a1bc60970fec73", "typeString": "literal_string \"REENTRANT\"" } ], "id": 11279, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "506:7:39", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 11283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "506:32:39", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11284, "nodeType": "ExpressionStatement", "src": "506:32:39" }, { "expression": { "argumentTypes": null, "id": 11287, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11285, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "548:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 11286, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "560:4:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "548:16:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 11288, "nodeType": "ExpressionStatement", "src": "548:16:39" }, { "id": 11289, "nodeType": "PlaceholderStatement", "src": "574:1:39" }, { "expression": { "argumentTypes": null, "id": 11292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11290, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "585:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 11291, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "597:5:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "585:17:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 11293, "nodeType": "ExpressionStatement", "src": "585:17:39" } ] }, "documentation": null, "id": 11295, "name": "preventReentrant", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 11278, "nodeType": "ParameterList", "parameters": [], "src": "493:2:39" }, "src": "468:141:39", "virtual": false, "visibility": "internal" } ], "scope": 11297, "src": "249:362:39" } ], "src": "78:534:39" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol", "exportedSymbols": { "ReentrancyGuard": [ 11296 ] }, "id": 11297, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 11273, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:39" }, { "id": 11274, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:39" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 11275, "nodeType": "StructuredDocumentation", "src": "136:112:39", "text": " @title ReentrancyGuard\n @author DODO Breeder\n @notice Protect functions from Reentrancy Attack" }, "fullyImplemented": true, "id": 11296, "linearizedBaseContracts": [ 11296 ], "name": "ReentrancyGuard", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11277, "mutability": "mutable", "name": "_ENTERED_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 11296, "src": "439:22:39", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 11276, "name": "bool", "nodeType": "ElementaryTypeName", "src": "439:4:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "private" }, { "body": { "id": 11294, "nodeType": "Block", "src": "496:113:39", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "514:10:39", "subExpression": { "argumentTypes": null, "id": 11280, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "515:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "5245454e5452414e54", "id": 11282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "526:11:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_40d1ed539991cf8f0c0e2cf9c325da6c7b687870b5825a46b3a1bc60970fec73", "typeString": "literal_string \"REENTRANT\"" }, "value": "REENTRANT" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_40d1ed539991cf8f0c0e2cf9c325da6c7b687870b5825a46b3a1bc60970fec73", "typeString": "literal_string \"REENTRANT\"" } ], "id": 11279, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "506:7:39", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 11283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "506:32:39", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11284, "nodeType": "ExpressionStatement", "src": "506:32:39" }, { "expression": { "argumentTypes": null, "id": 11287, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11285, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "548:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 11286, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "560:4:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "548:16:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 11288, "nodeType": "ExpressionStatement", "src": "548:16:39" }, { "id": 11289, "nodeType": "PlaceholderStatement", "src": "574:1:39" }, { "expression": { "argumentTypes": null, "id": 11292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11290, "name": "_ENTERED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11277, "src": "585:9:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 11291, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "597:5:39", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "585:17:39", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 11293, "nodeType": "ExpressionStatement", "src": "585:17:39" } ] }, "documentation": null, "id": 11295, "name": "preventReentrant", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 11278, "nodeType": "ParameterList", "parameters": [], "src": "493:2:39" }, "src": "468:141:39", "virtual": false, "visibility": "internal" } ], "scope": 11297, "src": "249:362:39" } ], "src": "78:534:39" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.723Z", "devdoc": { "author": "DODO Breeder", "methods": {}, "title": "ReentrancyGuard" }, "userdoc": { "methods": {}, "notice": "Protect functions from Reentrancy Attack" } }