Skip to content

Commit

Permalink
clean up mock minter warnings (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsabellaSmallcombe authored May 2, 2024
1 parent 2c09dec commit cbe6fdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions packages/1155-contracts/test/fixtures/ZoraMintsFixtures.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {MockMintsManager} from "../mock/MockMints.sol";

library ZoraMintsFixtures {
Expand Down
15 changes: 9 additions & 6 deletions packages/1155-contracts/test/mock/MockMints.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {TokenConfig, Redemption} from "@zoralabs/mints-contracts/src/ZoraMintsTypes.sol";
import {MintsStorageBase} from "@zoralabs/mints-contracts/src/MintsStorageBase.sol";
Expand Down Expand Up @@ -29,7 +32,7 @@ contract MockMintsManager is IZoraMintsManager {
}

/// This will be moved to the Mints Manager
function mintWithERC20(address tokenAddress, uint quantity, address recipient) external returns (uint256 mintableTokenId) {
function mintWithERC20(address, uint, address) external pure returns (uint256) {
revert("Not implemented");
}

Expand All @@ -43,7 +46,7 @@ contract MockMintsManager is IZoraMintsManager {
}
}

function setDefaultMintable(address tokenAddress, uint256 tokenId) public {
function setDefaultMintable(address, uint256 tokenId) public {
TokenConfig memory tokenConfig = zoraMints1155.getTokenConfig(tokenId);
if (tokenConfig.price == 0) {
revert("Not a token");
Expand All @@ -55,11 +58,11 @@ contract MockMintsManager is IZoraMintsManager {
mintableEthToken = tokenId;
}

function uri(uint256 tokenId) external view returns (string memory) {
function uri(uint256) external pure returns (string memory) {
revert("Not implemented");
}

function contractURI() external view returns (string memory) {
function contractURI() external pure returns (string memory) {
revert("Not implemented");
}
}
Expand Down Expand Up @@ -107,7 +110,7 @@ contract MockZoraMints1155 is ERC1155, IZoraMints1155 {
}

// called by the mints manager
function mintTokenWithERC20(uint256 tokenId, address tokenAddress, uint quantity, address recipient, bytes memory data) external {
function mintTokenWithERC20(uint256, address, uint, address, bytes memory) external pure {
revert("Not implemented");
}

Expand Down Expand Up @@ -175,7 +178,7 @@ contract MockZoraMints1155 is ERC1155, IZoraMints1155 {
return tokenConfigs[tokenId];
}

function balanceOfAccount(address user) external view override returns (uint256) {
function balanceOfAccount(address) external pure override returns (uint256) {
revert("Not implemented");
}
}
3 changes: 1 addition & 2 deletions packages/1155-contracts/test/nft/ZoraCreator1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract MockTransferHookReceiver is ITransferHookReceiver {
hasTransfer[id] = true;
}

function supportsInterface(bytes4 testInterface) external view override returns (bool) {
function supportsInterface(bytes4 testInterface) external pure override returns (bool) {
return testInterface == type(ITransferHookReceiver).interfaceId;
}
}
Expand Down Expand Up @@ -1677,7 +1677,6 @@ contract ZoraCreator1155Test is Test {
init();
uint256 mintTokenPrice = 0.000222 ether;
uint256 mintTokenId = 111;
uint256 tokenPrice = 0.001111 ether;
uint256 salePrice = 2 ether;

address fundsRecipient = makeAddr("fundsRecipient");
Expand Down

0 comments on commit cbe6fdc

Please sign in to comment.