Skip to content
forked from rwardd/UQBet

Ethereum betting app made with hardhat and react.

License

Notifications You must be signed in to change notification settings

nathanhettige/UQBet

 
 

Repository files navigation

UQBet

This repository contains UQBet, a betting website running on the Ethereum network. The application is currently deployed here.

Alt text

This project is intended to be used with the Hardhat Beginners Tutorial, but you should be able to follow it by yourself by reading the README and exploring its contracts, tests, scripts and frontend directories.

Quick start

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/rwardd/UQBet.git
cd UQBet
yarn install

Once installed, let's run Hardhat's testing network:

npx hardhat node

Then, on a new terminal, go to the repository's root folder and run this to deploy your contract:

npx hardhat run scripts/deploy.js --network localhost

Finally, we can run the frontend with:

cd frontend
yarn install
yarn start

Note: There's an issue in ganache-core that can make the yarn install step fail.

If you see npm ERR! code ENOLOCAL, try running yarn install --frozen-lockfile instead of yarn install.

Open http://localhost:3000/ to see your Dapp. You will need to have Metamask installed and listening to localhost 8545.

User Guide

You can find detailed instructions on using this repository and many tips in its documentation.

For a complete introduction to Hardhat, refer to this guide.

What’s Included?

Your environment will have everything you need to build a Dapp powered by Hardhat and React.

  • Hardhat: An Ethereum development task runner and testing network.
  • Mocha: A JavaScript test runner.
  • Chai: A JavaScript assertion library.
  • ethers.js: A JavaScript library for interacting with Ethereum.
  • Waffle: To have Ethereum-specific Chai assertions/mathers.
  • frontend/UQBet: A frontend which uses Create React App.
  • grommet: A lightweight UI library

Troubleshooting

  • Invalid nonce errors: if you are seeing this error on the npx hardhat node console, try resetting your Metamask account. This will reset the account's transaction history and also the nonce. Open Metamask, click on your account followed by Settings > Advanced > Reset Account.
  • Use node version 16.x.x. Problems occur when using version 17.x.x

About

Ethereum betting app made with hardhat and react.

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 67.0%
  • Solidity 16.1%
  • JavaScript 15.1%
  • HTML 1.8%