Skip to content

Commit b971092

Browse files
Amxxfrangio
authored andcommitted
Make ERC4626 _deposit and _withdraw internal virtual (#3504)
(cherry picked from commit 7473872)
1 parent 4307d74 commit b971092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/token/ERC20/extensions/ERC4626.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
176176
address receiver,
177177
uint256 assets,
178178
uint256 shares
179-
) private {
179+
) internal virtual {
180180
// If _asset is ERC777, `transferFrom` can trigger a reenterancy BEFORE the transfer happens through the
181181
// `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,
182182
// calls the vault, which is assumed not malicious.
@@ -199,7 +199,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
199199
address owner,
200200
uint256 assets,
201201
uint256 shares
202-
) private {
202+
) internal virtual {
203203
if (caller != owner) {
204204
_spendAllowance(owner, caller, shares);
205205
}

0 commit comments

Comments
 (0)