Skip to content

Commit

Permalink
added missing functions to IZoraCreator1155 (#351)
Browse files Browse the repository at this point in the history
added missing functions to IZoraCreator1155

added constants
  • Loading branch information
oveddan authored Nov 13, 2023
1 parent dbe2444 commit 63ef7f6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-gifts-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": patch
---

Added missing functions to IZoraCreator1155
37 changes: 37 additions & 0 deletions packages/1155-contracts/src/interfaces/IZoraCreator1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,21 @@ import {PremintConfig} from "../delegation/ZoraCreator1155Attribution.sol";
/// @notice Main interface for the ZoraCreator1155 contract
/// @author @iainnash / @tbtstl
interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, IVersionedContract, IOwnable, IERC1155MetadataURIUpgradeable {
/// @notice This user role allows for any action to be performed
function PERMISSION_BIT_ADMIN() external returns (uint256);

/// @notice This user role allows for only mint actions to be performed
function PERMISSION_BIT_MINTER() external returns (uint256);

/// @notice This user role allows for only managing sales configurations
function PERMISSION_BIT_SALES() external returns (uint256);

/// @notice This user role allows for only managing metadata configuration
function PERMISSION_BIT_METADATA() external returns (uint256);

/// @notice This user role allows for only withdrawing funds and setting funds withdraw address
function PERMISSION_BIT_FUNDS_MANAGER() external returns (uint256);

/// @notice Used to label the configuration update type
enum ConfigUpdate {
OWNER,
Expand All @@ -58,6 +65,8 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, I

function setOwner(address newOwner) external;

function owner() external view returns (address);

event ContractRendererUpdated(IRenderer1155 renderer);
event ContractMetadataUpdated(address indexed updater, string uri, string name);
event Purchased(address indexed sender, address indexed minter, uint256 indexed tokenId, uint256 quantity, uint256 value);
Expand All @@ -71,6 +80,14 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, I
/// @param minterArguments calldata for the minter contracts
function mint(IMinter1155 minter, uint256 tokenId, uint256 quantity, bytes calldata minterArguments) external payable;

/// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and a mint referral
/// @param minter The minter contract to use
/// @param tokenId The token ID to mint
/// @param quantity The quantity of tokens to mint
/// @param minterArguments The arguments to pass to the minter
/// @param mintReferral The referrer of the mint
function mintWithRewards(IMinter1155 minter, uint256 tokenId, uint256 quantity, bytes calldata minterArguments, address mintReferral) external payable;

function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external;

function adminMintBatch(address recipient, uint256[] memory tokenIds, uint256[] memory quantities, bytes memory data) external;
Expand All @@ -82,6 +99,10 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, I
/// @param maxSupply maxSupply for the token, set to 0 for open edition
function setupNewToken(string memory tokenURI, uint256 maxSupply) external returns (uint256 tokenId);

function setupNewTokenWithCreateReferral(string calldata newURI, uint256 maxSupply, address createReferral) external returns (uint256);

function getCreatorRewardRecipient(uint256 tokenId) external view returns (address);

function delegateSetupNewToken(PremintConfig calldata premintConfig, bytes calldata signature, address sender) external returns (uint256 newTokenId);

function updateTokenURI(uint256 tokenId, string memory _newURI) external;
Expand All @@ -96,6 +117,13 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, I

function updateRoyaltiesForToken(uint256 tokenId, ICreatorRoyaltiesControl.RoyaltyConfiguration memory royaltyConfiguration) external;

/// @notice Set funds recipient address
/// @param fundsRecipient new funds recipient address
function setFundsRecipient(address payable fundsRecipient) external;

/// @notice Allows the create referral to update the address that can claim their rewards
function updateCreateReferral(uint256 tokenId, address recipient) external;

function addPermission(uint256 tokenId, address user, uint256 permissionBits) external;

function removePermission(uint256 tokenId, address user, uint256 permissionBits) external;
Expand All @@ -109,4 +137,13 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, I
function callSale(uint256 tokenId, IMinter1155 salesConfig, bytes memory data) external;

function mintFee() external view returns (uint256);

/// @notice Withdraws all ETH from the contract to the funds recipient address
function withdraw() external;

/// @notice Withdraws ETH from the Zora Rewards contract
function withdrawRewards(address to, uint256 amount) external;

/// @notice Returns the current implementation address
function implementation() external view returns (address);
}

0 comments on commit 63ef7f6

Please sign in to comment.