mirror of
https://github.com/luxfi/uma.git
synced 2026-10-30 15:14:44 +00:00
13 lines
513 B
Solidity
13 lines
513 B
Solidity
// SPDX-License-Identifier: AGPL-3.0-only
|
|
pragma solidity ^0.8.0;
|
|
|
|
// Tests reentrancy guards defined in Lockable.sol.
|
|
// Copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.0.1/contracts/mocks/ReentrancyAttack.sol.
|
|
contract ReentrancyAttack {
|
|
function callSender(bytes4 data) public {
|
|
// solhint-disable-next-line avoid-low-level-calls
|
|
(bool success, ) = msg.sender.call(abi.encodeWithSelector(data));
|
|
require(success, "ReentrancyAttack: failed call");
|
|
}
|
|
}
|