-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ae9072
commit c79dd17
Showing
5 changed files
with
75 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Test.sol"; | ||
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; | ||
import { SampleNFT1155Launchpad, SampleERC1155 } from "../../src/mock/launchpad/SampleNFT1155Launchpad.sol"; | ||
import { INFTLaunchpad } from "src/interfaces/launchpad/INFTLaunchpad.sol"; | ||
import { IERC1155Common } from "src/interfaces/IERC1155Common.sol"; | ||
|
||
contract SampleERC1155LaunchpadTest is Test { | ||
using Strings for uint256; | ||
|
||
address admin = makeAddr("admin"); | ||
string public constant NAME = "SampleERC721"; | ||
string public constant SYMBOL = "NFT"; | ||
string public constant BASE_URI = "http://example.com/"; | ||
|
||
SampleNFT1155Launchpad internal _t; | ||
|
||
function setUp() public virtual { | ||
_t = new SampleNFT1155Launchpad(admin, NAME, SYMBOL, BASE_URI); | ||
} | ||
|
||
function testSupportInterface() public { | ||
assertEq(_token().supportsInterface(type(INFTLaunchpad).interfaceId), true); | ||
assertEq(_token().supportsInterface(type(IERC1155Common).interfaceId), true); | ||
} | ||
|
||
function _token() internal view virtual returns (SampleNFT1155Launchpad) { | ||
return _t; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Test.sol"; | ||
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; | ||
import { SampleNFT721Launchpad } from "../../src/mock/launchpad/SampleNFT721Launchpad.sol"; | ||
import { INFTLaunchpad } from "src/interfaces/launchpad/INFTLaunchpad.sol"; | ||
import { IERC721Common } from "src/interfaces/IERC721Common.sol"; | ||
|
||
contract SampleNFT721LaunchpadTest is Test { | ||
using Strings for uint256; | ||
|
||
string public constant NAME = "SampleERC721"; | ||
string public constant SYMBOL = "NFT"; | ||
string public constant BASE_URI = "http://example.com/"; | ||
|
||
SampleNFT721Launchpad internal _t; | ||
|
||
function setUp() public virtual { | ||
_t = new SampleNFT721Launchpad(NAME, SYMBOL, BASE_URI); | ||
} | ||
|
||
function testSupportInterface() public { | ||
assertEq(_token().supportsInterface(type(INFTLaunchpad).interfaceId), true); | ||
assertEq(_token().supportsInterface(type(IERC721Common).interfaceId), true); | ||
} | ||
|
||
function _token() internal view virtual returns (SampleNFT721Launchpad) { | ||
return _t; | ||
} | ||
} |