Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: implement first minter reward on adminMint #207

Merged
merged 10 commits into from
Sep 28, 2023
1 change: 0 additions & 1 deletion chainConfigs/1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xDB392f4391462d60B8B4413ef72018Ab595Af9D0",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/10.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x4c7f7b6067fac9a737ecf2ca1a733fc85dd65a2b",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/11155111.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"FACTORY_OWNER": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
"MINT_FEE_AMOUNT": 111000000000000,
"MINT_FEE_RECIPIENT": "0xE51051a204afb2fC071A2406914cdEA5638e5018"
}
1 change: 0 additions & 1 deletion chainConfigs/420.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xbb45052B2260707655Dfd916a416264f5981192c",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x5dEe21327CD7CD6725C2578DA1c3E5bb2D2D34b2",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
10 changes: 4 additions & 6 deletions chainConfigs/424.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"FACTORY_OWNER": "0x8fbC66d36cceB3Ad69B4d672756da54CcFec1cD2",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}

"FACTORY_OWNER": "0x8fbC66d36cceB3Ad69B4d672756da54CcFec1cD2",
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}
1 change: 0 additions & 1 deletion chainConfigs/5.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xDC498668B5e6CC518fD58A2ADBF614Fd3A13D3a0",
"MINT_FEE_AMOUNT": 10000,
"MINT_FEE_RECIPIENT": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/58008.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"FACTORY_OWNER": "0xfAe426B462f4Bc9857ED28D8473Fb85192f23E9b",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x917D86f1eBD1d9f59Dae1C00e5Af7f8689299EC4"
}
10 changes: 4 additions & 6 deletions chainConfigs/7777777.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"FACTORY_OWNER": "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}

"FACTORY_OWNER": "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955",
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/8453.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x004d6611884B4A661749B64b2ADc78505c3e1AB3",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/84531.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/999.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
6 changes: 3 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
fs_permissions = [{access = "read", path = "./addresses"}, {access = "read", path = "./chainConfigs"}, {access = "read", path = "./package.json"}]
libs = ['_imagine', 'node_modules', 'script']
optimizer = true
optimizer_runs = 150
optimizer_runs = 50
out = 'out'
solc_version = '0.8.17'
src = 'src'
via_ir = true

[profile.optimized]
optimizer = true
optimizer_runs = 150
optimizer_runs = 50
out = 'out'
script = 'src'
solc_version = '0.8.17'
Expand All @@ -19,7 +19,7 @@ test = 'src'
via_ir = true

[profile.fast_compilation]
optimizer_runs = 150
optimizer_runs = 50
solc_version = '0.8.17'

