Skip to content

Commit

Permalink
added a test contract deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Nov 21, 2023
1 parent cbbb619 commit 8c57238
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/protocol-deployments/script/DeployTestContracts.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "forge-std/Script.sol";
import "forge-std/console2.sol";

import {ZoraDeployerBase} from "../src/ZoraDeployerBase.sol";
import {Deployment} from "../src/DeploymentConfig.sol";
import {ZoraDeployerUtils} from "../src/ZoraDeployerUtils.sol";
import {IZoraCreator1155PremintExecutor} from "@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155PremintExecutor.sol";

contract DeployTestContracts is ZoraDeployerBase {
function run() public returns (string memory) {
Deployment memory deployment = getDeployment();

vm.startBroadcast();

ZoraDeployerUtils.deployTestContractForVerification(deployment.factoryProxy, makeAddr("admin"));

address fundsRecipient = vm.envAddress("DEPLOYER");
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
mintRecipient: fundsRecipient,
mintComment: "",
mintReferral: fundsRecipient
});

signAndExecutePremintV2(deployment.preminterProxy, fundsRecipient, mintArguments);

vm.stopBroadcast();

// now test signing and executing premint

return getDeploymentJSON(deployment);
}
}

0 comments on commit 8c57238

Please sign in to comment.