Skip to content

A backend application that captures real-time blockchain data using moralis streams & stores them in a mongodb cluster

Notifications You must be signed in to change notification settings

Guap-Codes/USDT-token-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USDT Token Transfer Tracker (Mumbai Polygon Testnet)

Overview

This is a JavaScript backend application that tracks real-time blockchain data of USDT (Tether) token transfers on the Mumbai Polygon Testnet. The application utilizes MongoDB for data storage and Moralis Streams for real-time data retrieval from the blockchain.

The purpose of this project is to demonstrate how to build a simple backend system that can efficiently monitor and store USDT token transfer events on the Mumbai Polygon Testnet. It can be used as a foundation for building more complex blockchain data tracking applications or as a reference for integrating Moralis Streams with MongoDB.

Features

  • Real-time tracking of USDT token transfers on the Mumbai Polygon Testnet.
  • Storing relevant transaction data (sender, receiver, amount, timestamp) in a MongoDB database.
  • Easy setup and configuration.
  • Minimal and efficient codebase.

Prerequisites

Before running the application, make sure you have the following installed:

  • Node.js (version 18.5.0 or higher)
  • MongoDB cluster connection string

Installation

  1. Clone the repository:
git clone https://github.com/Guap-Codes/usdt-token-tracker.git
  1. Install the dependencies:
cd usdt-token-tracker
npm install

Configuration

  1. Rename the .env.example file to .env.

  2. Replace the placeholder values in the .env file with your actual MongoDB connection URI.

  3. Create an account on Moralis.io & create a new stream

  4. Get the token address of USDT on the polygon mumbai testnet from mumbai.polygonscan.com

Usage

To start the application, run the following command:

node index.js

The application will begin tracking USDT token transfers on the Mumbai Polygon Testnet in real-time. The incoming transactions will be stored in the MongoDB database specified in the .env file.

Data Schema

The data stored in the MongoDB database will have the following schema:

{
  "_id": "ObjectId", // MongoDB autogenerated ID
  "fromAddress": "string", // Ethereum address of the sender
  "toAddress": "string", // Ethereum address of the receiver
  "value": "string", // USDT token amount transferred
  "valueWithDecimal": "string", // USDT token amount transferred in decimal
  "timestamp": "number" // UNIX timestamp of the transaction
}

Contributing

We welcome contributions to improve the project. To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature/fix: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a pull request and describe the changes you made.

License

This project is licensed under the MIT License.

Acknowledgments

We would like to thank the contributors and maintainers of the following libraries and services:

  • Moralis Streams
  • MongoDB

Contact

If you have any questions or need further assistance, feel free to contact the project maintainers at yahayajelil@yahoo.com.

About

A backend application that captures real-time blockchain data using moralis streams & stores them in a mongodb cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published