Skip to content

Commit

Permalink
Change admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Dec 15, 2023
1 parent b528fcb commit 00f1016
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
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
7 changes: 7 additions & 0 deletions contracts/src/dependencies/IDefaultProxyAdmin.sol
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;
}

0 comments on commit 00f1016

Please sign in to comment.