forked from scroll-tech/canvas-contracts
-
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.
feat(contracts): add IScrollBadgeUpgradeable
- Loading branch information
1 parent
1782b72
commit 41cc7da
Showing
3 changed files
with
37 additions
and
5 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,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.19; | ||
|
||
/// @title IScrollBadgeUpgradeable | ||
/// @notice This interface defines functions to facilitate badge upgrades. | ||
interface IScrollBadgeUpgradeable { | ||
/// @notice Checks if a badge can be upgraded. | ||
/// @param uid The unique identifier of the badge. | ||
/// @return True if the badge can be upgraded, false otherwise. | ||
function canUpgrade(bytes32 uid) external view returns (bool); | ||
|
||
/// @notice Upgrades a badge. | ||
/// @param uid The unique identifier of the badge. | ||
/// @dev Should revert with CannotUpgrade (from Errors.sol) if the badge cannot be upgraded. | ||
/// @dev Should emit an Upgrade event (custom defined) if the upgrade is successful. | ||
function upgrade(bytes32 uid) external; | ||
} |