-
Notifications
You must be signed in to change notification settings - Fork 2
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
557c7da
commit 1466317
Showing
3 changed files
with
61 additions
and
58 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
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,34 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
/** | ||
* @title IEncryptedERC20Wrapped/ | ||
* @notice Interface that defines events, errors, and structs for | ||
* contrats that wrap native asset or ERC20 tokens. | ||
*/ | ||
interface IEncryptedERC20Wrapped { | ||
/// @notice Returned if the amount is greater than 2**64. | ||
error AmountTooHigh(); | ||
|
||
/// @notice Returned if user cannot transfer or mint. | ||
error CannotTransferOrUnwrap(); | ||
|
||
/// @notice Emitted when token is unwrapped. | ||
event Unwrap(address indexed to, uint64 amount); | ||
|
||
/// @notice Emitted if unwrap fails. | ||
event UnwrapFail(address account, uint64 amount); | ||
|
||
/// @notice Emitted when token is wrapped. | ||
event Wrap(address indexed to, uint64 amount); | ||
|
||
/** | ||
* @notice Keeps track of unwrap information. | ||
* @param account Account that initiates the unwrap request. | ||
* @param amount Amount to be unwrapped. | ||
*/ | ||
struct UnwrapRequest { | ||
address account; | ||
uint64 amount; | ||
} | ||
} |