-
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.
feat: globalAdmin is authorized upgrader (#69)
- Loading branch information
1 parent
587b5a5
commit b125aac
Showing
6 changed files
with
70 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity 0.8.7; | ||
|
||
import { User as ProxyUser } from "../../modules/maple-proxy-factory/contracts/test/accounts/User.sol"; | ||
|
||
import { IDebtLocker, IMapleProxied } from "../../contracts/interfaces/IDebtLocker.sol"; | ||
|
||
contract GlobalAdmin is ProxyUser { | ||
|
||
/************************/ | ||
/*** Direct Functions ***/ | ||
/************************/ | ||
|
||
function debtLocker_upgrade(address debtLocker_, uint256 toVersion_, bytes memory arguments_) external { | ||
IDebtLocker(debtLocker_).upgrade(toVersion_, arguments_); | ||
} | ||
|
||
/*********************/ | ||
/*** Try Functions ***/ | ||
/*********************/ | ||
|
||
function try_debtLocker_upgrade(address debtLocker_, uint256 toVersion_, bytes memory arguments_) external returns (bool ok_) { | ||
( ok_, ) = debtLocker_.call(abi.encodeWithSelector(IMapleProxied.upgrade.selector, toVersion_, arguments_)); | ||
} | ||
|
||
} |
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