IPN-54 tokenizer adds function to reserve and tokenize at once#164
Open
elmariachi111 wants to merge 2 commits intomainfrom
Open
IPN-54 tokenizer adds function to reserve and tokenize at once#164elmariachi111 wants to merge 2 commits intomainfrom
elmariachi111 wants to merge 2 commits intomainfrom
Conversation
Signed-off-by: stadolf <stefan@molecule.to>
full test case for reservation issuance Signed-off-by: stadolf <stefan@molecule.to>
DorianWilhelm
approved these changes
Aug 9, 2024
nour-karoui
approved these changes
Aug 12, 2024
| function controllerOf(uint256 ipnftId) public view override returns (address) { | ||
| //todo: check whether this is safe (or if I can trick myself to be the controller somehow) | ||
| //reservations are deleted upon mints, so this imo should be good | ||
| if (ipnft.reservations(ipnftId) != address(0)) { |
Contributor
There was a problem hiding this comment.
is this correct:
return ipnft.reservations(ipnftId) || ipnft.ownerOf(ipnftId)
if the ipnft is minted it will return ipnft.ownerOf(ipnftId) as ipnft.reservations(ipnftId) would be address(0) abd vice versa.
Contributor
Author
There was a problem hiding this comment.
I would never assume by default whether a language besides Javascript would automatically cast an (address(0)) to a boolean (true). That code is pretty concise imo. If there's a reservation it returns its initiator, otherwise the holder.
Contributor
There was a problem hiding this comment.
yes yes the code is clear, I just wanted to know whether the other optiion is also correct or not
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.