Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit e13d712

Browse files
committed
fix test
1 parent fad96ad commit e13d712

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/ERC721ShipyardRedeemable.t.sol

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.19;
33

4-
import {BaseRedeemablesTest} from "./utils/BaseRedeemablesTest.sol";
4+
import {Test} from "forge-std/Test.sol";
55
import {ERC721} from "solady/src/tokens/ERC721.sol";
66
import {ERC721ShipyardRedeemableOwnerMintable} from "../src/test/ERC721ShipyardRedeemableOwnerMintable.sol";
77

8-
contract TestERC721ShipyardRedeemable is BaseRedeemablesTest {
8+
contract TestERC721ShipyardRedeemable is Test {
9+
// This Transfer event is different than the one in BaseOrderTest, since `id` is indexed.
10+
// We don't inherit BaseRedeemablesTest to avoid this conflict.
11+
// For more details see https://github.com/ethereum/solidity/issues/4168#issuecomment-1819912098
12+
event Transfer(address indexed from, address indexed to, uint256 indexed id);
13+
914
function testBurn() public {
1015
uint256 tokenId = 1;
1116
ERC721ShipyardRedeemableOwnerMintable token = new ERC721ShipyardRedeemableOwnerMintable("Test", "TEST");
@@ -15,7 +20,7 @@ contract TestERC721ShipyardRedeemable is BaseRedeemablesTest {
1520
vm.expectRevert(ERC721.NotOwnerNorApproved.selector);
1621
token.burn(tokenId);
1722

18-
vm.expectEmit(true, true, true, true);
23+
vm.expectEmit(true, true, false, false);
1924
emit Transfer(fred, address(0), tokenId);
2025
vm.prank(fred);
2126
token.burn(tokenId);
@@ -30,8 +35,12 @@ contract TestERC721ShipyardRedeemable is BaseRedeemablesTest {
3035
vm.prank(fred);
3136
token.setApprovalForAll(address(this), true);
3237

33-
vm.expectEmit(true, true, true, true);
38+
vm.expectEmit(true, true, false, false);
3439
emit Transfer(fred, address(0), tokenId + 1);
3540
token.burn(tokenId + 1);
3641
}
42+
43+
function _mintToken(address token, uint256 tokenId, address recipient) internal {
44+
ERC721ShipyardRedeemableOwnerMintable(address(token)).mint(recipient, tokenId);
45+
}
3746
}

0 commit comments

Comments
 (0)