make install
make start_all
replace {MY_INFURA_KEY} by your own infura key and run following commands:
cd unilib
yarn hardhat node --fork https://mainnet.infura.io/v3/${MY_INFURA_KEY} # let this command run in a separate terminal
yarn hardhat run scripts/deploy.ts --network localhost
cd ../chain
yarn hardhat run scripts/deploy.ts --network localhost
optionally, to buy tokens, deposit collateral and open loans:
cd chain
yarn hardhat run scripts/mock.ts --network localhost
Loanster should now be deployed to your local ethereum hard fork
yarn hardhat test --network localhost
create webapp/.env file with your infura key:
REACT_APP_INFURA_ID={MY_INFURA_KEY}
run following commands:
cd webapp
yarn install
yarn dev
Open http://localhost:3000 with your browser to see the result.
connect metamask with a custom network:
network name: localhost RPC endpoint: http://localhost:8545 chain id: 31337 currency symbol: ETH
and import wallet from private key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Postgres database is used for storing data. To run it locally, use docker-compose:
docker-compose up
You can use DBeaver Community to connect to the database for manual inspections.
cd backend
npm run start:dev
We use Heroku to deploy our application. To deploy to Heroku, you need to have Heroku CLI installed. You can find the installation instructions here: https://devcenter.heroku.com/articles/heroku-cli