This repo is for a starter project using Firebase and Hardhat
- Install hardhat and firebase
npm install --save-dev hardhat
npm install --save-dev firebase
- Create the sample project. The sample overwrites this file, so we work around.
mv README.md README.md.bak
npx hardhat
cat README.md >> README.md.bak
mv README.md.bak README.md
Use the JavaScript option.
- Initialize firebase
firebase init
In the first menu, at minimum you'll want to select:
Hosting: Configure files for Firebase Hosting...
Emulators: Set up local emulators for Firebase products
In the project setup menu, either create a new project or use an existing one.
In the emulators menu, at minimum you'll want to select:
Hosting Emulator
Other options can be safely left as defaults. If you need to update anything later, re-run firebase init
.
- Install Hardhat dependencies
npm install --save-dev @openzeppelin/hardhat-upgrades
npm install --save-dev @openzeppelin/contracts
npm install --save-dev @nomiclabs/hardhat-ethers ethers
You'll need a few separate shells.
- In shell 1, run a local node on all network interfaces.
npm run hh:node
- In shell 2, run firebase
npm run fb:start
Verify that you can connect to the local firebase server in your browser at http://localhost:5000.
- In shell 3, deploy to the hardhad project to the local node
npm run hh:deploy
- Check the Hardhat getting started guide
- Check the Firebase getting started guide
- https://css-tricks.com/things-ive-learned-css-grid-layout/
- https://github.com/aarohmankad/identicon-api
- https://github.com/gnidan/interval-trees-solidity
- https://support.google.com/admanager/answer/2884033
- https://support.google.com/admanager/answer/1628457
- https://www.decentraboard.com/
- https://fravoll.github.io/solidity-patterns/randomness.html
- https://cssgrid-generator.netlify.app/
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js