Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
yarn and npm documentation
  • Loading branch information
Taombawkry authored Nov 15, 2024
1 parent 38c1a39 commit 4f30abc
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions packages/hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,31 @@ npx hardhat verify <CONTRACT_ADDRESS> <CONSTRUCTOR_ARGS> --network celo
Check the file `hardhat.config.js` for Celo specific hardhat configuration.

5. ABI Synchronization
The project includes automatic ABI synchronization with your React frontend. ABIs are synced to `../react-app/src/abis/` during compilation.

**Usage**
- ABIs automatically sync on every `npx hardhat compile`
- To sync ABIs manually without compilation:
```bash
npm run sync:abis
```

### Configuration
- The sync script is made executable automatically during `npm install`
- To disable automatic syncing, remove the sync-abis.js call from the compile script in package.json
The project includes automatic ABI synchronization with your React frontend. ABIs are synced to `../react-app/src/abis/` during compilation.

- **Automatic Syncing**:
- The ABIs only sync automatically when you run:
```bash
yarn compile
```
or
```bash
npm run compile
```

- **Manual Syncing**:
- To sync ABIs manually without compilation:
- With npm:
```bash
npm run sync:abis
```
- With Yarn:
```bash
yarn sync:abis
```

##### Configuration
- The sync script (`sync-abis.js`) is made executable automatically during `npm install` or `yarn install` by the `postinstall` hook in `package.json`.
- **To disable automatic syncing**, remove the `sync-abis.js` call from the `compile` script in `package.json`. This configuration provides a flexible and consistent workflow for both `yarn` and `npm` users.

0 comments on commit 4f30abc

Please sign in to comment.