Skip to content

Commit aa18184

Browse files
Update sponsoring upgrade script
1 parent 4887939 commit aa18184

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/sponsoring/1_add-modules-to-proxy.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { BigNumber } from '@ethersproject/bignumber';
22
import { BytesLike } from '@ethersproject/bytes';
3+
import { time } from '@nomicfoundation/hardhat-network-helpers';
34
import hre, { ethers } from 'hardhat';
45
import CONFIG from '../../config/config.json';
56
import {
@@ -83,22 +84,20 @@ export async function addModulesToProxy() {
8384
0,
8485
);
8586
console.log(`Expected Timelock proposer: ${timelockAdminAddress}`);
87+
/*
88+
// Enable this in production
8689
const [proposer] = await ethers.getSigners();
8790
console.log(`Actual Timelock proposer: ${proposer.address}`);
8891
if (proposer.address != timelockAdminAddress) {
8992
console.error('Bad proposer');
9093
process.exit(1);
9194
}
92-
const timelockAdminSigner =
93-
//await ethers.getImpersonatedSigner(timelockAdminAddress);
94-
proposer;
95-
/*
95+
*/
96+
const timelockAdminSigner = await ethers.getImpersonatedSigner(timelockAdminAddress);
97+
//const timelockAdminSigner = proposer; // Enable this in production
9698
await scheduleUpgrade();
97-
console.log('Upgrade is proposed, stopping now.');
98-
process.exit(0);
99-
await time.increase(delay);
99+
await time.increase(delay); // Disable this in production
100100
console.log('Time traveling..');
101-
*/
102101
await executeUpgrade();
103102

104103
return erc1538ProxyAddress;

0 commit comments

Comments
 (0)