Search
K

DEPLOYING DE-FI BANK DAPP

This is a guide for deploying a Defi Bank dapp on the gather network testnet. You can deposit & withdraw funds.
You can also borrow Defi bank currency (DBC) and payoff using GTHs.

Prerequisites:

  1. 1.
    MetaMask or any web3 wallet configured with Gather testnet.
  2. 2.
    Testnet GTHs.
  3. 3.
    Install NodeJS, should work with any node version below 16.5.0.
  4. 4.
    Install Truffle.

STEP - 1:

Clone/Download the repository on your local machine.
git clone https://github.com/GatherNetwork/Defi-Bank.git

STEP - 2:

Install dependencies.
cd Defi-Bank
npm install

STEP - 3:

Create a .env file in the root directory. Copy the content from existing .env.example into .env file.
Update your MetaMask wallet mnemonic in the .env file.

STEP - 4:

Migrate Smart Contracts to Gather testnet. At this step, we are deploying our smart contract on the Gather testnet. You can also deploy your contract on other Ethereum-based test networks, but for that network, configurations need to be changed.
truffle migrate --reset --network gather

STEP - 5:

As the smart contracts are deployed on the Gather testnet, now we can start our dapp frontend and interact with the deployed smart contracts.
npm run start

STEP - 6:

Now you can connect your MetaMask wallet account with dapp. Unlock your MetaMask wallet and reload the dapp. Your account will connect automatically and you can see your wallet address on the dapp.
Your dapp is successfully launched. You can start depositing and withdrawing testnet GTHs. You can also borrow Defi bank currency (DBC), you can use GTHs as collateral and get 50% of collaterals as DBC tokens. You can also payoff your borrowings.

VIDEO