Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
neokry committed Sep 4, 2023
1 parent dee9d1d commit d6efffc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/metadata/media/MediaMetadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { IOwnable } from "../../lib/interfaces/IOwnable.sol";
import { ERC721 } from "../../lib/token/ERC721.sol";

import { MediaMetadataStorageV1 } from "./storage/MediaMetadataStorageV1.sol";
import { IToken } from "../../token/IToken.sol";
import { IToken } from "../../token/default/IToken.sol";
import { IMediaMetadata } from "./interfaces/IMediaMetadata.sol";
import { IManager } from "../../manager/IManager.sol";
import { IBaseMetadata } from "../interfaces/IBaseMetadata.sol";
Expand Down
2 changes: 2 additions & 0 deletions src/metadata/property/PropertyMetadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity 0.8.16;
import { Base64 } from "@openzeppelin/contracts/utils/Base64.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { UriEncode } from "sol-uriencode/src/UriEncode.sol";
import { MetadataBuilder } from "micro-onchain-metadata-utils/MetadataBuilder.sol";
import { MetadataJSONKeys } from "micro-onchain-metadata-utils/MetadataJSONKeys.sol";

import { UUPS } from "../../lib/proxy/UUPS.sol";
import { Initializable } from "../../lib/utils/Initializable.sol";
Expand Down
4 changes: 4 additions & 0 deletions src/token/default/IToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { IManager } from "../../manager/IManager.sol";
import { IBaseToken } from "../interfaces/IBaseToken.sol";
import { TokenTypesV1 } from "./types/TokenTypesV1.sol";
import { TokenTypesV2 } from "./types/TokenTypesV2.sol";
import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol";

/// @title IToken
/// @author Rohan Kulkarni
Expand Down Expand Up @@ -102,6 +103,9 @@ interface IToken is IUUPS, IERC721Votes, IBaseToken, TokenTypesV1, TokenTypesV2
/// @notice Mints the specified amount of tokens to the recipient and handles founder vesting
function mintBatchTo(uint256 amount, address recipient) external returns (uint256[] memory tokenIds);

/// @notice Mints the specified token from the reserve to the recipent
function mintFromReserveTo(address recipient, uint256 tokenId) external;

/// @notice Burns a token owned by the caller
/// @param tokenId The ERC-721 token id
function burn(uint256 tokenId) external;
Expand Down
1 change: 1 addition & 0 deletions src/token/default/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { IAuction } from "../../auction/IAuction.sol";
import { IToken } from "./IToken.sol";
import { IBaseToken } from "../interfaces/IBaseToken.sol";
import { VersionedContract } from "../../VersionedContract.sol";
import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol";

/// @title Token
/// @author Rohan Kulkarni
Expand Down
2 changes: 1 addition & 1 deletion src/token/default/types/TokenTypesV1.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol";
import { IBaseMetadata } from "../../../metadata/interfaces/IBaseMetadata.sol";

/// @title TokenTypesV1
/// @author Rohan Kulkarni
Expand Down
2 changes: 1 addition & 1 deletion src/token/partial-soulbound/PartialSoulboundToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ERC721Votes } from "../../lib/token/ERC721Votes.sol";
import { ERC721 } from "../../lib/token/ERC721.sol";
import { Ownable } from "../../lib/utils/Ownable.sol";
import { PartialSoulboundTokenStorageV1 } from "./storage/PartialSoulboundTokenStorageV1.sol";
import { IBaseMetadata } from "../metadata/interfaces/IBaseMetadata.sol";
import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol";
import { IManager } from "../../manager/IManager.sol";
import { IAuction } from "../../auction/IAuction.sol";
import { IPartialSoulboundToken } from "./IPartialSoulboundToken.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import { IBaseMetadata } from "../../metadata/interfaces/IBaseMetadata.sol";
import { IBaseMetadata } from "../../../metadata/interfaces/IBaseMetadata.sol";

/// @title PartialSoulboundTokenTypesV1
/// @author Neokry
Expand Down
3 changes: 3 additions & 0 deletions test/PartialSoulboundToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ contract PartialSoulboundTokenTest is NounsBuilderTest, TokenTypesV1 {

function testRevert_OnlyMinterCanMint(address newMinter, address nonMinter) public {
vm.assume(newMinter != nonMinter && newMinter != founder && newMinter != address(0) && newMinter != address(auction));
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployAltMock(0);

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand All @@ -464,6 +465,7 @@ contract PartialSoulboundTokenTest is NounsBuilderTest, TokenTypesV1 {
vm.assume(
newMinter != nonMinter && newMinter != founder && newMinter != address(0) && newMinter != address(auction) && recipient != address(0)
);
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployAltMock(0);

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand Down Expand Up @@ -495,6 +497,7 @@ contract PartialSoulboundTokenTest is NounsBuilderTest, TokenTypesV1 {
amount > 0 &&
amount < 100
);
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployAltMock(0);

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand Down
3 changes: 3 additions & 0 deletions test/Token.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ contract TokenTest is NounsBuilderTest, TokenTypesV1 {

function testRevert_OnlyMinterCanMint(address newMinter, address nonMinter) public {
vm.assume(newMinter != nonMinter && newMinter != founder && newMinter != address(0) && newMinter != address(auction));
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployMock();

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand All @@ -462,6 +463,7 @@ contract TokenTest is NounsBuilderTest, TokenTypesV1 {
vm.assume(
newMinter != nonMinter && newMinter != founder && newMinter != address(0) && newMinter != address(auction) && recipient != address(0)
);
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployMock();

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand Down Expand Up @@ -493,6 +495,7 @@ contract TokenTest is NounsBuilderTest, TokenTypesV1 {
amount > 0 &&
amount < 100
);
vm.assume(nonMinter != founder && nonMinter != address(0) && nonMinter != address(auction));
deployMock();

TokenTypesV2.MinterParams memory params = TokenTypesV2.MinterParams({ minter: newMinter, allowed: true });
Expand Down

0 comments on commit d6efffc

Please sign in to comment.