-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge pacaya_fork branch, update resolvers
- Loading branch information
Showing
44 changed files
with
398 additions
and
298 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
packages/nfts/script/trailblazers-season-2/UpgradeRecruitmentsV2.s.sol
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,38 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.24; | ||
|
||
import { UtilsScript } from "./Utils.s.sol"; | ||
import { Script, console } from "forge-std/src/Script.sol"; | ||
import { BadgeRecruitment } from "../../contracts/trailblazers-season-2/BadgeRecruitment.sol"; | ||
import { BadgeRecruitmentV2 } from "../../contracts/trailblazers-season-2/BadgeRecruitmentV2.sol"; | ||
|
||
contract UpgradeRecruitmentsV2 is Script { | ||
UtilsScript public utils; | ||
string public jsonLocation; | ||
uint256 public deployerPrivateKey; | ||
|
||
address recruitmentAddress = 0xa9Ceb04F3aF71fF123409d426A92BABb5124970C; | ||
BadgeRecruitment public recruitmentV1; | ||
BadgeRecruitmentV2 public recruitmentV2; | ||
|
||
function setUp() public { | ||
utils = new UtilsScript(); | ||
utils.setUp(); | ||
|
||
jsonLocation = utils.getContractJsonLocation(); | ||
deployerPrivateKey = utils.getPrivateKey(); | ||
} | ||
|
||
function run() public { | ||
vm.startBroadcast(deployerPrivateKey); | ||
recruitmentV1 = BadgeRecruitment(recruitmentAddress); | ||
|
||
recruitmentV1.upgradeToAndCall( | ||
address(new BadgeRecruitmentV2()), abi.encodeCall(BadgeRecruitmentV2.version, ()) | ||
); | ||
|
||
recruitmentV2 = BadgeRecruitmentV2(address(recruitmentV1)); | ||
|
||
console.log("Upgraded BadgeRecruitmentV2 to:", address(recruitmentV2)); | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.