Skip to content

Commit 800dd7e

Browse files
Update README.md in react-solidity-hardhat
1 parent 14b037e commit 800dd7e

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

templates/react-solidity-hardhat/README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,29 @@ Contracts are written in `contracts/contracts`. Each smart contract has a Hardha
2828
1. Edit smart contracts in `contracts/contracts`
2929
2. Edit ignition module in `contracts/igniton/modules`
3030
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 :)
3254

3355
## 2. Interacting with smart contracts from frontend app
3456

@@ -49,30 +71,6 @@ writeContract({
4971
});
5072
```
5173

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-
7674
More info at:
7775
* [docs on smart contracts on Polkadot](https://docs.polkadot.com/develop/smart-contracts/)
7876
* [hardhat docs](https://hardhat.org/docs)

0 commit comments

Comments
 (0)