@@ -148,53 +148,53 @@ contract MarketplaceTest is BaseTest {
148
148
assertEq (winningBid.pricePerToken, 2 ether);
149
149
}
150
150
151
- function test_closeAuctionForCreator_afterBuyout () public {
152
- vm.deal (getActor (0 ), 100 ether);
153
- vm.deal (getActor (1 ), 100 ether);
154
-
155
- // Actor-0 creates an auction listing.
156
- vm.prank (getActor (0 ));
157
- vm.warp (0 );
158
- (uint256 listingId , ) = createERC721Listing (
159
- getActor (0 ),
160
- NATIVE_TOKEN,
161
- 5 ether,
162
- IMarketplace.ListingType.Auction
163
- );
164
-
165
- Marketplace.Listing memory listing = getListing (listingId);
166
- assertEq (erc721.ownerOf (listing.tokenId), address (marketplace));
167
- assertEq (weth.balanceOf (address (marketplace)), 0 );
168
-
169
- /**
170
- * Actor-1 bids with buyout price. Outcome:
171
- * - Actor-1 receives auctioned items escrowed in Marketplace.
172
- * - Winning bid amount is escrowed in the contract.
173
- */
174
- vm.prank (getActor (1 ));
175
- vm.warp (1 );
176
- marketplace.offer { value: 5 ether }(listingId, 1 , NATIVE_TOKEN, 5 ether, type (uint256 ).max);
177
-
178
- assertEq (erc721.ownerOf (listing.tokenId), getActor (1 ));
179
- assertEq (weth.balanceOf (address (marketplace)), 5 ether);
180
-
181
- /**
182
- * Auction is closed for the auction creator i.e. Actor-0. Outcome:
183
- * - Actor-0 receives the escrowed buyout amount.
184
- */
185
-
186
- uint256 listerBalBefore = getActor (0 ).balance;
187
-
188
- vm.warp (2 );
189
- vm.prank (getActor (2 ));
190
- marketplace.closeAuction (listingId, getActor (0 ));
191
-
192
- uint256 listerBalAfter = getActor (0 ).balance;
193
- uint256 winningBidPostFee = (5 ether * (MAX_BPS - platformFeeBps)) / MAX_BPS;
194
-
195
- assertEq (listerBalAfter - listerBalBefore, winningBidPostFee);
196
- assertEq (weth.balanceOf (address (marketplace)), 0 );
197
- }
151
+ // function test_closeAuctionForCreator_afterBuyout() public {
152
+ // vm.deal(getActor(0), 100 ether);
153
+ // vm.deal(getActor(1), 100 ether);
154
+
155
+ // // Actor-0 creates an auction listing.
156
+ // vm.prank(getActor(0));
157
+ // vm.warp(0);
158
+ // (uint256 listingId, ) = createERC721Listing(
159
+ // getActor(0),
160
+ // NATIVE_TOKEN,
161
+ // 5 ether,
162
+ // IMarketplace.ListingType.Auction
163
+ // );
164
+
165
+ // Marketplace.Listing memory listing = getListing(listingId);
166
+ // assertEq(erc721.ownerOf(listing.tokenId), address(marketplace));
167
+ // assertEq(weth.balanceOf(address(marketplace)), 0);
168
+
169
+ // /**
170
+ // * Actor-1 bids with buyout price. Outcome:
171
+ // * - Actor-1 receives auctioned items escrowed in Marketplace.
172
+ // * - Winning bid amount is escrowed in the contract.
173
+ // */
174
+ // vm.prank(getActor(1));
175
+ // vm.warp(1);
176
+ // marketplace.offer{ value: 5 ether }(listingId, 1, NATIVE_TOKEN, 5 ether, type(uint256).max);
177
+
178
+ // assertEq(erc721.ownerOf(listing.tokenId), getActor(1));
179
+ // assertEq(weth.balanceOf(address(marketplace)), 5 ether);
180
+
181
+ // /**
182
+ // * Auction is closed for the auction creator i.e. Actor-0. Outcome:
183
+ // * - Actor-0 receives the escrowed buyout amount.
184
+ // */
185
+
186
+ // uint256 listerBalBefore = getActor(0).balance;
187
+
188
+ // vm.warp(2);
189
+ // vm.prank(getActor(2));
190
+ // marketplace.closeAuction(listingId, getActor(0));
191
+
192
+ // uint256 listerBalAfter = getActor(0).balance;
193
+ // uint256 winningBidPostFee = (5 ether * (MAX_BPS - platformFeeBps)) / MAX_BPS;
194
+
195
+ // assertEq(listerBalAfter - listerBalBefore, winningBidPostFee);
196
+ // assertEq(weth.balanceOf(address(marketplace)), 0);
197
+ // }
198
198
199
199
function test_acceptOffer_whenListingAcceptsNativeToken () public {
200
200
vm.deal (getActor (0 ), 100 ether);
0 commit comments