-
Notifications
You must be signed in to change notification settings - Fork 16
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
Consolidated NFT tutorial #502
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
c9016e7
to
1b619e8
Compare
1b619e8
to
126b6a3
Compare
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.
Ran up to Part 3, included.
docs/tutorials/nft-consolidated.md
Outdated
|
||
<img src="/img/tutorials/nft-consolidated-show-info-ids.png" alt="The application showing the IDs of the owned NFTs" style={{width: 500}} /> | ||
|
||
The source code of the completed application is available here: https://github.com/trilitech/tutorial-applications/tree/main/nft-consolidated. |
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.
The repo doesn't exist, or perhaps just not yet?
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.
It will be created with trilitech/tutorial-applications#17.
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.
OK, once that PR is merged let's try again.
</script> | ||
|
||
<style lang="scss"> | ||
/* Your Sass code */ |
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.
is it rather "Scss", as implied by the tag just above?
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.
Strange, that's the default code for this file. I'll change it to "your styles."
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
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.
Also executed Step 4
return True | ||
``` | ||
|
||
You can omit this override to use the default behavior, but in this case you must set an administrator account when you deploy the contract or else you will not be able to mint any tokens. |
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.
These instructions are confusing. Either you instruct to omit the override, but then the test says "only admins can mint", so you have to instruct the reader to modify the first mint test to allow the mint by Bob.
Or you instruct to not override, but then you explain how to set the adiminstrator.
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.
Removed this section about the override.
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.
OK, but did you fix the tests accordingly? The first test expected Bob NOT to be able to mint. I had to fix manually this expectation for the tests to pass.
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.
I just went through the instructions and the created contract works including the tests. With the changes to the admin (setting your address as admin), Bob is not supposed to be able to mint and that's what the tests show. Maybe try the steps again from the beginning? The contract should match this one: https://github.com/trilitech/tutorial-applications/blob/main/create-nfts/contract/fa2-from-template.py
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.
But then why it's still written:"The overridden version always returns true, so anyone can mint a token."? Where is this overridden version?
Anyways, just check that and I trust you that it works, I won't be able to test the whole thing again.
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.
Also executed Step 5, so the review is complete
Co-authored-by: NicNomadic <[email protected]>
Co-authored-by: NicNomadic <[email protected]>
We have a few tutorials around NFTs. This creates a single one to rule them all; then we can remove the other tutorials.
Source code: trilitech/tutorial-applications#17
Preview: https://docs-staging-git-merge-nft-tutorials-trili-tech.vercel.app/tutorials/nft-consolidated
This tutorial covers frontend and backend parts of an NFT application. It starts with the front end and uses a predeployed smart contract. Then it has the user deploy their own contract and switch the application to it. I think this might ease developers into it because the web application part is less of a leap for most programmers.
After merging this tutorial, we can delete these tutorials: