Skip to content
A mobile app that keeps track of Ethereum transactions and balances
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.opensource
MY NOTES
android
assets
bin
design
ios
screens
utils
.babelrc
.buckconfig
.editorconfig
.flowconfig
.gitattributes
.gitignore
.watchmanconfig
App.js
App.test.js
LICENSE
README.md
app.json
index.js
package.json
react_native_firebase.md

README.md

Monitor - Ethereum Tracker

developer

A mobile app that keeps track of Ethereum transactions and balances.

Email app@dillonpetito.com for Testflight invite.


Separate repository with firebase cloud functions: monitor-cloud-functions


Table of Contents

About
    Description
    Screenshots
    Demo Video

Technical Details
    Dependencies
    APIs

Firebase
    Firebase Cloud Functions
    Realtime Database
    Cloud Messaging
    User Authentication


Screenshots

app gif 1 app gif 2 app gif 3
screenshot screenshot screenshot

Technical Details

Dependencies

react react-native react-native-firebase
react-navigation react-native-swipeout
react-native-vector-icons react-native-gesture-handler
crypto-js moment

APIs

BlockCypher

Fetching address balances and previous transactions

Etherscan

Subscribing to webhooks for new transactions on specified wallets.


Firebase

Firebase Cloud Functions

Code comprising all four firebase cloud functions can be found in this repository

  1. newUser creates a corresponding database entry for each new user sign up.
  2. deleteUser deletes all corresponding database info and deletes all associated webhooks users who delete their firebase auth account
  3. newWallet fetches balance and most recent 10,000 transactions for new wallets via the Etherscan API and populates the Firebase Realtime Database. Also listens for new transactions by creating a webhook with the BlockCypher API
  4. webhookEndpoint a webhook callback function that accents new transactions, sends a push notification to the user associated with the wallet and populates the Firebase Realtime Database with new transactions.

Realtime Database

.
└── users 
│   └── uid : user id from firebase auth
|       ├── email     : email associated with account
|       ├── createdOn : date account was created
|       ├── pushToken : token used for push notifications
|       └── wallets
│           └── key 
│               ├── address    : wallet address
│               ├── nickname   : user-defined name
│               ├── balance    : ETH balance
│               ├── createdOn  : date wallet was created
│               ├── webhookId  : BlockCypher webhook id
│               ├── isFetchingTransactions : true while using etherscan api
│               └── transactions 
│                   └── key 
│                       ├── txHash      : full tx hash
│                       └── value       : value in ETH
│                       ├── type        : outgoing/incoming/other
│                       ├── fromAddress : outgoing wallet
│                       ├── toAddress   : incoming wallet
│                       ├── blockHash   : hash of mined block tx was in
│                       ├── blockNumber : number of mined block tx was in
│                       ├── timeStamp   : unix timestamp
│                       ├── dateString  : parsed timestamp
│                       ├── gasPrice    : price of gas
│                       ├── gasUsed     : gas used

Cloud Messaging

  1. Push notification permissions are initialized on login.
  2. The client collects the unique device token (as well as listens for changes) and pushes it to the realtime database.
  3. Firebase Functions handles webhook callbacks and sending push notifications to users on new transactions.

User Authentication

Standard email/password user auth using react-native-firebase


More

Good Test Wallets

  • wallet with 17 txs 0xe8f6f556d571d149a4156aeb642a3acc7e966fe8
  • 230 txs 0x995a25a5bc27c239cc40453ce4a436532b9fc01c
  • 0 txs 0x27337b5363ebfd784775cc85b978fc7b02f59cae
You can’t perform that action at this time.