-
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.
Merge branch 'release/v0.2.0' into feature/adapt-oz-v5
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,16 @@ on: | |
- dev | ||
- "feature/*" | ||
- "features/*" | ||
- "feature/*" | ||
- "features/*" | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
- "feature/*" | ||
- "features/*" | ||
- "feature/*" | ||
- "features/*" | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
@@ -24,6 +28,7 @@ jobs: | |
|
||
name: Foundry project | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
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,34 @@ | ||
// 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, IAccessControlEnumerable, IERC1155 } 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 testSupportsInterface() public { | ||
assertEq(_token().supportsInterface(type(INFTLaunchpad).interfaceId), true); | ||
assertEq(_token().supportsInterface(type(IERC1155Common).interfaceId), true); | ||
assertEq(_token().supportsInterface(type(IAccessControlEnumerable).interfaceId), true); | ||
assertEq(_token().supportsInterface(type(IERC1155).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; | ||
} | ||
} |