diff --git a/developer-docs-site/docs/guides/move-guides/mint-nft-cli.md b/developer-docs-site/docs/guides/move-guides/mint-nft-cli.md index 6e681cd05e60b..df0793ab50a9e 100644 --- a/developer-docs-site/docs/guides/move-guides/mint-nft-cli.md +++ b/developer-docs-site/docs/guides/move-guides/mint-nft-cli.md @@ -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. @@ -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. @@ -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. \ No newline at end of file +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).