@@ -7,13 +7,13 @@ All you have to do is create a new repository from the template and start coding
7
7
8
8
## Hardhat Configuration
9
9
10
- - [ Typechain] ( https://github.com/dethcrypto/TypeChain ) plugin enabled (typescript type bindings for smart contracts)
11
- - [ hardhat-deploy ] ( https://github.com/wighawag/hardhat-deploy ) plugin enabled
12
- - Testing environment configured and operational, with test coverage
13
- - Prettier and eslint configured for project files and solidity smart contract
14
- - [ Solhint] ( https://github.com/protofire/solhint ) configured for enforcing best practices
15
- - Github actions workflows prepared for CI/CD
16
- - Prepared Smart Contract Examples, Tests, Deployments and Tasks for Common ERC Standards (ERC20, ERC721, ERC1155)
10
+ - [ Typechain] ( https://github.com/dethcrypto/TypeChain ) plugin enabled (typescript type bindings for smart contracts)
11
+ - [ Ignition ] ( https://hardhat.org/ignition/docs/getting-started ) for contract deployment
12
+ - Testing environment configured and operational, with test coverage
13
+ - Prettier and eslint configured for project files and solidity smart contract
14
+ - [ Solhint] ( https://github.com/protofire/solhint ) configured for enforcing best practices
15
+ - Github actions workflows prepared for CI/CD
16
+ - Prepared Smart Contract Examples, Tests, Deployments and Tasks for Common ERC Standards (ERC20, ERC721, ERC1155)
17
17
18
18
Check the Hardhat documentation for more information.
19
19
@@ -27,30 +27,44 @@ https://hardhat.org/getting-started/
27
27
│ ├── BasicERC1155.sol
28
28
│ ├── BasicERC20.sol
29
29
│ └── BasicERC721.sol
30
- ├── deploy
31
- │ ├── Deploy_BasicERC1155.ts
32
- │ ├── Deploy_BasicERC20.ts
33
- │ └── Deploy_BasicERC721.ts
34
- ├── deployments
35
- ├── hardhat.config.ts
30
+ ├── ignition
31
+ │ ├── deployments
32
+ │ ├── modules
33
+ │ │ ├── BasicERC1155Module.ts
34
+ │ │ ├── BasicERC20Module.ts
35
+ │ │ └── BasicERC721Module.ts
36
+ │ └── parameters
37
+ │ └── custom.json
36
38
├── tasks
37
39
│ ├── erc1155
40
+ │ │ ├── base-uri.ts
41
+ │ │ ├── contract-uri.ts
42
+ │ │ └── mint.ts
38
43
│ ├── erc20
44
+ │ │ └── mint.ts
39
45
│ ├── erc721
46
+ │ │ ├── base-uri.ts
47
+ │ │ ├── contract-uri.ts
48
+ │ │ └── mint.ts
40
49
│ └── utils
41
- └── test
42
- ├── BasicERC1155.ts
43
- ├── BasicERC20.ts
44
- └── BasicERC721.ts
50
+ │ ├── accounts.ts
51
+ │ ├── balance.ts
52
+ │ ├── block-number.ts
53
+ │ └── send-eth.ts
54
+ ├── test
55
+ │ ├── BasicERC1155.ts
56
+ │ ├── BasicERC20.ts
57
+ │ └── BasicERC721.ts
58
+ └── hardhat.config.ts
45
59
```
46
60
47
61
## Supported Networks
48
62
49
- - Hardhat Network (localhost)
50
- - Ethereum Mainnet
51
- - Ethereum Sepolia Testnet
52
- - Polygon Mainnet
53
- - Polygon Mumbai Testnet
63
+ - Hardhat Network (localhost)
64
+ - Ethereum Mainnet
65
+ - Ethereum Sepolia Testnet
66
+ - Polygon Mainnet
67
+ - Polygon Mumbai Testnet
54
68
55
69
Feel free to add more networks in ` hardhat.config.ts ` file.
56
70
@@ -66,12 +80,12 @@ https://hardhat.org/guides/shorthand.html
66
80
67
81
### Common Shorthand Commands
68
82
69
- - ` hh compile ` - to compile smart contract and generate typechain ts bindings
70
- - ` hh test ` - to run tests
71
- - ` hh deploy ` - to deploy to local network (see options for more)
72
- - ` hh node ` - to run a localhost node
73
- - ` hh help ` - to see all available commands
74
- - ` hh TABTAB ` - to use autocomplete
83
+ - ` hh compile ` - to compile smart contract and generate typechain ts bindings
84
+ - ` hh test ` - to run tests
85
+ - ` hh igntion ` - to deploy smart contracts
86
+ - ` hh node ` - to run a localhost node
87
+ - ` hh help ` - to see all available commands
88
+ - ` hh TABTAB ` - to use autocomplete
75
89
76
90
## Usage
77
91
@@ -101,23 +115,37 @@ Make sure you include either `MNEMONIC` or `PRIVATE_KEY` in your `.env` file.
101
115
102
116
> This is an example flow to deploy an ERC721 token to a public network and interact with it.
103
117
104
- #### 1. Deploy BasicERC721 Contract
118
+ #### 1.1 Deploy BasicERC721 Contract
105
119
106
120
``` shell
107
- hh deploy --network sepolia --tags BasicERC721
121
+ hh ignition deploy ignition/modules/BasicERC721Module.ts --network sepolia
108
122
```
109
123
110
- #### 2. Verify Contract
124
+ ** Verify contract **
111
125
112
126
``` shell
113
- hh --network sepolia etherscan-verify
127
+ hh ignition verify chain-11155111
114
128
```
115
129
116
- #### 3. Interact With Contract - Mint
130
+ #### 1.2 Deploy and Verify
131
+
132
+ ``` shell
133
+ hh ignition deploy ignition/modules/BasicERC721Module.ts --network sepolia --verify
134
+ ```
135
+
136
+ #### 1.3 Deploy and Verify with Custom Parameters
137
+
138
+ Look at ` ignition/parameters/custom.json ` to see how to adjust contract parameters
139
+
140
+ ``` shell
141
+ hh ignition deploy ignition/modules/BasicERC721Module.ts --network sepolia --verify --parameters ignition/parameters/custom.json
142
+ ```
143
+
144
+ #### 2. Interact With Contract - Mint
117
145
118
146
``` shell
119
147
hh erc721-mint \
120
- --contract 0x77337983A7D1699FaF51a5f43b9907fB7B614097 \
148
+ --contract 0x1FEB5675Be6F256c4680BE447D6C353E02e04fb9 \
121
149
--recipient 0x73faDd7E476a9Bc2dA6D1512A528366A3E50c3cF \
122
150
--network sepolia
123
151
```
0 commit comments