@symfoni/hardhat-react
npm i @symfoni/hardhat-react

@symfoni/hardhat-react

A Hardhat plugin that generates a React hook component from your smart contracts. Hot reloaded into your React app. Deployed or not deployed. And everything typed and initialized.

by symfoni

0.3.0 (see all)License:MITTypeScript:Built-InCategories:React Ethereum Smart Contract
npm i @symfoni/hardhat-react
Readme

Universal Ethers backend (Hardhat) and Frontend(React) enviroment.

Packages

@symfoni/hardhat-demo

This is a demo project that includes hardhat-react as a plugin to generate the react component that is used to display some example content.

@symfoni/hardhat-react

Here is the code for the hardhat react plugin. Lerna will symlink this package to @symfoni/hardhat-demo so we can use it there.

Developing

  1. Install lerna globally npm i -g lerna
  2. Run yarn
  3. Run yarn run bootstrap // This will install all packages and build

You need three processes running for the full development enviroment

  1. yarn run watch watches changes in hardhat-react plugin. Lerna will then symlink this package to be used in hardhat-demo.
  2. yarn run node runs up a blockchain node, generate typechain interfaces, compile and deploy smart-contracts then watch for changes in smart contracts and deploy them.
  3. yarn run frontend runs a dev-server for a create-react-application from packages/hardhat-demo/frontend that is served on http://localhost:3000/ with hot-reloading. This will also reload when you change smart contracts

Publish a new NPM package

  1. yarn run pubish builds all packages and published them to npm with version bump.

Use a browser wallet to interact with Ethereum

  1. Use Metamask or some other wallet provider (https://metamask.io/).
  2. Use Mnemonic "shrug antique orange tragic direct drop abstract ring carry price anchor train".
  3. Set the Network to custom rpc at "http://127.0.0.1:8545/".

Demo should be working!

Downloads/wk

118

GitHub Stars

5

LAST COMMIT

NaNyrs ago

MAINTAINERS

2

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.3.0
latest
1yr ago
0.3.1-next.0
next
1yr ago
No tutorials found
Add a tutorial