Skip to content

Commit

Permalink
fix: zora 1155 impl var name
Browse files Browse the repository at this point in the history
  • Loading branch information
kulkarohan committed Sep 27, 2023
1 parent e801c7a commit a77c0a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/factory/ZoraCreator1155FactoryImpl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {ContractVersionBase} from "../version/ContractVersionBase.sol";
/// @title ZoraCreator1155FactoryImpl
/// @notice Factory contract for creating new ZoraCreator1155 contracts
contract ZoraCreator1155FactoryImpl is IZoraCreator1155Factory, Ownable2StepUpgradeable, ContractVersionBase, UUPSUpgradeable, IContractMetadata {
IZoraCreator1155 public immutable zora1155impl;
IZoraCreator1155 public immutable zora1155Impl;
IMinter1155 public immutable merkleMinter;
IMinter1155 public immutable fixedPriceMinter;
IMinter1155 public immutable redeemMinterFactory;
Expand All @@ -28,7 +28,7 @@ contract ZoraCreator1155FactoryImpl is IZoraCreator1155Factory, Ownable2StepUpgr
if (address(_zora1155Impl) == address(0)) {
revert Constructor_ImplCannotBeZero();
}
zora1155impl = _zora1155Impl;
zora1155Impl = _zora1155Impl;
merkleMinter = _merkleMinter;
fixedPriceMinter = _fixedPriceMinter;
redeemMinterFactory = _redeemMinterFactory;
Expand Down Expand Up @@ -72,7 +72,7 @@ contract ZoraCreator1155FactoryImpl is IZoraCreator1155Factory, Ownable2StepUpgr
address payable defaultAdmin,
bytes[] calldata setupActions
) external returns (address) {
Zora1155 newContract = new Zora1155(address(zora1155impl));
Zora1155 newContract = new Zora1155(address(zora1155Impl));

_initializeContract(Zora1155(newContract), newContractURI, name, defaultRoyaltyConfiguration, defaultAdmin, setupActions);

Expand All @@ -88,7 +88,7 @@ contract ZoraCreator1155FactoryImpl is IZoraCreator1155Factory, Ownable2StepUpgr
) external returns (address) {
bytes32 digest = _hashContract(msg.sender, newContractURI, name, defaultAdmin);

address createdContract = CREATE3.deploy(digest, abi.encodePacked(type(Zora1155).creationCode, abi.encode(zora1155impl)), 0);
address createdContract = CREATE3.deploy(digest, abi.encodePacked(type(Zora1155).creationCode, abi.encode(zora1155Impl)), 0);

Zora1155 newContract = Zora1155(payable(createdContract));

Expand Down
6 changes: 3 additions & 3 deletions test/factory/ZoraCreator1155Factory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ contract ZoraCreator1155FactoryTest is Test {
ZoraCreator1155FactoryImpl proxy = ZoraCreator1155FactoryImpl(proxyAddress);
vm.prank(initialOwner);
proxy.upgradeTo(address(newFactoryImpl));
assertEq(address(proxy.zora1155impl()), address(mockNewContract));
assertEq(address(proxy.zora1155Impl()), address(mockNewContract));
}

function test_upgradeFailsWithDifferentContractName(address initialOwner) external {
Expand Down Expand Up @@ -212,7 +212,7 @@ contract ZoraCreator1155FactoryTest is Test {
factory.upgradeTo(address(newFactoryImpl));

// sanity check - make sure that the proxy erc1155 implementation is pointing to the new implementation
assertEq(address(factory.zora1155impl()), address(newZoraCreator));
assertEq(address(factory.zora1155Impl()), address(newZoraCreator));

// 3. Create a contract with a deterministic address, it should match the address from before the upgrade
ICreatorRoyaltiesControl.RoyaltyConfiguration memory royaltyConfig = ICreatorRoyaltiesControl.RoyaltyConfiguration({
Expand Down Expand Up @@ -254,7 +254,7 @@ contract ZoraCreator1155FactoryTest is Test {
IZoraCreator1155 newZoraCreator = new ZoraCreator1155Impl(newMintFeeAmount, zora, address(0), address(new ProtocolRewards()));

address[] memory baseImpls = new address[](1);
baseImpls[0] = address(factory.zora1155impl());
baseImpls[0] = address(factory.zora1155Impl());

vm.prank(zora);
upgradeGate.registerUpgradePath(baseImpls, address(newZoraCreator));
Expand Down

0 comments on commit a77c0a6

Please sign in to comment.