Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bcdd5be
new contracts
wolfy-nft Dec 5, 2024
6473f8f
lint
wolfy-nft Dec 5, 2024
4a672f0
forge install: ERC721A
wolfy-nft Dec 5, 2024
159ec2f
add cloneables
wolfy-nft Dec 5, 2024
5a6110f
fmt
wolfy-nft Dec 5, 2024
4ad4cdc
cloneable
wolfy-nft Dec 5, 2024
3df1b0a
move contract version to another branch
wolfy-nft Dec 6, 2024
61a9e14
add old version back
wolfy-nft Dec 6, 2024
6dd656b
fix
wolfy-nft Dec 6, 2024
b5e3f9f
add docs
wolfy-nft Dec 9, 2024
2eff675
stage logic
wolfy-nft Dec 9, 2024
8d9bd49
docs and tests
wolfy-nft Dec 10, 2024
2ed0306
cleanup
wolfy-nft Dec 10, 2024
1b7861c
enforce private before public, and transfer proceeds on mint
wolfy-nft Dec 10, 2024
d6387cf
updates
wolfy-nft Dec 12, 2024
96e5a6b
updates
wolfy-nft Dec 17, 2024
c3c2f02
add file end newline
wolfy-nft Dec 17, 2024
e5ac063
updates
wolfy-nft Dec 18, 2024
fd3fc3b
updates
wolfy-nft Dec 18, 2024
fb00eab
fix
wolfy-nft Dec 18, 2024
2185a94
add royalties to config
wolfy-nft Dec 19, 2024
1cca4f6
fmt
wolfy-nft Dec 19, 2024
44f2849
add config function
wolfy-nft Jan 2, 2025
c04f419
emit contract uri event
wolfy-nft Jan 6, 2025
763b1d5
add heading
wolfy-nft Jan 7, 2025
bcd2e66
zero protocol fee
wolfy-nft Jan 8, 2025
fe7cb9b
add missing events
wolfy-nft Jan 14, 2025
2da14ea
add mint event
wolfy-nft Jan 14, 2025
ace522b
update merkle tree impl
wolfy-nft Jan 16, 2025
4a35232
fmt
wolfy-nft Jan 16, 2025
2bbe7f5
rm
wolfy-nft Jan 16, 2025
b91e8b8
remove unused imports
wolfy-nft Jan 20, 2025
0c297e0
fix required payment
wolfy-nft Jan 20, 2025
cf2ad60
rename error
wolfy-nft Jan 20, 2025
b0d1509
fix
wolfy-nft Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions contracts/common/interfaces/IMagicDropMetadata.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

interface IMagicDropMetadata {
/*==============================================================
= EVENTS =
==============================================================*/

/// @notice Emitted when the contract URI is updated.
/// @param _contractURI The new contract URI.
event ContractURIUpdated(string _contractURI);

/// @notice Emitted when the royalty info is updated.
/// @param receiver The new royalty receiver.
/// @param bps The new royalty basis points.
event RoyaltyInfoUpdated(address receiver, uint256 bps);

/// @notice Emitted when the metadata is updated. (EIP-4906)
/// @param _fromTokenId The starting token ID.
/// @param _toTokenId The ending token ID.
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);

/// @notice Emitted once when the token contract is deployed and initialized.
event MagicDropTokenDeployed();

/*==============================================================
= ERRORS =
==============================================================*/

/// @notice Throw when the max supply is exceeded.
error CannotExceedMaxSupply();

/// @notice Throw when the max supply is less than the current supply.
error MaxSupplyCannotBeLessThanCurrentSupply();

/// @notice Throw when trying to increase the max supply.
error MaxSupplyCannotBeIncreased();

/// @notice Throw when the max supply is greater than 2^64.
error MaxSupplyCannotBeGreaterThan2ToThe64thPower();

/*==============================================================
= PUBLIC VIEW METHODS =
==============================================================*/

/// @notice Returns the base URI used to construct token URIs
/// @dev This is concatenated with the token ID to form the complete token URI
/// @return The base URI string that prefixes all token URIs
function baseURI() external view returns (string memory);

/// @notice Returns the contract-level metadata URI
/// @dev Used by marketplaces like MagicEden to display collection information
/// @return The URI string pointing to the contract's metadata JSON
function contractURI() external view returns (string memory);

/// @notice Returns the address that receives royalty payments
/// @dev Used in conjunction with royaltyBps for EIP-2981 royalty standard
/// @return The address designated to receive royalty payments
function royaltyAddress() external view returns (address);

/// @notice Returns the royalty percentage in basis points (1/100th of a percent)
/// @dev 100 basis points = 1%. Used in EIP-2981 royalty calculations
/// @return The royalty percentage in basis points (e.g., 250 = 2.5%)
function royaltyBps() external view returns (uint256);

/*==============================================================
= ADMIN OPERATIONS =
==============================================================*/

/// @notice Sets the base URI for all token metadata
/// @dev This is a critical function that determines where all token metadata is hosted
/// Changing this will update the metadata location for all tokens in the collection
/// @param baseURI The new base URI string that will prefix all token URIs
function setBaseURI(string calldata baseURI) external;

/// @notice Sets the contract-level metadata URI
/// @dev This metadata is used by marketplaces to display collection information
/// Should point to a JSON file following collection metadata standards
/// @param contractURI The new URI string pointing to the contract's metadata JSON
function setContractURI(string calldata contractURI) external;

/// @notice Updates the royalty configuration for the collection
/// @dev Implements EIP-2981 for NFT royalty standards
/// The bps (basis points) must be between 0 and 10000 (0% to 100%)
/// @param newReceiver The address that will receive future royalty payments
/// @param newBps The royalty percentage in basis points (e.g., 250 = 2.5%)
function setRoyaltyInfo(address newReceiver, uint96 newBps) external;
}
Loading