LogoLogo
  • Welcome
  • XRPL Basics
    • Getting Started
    • Payments
    • Reading and subscribing to Transactions
    • Writing and reading memos
    • Non Fungible Tokens
    • PathFinding
    • Escrow
    • Price Oracles
    • Tickets
    • Multi-Signature
  • Token Issuance and Liquidity
    • Creating Accounts
    • Issuing Tokens
    • Creating an AMM Pool
  • Cyphered Chat on XRPL
    • Set up
    • Set up Keys
    • Cypher the message
    • Set up the memo & send the tx
    • Get the message and decypher it
  • EVM Sidechain
    • Connecting Metamask
    • Bridging Assets
    • Remix
    • Banking App
    • Banking Contract Key Concepts
  • Tools
    • Xaman Setup
    • Metamask Setup
Powered by GitBook
On this page
  • Clone repo
  • Deploy the banking smart contract
  • Run the Frontend
Export as PDF
  1. EVM Sidechain

Banking App

In this workshop we will learn how to create a Fullstack app using hardhat

PreviousRemixNextBanking Contract Key Concepts

Last updated 8 months ago

Clone repo

First off we will clone the repo or import it into replit depending on your configuration.

From the root directory, run npm ito install common dependencies.

Deploy the banking smart contract

Navigate to the lending-contract folder and follow the instructions in the readme to deploy the contract:

  • install dependencies with npm i

  • add your private key to the .env file

  • fix the hardhat config

  • review the contract ()

  • compile the contract using npm run compile

  • deploy the contract using npm run deploy

You can verify your contract has been deployed using the XRPL EVM Explorer

Run the Frontend

Navigate to the lending-frontend folder and follow the instructions in the readme to run the front end:

  • install dependencies with npm i

  • run the frontend with npm run dev and notice the Connect Wallet button does not work

We need to set up the web 3 context, to do this navigate to the .shared folder and fix the web3-context.ts file, your web app should now look like this.

  • connect your account (the same EVM account you deployed the contract to)

  • try to deposit

  • fix the deposit function

  • try to withdraw

  • fix the withdraw function

  • try to lend

  • fix the lend function

  • try to repay

  • fix the repay function

Congratulations, you have just completed a full stack app using the XRPL EVM Sidechain.

https://github.com/XRPL-Commons/evm-banking-kryptoshpere-2024
in depth review of the contract here