MNW smart contracts and React-based Dapp
This is a React Truffle box project: for more information, please check http://trufflesuite.com/boxes/react/index.html
This repository contains all the MNW smart contracts (in /contracts), along with a React.js front-end (in /client).
https://mnp-app.herokuapp.com/
Available for mumbai (Polygon testnet)
Players must have MATIC to pay transactions.
MATIC faucet https://faucet.polygon.technology/
See Slither analysis at feature/security
branch
See docs/devdoc/
See docs/userdoc/
In an empty local directory
git clone https://github.com/jcaporossi/mnp-trufflebox.git
After cloning the project, install dependencies with
cd mnp-trufflebox
npm install
cd client
npm install
cd ..
To compile all smart contracts:
truffle compile
Start a local node
Open a shell window and launch
ganache-cli
To launch unit tests associated with each smart contracts, in another terminal windows, at root of the project
See explanations there
truffle test
fill .env
file.
Don't forget, deployer account must have MATIC on Mumbai network
MATIC faucet https://faucet.polygon.technology/
truffle migrate --network mumbai
After deployment, give some LINK to Board and Bank contracts.
LINK faucet https://faucets.chain.link
truffle migrate
To launch React front-end
cd client
npm start
change rename replace App.js
component with App.local.js