Skip to content

Commit

Permalink
chore: remove temp fork tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kulkarohan committed Oct 19, 2023
1 parent 463c3cc commit 3ade5a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,28 +149,4 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
testTheFork(forkTestChains[i]);
}
}

// this is a temporary test to simulate the upgrade to the correct factory implementation
// on zora goerli. it can be deleted post upgrade
function test_fork_zoraGoerli_factoryUpgradeCanMint() external {
// create and select the fork, which will be used for all subsequent calls
// it will also affect the current block chain id based on the rpc url returned
vm.createSelectFork(vm.rpcUrl("zora_goerli"));

Deployment memory deployment = getDeployment();

address factoryAddress = deployment.factoryProxy;
ZoraCreator1155FactoryImpl factory = ZoraCreator1155FactoryImpl(factoryAddress);

vm.prank(factory.owner());

factory.upgradeTo(deployment.factoryImpl);

// sanity check - check minters match config
assertEq(address(factory.merkleMinter()), deployment.merkleMintSaleStrategy);
assertEq(address(factory.fixedPriceMinter()), deployment.fixedPriceSaleStrategy);
assertEq(address(factory.redeemMinterFactory()), deployment.redeemMinterFactory);

mintTokenAtFork(factory);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -292,40 +292,6 @@ contract ZoraCreator1155PreminterTest is ForkDeploymentConfig, Test {
}
}

// this is a temporary test to simulate the upcoming upgrade
function test_fork_zoraGoerli_afterUpgradeCanPremint() external {
vm.createSelectFork(vm.rpcUrl("zora_goerli"));

Deployment memory deployment = getDeployment();

factory = ZoraCreator1155FactoryImpl(deployment.factoryProxy);

console2.log("factory upgrade target:", deployment.factoryProxy);
bytes memory factoryProxyUpgradeCall = abi.encodeWithSelector(UUPSUpgradeable.upgradeTo.selector, deployment.factoryImpl);
console2.log("factory upgrade call:", vm.toString(factoryProxyUpgradeCall));

console2.log("preminter upgrade target:", deployment.preminterProxy);
bytes memory preminterProxyUpgradeCall = abi.encodeWithSelector(UUPSUpgradeable.upgradeTo.selector, deployment.preminterImpl);
console2.log("preminter upgrade call:", vm.toString(preminterProxyUpgradeCall));

vm.prank(factory.owner());
// lets call it as if we were calling from a safe:
deployment.factoryProxy.call(factoryProxyUpgradeCall);

// override test storage to point to proxy
preminter = ZoraCreator1155PremintExecutorImpl(deployment.preminterProxy);

vm.prank(preminter.owner());
// preminter impl was already created with correct factory, were just upgrading it now
deployment.preminterProxy.call(preminterProxyUpgradeCall);

assertEq(address(preminter.zora1155Factory()), address(factory));

preminterCanMintTokens();

// lets console.log these upgrades
}

function test_signatureForSameContractandUid_shouldMintExistingToken() external {
// 1. Make contract creation params

Expand Down

0 comments on commit 3ade5a5

Please sign in to comment.