mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-27 03:36:32 +00:00
Fix .gitignore: stop tracking ignored files
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "../utils/Address.sol";
|
||||
|
||||
contract TimelockReentrant {
|
||||
address private _reenterTarget;
|
||||
bytes private _reenterData;
|
||||
bool _reentered;
|
||||
|
||||
function disableReentrancy() external {
|
||||
_reentered = true;
|
||||
}
|
||||
|
||||
function enableRentrancy(address target, bytes calldata data) external {
|
||||
_reenterTarget = target;
|
||||
_reenterData = data;
|
||||
}
|
||||
|
||||
function reenter() external {
|
||||
if (!_reentered) {
|
||||
_reentered = true;
|
||||
Address.functionCall(_reenterTarget, _reenterData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user