Skip to content

Commit 041afd7

Browse files
committed
Update document with Work with web UI
1 parent c823709 commit 041afd7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $ npm install
7070

7171
**Note:** these smart contracts are not designed to be library contracts, and you can fork these contracts locally to modify them yourself, rather than importing them directly by a git link.
7272

73-
If you encounter a dependency conflict during installation, this is due to the version number of the hardhat-deploy-ethers module being incompatible with the @nomiclabs/hardhat-waffle required @nomiclabs/hardhat-ethers module version number. Make sure to add `--force` flag to `$ npm install` to resolve this problem.
73+
If you encounter a dependency conflict during installation, this is due to the version number of the `hardhat-deploy-ethers` module being incompatible with the `@nomiclabs/hardhat-waffle` required `@nomiclabs/hardhat-ethers` module version number. Make sure to add `--force` flag to `$ npm install` to resolve this problem.
7474

7575
### Membership NFT
7676

@@ -84,6 +84,25 @@ After deployment, you need to call the `setupGovernor` method to release importa
8484

8585
Run the `npm run deploy:test` command to deploy the contract, or you can refer to the `. /tests` folder for test cases.
8686

87+
### Work with Web UI
88+
89+
To use the contract with the Web UI, we need to run the hardhat network locally and export the `ABI` of the contracts in the directory where the UI is located, which by default is: `../website/contracts/`.
90+
91+
To run the hardhat network locally with contracts deployed:
92+
93+
```bash
94+
$ npm start
95+
$ npm run deploy:localhost
96+
```
97+
98+
And, add the `MulticallV1` contract address to `.env.local` of the Web UI project without `0x` prefix. (Make sure to replace with the address you just deployed, not the sample one)
99+
100+
```
101+
NEXT_PUBLIC_LOCALHOST_MULTICALL_ADDRESS=Cf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
102+
```
103+
104+
This is useful for third party web module like `multicall.js` or `useDapp`
105+
87106
### Extending Modules
88107

89108
Modules are an important part of aggressive governance. By writing your own modules, you can expand any business to be part of DAO.

0 commit comments

Comments
 (0)