Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Template for blockchain projects with hardhat and react (vite)

Notifications You must be signed in to change notification settings

teonite/blockchain-template

Repository files navigation

This project demonstrates a setup for smart-contract development with hardhat and react.js

Hardhat & react blockchain template

Usage

Clone this repo:

git clone [email protected]:teonite/blockchain-template.git

Install hardhat & frontend dependencies:

yarn install && pushd frontend && yarn install && popd

Prepare .env file:

cp .env.example .env

and fill in your variables.

Local development

For local development we'll use a hardhat node. Run it with:

yarn run node

Then we need to deploy the contract:

yarn deploy:local

Your node logs should display info about the deployment.

Once the contract is deployed you can run vite dev server and start hacking on your app:

yarn dev

Run contract tests with:

yarn test:contracts

More info:

Multisignature deployments with Gnosis Safe and OpenZeppelin Defender

For multisignature deployment, you'll need an OpenZeppelin account and a Gnosis Safe. Follow this guide to gain understanding of the whole multisig deployment process: https://docs.openzeppelin.com/defender/guide-upgrades. This repository comes with multisig deployment helper scripts. Fill in your .env file with Gnosis Safe address and:

  1. Deploy the proxy contract to Rinkeby network:
yarn deploy:rinkeby

Then fill in .env file with proxy contract address.

  1. Transfer proxy ownership to Gnosis Safe:
yarn transfer-ownership:rinkeby
  1. Once the changes were made to the contract, you can propose the upgrade with:
yarn upgrade:rinkeby

Used libs & tech

TODOs & issues

About

Template for blockchain projects with hardhat and react (vite)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published