Skip to content

Commit

Permalink
chore: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ihoroleksiienko committed Nov 8, 2024
1 parent 323546b commit ba8c192
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
4 changes: 2 additions & 2 deletions scripts/deployProxy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ethers, upgrades } from "hardhat";

async function main() {
const CONTRACT_NAME: string = ""; // TODO: Enter contract name
const TOKEN_ADDRESS: string = ""; // TODO: Enter token contract address
const CONTRACT_NAME: string = ""; // TBD: Enter contract name
const TOKEN_ADDRESS: string = ""; // TBD: Enter token contract address

const factory = await ethers.getContractFactory(CONTRACT_NAME);
const proxy = await upgrades.deployProxy(
Expand Down
13 changes: 6 additions & 7 deletions scripts/prepareUpgrade.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { ethers, upgrades } from "hardhat";

async function main() {
const CONTRACT_NAME: string = ""; // TODO: Enter contract name
const PROXY_ADDRESS: string = ""; // TODO: Enter proxy address

// Upgrade options:
// - unsafeAllowRenames: true
// - unsafeSkipStorageCheck: true
const CONTRACT_NAME: string = ""; // TBD: Enter contract name
const PROXY_ADDRESS: string = ""; // TBD: Enter proxy address

const factory = await ethers.getContractFactory(CONTRACT_NAME);
const response = await upgrades.prepareUpgrade(PROXY_ADDRESS, factory);
const response = await upgrades.prepareUpgrade(PROXY_ADDRESS, factory, {
unsafeAllowRenames: false,
unsafeSkipStorageCheck: false
});

console.log("Upgrade prepared:", response);
}
Expand Down
13 changes: 6 additions & 7 deletions scripts/upgradeProxy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { ethers, upgrades } from "hardhat";

async function main() {
const CONTRACT_NAME: string = ""; // TODO: Enter contract name
const PROXY_ADDRESS: string = ""; // TODO: Enter proxy address

// Upgrade options:
// - unsafeAllowRenames: true
// - unsafeSkipStorageCheck: true
const CONTRACT_NAME: string = ""; // TBD: Enter contract name
const PROXY_ADDRESS: string = ""; // TBD: Enter proxy address

const factory = await ethers.getContractFactory(CONTRACT_NAME);
await upgrades.upgradeProxy(PROXY_ADDRESS, factory);
await upgrades.upgradeProxy(PROXY_ADDRESS, factory, {
unsafeAllowRenames: false,
unsafeSkipStorageCheck: false
});

console.log("Proxy upgraded");
}
Expand Down
13 changes: 6 additions & 7 deletions scripts/validateUpgrade.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { ethers, upgrades } from "hardhat";

async function main() {
const CONTRACT_NAME: string = ""; // TODO: Enter contract name
const PROXY_ADDRESS: string = ""; // TODO: Enter proxy address

// Upgrade options:
// - unsafeAllowRenames: true
// - unsafeSkipStorageCheck: true
const CONTRACT_NAME: string = ""; // TBD: Enter contract name
const PROXY_ADDRESS: string = ""; // TBD: Enter proxy address

const factory = await ethers.getContractFactory(CONTRACT_NAME);
await upgrades.validateUpgrade(PROXY_ADDRESS, factory);
await upgrades.validateUpgrade(PROXY_ADDRESS, factory, {
unsafeAllowRenames: false,
unsafeSkipStorageCheck: false
});

console.log("Successfully validated");
}
Expand Down

0 comments on commit ba8c192

Please sign in to comment.