diff --git a/README.md b/README.md index 9b1bc52..518359a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Coverage Report + +| Statements | Functions | Lines | +| ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| ![Statements](https://img.shields.io/badge/statements-71.73%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-65.19%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-67.43%25-red.svg?style=flat) | + # Let's Fucking Game This application was done during the [Chainlink Hackathon Fall 2022](https://chainlinkfall2022.devpost.com/) @@ -132,27 +138,38 @@ Secondary : ## Quick Start -Clone the repo and install all dependencies: +### Clone the repo: ```bash git clone https://github.com/lets-fucking-game/lets-fucking-game cd lets-fucking-game +``` + +### Install all dependencies: -yarn install +```bash +yarn install # install deps +yarn run build # install solc and other tools in the docker image ``` -Start up the local Hardhat network and deploy all contracts: +Don't forget to copy the .env.example file to a file named .env, and then edit it to fill in the details. + +### Start up the local Hardhat network and deploy all contracts: ```bash yarn chain ``` +### Startup the dapp + In a second terminal start up the local development server run the front-end app: ```bash yarn dev ``` +### Metamask configuration + To interact with the local network, follow this step-by-step guide on how to use [MetaMask with a Hardhat node](https://support.chainstack.com/hc/en-us/articles/4408642503449-Using-MetaMask-with-a-Hardhat-node). If you've set the mnemonic from MetaMask the first 20 accounts will be funded with ETH. diff --git a/package.json b/package.json index 83c695c..265b0ed 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "scripts": { "prepare": "husky install", "dev": "yarn workspace lets-fucking-game-dapp dev", - "build": "yarn workspace lets-fucking-game-dapp build", + "build": "yarn build:hardhat && yarn build:dapp", + "build:hardhat": "yarn workspace lets-fucking-game-hardhat build", + "build:dapp": "yarn workspace lets-fucking-game-dapp build", "export": "yarn workspace lets-fucking-game-dapp export", "start": "yarn workspace lets-fucking-game-dapp start", "chain": "yarn workspace lets-fucking-game-hardhat chain", diff --git a/packages/dapp/package.json b/packages/dapp/package.json new file mode 100644 index 0000000..09a971d --- /dev/null +++ b/packages/dapp/package.json @@ -0,0 +1,69 @@ +{ + "name": "lets-fucking-game-dapp", + "author": "@GuiDieudo", + "license": "MIT", + "version": "0.0.1", + "scripts": { + "dev": "next dev", + "build": "next build", + "export": "next export", + "start": "next start", + "type-check": "tsc --pretty --noEmit", + "format": "prettier --write .", + "lint": "eslint . --ext ts --ext tsx --ext js", + "test": "jest", + "test-all": "yarn lint && yarn type-check && yarn test" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "pre-push": "yarn run type-check" + } + }, + "lint-staged": { + "*.@(ts|tsx)": [ + "yarn lint" + ] + }, + "dependencies": { + "@chakra-ui/icons": "^2.0.4", + "@chakra-ui/react": "^2.2.4", + "@emotion/react": "^11", + "@emotion/styled": "^11", + "@usedapp/core": "1.1.3", + "@web3-react/core": "^6.1.9", + "@web3-react/injected-connector": "^6.0.7", + "@web3-react/walletconnect-connector": "^6.2.13", + "blockies-ts": "^1.0.0", + "deepmerge": "^4.2.2", + "ethers": "5.6.9", + "framer-motion": "^6", + "lodash": "4.17.21", + "next": "^12.2.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-gtm-module": "^2.0.11" + }, + "devDependencies": { + "@testing-library/react": "^13.3.0", + "@types/jest": "^28.1.6", + "@types/node": "^18.6.2", + "@types/react": "^18.0.15", + "@typescript-eslint/eslint-plugin": "^5.31.0", + "@typescript-eslint/parser": "^5.31.0", + "babel-jest": "^28.1.3", + "eslint": "^8.20.0", + "eslint-config-next": "^12.2.3", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-react": "^7.30.1", + "eslint-plugin-react-hooks": "^4.6.0", + "husky": "^8.0.1", + "identity-obj-proxy": "^3.0.0", + "jest": "^28.1.3", + "jest-watch-typeahead": "^2.0.0", + "lint-staged": "^13.0.3", + "prettier": "^2.7.1", + "types": "0.1.1", + "typescript": "^4.7.4" + } +} diff --git a/packages/hardhat/README.md b/packages/hardhat/README.md index 3066a41..b9dc11f 100644 --- a/packages/hardhat/README.md +++ b/packages/hardhat/README.md @@ -1,11 +1,5 @@ # Let's Fucking Game - Smart Contract -# Coverage Report - -| Statements | Functions | Lines | -| ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | -| ![Statements](https://img.shields.io/badge/statements-71.73%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-65.19%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-67.43%25-red.svg?style=flat) | - # Prerequisites ```shell