-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Burn using 0xdead to enable taking reserves on L2s #1058
Changes from 3 commits
4c6e54f
69cdc4b
9576661
7f50616
97fdf9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
/***********************/ | ||
/*** State Variables ***/ | ||
|
@@ -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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hey kirill, do we need to concern about non-standard bridged token? or this can be note to deployer to run integration test before deploying it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since AJNA token is already circulating, it should be quite easy to test all success paths on a live L2 deployment with bridged quote, collateral and bwAJNA tokens There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran on Base yesterday, and Arbitrum, Optimism, and Polygon PoS today. Renamed variables to be less Base-specific, even though token address is hardcoded in the test. |
||
IERC20(_getArgAddress(AJNA_ADDRESS)).safeTransferFrom(msg.sender, BURN_ADDRESS, ajnaRequired); | ||
|
||
// transfer quote token to caller | ||
_transferQuoteToken(msg.sender, amount_); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't being used anywhere. Had it commented-out in my env file for many months.