-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated script to deploy preminter to now deploy the proxy (#189)
* Extracted common deployment tasks to reusable helper functions * Added script to upgrade preminter
- Loading branch information
Showing
7 changed files
with
136 additions
and
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"CONTRACT_1155_IMPL": "0xe349c0e2C91DE151F7Fc469BF9c39F8A05EF59D2", | ||
"CONTRACT_1155_IMPL": "0x324bA85dAE97331D8256D96D7e45BdC4688f665C", | ||
"CONTRACT_1155_IMPL_VERSION": "1.4.0", | ||
"FACTORY_IMPL": "0x93B2BCa3b7734370BB5bdcaB5Ef83b8E995cb9e0", | ||
"FACTORY_PROXY": "0x368d9Fa8Fe07652a73E91986A7Eee2436D218739", | ||
"FACTORY_IMPL": "0xd360c892c69A70F900352d142e78A9C0a59544c5", | ||
"FACTORY_PROXY": "0x415015A8d73582DF01d83CFa16D11b6c7aD8AF24", | ||
"FIXED_PRICE_SALE_STRATEGY": "0xd81351363b7d80b06E4Ec4De7989f0f91e41A846", | ||
"MERKLE_MINT_SALE_STRATEGY": "0x2c4457D38A329526063b26a2bB2C31B61553Aa98", | ||
"PREMINTER": "0x9D0162AC5ff579670f9b941db7eb7675667883B5", | ||
"PREMINTER": "0xcb81DbF6DB4526fe2Cdf59Bd8a2Ef627899B9Ef2", | ||
"REDEEM_MINTER_FACTORY": "0x27817bAef1341De9Ad04097Bbba4Ea8dA32c8552", | ||
"timestamp": 1692386956, | ||
"commit": "d077c85" | ||
"timestamp": 1694716506, | ||
"commit": "b197446" | ||
} |
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 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,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
|
||
import "forge-std/Script.sol"; | ||
import "forge-std/console2.sol"; | ||
|
||
import {ZoraDeployerBase} from "./ZoraDeployerBase.sol"; | ||
import {ChainConfig, Deployment} from "../src/deployment/DeploymentConfig.sol"; | ||
|
||
contract DeployNewPreminterAndFactoryProxy is ZoraDeployerBase { | ||
function run() public returns (string memory) { | ||
Deployment memory deployment = getDeployment(); | ||
|
||
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); | ||
address deployer = vm.envAddress("DEPLOYER"); | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
deployNew1155AndFactoryProxy(deployment, deployer); | ||
|
||
deployNewPreminterProxy(deployment); | ||
|
||
vm.stopBroadcast(); | ||
|
||
return getDeploymentJSON(deployment); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
|
||
import "forge-std/Script.sol"; | ||
import "forge-std/console2.sol"; | ||
|
||
import {ZoraDeployerBase} from "./ZoraDeployerBase.sol"; | ||
import {ChainConfig, Deployment} from "../src/deployment/DeploymentConfig.sol"; | ||
import {UUPSUpgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol"; | ||
|
||
contract UpgradePreminter is ZoraDeployerBase { | ||
function run() public returns (string memory, bytes memory upgradeCalldata, address upgradeTarget) { | ||
Deployment memory deployment = getDeployment(); | ||
|
||
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
address preminterImplementation = deployNewPreminterImplementation(deployment); | ||
|
||
vm.stopBroadcast(); | ||
|
||
upgradeCalldata = abi.encodeWithSelector(UUPSUpgradeable.upgradeTo.selector, preminterImplementation); | ||
|
||
upgradeTarget = deployment.preminter; | ||
|
||
console2.log("Upgrade PremintExecutor target and implementatin:", upgradeTarget, preminterImplementation); | ||
console2.log("To upgrade, use this calldata:"); | ||
console2.logBytes(upgradeCalldata); | ||
|
||
return (getDeploymentJSON(deployment), upgradeCalldata, upgradeTarget); | ||
} | ||
} |
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 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