Skip to content

feat: v4 gho direct minter#8

Open
DhairyaSethi wants to merge 4 commits into
aave-dao:mainfrom
aave:feat/v4-minter
Open

feat: v4 gho direct minter#8
DhairyaSethi wants to merge 4 commits into
aave-dao:mainfrom
aave:feat/v4-minter

Conversation

@DhairyaSethi

Copy link
Copy Markdown
Member

No description provided.

@DhairyaSethi DhairyaSethi changed the title Feat/v4 minter feat: v4 gho direct minter Feb 27, 2026
Comment thread src/GhoDirectMinterV4.sol
/// @inheritdoc IGhoDirectMinterV4
function withdrawAndBurn(uint256 amount) external onlyOwnerOrGuardian {
HUB.remove(ASSET_ID, amount, address(this));
GHO.burn(amount);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use the withdrawnAmount like in V3 version ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah initially i didn't bc unlike v3 pool, hub.remove doesn't cap input amount and will revert if it's excess. so exactly 'amount' will always be removed

Comment thread src/GhoDirectMinterV4.sol
UpgradeableOwnableWithGuardian
} from "solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
import {Initializable} from "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import {SafeERC20, IERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can rm

minter.withdrawAndBurn(100);
}

function test_transferExcessToTreasury() external {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be a fuzz test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants