Skip to content

Commit 95d4479

Browse files
committed
storytelling cleanup
1 parent 9705924 commit 95d4479

File tree

10 files changed

+65
-37
lines changed

10 files changed

+65
-37
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
nav:
2-
- 'Deploy a Basic Contract': deploy-basic
3-
- 'Deploy an ERC-20': deploy-erc20
4-
- 'Deploy an NFT': deploy-nft
2+
- 'Deploy Basic Contract': deploy-basic
3+
- 'Deploy ERC-20 Token': deploy-erc20
4+
- 'Deploy ERC-721 NFT': deploy-nft
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
nav:
2-
- 'Using Remix IDE': remix.md
3-
- 'Using Hardhat': hardhat.md
2+
- 'Remix IDE': basic-remix.md
3+
- 'Hardhat': basic-hardhat.md
44
# - 'Using Foundry': foundry.md

smart-contracts/cookbook/smart-contracts/deploy-basic/hardhat.md renamed to smart-contracts/cookbook/smart-contracts/deploy-basic/basic-hardhat.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ Follow these steps to create your smart contract:
119119
Compile your `Storage.sol` contract using the following command:
120120

121121
```bash
122-
npx hardhat build
122+
npx hardhat compile
123123
```
124124

125125
You will see a message in the terminal confirming the contract was successfully compiled similar to the following:
126126

127127
<div id="termynal" data-termynal>
128-
<span data-ty="input"><span class="file-path"></span>npx hardhat build</span>
128+
<span data-ty="input"><span class="file-path"></span>npx hardhat compile</span>
129129
<span data-ty>Downloading solc 0.8.28</span>
130130
<span data-ty>Downloading solc 0.8.28 (WASM build)</span>
131131
<span data-ty>Compiled 1 Solidity file with solc 0.8.28 (evm target: cancun)</span>
@@ -134,6 +134,8 @@ You will see a message in the terminal confirming the contract was successfully
134134

135135
## Set Up Deployment
136136

137+
Follow these steps to prepare for contract deployment:
138+
137139
1. Delete the default file(s) inside the `ignition/modules` directory.
138140

139141
2. Create a new file named `Storage.ts` inside the `ignition/modules` directory.
@@ -175,14 +177,14 @@ npx hardhat ignition deploy ignition/modules/Storage.ts --network polkadotHubTes
175177

176178
Walk through deploying a fully-functional ERC-20 to the Polkadot Hub using Hardhat.
177179

178-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/hardhat/)
180+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-hardhat/)
179181

180182
- <span class="badge guide">Guide</span> __Deploy an NFT__
181183

182184
---
183185

184186
Walk through deploying a NFT to the Polkadot Hub using Hardhat.
185187

186-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/hardhat/)
188+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/nft-hardhat/)
187189

188190
</div>

smart-contracts/cookbook/smart-contracts/deploy-basic/remix.md renamed to smart-contracts/cookbook/smart-contracts/deploy-basic/basic-remix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ Once successfully deployed, your contract will appear in the **Deployed Contract
6969

7070
Walk through deploying a fully-functional ERC-20 to the Polkadot Hub using Remix.
7171

72-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/remix/)
72+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-remix/)
7373

7474
- <span class="badge guide">Guide</span> __Deploy an NFT__
7575

7676
---
7777

7878
Walk through deploying a NFT to the Polkadot Hub using Remix.
7979

80-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/remix/)
80+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/nft-remix/)
8181

8282
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
title: Deploy an ERC-20
22
nav:
3-
- 'Remix': erc20-remix.md
3+
- 'Remix IDE': erc20-remix.md
44
- 'Hardhat': erc20-hardhat.md
55
# - 'Foundry': erc20-foundry.md

smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-hardhat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ Congratulations! You've successfully deployed an ERC-20 token contract to the Po
153153

154154
Walk through deploying an ERC-721 Non-Fungible Token (NFT) using OpenZeppelin's battle-tested NFT implementation and Remix.
155155
156-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/remix/)
156+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/nft-remix/)
157157
158158
</div>

smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-remix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Follow these steps to deploy the contract using Remix:
6363
3. Configure the contract parameters to enter the address that will own the deployed token contract.
6464
4. Click the **Deploy** button to initiate the deployment.
6565
5. Approve the transaction in your MetaMask wallet.
66-
6. If the deployment process succeeded, you will see the transaction details in the terminal, including the contract address and deployment transaction hash.
66+
6. You will see the transaction details in the terminal when the deployment succeeds, including the contract address and deployment transaction hash.
6767
6868
![](/images/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-remix-4.gif)
6969
@@ -95,6 +95,6 @@ Feel free to explore and interact with the contract's other functions by selecti
9595
9696
Walk through deploying an ERC-721 Non-Fungible Token (NFT) using OpenZeppelin's battle-tested NFT implementation and Remix.
9797
98-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/remix/)
98+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/nft-remix/)
9999
100100
</div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
nav:
2-
- 'Using Remix': remix.md
3-
- 'Using Hardhat': hardhat.md
2+
- 'Remix IDE': nft-remix.md
3+
- 'Hardhat': nft-hardhat.md
44
# - 'Using Foundry': foundry.md

smart-contracts/cookbook/smart-contracts/deploy-nft/hardhat.md renamed to smart-contracts/cookbook/smart-contracts/deploy-nft/nft-hardhat.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
---
2-
title: Deploy an NFT to Polkadot Hub with Hardhat
2+
title: Deploy ERC-721 Using Hardhat
33
description: Learn how to deploy an ERC-721 NFT contract to Polkadot Hub with Hardhat, a comprehenive development environment with built-in deployment capabilities.
44
tutorial_badge: Beginner
55
categories: Basics, Smart Contracts
66
tools: EVM Wallet, Hardhat
77
---
88

9-
# Deploy an NFT with Hardhat
9+
# Deploy ERC-721 Using Hardhat
1010

1111
## Introduction
1212

1313
Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification.
1414

15-
This guide demonstrates how to deploy an [ERC-721](https://eips.ethereum.org/EIPS/eip-721){target=\_blank} NFT contract to [Polkadot Hub](/smart-contracts/overview/#smart-contract-development){target=\_blank}. You'll use [OpenZeppelin's battle-tested NFT implementation](https://github.com/OpenZeppelin/openzeppelin-contracts){target=\_blank} and [Hardhat](https://hardhat.org/docs/getting-started){target=\_blank}, a comprehensive development environment with built-in testing, debugging, and deployment capabilities. Hardhat uses standard Solidity compilation to generate EVM bytecode, making it fully compatible with Polkadot Hub's EVM environment.
15+
This guide demonstrates how to deploy an [ERC-721](https://eips.ethereum.org/EIPS/eip-721){target=\_blank} NFT contract to [Polkadot Hub](/smart-contracts/overview/#smart-contract-development){target=\_blank}. You'll use OpenZeppelin's battle-tested [NFT implementation](https://github.com/OpenZeppelin/openzeppelin-contracts){target=\_blank} and [Hardhat](https://hardhat.org/docs/getting-started){target=\_blank}, a comprehensive development environment with built-in testing, debugging, and deployment capabilities. Hardhat uses standard Solidity compilation to generate EVM bytecode, making it fully compatible with Polkadot Hub's EVM environment.
1616

1717
## Prerequisites
1818

19-
- Basic understanding of Solidity programming and NFT standards.
20-
- Node.js v22.13.1 or later.
21-
- A funded account with tokens for transaction fees. This example will deploy the contract to the Polkadot TestNet, so you'll [need some TestNet tokens](/smart-contracts/faucet/#get-test-tokens){target=\_blank} from the [Polkadot Faucet](https://faucet.polkadot.io/?parachain=1111){target=\_blank}.
19+
Before you begin, ensure you have the following:
20+
21+
- A basic understanding of [Solidity](https://www.soliditylang.org/){target=\_blank} programming and [ERC-721](https://ethereum.org/developers/docs/standards/tokens/erc-721/){target=\_blank} non-fungible tokens.
22+
- Node.js v22.13.1 or later installed.
23+
- Test tokens for gas fees, available from the [Polkadot faucet](https://faucet.polkadot.io/){target=\_blank}. See [Get Test Tokens](/smart-contracts/faucet/#get-test-tokens){target=\_blank} for a guide to using the faucet.
2224
- A wallet with a private key for signing transactions.
2325

2426
## Set Up Your Project
2527

26-
Take the following steps to get started:
27-
28-
1. Initialize your Hardhat project:
28+
1. Use the following terminal commands to create a directory and initialize your Hardhat project inside of it:
2929

3030
```bash
3131
mkdir hardhat-nft-deployment
3232
cd hardhat-nft-deployment
3333
npx hardhat --init
3434
```
3535

36-
2. Install OpenZeppelin contracts:
36+
2. Install the OpenZeppelin contract dependencies using the command:
3737

3838
```bash
3939
npm install @openzeppelin/contracts
4040
```
4141

4242
## Configure Hardhat
4343

44-
Edit `hardhat.config.ts`:
44+
Open `hardhat.config.js` and update to add `polkadotHubTestnet` to the `networks` configuration as highlighted in the following example code:
4545

46-
```typescript title="hardhat.config.ts"
46+
```typescript title="hardhat.config.ts" hl_lines='39-44'
4747
import type { HardhatUserConfig } from 'hardhat/config';
4848
4949
import hardhatToolboxViemPlugin from '@nomicfoundation/hardhat-toolbox-viem';
@@ -97,9 +97,15 @@ export default config;
9797
!!! tip
9898
Learn how to use Hardhat's [Config Variables](https://hardhat.org/docs/learn-more/configuration-variables){target=\_blank} to handle your private keys in a secure way.
9999
100-
## Create Your Contract
100+
## Create the Contract
101+
102+
Follow these steps to create your smart contract:
103+
104+
1. Delete the default contract file(s) in the `contracts` directory.
101105
102-
Create `contracts/MyNFT.sol`:
106+
2. Create a new file named `MyNFT.sol` inside the `contracts` directory.
107+
108+
3. Add the following code to create the `MyNFT.sol` smart contract:
103109
104110
```solidity title="contracts/MyNFT.sol"
105111
// SPDX-License-Identifier: MIT
@@ -123,15 +129,33 @@ contract MyNFT is ERC721, Ownable {
123129
}
124130
```
125131
126-
## Compile
132+
## Compile the Contract
133+
134+
Compile your `MyNFT.sol` contract using the following command:
127135
128136
```bash
129137
npx hardhat compile
130138
```
131139
140+
You will see a message in the terminal confirming the contract was successfully compiled similar to the following:
141+
142+
<div id="termynal" data-termynal>
143+
<span data-ty="input"><span class="file-path"></span>npx hardhat compile</span>
144+
<span data-ty>Downloading solc 0.8.28</span>
145+
<span data-ty>Downloading solc 0.8.28 (WASM build)</span>
146+
<span data-ty>Compiled 1 Solidity file with solc 0.8.28 (evm target: cancun)</span>
147+
<span data-ty="input"><span class="file-path"></span></span>
148+
</div>
149+
132150
## Set Up Deployment
133151
134-
Create a deployment module in `ignition/modules/MyNFT.ts`:
152+
Follow these steps to prepare for contract deployment:
153+
154+
1. Delete the default file(s) inside the `ignition/modules` directory.
155+
156+
2. Create a new file named `MyNFT.ts` inside the `ignition/modules` directory.
157+
158+
3. Open `ignition/modules/MyNFT.ts` and add the following code to create your deployment module:
135159
136160
```typescript title="ignition/modules/MyNFT.ts"
137161
import { buildModule } from '@nomicfoundation/hardhat-ignition/modules';
@@ -145,14 +169,16 @@ export default buildModule('MyNFTModule', (m) => {
145169
146170
Replace `INSERT_OWNER_ADDRESS` with your desired owner address.
147171
148-
## Deploy
172+
## Deploy the Contract
149173
150-
Deploy to Polkadot Hub TestNet:
174+
Deploy your contract to Polkadot Hub TestNet using the following command:
151175
152176
```bash
153177
npx hardhat ignition deploy ignition/modules/MyNFT.ts --network polkadotHubTestnet
154178
```
155179
180+
Congratulations! You've successfully deployed an ERC-721 NFT contract to the Polkadot TestNet using Hardhat.
181+
156182
## Where to Go Next
157183
158184
<div class="grid cards" markdown>
@@ -172,6 +198,6 @@ npx hardhat ignition deploy ignition/modules/MyNFT.ts --network polkadotHubTestn
172198
173199
Walk through deploying a fully-functional ERC-20 to the Polkadot Hub using Hardhat.
174200
175-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/hardhat/)
201+
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-hardhat/)
176202
177203
</div>

smart-contracts/cookbook/smart-contracts/deploy-nft/remix.md renamed to smart-contracts/cookbook/smart-contracts/deploy-nft/nft-remix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Deploy an NFT to Polkadot Hub with Remix
2+
title: Deploy ERC-721 NFT Using Remix
33
description: Learn how to deploy an ERC-721 NFT contract to Polkadot Hub using Remix, a browser-based IDE for quick prototyping and learning.
44
tutorial_badge: Beginner
55
categories: Basics, Smart Contracts

0 commit comments

Comments
 (0)