Skip to content

Commit

Permalink
add ironblocks modifiers to manageable
Browse files Browse the repository at this point in the history
  • Loading branch information
YouStillAlive committed Sep 20, 2024
1 parent 6c6627b commit bb4380c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions contracts/BNBPartyFee.sol
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ abstract contract BNBPartyFee is BNBPartyState {
function _withdrawLPFees(
address[] calldata liquidityPools,
INonfungiblePositionManager manager
) internal {
) internal firewallProtectedSig(0x5892c0be) {
if (liquidityPools.length == 0) {
revert ZeroLength();
}
Expand All @@ -149,7 +149,7 @@ abstract contract BNBPartyFee is BNBPartyState {
function _collectFee(
address liquidityPool,
INonfungiblePositionManager manager
) internal notZeroAddress(liquidityPool) {
) internal firewallProtectedSig(0xbbd73307) notZeroAddress(liquidityPool) {
manager.collect(
INonfungiblePositionManager.CollectParams({
tokenId: lpToTokenId[liquidityPool],
Expand Down
16 changes: 8 additions & 8 deletions contracts/BNBPartyManageable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract contract BNBPartyManageable is BNBPartyFee, Pausable {
function setNonfungiblePositionManager(
INonfungiblePositionManager _BNBPositionManager,
INonfungiblePositionManager _positionManager
) external onlyOwner {
) external onlyOwner firewallProtected {
if (_BNBPositionManager == BNBPositionManager && _positionManager == positionManager) {
revert PositionManagerAlreadySet();
}
Expand All @@ -27,19 +27,19 @@ abstract contract BNBPartyManageable is BNBPartyFee, Pausable {
/// @dev Reverts if the new swap router is identical to the current one
function setBNBPartySwapRouter(
ISwapRouter _swapRouter
) external onlyOwner swapRouterAlreadySet(_swapRouter, BNBSwapRouter) {
) external onlyOwner firewallProtected swapRouterAlreadySet(_swapRouter, BNBSwapRouter) {
BNBSwapRouter = _swapRouter;
}

function setSwapRouter(
ISwapRouter _swapRouter
) external onlyOwner swapRouterAlreadySet(_swapRouter, swapRouter) {
) external onlyOwner firewallProtected swapRouterAlreadySet(_swapRouter, swapRouter) {
swapRouter = _swapRouter;
}

/// @notice Withdraws the balance of BNB from token creation fees
/// @dev Reverts if the contract balance is zero
function withdrawFee() external onlyOwner {
function withdrawFee() external onlyOwner firewallProtected {
if (address(this).balance > 0) {
emit TransferOutBNB(msg.sender, address(this).balance); // Emits an event indicating the transfer of BNB
payable(msg.sender).transfer(address(this).balance); // Transfers the entire BNB balance to the owner
Expand All @@ -50,23 +50,23 @@ abstract contract BNBPartyManageable is BNBPartyFee, Pausable {
/// @param liquidityPools Array of liquidity pool addresses from which fees will be withdrawn
function withdrawPartyLPFee(
address[] calldata liquidityPools
) external onlyOwner {
) external onlyOwner firewallProtected {
_withdrawLPFees(liquidityPools, BNBPositionManager);
}

/// @notice Withdraws LP fees from Pancakeswap V3 for specified liquidity pools
/// @param liquidityPools Array of liquidity pool addresses from which fees will be withdrawn
function withdrawLPFee(address[] calldata liquidityPools) external onlyOwner {
function withdrawLPFee(address[] calldata liquidityPools) external onlyOwner firewallProtected {
_withdrawLPFees(liquidityPools, positionManager);
}

/// @notice Pauses the contract
function pause() external onlyOwner {
function pause() external onlyOwner firewallProtected {
_pause();
}

/// @notice Unpauses the contract
function unpause() external onlyOwner {
function unpause() external onlyOwner firewallProtected {
_unpause();
}
}

0 comments on commit bb4380c

Please sign in to comment.