Skip to content

Commit

Permalink
feat(protocol): allow owner to update recipient in TokenUnlock (#18184)
Browse files Browse the repository at this point in the history
Co-authored-by: David <david@taiko.xyz>
  • Loading branch information
dantaik and davidtaikocha authored Sep 28, 2024
1 parent 02a71dd commit 773ae1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ contract TokenUnlock is EssentialContract {
_;
}

modifier onlyRecipientOrOwner() {
if (msg.sender != recipient && msg.sender != owner()) revert PERMISSION_DENIED();
_;
}

/// @notice Initializes the contract.
/// @param _owner The contract owner address.
/// @param _rollupAddressManager The rollup address manager.
Expand Down Expand Up @@ -151,7 +156,7 @@ contract TokenUnlock is EssentialContract {
IERC20(resolve(LibStrings.B_TAIKO_TOKEN, false)).safeTransfer(recipient, amount);
}

function changeRecipient(address _newRecipient) external onlyRecipient {
function changeRecipient(address _newRecipient) external onlyRecipientOrOwner {
if (_newRecipient == address(0) || _newRecipient == recipient) {
revert INVALID_PARAM();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
},
{
"proxy": "0x2Da30e14dE6a5fcE16a5Ea72199De76cebDC876C",
"recipient": "0x9c0c06ddbb72f70820d7e55b6b77db175d400fba",
"recipient": "0xf7a0cd60e3b6ab4523a5f54e9a410258895b138d",
"vestAmount": 4013867
},
{
Expand Down

0 comments on commit 773ae1b

Please sign in to comment.