- Sign up for an account at Alchemy
- Go to the Alchemy dashboard
- Click on "Create App"
- Enter the app name "Driver Registration"
- Enter the app description "Driver Registration DApp"
- Choose chain "Ethereum"
- Choose Network "Goerli"
- Follow this official tutorial by MetaMask on getting started with MetaMask
- Switch MetaMask to Goerli
- Copy your public address
- Go to Goerli FAUCET
- Log in with your Alchemy account
- Paste your public address
- Click "Send Me ETH"
- Click on MetaMask to see the balance increase in a while
- In the root of the project, find .env.example
- Duplicate this file and rename it to .env
- Open .env
- Go to the Alchemy dashboard
- Click on "View Key" for the Driver Registration app
- Copy the "HTTPS" link
- Replace
API_URL
in .env - Follow this official tutorial by MetaMask on How to reveal your Secret Recovery Phrase
- Copy the 12-word phrase
- Replace
MNEMONIC
in .env - Save .env
- Download and install node.js.
- Follow this official instruction by nodejs.dev for your platform on Installing Node.js via Package Manager
- Install truffle globally
- On a Unix-like system use,
sudo npm install -g truffle
- On Windows, use,
npm install -g truffle
- On a Unix-like system use,
If the truffle
command doesn't work on Windows, the execution policy might be set to restricted. Follow these steps to remove the restriction.
This is an extremely dangerous setting change. It might leave space for malicious scripts to run on your system. Do it at your own risk. Alternatively, use npx
.
- Open Power Shell as administrator.
- Enter command
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
- Enter
Y
if prompted
truffle migrate --reset --network goerli
- Copy the contract address
- Open /client/src/constants.js
- Replace the contract address
- Working with dates https://soliditytips.com/articles/solidity-dates-time-operations/