-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e215c45
commit 0b6cbc7
Showing
2 changed files
with
52 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-License-Identifier: AGPL-3.0 | ||
pragma solidity 0.8.18; | ||
|
||
contract Hooks is DepositHooks, WithdrawHooks, TransferHooks {} | ||
|
||
contract DepositHooks { | ||
function _preDepositHook( | ||
uint256 assets, | ||
uint256 shares, | ||
address receiver | ||
) internal virtual {} | ||
|
||
function _postDepositHook( | ||
uint256 assets, | ||
uint256 shares, | ||
address receiver | ||
) internal virtual {} | ||
} | ||
|
||
contract WithdrawHooks { | ||
function _preWithdrawHook( | ||
uint256 assets, | ||
uint256 shares, | ||
address receiver, | ||
address owner, | ||
uint256 maxLoss | ||
) internal virtual {} | ||
|
||
function _postWithdrawHook( | ||
uint256 assets, | ||
uint256 shares, | ||
address receiver, | ||
address owner, | ||
uint256 maxLoss | ||
) internal virtual {} | ||
} | ||
|
||
contract TransferHooks { | ||
function _preTransferHook( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal virtual {} | ||
|
||
function _postTransferHook( | ||
address from, | ||
address to, | ||
uint256 amount, | ||
bool success | ||
) internal virtual {} | ||
} |