Skip to content

obscureozy/tatum-tx-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tatum Transaction Simulator

A React-based web application for simulating Ethereum transactions on the Sepolia testnet using the Tatum API. The application provides a matrix-style interface for estimating gas costs for both native ETH and ERC20 token transfers.

Features

  • 🎨 Matrix-style UI with green-on-black theme
  • 💰 Support for both native ETH and ERC20 token transfers
  • 🔍 Real-time gas estimation
  • 📊 Detailed gas price breakdowns (Safe, Standard, Fast)
  • 💵 Transaction cost estimates in ETH
  • 🌐 Sepolia testnet integration

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Tatum API key

Installation

  1. Clone the repository:
git clone https://github.com/obscureozy/tatum-tx-simulator.git
cd tatum-tx-simulator
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your Tatum API key:
REACT_APP_TATUM_API_KEY=your-api-key-here

Usage

  1. Start the development server:
npm start
  1. Open http://localhost:3000 in your browser.

  2. Choose between Native ETH or ERC20 Token transfer simulation.

  3. Enter the required details:

    • For Native ETH: From Address, To Address, and Value in Wei
    • For ERC20: From Address, To Address, Token Amount, and Token Contract Address
  4. Click "Simulate" to get gas estimates and transaction costs.

API Integration

The application uses the Tatum API for gas estimation:

  • Endpoint: https://api.tatum.io/v3/ethereum/gas
  • Method: POST
  • Headers:
    • x-api-key: Your Tatum API key
    • Content-Type: application/json

Response Format

The API returns gas estimates in the following format:

{
  "gasLimit": "21800",
  "gasPrice": "1853943",
  "estimations": {
    "safe": "1853943",
    "standard": "1853943",
    "fast": "1853943",
    "baseFee": "1853943"
  }
}

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published