[rpc_endpoints]
Expand Down
1 change: 0 additions & 1 deletion script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ contract DeployScript is ZoraDeployerBase {
Deployment memory deployment;
ChainConfig memory chainConfig = getChainConfig();

console2.log("zoraFeeAmount", chainConfig.mintFeeAmount);
console2.log("zoraFeeRecipient", chainConfig.mintFeeRecipient);
console2.log("factoryOwner", chainConfig.factoryOwner);
console2.log("protocolRewards", chainConfig.protocolRewards);
Expand Down
3 changes: 1 addition & 2 deletions script/TestCreateDeterministic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ contract DeployScript is ZoraDeployerBase {
function run() public {
// ChainConfig memory chainConfig = getChainConfig();

// console2.log("zoraFeeAmount", chainConfig.mintFeeAmount);
// console2.log("zoraFeeRecipient", chainConfig.mintFeeRecipient);
// console2.log("factoryOwner", chainConfig.factoryOwner);

Expand All @@ -43,7 +42,7 @@ contract DeployScript is ZoraDeployerBase {

vm.startBroadcast(deployerPrivateKey);

ZoraCreator1155Impl zoraCreator1155Impl = new ZoraCreator1155Impl(0, address(0), address(0), address(new ProtocolRewards()));
ZoraCreator1155Impl zoraCreator1155Impl = new ZoraCreator1155Impl(address(0), address(0), address(new ProtocolRewards()));
// get above constructor args encoded for verification later:
ZoraCreator1155FactoryImpl factory = new ZoraCreator1155FactoryImpl(
zoraCreator1155Impl,
Expand Down
5 changes: 2 additions & 3 deletions script/Upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ contract UpgradeScript is ZoraDeployerBase {

bool isNewNFTImpl = deployment.contract1155Impl == address(0);
if (isNewNFTImpl) {
console2.log("mintFeeAmount", chainConfig.mintFeeAmount);
console2.log("minFeeRecipient", chainConfig.mintFeeRecipient);
console2.log("mintFeeRecipient", chainConfig.mintFeeRecipient);
console2.log("protocolRewards", chainConfig.protocolRewards);
deployment.contract1155Impl = address(new ZoraCreator1155Impl(chainConfig.mintFeeAmount, chainConfig.mintFeeRecipient, deployment.factoryProxy, chainConfig.protocolRewards));
deployment.contract1155Impl = address(new ZoraCreator1155Impl(chainConfig.mintFeeRecipient, deployment.factoryProxy, chainConfig.protocolRewards));
console2.log("New NFT_IMPL", deployment.contract1155Impl);
} else {
console2.log("Existing NFT_IMPL", deployment.contract1155Impl);
Expand Down
1 change: 0 additions & 1 deletion script/ZoraDeployerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ abstract contract ZoraDeployerBase is ScriptDeploymentConfig {
ChainConfig memory chainConfig = getChainConfig();

ZoraCreator1155Impl creatorImpl = new ZoraCreator1155Impl(
chainConfig.mintFeeAmount,
chainConfig.mintFeeRecipient,
address(factoryProxy),
chainConfig.protocolRewards
Expand Down
4 changes: 0 additions & 4 deletions src/deployment/DeploymentConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {Script} from "forge-std/Script.sol";
struct ChainConfig {
/// @notice The user that owns the factory proxy. Allows ability to upgrade for new implementations deployed.
address factoryOwner;
/// @notice Mint fee amount in WEI charged for each mint
uint256 mintFeeAmount;
/// @notice Mint fee recipient user
address mintFeeRecipient;
/// @notice Protocol rewards contract address
Expand Down Expand Up @@ -50,7 +48,6 @@ abstract contract DeploymentConfig is Script {
///

string constant FACTORY_OWNER = "FACTORY_OWNER";
string constant MINT_FEE_AMOUNT = "MINT_FEE_AMOUNT";
string constant MINT_FEE_RECIPIENT = "MINT_FEE_RECIPIENT";
string constant PROTOCOL_REWARDS = "PROTOCOL_REWARDS";

Expand All @@ -75,7 +72,6 @@ abstract contract DeploymentConfig is Script {
function getChainConfig() internal view returns (ChainConfig memory chainConfig) {
string memory json = vm.readFile(string.concat("chainConfigs/", Strings.toString(chainId()), ".json"));
chainConfig.factoryOwner = json.readAddress(getKeyPrefix(FACTORY_OWNER));
chainConfig.mintFeeAmount = json.readUint(getKeyPrefix(MINT_FEE_AMOUNT));
chainConfig.mintFeeRecipient = json.readAddress(getKeyPrefix(MINT_FEE_RECIPIENT));
chainConfig.protocolRewards = json.readAddress(getKeyPrefix(PROTOCOL_REWARDS));
}
Expand Down
27 changes: 10 additions & 17 deletions src/nft/ZoraCreator1155Impl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ contract ZoraCreator1155Impl is
/// @notice Factory contract
IUpgradeGate internal immutable upgradeGate;

constructor(
uint256, // TODO remove
address _mintFeeRecipient,
address _upgradeGate,
address _protocolRewards
) ERC1155Rewards(_protocolRewards, _mintFeeRecipient) initializer {
constructor(address _mintFeeRecipient, address _upgradeGate, address _protocolRewards) ERC1155Rewards(_protocolRewards, _mintFeeRecipient) initializer {
upgradeGate = IUpgradeGate(_upgradeGate);
}

Expand Down Expand Up @@ -365,15 +360,6 @@ contract ZoraCreator1155Impl is
return config.owner;
}

/// @notice AdminMint that only checks if the requested quantity can be minted and has a re-entrant guard
/// @param recipient recipient for admin minted tokens
/// @param tokenId token id to mint
/// @param quantity quantity to mint
/// @param data callback data as specified by the 1155 spec
function _adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) internal {
_mint(recipient, tokenId, quantity, data);
}

/// @notice Mint a token to a user as the admin or minter
/// @param recipient The recipient of the token
/// @param tokenId The token ID to mint
Expand All @@ -385,8 +371,15 @@ contract ZoraCreator1155Impl is
uint256 quantity,
bytes memory data
) external nonReentrant onlyAdminOrRole(tokenId, PERMISSION_BIT_MINTER) {
// Call internal admin mint
_adminMint(recipient, tokenId, quantity, data);
// If this is the token's first mint:
if (firstMinters[tokenId] == address(0)) {
// Store the recipient address as the first minter
// Note: If the recipient is address(0) the tx will revert in the `_mint` call below
firstMinters[tokenId] = recipient;
}

// Mint the specified tokens
_mint(recipient, tokenId, quantity, data);
oveddan marked this conversation as resolved.
Show resolved Hide resolved
}

/// @notice Batch mint tokens to a user as the admin or minter
Expand Down
8 changes: 3 additions & 5 deletions test/factory/ZoraCreator1155Factory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract ZoraCreator1155FactoryTest is Test {
Zora1155Factory factoryProxy = new Zora1155Factory(factoryShimAddress, "");

ProtocolRewards protocolRewards = new ProtocolRewards();
ZoraCreator1155Impl zoraCreator1155Impl = new ZoraCreator1155Impl(mintFeeAmount, zora, address(upgradeGate), address(protocolRewards));
ZoraCreator1155Impl zoraCreator1155Impl = new ZoraCreator1155Impl(zora, address(upgradeGate), address(protocolRewards));

factoryImpl = new ZoraCreator1155FactoryImpl(zoraCreator1155Impl, IMinter1155(address(1)), IMinter1155(address(2)), IMinter1155(address(3)));
factory = ZoraCreator1155FactoryImpl(address(factoryProxy));
Expand Down Expand Up @@ -199,8 +199,7 @@ contract ZoraCreator1155FactoryTest is Test {
// * create a new version of the erc1155 implementation
// * create a new factory that points to that new erc1155 implementation,
// * upgrade the proxy to point to the new factory
uint256 newMintFeeAmount = 0.000888 ether;
IZoraCreator1155 newZoraCreator = new ZoraCreator1155Impl(newMintFeeAmount, zora, address(factory), address(new ProtocolRewards()));
IZoraCreator1155 newZoraCreator = new ZoraCreator1155Impl(zora, address(factory), address(new ProtocolRewards()));

ZoraCreator1155FactoryImpl newFactoryImpl = new ZoraCreator1155FactoryImpl(
newZoraCreator,
Expand Down Expand Up @@ -251,8 +250,7 @@ contract ZoraCreator1155FactoryTest is Test {
ZoraCreator1155Impl creatorProxy = ZoraCreator1155Impl(createdAddress);

// 2. upgrade the created contract by creating a new contract and upgrading the existing one to point to it.
uint256 newMintFeeAmount = 0.000888 ether;
IZoraCreator1155 newZoraCreator = new ZoraCreator1155Impl(newMintFeeAmount, zora, address(0), address(new ProtocolRewards()));
IZoraCreator1155 newZoraCreator = new ZoraCreator1155Impl(zora, address(0), address(new ProtocolRewards()));

address[] memory baseImpls = new address[](1);
baseImpls[0] = address(factory.zora1155Impl());
Expand Down
9 changes: 4 additions & 5 deletions test/factory/ZoraCreator1155Factory_Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import {ForkDeploymentConfig} from "../../src/deployment/DeploymentConfig.sol";
contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
uint256 constant quantityToMint = 3;
uint256 constant tokenMaxSupply = 100;
uint32 constant royaltyMintSchedule = 10;
uint32 constant royaltyBPS = 100;
uint256 constant mintFee = 0.000777 ether;

address collector;
address creator;
Expand Down Expand Up @@ -67,9 +70,6 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
// create the contract, with no toekns
bytes[] memory initSetup = new bytes[](0);

uint32 royaltyMintSchedule = 10;
uint32 royaltyBPS = 100;

address admin = creator;
string memory contractURI = "ipfs://asdfasdf";
string memory name = "Test";
Expand Down Expand Up @@ -120,15 +120,14 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
uint256 tokenId = _setupToken(target, fixedPrice, tokenPrice);

// ** 3. Mint on that contract **
uint256 mintFee = getChainConfig().mintFeeAmount;

// mint 3 tokens
uint256 valueToSend = quantityToMint * (tokenPrice + mintFee);

// mint the token
vm.deal(collector, valueToSend);
vm.startPrank(collector);
target.mint{value: valueToSend}(fixedPrice, tokenId, quantityToMint, abi.encode(collector));
ZoraCreator1155Impl(address(target)).mintWithRewards{value: valueToSend}(fixedPrice, tokenId, quantityToMint, abi.encode(collector), address(0));

assertEq(target.balanceOf(collector, tokenId), quantityToMint, chainName);
}
Expand Down
7 changes: 3 additions & 4 deletions test/fixtures/Zora1155FactoryFixtures.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {ProtocolRewards} from "@zoralabs/protocol-rewards/src/ProtocolRewards.so
import {ProxyShim} from "../../src/utils/ProxyShim.sol";

library Zora1155FactoryFixtures {
function setupZora1155Impl(uint256 mintFeeAmount, address zora, Zora1155Factory factoryProxy) internal returns (ZoraCreator1155Impl) {
function setupZora1155Impl(address zora, Zora1155Factory factoryProxy) internal returns (ZoraCreator1155Impl) {
ProtocolRewards rewards = new ProtocolRewards();
return new ZoraCreator1155Impl(mintFeeAmount, zora, address(factoryProxy), address(rewards));
return new ZoraCreator1155Impl(zora, address(factoryProxy), address(rewards));
}

function upgradeFactoryProxyToUse1155(
Expand All @@ -37,13 +37,12 @@ library Zora1155FactoryFixtures {
}

function setup1155AndFactoryProxy(
uint256 mintFeeAmount,
address zora,
address deployer
) internal returns (ZoraCreator1155Impl zoraCreator1155Impl, IMinter1155 fixedPriceMinter, Zora1155Factory factoryProxy) {
factoryProxy = setupFactoryProxy(deployer);
fixedPriceMinter = new ZoraCreatorFixedPriceSaleStrategy();
zoraCreator1155Impl = setupZora1155Impl(mintFeeAmount, zora, factoryProxy);
zoraCreator1155Impl = setupZora1155Impl(zora, factoryProxy);
upgradeFactoryProxyToUse1155(factoryProxy, zoraCreator1155Impl, fixedPriceMinter, deployer);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract ZoraCreatorFixedPriceSaleStrategyTest is Test {

bytes[] memory emptyData = new bytes[](0);
ProtocolRewards protocolRewards = new ProtocolRewards();
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards));
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(zora, address(0), address(protocolRewards));
Zora1155 proxy = new Zora1155(address(targetImpl));
target = ZoraCreator1155Impl(address(proxy));
target.initialize("test", "test", ICreatorRoyaltiesControl.RoyaltyConfiguration(0, 0, address(0)), admin, emptyData);
Expand Down
2 changes: 1 addition & 1 deletion test/minters/merkle/ZoraCreatorMerkleMinterStrategy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract ZoraCreatorMerkleMinterStrategyTest is Test {
mintTo = address(1);
bytes[] memory emptyData = new bytes[](0);
protocolRewards = new ProtocolRewards();
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards));
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(zora, address(0), address(protocolRewards));
Zora1155 proxy = new Zora1155(address(targetImpl));
target = ZoraCreator1155Impl(address(proxy));
target.initialize("test", "test", ICreatorRoyaltiesControl.RoyaltyConfiguration(0, 0, address(0)), admin, emptyData);
Expand Down
2 changes: 1 addition & 1 deletion test/minters/redeem/ZoraCreatorRedeemMinterFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract ZoraCreatorRedeemMinterFactoryTest is Test {
zora = makeAddr("zora");
bytes[] memory emptyData = new bytes[](0);
protocolRewards = new ProtocolRewards();
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards));
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(zora, address(0), address(protocolRewards));
Zora1155 proxy = new Zora1155(address(targetImpl));
target = ZoraCreator1155Impl(address(proxy));
target.initialize("test", "test", ICreatorRoyaltiesControl.RoyaltyConfiguration(0, 0, address(0)), tokenAdmin, emptyData);
Expand Down
2 changes: 1 addition & 1 deletion test/minters/redeem/ZoraCreatorRedeemMinterStrategy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract ZoraCreatorRedeemMinterStrategyTest is Test {
zora = makeAddr("zora");
bytes[] memory emptyData = new bytes[](0);
protocolRewards = new ProtocolRewards();
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards));
ZoraCreator1155Impl targetImpl = new ZoraCreator1155Impl(zora, address(0), address(protocolRewards));
Zora1155 proxy = new Zora1155(address(targetImpl));
target = ZoraCreator1155Impl(address(proxy));
target.initialize("test", "test", ICreatorRoyaltiesControl.RoyaltyConfiguration(0, 0, address(0)), admin, emptyData);
Expand Down
6 changes: 3 additions & 3 deletions test/nft/ZoraCreator1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ contract ZoraCreator1155Test is Test {
protocolRewards = new ProtocolRewards();
upgradeGate = new UpgradeGate();
upgradeGate.initialize(admin);
zoraCreator1155Impl = new ZoraCreator1155Impl(0, zora, address(upgradeGate), address(protocolRewards));
zoraCreator1155Impl = new ZoraCreator1155Impl(zora, address(upgradeGate), address(protocolRewards));
target = ZoraCreator1155Impl(address(new Zora1155(address(zoraCreator1155Impl))));
simpleMinter = new SimpleMinter();
fixedPriceMinter = new ZoraCreatorFixedPriceSaleStrategy();
Expand Down Expand Up @@ -1368,7 +1368,7 @@ contract ZoraCreator1155Test is Test {
}

function test_unauthorizedUpgradeFails() external {
address new1155Impl = address(new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards)));
address new1155Impl = address(new ZoraCreator1155Impl(zora, address(0), address(protocolRewards)));

vm.expectRevert();
target.upgradeTo(new1155Impl);
Expand All @@ -1380,7 +1380,7 @@ contract ZoraCreator1155Test is Test {

oldImpls[0] = address(zoraCreator1155Impl);

address new1155Impl = address(new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards)));
address new1155Impl = address(new ZoraCreator1155Impl(zora, address(0), address(protocolRewards)));

vm.prank(upgradeGate.owner());
upgradeGate.registerUpgradePath(oldImpls, new1155Impl);
Expand Down
2 changes: 1 addition & 1 deletion test/nft/ZoraCreator1155AccessControlGeneralTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ contract ZoraCreator1155AccessControlGeneralTest is Test {
function setUp() external {
zora = makeAddr("zora");
protocolRewards = new ProtocolRewards();
zoraCreator1155Impl = new ZoraCreator1155Impl(0, zora, address(0), address(protocolRewards));
zoraCreator1155Impl = new ZoraCreator1155Impl(zora, address(0), address(protocolRewards));
target = ZoraCreator1155Impl(address(new Zora1155(address(zoraCreator1155Impl))));
admin = payable(address(0x9));
target.initialize("", "test", ICreatorRoyaltiesControl.RoyaltyConfiguration(0, 0, address(0)), admin, _emptyInitData());
Expand Down
Loading
Loading