Skip to content

Commit

Permalink
feat: route mint external shares through the VaultHub
Browse files Browse the repository at this point in the history
  • Loading branch information
vp4242 committed Feb 27, 2025
1 parent 0292510 commit 0827f4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/0.8.25/Accounting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ contract Accounting {
);

if (_update.totalVaultsTreasuryFeeShares > 0) {
LIDO.mintShares(LIDO_LOCATOR.treasury(), _update.totalVaultsTreasuryFeeShares);
_contracts.vaultHub.mintExternalSharesForFees(LIDO_LOCATOR.treasury(), _update.totalVaultsTreasuryFeeShares);
}

_notifyRebaseObserver(_contracts.postTokenRebaseReceiver, _report, _pre, _update);
Expand Down
5 changes: 5 additions & 0 deletions contracts/0.8.25/vaults/VaultHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ contract VaultHub is PausableUntilWithRoles {
}
}

function mintExternalSharesForFees(address _recipient, uint256 _amountOfShares) external {
if (msg.sender != ACCOUNTING) revert NotAuthorized("mintExternalSharesForFees", msg.sender);
STETH.mintExternalShares(_recipient, _amountOfShares);
}

function _vaultAuth(address _vault, string memory _operation) internal view {
if (msg.sender != OwnableUpgradeable(_vault).owner()) revert NotAuthorized(_operation, msg.sender);
}
Expand Down

0 comments on commit 0827f4a

Please sign in to comment.