-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: use custom errors instead (#56)
* style: use custom errors instead * fix: structured files for custom errors * style: change INITIAL values to upper-case * Update src/Funnel.sol Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com>
- Loading branch information
1 parent
6511328
commit 0c44644
Showing
9 changed files
with
91 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
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
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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
/// @title Shared errors for Funnel Contracts and FunnelFactory | ||
/// @author Zac (zlace0x), zhongfu (zhongfu), Edison (edison0xyz) | ||
interface IFunnelErrors { | ||
/// @dev Invalid address, could be due to zero address | ||
/// @param _input address that caused the error. | ||
error InvalidAddress(address _input); | ||
|
||
/// Error thrown when the token is invalid | ||
error InvalidToken(); | ||
|
||
/// @dev Thrown when attempting to interact with a non-contract. | ||
error NotContractError(); | ||
|
||
/// @dev Error thrown when the permit deadline expires | ||
error PermitExpired(); | ||
} |
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