Make sure you have node and nvm installed:
nvm use v16
npm install -g yarn
npm install -g lerna
yarn install
lerna bootstrapMake sure to run lerna bootstrap after any git pull or whenever you have a problem with missing dependencies.
-
Sign Up for Web3.Storage, get an API key
-
Create a
packages/smart-contracts/.envfile (if you don't have one) and add the Web3.Storage API key to it there as followsWEB3STORAGE_KEY=<Web3.Storage API key> -
Open
packages/smart-contractsin two terminal windows. Runyarn start:nodein one and thenyarn start:setupin the other one. Make sure to copy one of the private keys displayed after you runyarn start:node. -
Add to
packages/dapp/.envconfig:FAST_REFRESH=true BROWSER=false HTTPS=true REACT_APP_LOG_LEVEL=debug REACT_APP_FILE_WEB3STORAGE_KEY=<Web3.Storage API key> REACT_APP_NETWORK_ID=31337 REACT_APP_NETWORK_PROVIDER=http://127.0.0.1:8545 REACT_APP_CONTRACT_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3 -
Add Hardhat Testnet network to Metamask
- URL:
http://127.0.0.1:8545 - Chain ID:
31337
- URL:
-
Add to Metamask some of the private keys from the hardhat console output that will be displayed when you run
yarn start:node -
Start the Dapp from
packages/dapp:yarn start
Contract Address: 0x0cc294153cE26686DE79E2c6bD76027D136ddfF7 (etherscan)
-
Get SPOA (Sokol Testned DAI)
-
Get your Google Maps API KEY (for getting GPS from Address)
-
Change
packages/dapp/.envconfig:FAST_REFRESH=true BROWSER=false HTTPS=true REACT_APP_LOG_LEVEL=debug REACT_APP_FILE_WEB3STORAGE_KEY=<Web3.Storage API key> REACT_APP_GOOGLE_API_KEY=<GOOGLE_API_KEY> REACT_APP_MODE=production REACT_APP_NETWORK_ID=77 REACT_APP_NETWORK_PROVIDER=https://sokol.poa.network REACT_APP_CONTRACT_ADDRESS=0x0cc294153cE26686DE79E2c6bD76027D136ddfF7 -
Add
Sokol Testnetto Metamask:- URL:
https://sokol.poa.network - Chain ID:
77
- URL:
-
Start the Dapp from
packages/dapp:yarn start