Skip to content

Commit

Permalink
add revert on unwanted fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
kneelsdev committed Feb 17, 2024
1 parent 7a83ab1 commit 72dd9c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/DN404/DN404.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ abstract contract DN404 {
/// @dev Thrown when the caller for a fallback NFT function is not the mirror contract.
error SenderNotMirror();

/// @dev Thrown when the fn selector for a fallback NFT function is not recognized.
error FnSelectorNotRecognized();

/// @dev Thrown when attempting to transfer tokens to the zero address.
error TransferToZeroAddress();

Expand Down Expand Up @@ -1026,6 +1029,7 @@ abstract contract DN404 {
if (fnSelector == 0xb7a94eb8) {
_return(1);
}
revert FnSelectorNotRecognized();
_;
}

Expand Down

0 comments on commit 72dd9c3

Please sign in to comment.