Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

logo

rlogin-sample-apps

Basic Decentralized Application

This sample React application shows the basic implementation of rLogin. It allows a user to sign in to your app using their browser wallet or WalletConnect. The web3 provider is saved in the state so the dapp can interact with it. Examples of this interaction are signing messsages using personal_sign and sending a transaction with eth_sendTransaction.

This project was bootstrapped with Create React App and adds the following dependecies to implement rLogin and WalletConnect

  • rLogin
  • WalletConnect Web3 Provider - Used for WalletConnect. This is optional if you don't wish to support WalletConnect.
  • ethjs-query - Used to query the Ethereum RPC layer. However, you could also use ether.js, or web3.js, if you'd prefer.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn cypress

This repo uses cypress for e2e testing with a mock provider located here /cypress/fixtures/MockProvider.js. To run the test suite, first start an instance of the sample app at localhost:3000 with yarn start. Then in a different window, run yarn cypress.