ReentrancyAttack.sol 381 B

123456789101112
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity >=0.6.0 <0.8.0;
  3. import "../GSN/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. }