Skip to content

Commit 7473872

Browse files
authored
Make ERC4626 _deposit and _withdraw internal virtual (#3504)
1 parent 450c569 commit 7473872

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

contracts/token/ERC20/extensions/ERC4626.sol

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

0 commit comments

Comments
 (0)