-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
StefanIliev545
committed
Dec 15, 2023
1 parent
b528fcb
commit 00f1016
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
contracts/deployment_scripts/testnet/recoverfunds/002_change_admin.ts
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 @@ | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
|
||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const {deployer} = await hre.getNamedAccounts(); | ||
const ethers = hre.ethers; | ||
const proxyAdmin =await ethers.getContractAt('IDefaultProxyAdmin', '0xFFa0feA0cb522f3d0CE644B9a111215ACbEb061B', await ethers.getSigner(deployer)) | ||
const tx = await proxyAdmin.changeProxyAdmin('0xEde0fC70C4B67916B8d2037dE24cD18BF26e5069', '0xeA052c9635F1647A8a199c2315B9A66ce7d1e2a7') | ||
const receipt = await tx.wait(); | ||
if (receipt.status != 1) { | ||
console.error('Unable to change proxy admin'); | ||
throw Error('Failed: unable to change admin'); | ||
} | ||
}; | ||
|
||
export default func; | ||
// No dependencies |
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,7 @@ | ||
// SPDX-License-Identifier: Apache 2 | ||
pragma solidity ^0.8.0; | ||
|
||
|
||
interface IDefaultProxyAdmin { | ||
function changeProxyAdmin(address proxy, address newAdmin) external; | ||
} |