-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.13; | ||
|
||
import { FeralfileExhibitionV4_1 } from "./FeralfileArtworkV4_1.sol"; | ||
|
||
contract FeralfileExhibitionV4_2 is FeralfileExhibitionV4_1 { | ||
|
||
error ArtworkEditionNotFound(); | ||
|
||
mapping(uint256 => string) public artworkParameters; // artworkEditionID => parameters as string | ||
|
||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
bool burnable_, | ||
bool bridgeable_, | ||
address signer_, | ||
address vault_, | ||
address costReceiver_, | ||
string memory contractURI_, | ||
uint256[] memory seriesIds_, | ||
uint256[] memory seriesMaxSupplies_ | ||
) | ||
FeralfileExhibitionV4_1( | ||
name_, | ||
symbol_, | ||
burnable_, | ||
bridgeable_, | ||
signer_, | ||
vault_, | ||
costReceiver_, | ||
contractURI_, | ||
seriesIds_, | ||
seriesMaxSupplies_ | ||
) | ||
{} | ||
|
||
/// @notice Update the parameters of an edition to a new value | ||
function updateArtworkParameters(uint256 tokenId, string calldata parameters) | ||
external | ||
onlyAuthorized | ||
{ | ||
if (!_exists(tokenId)) { | ||
revert ArtworkEditionNotFound(); | ||
} | ||
|
||
artworkParameters[tokenId] = parameters; | ||
} | ||
|
||
/// @notice Get the parameters of an edition | ||
function getArtworkParameters( | ||
uint256 tokenId | ||
) public view virtual returns (string memory) { | ||
if (!_exists(tokenId)) { | ||
revert ArtworkEditionNotFound(); | ||
} | ||
|
||
return artworkParameters[tokenId]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters