Skip to content

Commit

Permalink
_safeMint() for Minting License Tokens (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster-will authored Dec 12, 2024
1 parent 57ebf6a commit 8c8c75c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/LicenseToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ contract LicenseToken is ILicenseToken, ERC721EnumerableUpgradeable, AccessManag
for (uint256 i = 0; i < amount; i++) {
uint256 tokenId = startLicenseTokenId + i;
$.licenseTokenMetadatas[tokenId] = ltm;
_mint(receiver, tokenId);
_safeMint(receiver, tokenId);
emit LicenseTokenMinted(minter, receiver, tokenId);
}
}
Expand Down
3 changes: 2 additions & 1 deletion test/foundry/integration/flows/grouping/Grouping.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import { PILFlavors } from "../../../../../contracts/lib/PILFlavors.sol";
import { Licensing } from "../../../../../contracts/lib/Licensing.sol";
import { IGroupingModule } from "../../../../../contracts/interfaces/modules/grouping/IGroupingModule.sol";
import { IGroupIPAssetRegistry } from "../../../../../contracts/interfaces/registries/IGroupIPAssetRegistry.sol";
import { ERC721Holder } from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";

// test
import { BaseIntegration } from "../../BaseIntegration.t.sol";

contract Flows_Integration_Grouping is BaseIntegration {
contract Flows_Integration_Grouping is BaseIntegration, ERC721Holder {
using EnumerableSet for EnumerableSet.UintSet;
using Strings for *;

Expand Down
3 changes: 2 additions & 1 deletion test/foundry/modules/grouping/GroupingModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity 0.8.26;
// external
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC721Holder } from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";

// contracts
import { Errors } from "../../../../contracts/lib/Errors.sol";
Expand All @@ -17,7 +18,7 @@ import { EvenSplitGroupPool } from "../../../../contracts/modules/grouping/EvenS
import { MockERC721 } from "../../mocks/token/MockERC721.sol";
import { BaseTest } from "../../utils/BaseTest.t.sol";

contract GroupingModuleTest is BaseTest {
contract GroupingModuleTest is BaseTest, ERC721Holder {
// test register group
// test add ip to group
// test remove ip from group
Expand Down

0 comments on commit 8c8c75c

Please sign in to comment.