-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add media metadata renderer #108
Conversation
address _newRendererImpl, | ||
bytes memory _setupRenderer | ||
) external returns (address metadata) { | ||
if (msg.sender != IOwnable(_token).owner()) revert ONLY_TOKEN_OWNER(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it's nice to always use {
and }
brackets to prevent bugs and readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall structure looks good – left some comments.
tokenAttributes[i + 1] = uint16(seed % numItems); | ||
|
||
// Adjust the randomness | ||
seed >>= 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this comment is a bit strange – get next 16 random bits likely makes more sense.
@@ -50,6 +50,19 @@ interface IPropertyIPFSMetadataRenderer is IBaseMetadata, MetadataRendererTypesV | |||
/// | |||
error TOO_MANY_PROPERTIES(); | |||
|
|||
error TOKEN_ALREADY_GENERATED(uint256 tokenId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this error?
Adds new metadata renderer and allows for custom metadata renderer
Code review