Skip to content

Commit

Permalink
add reentrancy guard
Browse files Browse the repository at this point in the history
  • Loading branch information
0xble committed Feb 21, 2024
1 parent 8b67ebb commit b75021e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/distribution/PushDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import { IERC20 } from "../tokens/IERC20.sol";
import { LibSafeCast } from "../utils/LibSafeCast.sol";
import { LibERC20Compat } from "./../utils/LibERC20Compat.sol";
import { LibAddress } from "./../utils/LibAddress.sol";
import { ReentrancyGuard } from "openzeppelin/contracts/security/ReentrancyGuard.sol";

contract PushDistributor {
contract PushDistributor is ReentrancyGuard {
event Distributed(Party party, IERC20 token, address[] members, uint256 amount);

error NotEnoughETH(uint256 expectedAmount, uint256 receivedAmount);
Expand All @@ -29,7 +30,7 @@ contract PushDistributor {
address[] memory members,
uint256 amount,
uint256 proposalId
) external payable {
) external payable nonReentrant {
Party party = Party(payable(msg.sender));
if (token == ETH_ADDRESS && msg.value < amount) revert NotEnoughETH(amount, msg.value);

Expand Down

0 comments on commit b75021e

Please sign in to comment.