Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Jan 24, 2025
1 parent 6b62f26 commit d0026e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 3 additions & 2 deletions scripts/00_validate_01_BookingTokenRefactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ describe("Upgrade Check", function () {
// is not deployed to mainnet yet and the production usage of the contract is
// minimal.
//
// ----------8<---------- Upgrade Check Running on columbus
// ----------8<----------
// Upgrade Check Running on columbus
// @openzeppelin:upgrades:core manifest file: .openzeppelin/unknown-501.json
// fallback file: .openzeppelin/unknown-501.json +0ms @openzeppelin:upgrades:core
// manifest file: .openzeppelin/unknown-501.json fallback file:
Expand Down Expand Up @@ -91,4 +92,4 @@ describe("Upgrade Check", function () {
// at Proxy.validateUpgrade
// (node_modules/@openzeppelin/hardhat-upgrades/src/validate-upgrade.ts:51:9)
// at Context.<anonymous> (scripts/validate_01_BookingTokenRefactor.js:32:9)
// ---------->8----------
// ---------->8----------
12 changes: 4 additions & 8 deletions scripts/00_validate_01_force_import.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ async function main() {
// Existing BookingToken proxy address on Columbus
const existingAddress = "0xe55E387F5474a012D1b048155E25ea78C7DBfBBC";

// 2. Get the contract factory for your upgradeable version
const ContractV1 = await ethers.getContractFactory("BookingTokenV2");
// Current version of the BookingToken contract
const OldBookingTokenV2 = await ethers.getContractFactory("BookingTokenV2");

// 3. Force import the existing deployment
const result = await upgrades.forceImport(
existingAddress,
ContractV1,
{ kind: "uups" }, // or "transparent" if using Transparent Proxy
);
// Force import the existing deployment from chain using the old BookingTokenV2
const result = await upgrades.forceImport(existingAddress, OldBookingTokenV2, { kind: "uups" });

console.log(result);

Expand Down

0 comments on commit d0026e8

Please sign in to comment.