Skip to content

Commit

Permalink
fix: move hardcoded fork vars to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
kulkarohan authored and oveddan committed Sep 12, 2023
1 parent 6d5b70b commit 62e0ee5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/factory/ZoraCreator1155Factory_Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import {ZoraCreatorFixedPriceSaleStrategy} from "../../src/minters/fixed-price/Z
import {ForkDeploymentConfig} from "../../src/deployment/DeploymentConfig.sol";

contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
uint256 constant mintFee = 0.000777 ether;
uint96 constant tokenPrice = 1 ether;
uint256 constant quantityToMint = 3;
uint256 constant tokenMaxSupply = 100;
uint32 constant royaltyMintSchedule = 10;
uint32 constant royaltyBPS = 100;

address collector;
address creator;

Expand All @@ -37,7 +44,6 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {

function _setupToken(IZoraCreator1155 target, IMinter1155 fixedPrice, uint96 tokenPrice) private returns (uint256 tokenId) {
string memory tokenURI = "ipfs://token";
uint256 tokenMaxSupply = 100;

tokenId = target.setupNewToken(tokenURI, tokenMaxSupply);

Expand Down Expand Up @@ -118,15 +124,7 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {

// ** 3. Mint on that contract **

// get the mint fee from the contract
uint256 mintFee = ZoraCreator1155Impl(address(target)).computeTotalReward(1);

// make sure the mint fee amount matches the configured mint fee amount
assertEq(mintFee, getChainConfig().mintFeeAmount, chainName);

// mint 3 tokens

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

// mint the token
Expand Down

0 comments on commit 62e0ee5

Please sign in to comment.