Skip to content

Commit

Permalink
fix: disable transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedm1 committed Sep 22, 2023
1 parent 9ee30ef commit b2d4390
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions contracts/CollateralTracker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,16 @@ contract CollateralTracker is ERC20Minimal, Multicall {
address recipient,
uint256 amount
) public override(ERC20Minimal) returns (bool) {
// make sure the caller does not have any open option positions
// if they do: we don't want them sending panoptic pool shares to others
// since that's like reducing collateral
// // make sure the caller does not have any open option positions
// // if they do: we don't want them sending panoptic pool shares to others
// // since that's like reducing collateral

if (s_panopticPool.numberOfPositions(msg.sender) != 0) revert Errors.PositionCountNotZero();
// if (s_panopticPool.numberOfPositions(msg.sender) != 0) revert Errors.PositionCountNotZero();

return ERC20Minimal.transfer(recipient, amount);
// return ERC20Minimal.transfer(recipient, amount);

// Transfers are disabled for the gated launch:
revert();
}

/// @dev See {IERC20-transferFrom}.
Expand All @@ -439,13 +442,16 @@ contract CollateralTracker is ERC20Minimal, Multicall {
address to,
uint256 amount
) public override(ERC20Minimal) returns (bool) {
// make sure the caller does not have any open option positions
// if they do: we don't want them sending panoptic pool shares to others
// as this would reduce their amount of collateral against the opened positions
// // make sure the caller does not have any open option positions
// // if they do: we don't want them sending panoptic pool shares to others
// // as this would reduce their amount of collateral against the opened positions

// if (s_panopticPool.numberOfPositions(from) != 0) revert Errors.PositionCountNotZero();

if (s_panopticPool.numberOfPositions(from) != 0) revert Errors.PositionCountNotZero();
// return ERC20Minimal.transferFrom(from, to, amount);

return ERC20Minimal.transferFrom(from, to, amount);
// Transfers are disabled for the gated launch:
revert();
}

/*//////////////////////////////////////////////////////////////
Expand Down

0 comments on commit b2d4390

Please sign in to comment.