Email email@example.com for Testflight invite.
Separate repository with firebase cloud functions: monitor-cloud-functions
Table of Contents
Fetching address balances and previous transactions
Subscribing to webhooks for new transactions on specified wallets.
Firebase Cloud Functions
Code comprising all four firebase cloud functions can be found in this repository
newUsercreates a corresponding database entry for each new user sign up.
deleteUserdeletes all corresponding database info and deletes all associated webhooks users who delete their firebase auth account
newWalletfetches 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
webhookEndpointa 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.
. └── 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
- Push notification permissions are initialized on login.
- The client collects the unique device token (as well as listens for changes) and pushes it to the realtime database.
- Firebase Functions handles webhook callbacks and sending push notifications to users on new transactions.
Standard email/password user auth using react-native-firebase
Good Test Wallets
- wallet with 17 txs 0xe8f6f556d571d149a4156aeb642a3acc7e966fe8
- 230 txs 0x995a25a5bc27c239cc40453ce4a436532b9fc01c
- 0 txs 0x27337b5363ebfd784775cc85b978fc7b02f59cae