Skip to content

Commit

Permalink
replace burn call, which doesn't exist on L2s
Browse files Browse the repository at this point in the history
  • Loading branch information
EdNoepel committed Jan 16, 2024
1 parent 2d6bbcb commit 4c6e54f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/base/Pool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ abstract contract Pool is Clone, ReentrancyGuard, Multicall, IPool {
uint256 internal constant QUOTE_ADDRESS = 41;
/// @dev Immutable quote token scale arg offset.
uint256 internal constant QUOTE_SCALE = 61;
/// @dev Address used to burn AJNA tokens
address internal constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;

This comment has been minimized.

Copy link
@poolpitako

poolpitako Jan 16, 2024

why don't you do zero address?
it will integrate automagically with trackers instead of them needing to add a custom burn address

This comment has been minimized.

Copy link
@EdNoepel

EdNoepel Jan 16, 2024

Author Contributor

/***********************/
/*** State Variables ***/
Expand Down Expand Up @@ -433,9 +435,7 @@ abstract contract Pool is Clone, ReentrancyGuard, Multicall, IPool {
);

// burn required number of ajna tokens to take quote from reserves
IERC20(_getArgAddress(AJNA_ADDRESS)).safeTransferFrom(msg.sender, address(this), ajnaRequired);

IERC20Token(_getArgAddress(AJNA_ADDRESS)).burn(ajnaRequired);
IERC20(_getArgAddress(AJNA_ADDRESS)).safeTransferFrom(msg.sender, BURN_ADDRESS, ajnaRequired);

// transfer quote token to caller
_transferQuoteToken(msg.sender, amount_);
Expand Down

0 comments on commit 4c6e54f

Please sign in to comment.