Whale Alerts Dapp 🐋🚨

About

Aim: Allow user to track wallet addresses, cross-chain (ETH/BSC/MATIC/…) and recieve alerts when specific transaction conditions are met.

This initial tutorial video is a great introduction: Link to Moralis YouTube Video.

Built on create-react-app a ReactJS front-end with a Moralis backend.

Quick Launch 🚀

Via terminal, navigate to root directory:

npm install

Go to Moralis.io to create your server instance. In the root directory of your code base create a .env file containing the moralis servers' enviroment variables:

REACT_APP_MORALIS_APPLICATION_ID=xxx
REACT_APP_MORALIS_SERVER_URL=https://xxx.bigmoralis.com:2053/server

Install Moralis admin client:

npm install -g moralis-admin-cli

This will allow you to sync Moralis Cloud Functions in CloudFile:

moralis-admin-cli watch-cloud-file --moralisApiKey xxx --moralisApiSecret xxx --moralisSubdomain xxx.moralisweb3.com --autoSave 1 --moralisCloudfolder /xxx/moralis-whale-alerts/src/Cloud

Finally provide your path to the CloudFile and sync with Moralis server instance:

/xxx/moralis-whale-alerts/src/Cloud/CloudFile.js

Once installed and synced with your Moralis server instance, in the project directory run:

npm start

Dependencies 🏗

moralis: Docs

@chakra-ui/react: Docs

react-final-form: Docs

react, react-dom react-moralis should be installed automatically (package.json).

Adapt Alert Conditons 🛠

Cloud function run on watchEthAddress adds address to your list of addresses to track transactions on.

//
// sync all txs in realtime to WatchedEthAddress class
Moralis.Cloud.run("watchEthAddress", {
  address,});

Function afterSave on EthTransactions then is where you create conditons against those transactions to intiate alerts.

 Moralis.Cloud.afterSave("EthTransactions", async function (request) {
    
 }

Todos ✅

  • Dispatch alerts via Telegram/Twitter/
  • Threshold conditions against tx e.g. only txs > $1,000,000.
  • Enable cross-chain compatibility.
  • Much more TBA.

Community BUIDLing 👨‍🔧👩‍🔧