Skip to content

Commit

Permalink
Continue building out prerequisites and mint NFT steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Clay Murphy authored and Clay Murphy committed Dec 12, 2022
1 parent e72e062 commit 08de836
Showing 1 changed file with 46 additions and 3 deletions.
49 changes: 46 additions & 3 deletions developer-docs-site/docs/guides/move-guides/mint-nft-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ title: "Mint an NFT with Aptos CLI"
slug: "mint-nft-cli"
---

# Mint an NFT
# Mint an NFT

## Prerequisites

This tutorial assumes you have:

* a GitHub account
* the GitHub CLI
* the Aptos CLI (installed below)

## Mint with the Aptos CLI

Now that you are starting to write smart contracts with Move, let's create our first NFT with the Aptos CLI.
Now that you are starting to write smart contracts with Move, let's create our first NFT with the Aptos CLI.

1. [Install the Aptos CLI](../../cli-tools/aptos-cli-tool/install-aptos-cli.md) and note its [many uses](../../cli-tools/aptos-cli-tool/use-aptos-cli.md) for later if you haven't experienced its goodness already.

Expand Down Expand Up @@ -44,6 +52,33 @@ Aptos CLI is now set up for account blah as profile nft-receiver! Run `aptos --
1. Note *blah* above is a placeholder for your private key. Record it someplace safe.
1. Mint the NFT:
```shell
aptos move run --function-id 8cdf69c8c93fee36ed83f8882908060c1335ed39a827c08dbb506b46237e88fb::minting::mint_nft --profile nft-receiver
```
1. When asked, `Do you want to submit a transaction for a range of...?`, enter: `yes`
1. Receive results resembling:
```shell
{
"Result": {
"transaction_hash": "0x9dc5c20f45a06d0cc621bf12610caa5b3c0797ac181c3339248b48ab0f0fcba2",
"gas_used": 3917,
"gas_unit_price": 100,
"sender": "7d69283af198b1265d17a305ff0cca6da1bcee64d499ce5b35b659098b3a82dc",
"sequence_number": 13,
"success": true,
"timestamp_us": 1668045908262170,
"version": 341215563,
"vm_status": "Executed successfully"
}
}
*/
```
## Find the NFT in your Petra wallet
1. Run `more ~/.aptos/config.yaml` to see the `nft-receiver` private key and then copy it.
Expand All @@ -62,4 +97,12 @@ Aptos CLI is now set up for account blah as profile nft-receiver! Run `aptos --
1. Click **Library** at bottom.
1. See the NFT in your wallet.
1. See the NFT in your wallet.
## Deploy the NFT contract
Now you can add this smart contract to the Aptos network:
1. Check out and review the [NFT Tutorial](https://github.com/aptos-labs/nft-tutorial) source code.
1. Explore the `mint_nft` function in [`minting.move`](https://github.com/aptos-labs/nft-tutorial/blob/main/sources/minting.move).

0 comments on commit 08de836

Please sign in to comment.