diff --git a/script/UpgradeSPGNFT.s.sol b/script/UpgradeSPGNFT.s.sol index f7c57b1..955e292 100644 --- a/script/UpgradeSPGNFT.s.sol +++ b/script/UpgradeSPGNFT.s.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.23; import { console2 } from "forge-std/console2.sol"; import { Script } from "forge-std/Script.sol"; -import { ICreate3Deployer } from "@create3-deployer/contracts/Create3Deployer.sol"; import { UpgradeableBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; @@ -19,9 +18,6 @@ import { JsonDeploymentHandler } from "./utils/JsonDeploymentHandler.s.sol"; contract UpgradeSPGNFT is Script, StoryProtocolPeripheryAddressManager, BroadcastManager, JsonDeploymentHandler { using StringUtil for uint256; - ICreate3Deployer private constant create3Deployer = ICreate3Deployer(0x384a891dFDE8180b054f04D66379f16B7a678Ad6); - uint256 private constant create3SaltSeed = 12; - StoryProtocolGateway private spg; SPGNFT private spgNftImpl; UpgradeableBeacon private spgNftBeacon; @@ -38,7 +34,7 @@ contract UpgradeSPGNFT is Script, StoryProtocolPeripheryAddressManager, Broadcas spgNftBeacon = UpgradeableBeacon(spgNftBeaconAddr); _beginBroadcast(); - _deploySPGNFT(deployer); + _deploySPGNFT(); // Upgrade the collections via multisig (can't do here). // spg.upgradeCollections(address(spgNftImpl)); @@ -47,17 +43,12 @@ contract UpgradeSPGNFT is Script, StoryProtocolPeripheryAddressManager, Broadcas _endBroadcast(); } - function _deploySPGNFT(address accessControlDeployer) private { + function _deploySPGNFT() private { _writeAddress("SPG", address(spg)); _writeAddress("SPGNFTBeacon", address(spgNftBeacon)); _predeploy("SPGNFTImpl"); - spgNftImpl = SPGNFT( - create3Deployer.deploy( - _getSalt(type(SPGNFT).name), - abi.encodePacked(type(SPGNFT).creationCode, abi.encode(address(spg))) - ) - ); + spgNftImpl = new SPGNFT(address(spg)); _postdeploy("SPGNFTImpl", address(spgNftImpl)); } @@ -69,8 +60,4 @@ contract UpgradeSPGNFT is Script, StoryProtocolPeripheryAddressManager, Broadcas _writeAddress(contractKey, newAddress); console2.log(string.concat(contractKey, " deployed to:"), newAddress); } - - function _getSalt(string memory name) private view returns (bytes32 salt) { - salt = keccak256(abi.encode(name, create3SaltSeed)); - } }