ReentrancyAttack.sol 375 B

123456789101112
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/Context.sol";
  4. contract ReentrancyAttack is Context {
  5. function callSender(bytes4 data) public {
  6. // solhint-disable-next-line avoid-low-level-calls
  7. (bool success,) = _msgSender().call(abi.encodeWithSelector(data));
  8. require(success, "ReentrancyAttack: failed call");
  9. }
  10. }