-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathDependencies.sol
22 lines (17 loc) · 876 Bytes
/
Dependencies.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: BSL-1.0 (Boost Software License 1.0)
//-------------------------------------------------------------------------------------//
// Copyright (c) 2022 - 2023 serial-coder: Phuwanai Thummavet ([email protected]) //
//-------------------------------------------------------------------------------------//
// For more info, please refer to my article:
// - On Medium: https://medium.com/valixconsulting/solidity-security-by-example-09-denial-of-service-with-revert-814f55b61e02
// - On serial-coder.com: https://www.serial-coder.com/post/solidity-smart-contract-security-by-example-09-denial-of-service-with-revert/
pragma solidity 0.8.19;
abstract contract ReentrancyGuard {
bool internal locked;
modifier noReentrant() {
require(!locked, "No re-entrancy");
locked = true;
_;
locked = false;
}
}