Skip to content
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

My First NFT Guide Update #838

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tippi-fifestarr
Copy link
Collaborator

Description

This PR reorganizes Your First NFT into a more streamlined, tutorial-style page. Key changes include:

Step-by-step flow: Converted to a single, cohesive “Steps” tutorial with clear headings and callouts.

Single TypeScript example: Consolidated the instructions into one TS project for easier setup and execution, removing Python snippets from the main guide.

Overall walkthrough: We explain the code before presenting the step by step how to do it and example code.

Readability and structure: Added environment variable configuration, tsconfig.json setup, code explanations, and direct links to the Aptos Explorer to simplify the user onboarding experience.

Should help our developers go faster 🚀

Checklist

  • If any existing pages were renamed or removed:
    • Were redirects added to next.config.mjs?
    • Did you update any relative links that pointed to the renamed / removed pages?
  • Do all Lints pass?
    • Have you ran pnpm fmt?
    • Have you ran pnpm lint?

Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
developer-docs-nextra ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2025 10:40pm

Comment on lines 235 to 243
1. Create a new file called `index.ts` in your project folder:

To read a token's metadata:

```python filename="example.py"
async def get_token_data(
token_client: AptosTokenClient, token_addr: AccountAddress
) -> dict[str, str]:
token = (await token_client.read_object(token_addr)).resources[Token]
return {
"collection": str(token.collection),
"description": str(token.description),
"name": str(token.name),
"uri": str(token.uri),
"index": str(token.index),
}
```bash filename="Terminal"
touch index.ts
```

</Tabs.Tab>
</Tabs>
<Callout type="info">
**Windows users:** Use `type nul > index.ts` in Command Prompt.
</Callout>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Tabs here? one for mac / linux and another for windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, I've just updated and replaced three sections with the Tabs component:

  • In the "Create tsconfig.json" section
  • In the "Configure Environment Variables" section
  • In the "Adding index.ts" section

Comment on lines 200 to 202
<Callout type="warning">
Remember to save your file after adding the configuration!
</Callout>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did a couple user interviews and found that several folks we interviewed forgot to save and ended up confused, so that's what inspired that callout. I think it's worth keeping in the "Your First NFT" especially since NFT creators aren't necessarily technical, but may be using AI to help them get by (meaning when they miss small steps like this it's hard for them to notice why if they've already refocused on another file).

Comment on lines 173 to 177
1. Create a new TypeScript configuration file:

const committedTxn = await aptos.signAndSubmitTransaction({
signer: alice,
transaction: mintTokenTransaction,
});
```bash filename="Terminal"
touch tsconfig.json
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Tabs here, one tab for mac os / linux and another for windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you

Comment on lines 26 to 28
- **Collection Creation**: A "collection" is a grouping of digital assets. We'll create a new collection under Alice's account.
- **Minting a Digital Asset**: Once the collection is in place, we'll mint a new digital asset (NFT) under that collection.
- **Transferring a Digital Asset**: Finally, we'll transfer the newly minted asset from Alice to Bob.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove these steps are mentioned above already, repetitive to have both

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants