Skip to content

Commit

Permalink
add config function
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Wolf <wolfynft@gmail.com>
  • Loading branch information
wolfy-nft committed Jan 2, 2025
1 parent fdcdcff commit 6a98ecd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions contracts/nft/erc1155m/clones/ERC1155MagicDropCloneable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ contract ERC1155MagicDropCloneable is ERC1155MagicDropMetadataCloneable {
= PUBLIC VIEW METHODS =
==============================================================*/

/// @notice Returns the current configuration of the contract.
/// @return The current configuration of the contract.
function getConfig(uint256 tokenId) external view returns (SetupConfig memory) {
SetupConfig memory newConfig = SetupConfig({
tokenId: tokenId,
maxSupply: _tokenSupply[tokenId].maxSupply,
walletLimit: _walletLimit[tokenId],
baseURI: _baseURI,
contractURI: _contractURI,
allowlistStage: _allowlistStages[tokenId],
publicStage: _publicStages[tokenId],
payoutRecipient: _payoutRecipient,
royaltyRecipient: _royaltyReceiver,
royaltyBps: _royaltyBps
});

return newConfig;
}

/// @notice Returns the current public stage configuration (startTime, endTime, price).
/// @return The current public stage settings.
function getPublicStage(uint256 tokenId) external view returns (PublicStage memory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract ERC1155MagicDropMetadataCloneable is
address internal _royaltyReceiver;

/// @dev The royalty basis points.
uint256 internal _royaltyBps;
uint96 internal _royaltyBps;

/// @dev The total supply of each token.
mapping(uint256 => TokenSupply) internal _tokenSupply;
Expand Down

0 comments on commit 6a98ecd

Please sign in to comment.