Skip to content

Commit

Permalink
update and split up fork tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Sep 22, 2023
1 parent 98cc164 commit 3225ad6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Run fork tests
run: |
forge test -vvv --match-test fork
forge test -vvv --match-test Fork
env:
FORK_TEST_CHAINS: mainnet,goerli,optimism,optimism_goerli,zora,zora_goerli,base_goerli,base # ,pgn_sepolia,pgn
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
Expand Down
31 changes: 28 additions & 3 deletions test/ZoraNFTCreatorV1_Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ contract ZoraNFTCreatorV1Test is Test, ForkHelper {
DropMetadataRenderer public dropMetadataRenderer;

function makeDefaultSalesConfiguration(uint104 price) internal returns (IERC721Drop.SalesConfiguration memory) {
return IERC721Drop.SalesConfiguration({
return
IERC721Drop.SalesConfiguration({
publicSaleStart: 0,
publicSaleEnd: type(uint64).max,
presaleStart: 0,
Expand All @@ -36,7 +37,7 @@ contract ZoraNFTCreatorV1Test is Test, ForkHelper {
});
}

function test_create_fork() external {
function testForkEdition() external {
string[] memory forkTestChains = getForkTestChains();

for (uint256 i = 0; i < forkTestChains.length; i++) {
Expand All @@ -46,7 +47,31 @@ contract ZoraNFTCreatorV1Test is Test, ForkHelper {
creator = ZoraNFTCreatorV1(getDeployment().factory);
verifyAddressesFork(chainName);
forkEdition();
}
}

function testForkDrop() external {
string[] memory forkTestChains = getForkTestChains();

for (uint256 i = 0; i < forkTestChains.length; i++) {
string memory chainName = forkTestChains[i];

vm.createSelectFork(vm.rpcUrl(chainName));
creator = ZoraNFTCreatorV1(getDeployment().factory);
verifyAddressesFork(chainName);
forkDrop();
}
}

function testForkDropGeneric() external {
string[] memory forkTestChains = getForkTestChains();

for (uint256 i = 0; i < forkTestChains.length; i++) {
string memory chainName = forkTestChains[i];

vm.createSelectFork(vm.rpcUrl(chainName));
creator = ZoraNFTCreatorV1(getDeployment().factory);
verifyAddressesFork(chainName);
forkDropGeneric();
}
}
Expand Down Expand Up @@ -96,7 +121,7 @@ contract ZoraNFTCreatorV1Test is Test, ForkHelper {
500,
DEFAULT_FUNDS_RECIPIENT_ADDRESS,
DEFAULT_FUNDS_RECIPIENT_ADDRESS,
makeDefaultSalesConfiguration(0.1 ether),
makeDefaultSalesConfiguration(0.1 ether),
"desc",
"animation",
"image"
Expand Down

0 comments on commit 3225ad6

Please sign in to comment.