-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor: update UpgradeFiatToken script
- Loading branch information
1 parent
56fe8d4
commit 49eb3e7
Showing
2 changed files
with
7 additions
and
4 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 |
---|---|---|
|
@@ -3,14 +3,17 @@ pragma solidity 0.8.20; | |
|
||
import "../v1/FiatTokenV1.sol"; | ||
|
||
error InvalidReInitialization(address addr); | ||
|
||
/// @custom:security-contact [email protected] | ||
contract FiatTokenV2 is FiatTokenV1 { | ||
uint8 internal _initializedVersion; | ||
bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); | ||
|
||
function initializeV2(address burner) external { | ||
// solhint-disable-next-line reason-string | ||
require(_initializedVersion == 0); | ||
if (_initializedVersion > 0) { | ||
revert InvalidReInitialization(msg.sender); | ||
} | ||
|
||
_grantRole(BURNER_ROLE, burner); | ||
|
||
|