Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Sep 29, 2023
1 parent 37d801a commit 15f7a82
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion script/DeployAllToNewChain.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ contract DeployAllToNewChain is ZoraDeployerBase, DeterministicDeployerScript {
chain: chain
});

deployTestContractForVerification(factoryProxyAddress, makeAddr("admin"));
ZoraDeployerUtils.deployTestContractForVerification(factoryProxyAddress, makeAddr("admin"));

address preminterImpl = ZoraDeployerUtils.deployNewPreminterImplementationDeterminstic(address(factoryProxyAddress));

Expand Down
22 changes: 22 additions & 0 deletions src/deployment/ZoraDeployerUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,26 @@ library ZoraDeployerUtils {
proxyDeployerAddress
);
}

/// @notice Deploy a test contract for etherscan auto-verification
/// @param factoryProxy Factory address to use
/// @param admin Admin owner address to use
function deployTestContractForVerification(address factoryProxy, address admin) internal {
bytes[] memory initUpdate = new bytes[](1);
initUpdate[0] = abi.encodeWithSelector(
ZoraCreator1155Impl.setupNewToken.selector,
"ipfs://bafkreigu544g6wjvqcysurpzy5pcskbt45a5f33m6wgythpgb3rfqi3lzi",
100
);
address newContract = address(
IZoraCreator1155Factory(factoryProxy).createContract(
"ipfs://bafybeicgolwqpozsc7iwgytavete56a2nnytzix2nb2rxefdvbtwwtnnoe/metadata",
unicode"🪄",
ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: 0, royaltyRecipient: address(0), royaltyMintSchedule: 0}),
payable(admin),
initUpdate
)
);
console2.log("Deployed new contract for verification purposes", newContract);
}
}

0 comments on commit 15f7a82

Please sign in to comment.