This app has been initialized with create-react-app
. It provides a UI to interact with the booking-contract:
- Connect to MetaMask
- View bookings
- Book a room
- Cancel your booking
- View how much time is remaining on the booking (base: 1h)
To run locally, you will first need to deploy the contract on a test / local network. For that, check this readme
After deploying the contract, update the contract address in the src/contractInfo/configContract.ts
.
Then, the classic:
npm i
npm start
And access the application on localhost.
You will need to configure metamask to connect to your local blockchain. The settings for Ganache are the following:
- Name: ganache
- RPC URL: http://localhost:7545
- ChainID: 1337
- Currency symbol: ETH
Once configured & selected, use the "connect" button on the WebUI.
If you receive "failed transaction" message during usage of the app, it's probably because you reseted your local blockchain and the nonce is not valid anymore. To fix that, go in settings > advanced in MetaMask and selet "Reset Account" (don't worry, it will just clean your tx history, and won't remove any of your coins).