You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/react-solidity-hardhat/README.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,29 @@ Contracts are written in `contracts/contracts`. Each smart contract has a Hardha
28
28
1. Edit smart contracts in `contracts/contracts`
29
29
2. Edit ignition module in `contracts/igniton/modules`
30
30
3. Run `npx hardhat compile` to compile smart contracts
31
-
4. Run `npx hardhat ignition deploy ./ignition/modules/<ModuleName>.ts --network polkadotHubTestnet` to deploy them
31
+
4. Run `npx hardhat ignition deploy ./ignition/modules/<ModuleName>.ts --network polkadotHubTestnet` to deploy them
32
+
33
+
### Note on committing `ignition/deployments`
34
+
35
+
This is a directory that contains build and deployment artifacts from `hardhat`.
36
+
They aren't ignored, becuase they are used for types generation for frontend: if there's a smart contract already deployed, you may want to keep it in git, so a fresh clone would give you a working frontend.
37
+
38
+
However, several issues with hardhat are resolved by removing `ignition/deployments` directory, to start fresh deployment. These issues include:
39
+
40
+
```
41
+
An unexpected error occurred:
42
+
43
+
Error: Could not parse row {...
44
+
```
45
+
46
+
```
47
+
[ MyTokenModule ] reconciliation failed ⛔
48
+
49
+
The module contains changes to executed futures:
50
+
...
51
+
```
52
+
53
+
In such cases, do `rm -rf ignition/deployments`, deploy the new contract, and commit the artifacts anew :)
32
54
33
55
## 2. Interacting with smart contracts from frontend app
34
56
@@ -49,30 +71,6 @@ writeContract({
49
71
});
50
72
```
51
73
52
-
## Troubleshooting
53
-
54
-
### hardhat errors
55
-
56
-
Several different problems have one solution: clear old deployment artifacts:
57
-
```sh
58
-
rm -rf ignition/deployments
59
-
```
60
-
61
-
These issues include following:
62
-
63
-
```
64
-
An unexpected error occurred:
65
-
66
-
Error: Could not parse row {...
67
-
```
68
-
69
-
```
70
-
[ MyTokenModule ] reconciliation failed ⛔
71
-
72
-
The module contains changes to executed futures:
73
-
...
74
-
```
75
-
76
74
More info at:
77
75
*[docs on smart contracts on Polkadot](https://docs.polkadot.com/develop/smart-contracts/)
0 commit comments