Skip to content

Commit

Permalink
fix: use mint w rewards to gurantee mint fee amount
Browse files Browse the repository at this point in the history
  • Loading branch information
kulkarohan committed Sep 27, 2023
1 parent ec07204 commit 7415a4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/factory/ZoraCreator1155Factory_Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
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 @@ -119,15 +120,14 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {
uint256 tokenId = _setupToken(target, fixedPrice, tokenPrice);

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

// 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

0 comments on commit 7415a4d

Please sign in to comment.