Skip to content

Gravity Multi Sender is an innovative platform that allows the seamless transfer of tokens $G In Gravity Alpha Mainnet to multiple addresses simultaneously, all within a single transaction.

Notifications You must be signed in to change notification settings

isaacnewton123/GravityMultiSender

Repository files navigation

GravityMultiSender

Gravity MultiSender Logo

πŸš€ Professional Token Distribution Platform for the Gravity Blockchain

License: MIT React Vite Solidity

Live Demo β€’ Features β€’ Smart Contract β€’ Installation β€’ Usage Guide β€’ Documentation

🌟 Overview

GravityMultiSender is an advanced, user-friendly web application built specifically for the Gravity blockchain ecosystem. It enables users to send native G tokens or any ERC-20 tokens to multiple addresses simultaneously in a single transaction, drastically reducing gas costs and transaction times.

This tool is essential for:

  • Token project teams distributing airdrops
  • DAOs distributing rewards to members
  • Companies paying salaries or bonuses in cryptocurrency
  • Marketers distributing promotional tokens
  • Any organization needing efficient mass token distribution

✨ Features

Core Functionality

  • βœ… Send tokens to up to 200 addresses per transaction
  • βœ… Support for native G tokens and ERC-20 tokens
  • βœ… Automatic batch processing for large lists
  • βœ… Real-time transaction status and confirmation
  • βœ… Detailed transaction history and receipts
  • βœ… Gas optimization techniques

User Experience

  • βœ… Intuitive, modern interface with dark mode
  • βœ… Drag-and-drop CSV file upload
  • βœ… Direct text input for recipient lists
  • βœ… Interactive transaction preview
  • βœ… Responsive design for all devices
  • βœ… Comprehensive error handling and validation

Security & Reliability

  • βœ… Non-custodial architecture
  • βœ… Client-side address validation
  • βœ… Verified, open-source smart contract
  • βœ… Comprehensive error handling
  • βœ… Emergency recovery functions
  • βœ… Transaction simulation before execution

Integration & Access

  • βœ… Connect with multiple wallet providers
  • βœ… Support for WalletConnect protocol
  • βœ… Direct links to block explorer
  • βœ… Chaindata verification
  • βœ… Network detection and switching
  • βœ… API access for developers (coming soon)

πŸ”— Live Application

Experience GravityMultiSender now at gravitymultisender.xyz

πŸ“œ Smart Contract

The MultiSender smart contract is the backbone of this application, providing secure and efficient token distribution functionality on the Gravity blockchain.

Contract Details

Key Contract Functions

// Send native G tokens to multiple recipients in one transaction
function multiSendNative(
    address[] calldata recipients, 
    uint256[] calldata amounts
) external payable

// Send ERC-20 tokens to multiple recipients in one transaction
function multiSendToken(
    address token,
    address[] calldata recipients,
    uint256[] calldata amounts
) external

// Calculate tax amount for a given value
function calculateTax(uint256 amount) public pure returns (uint256)

Security Features

  • Error Handling: Comprehensive custom errors with descriptive messages
  • Reentrancy Protection: Function logic prevents reentrancy attacks
  • Input Validation: Thorough validation of all function parameters
  • Gas Optimization: Uses unchecked blocks and other gas optimization techniques
  • Emergency Recovery: Functions to recover accidentally sent tokens or ETH (owner only)

Service Fee Structure

The contract applies a modest 1% service fee on all transactions. This fee:

  • Supports ongoing development and maintenance
  • Ensures long-term sustainability of the service
  • Helps fund new features and improvements
  • Secures the infrastructure for reliable operation

πŸ› οΈ Technical Architecture

GravityMultiSender is built with a modern, scalable tech stack designed for performance and reliability:

Layer Technologies
Frontend React Vite CSS3
Web3 Integration wagmi viem RainbowKit
Data Handling TanStack Query PapaParse
Smart Contract Solidity ERC20
Network Gravity Alpha Mainnet

πŸš€ Installation & Development

Follow these steps to set up GravityMultiSender for local development:

Prerequisites

  • Node.js (v16.0.0 or higher)
  • npm (v7.0.0 or higher) or yarn (v1.22.0 or higher)
  • Git

Setup Instructions

  1. Clone the repository
git clone https://github.com/yourusername/GravityMultiSender.git
cd GravityMultiSender
  1. Install dependencies
# Using npm
npm install

# Using yarn
yarn install
  1. Start the development server
# Using npm
npm run dev

# Using yarn
yarn dev
  1. Access the application

Open your browser and navigate to http://localhost:5173

Environment Configuration

Create a .env file in the root directory with the following variables:

VITE_PROJECT_ID=your_wallet_connect_project_id
VITE_EXPLORER_URL=https://explorer.gravity.xyz
VITE_RPC_URL=https://rpc.gravity.xyz

πŸ“‹ Usage Guide

Connecting Your Wallet

  1. Navigate to gravitymultisender.xyz
  2. Click the "Connect Wallet" button in the top-right corner
  3. Select your preferred wallet provider (MetaMask, WalletConnect, etc.)
  4. Confirm the connection in your wallet
  5. The application will automatically detect if you're on the Gravity Alpha Mainnet
  6. If you're on a different network, you'll be prompted to switch networks

Preparing Your Recipient List

You have two options for entering your recipient list:

Option 1: Upload a CSV File

  1. Create a CSV file with the following format:

    0x1234567890123456789012345678901234567890,1.5
    0x2345678901234567890123456789012345678901,2.75
    0x3456789012345678901234567890123456789012,0.5
    

    Each line should contain an address and amount separated by a comma.

  2. Drag and drop your CSV file onto the upload area, or click "Choose File" to select it

Option 2: Direct Text Input

  1. Enter your recipient list directly in the text area using the same format:
    0x1234567890123456789012345678901234567890,1.5
    0x2345678901234567890123456789012345678901,2.75
    0x3456789012345678901234567890123456789012,0.5
    

Sending Tokens

  1. Once your recipient list is loaded, review the transaction summary:

    • Total number of recipients
    • Total token amount
    • Service fee (1%)
    • Number of batches (if applicable)
  2. Click "Preview Transactions" to review the detailed list of recipients

  3. Click "Send Tokens" to initiate the transaction

  4. Confirm the transaction in your wallet (you'll need to confirm once per batch if you have more than 200 recipients)

  5. Track the transaction status in real-time:

    • Transaction preparation
    • Pending transaction
    • Transaction confirmation
    • Success or failure notification
  6. You can view transaction details in the block explorer by clicking the transaction hash or "View on Explorer" link

πŸ“ CSV Format Specifications

For optimal results, follow these guidelines for your CSV file:

Required Format

  • Column Structure: Two columns - address and amount
  • Delimiters: Comma-separated values (,)
  • Addresses: Must be valid Ethereum addresses (42 characters starting with 0x)
  • Amounts: Must be positive numbers (decimal values allowed)
  • Headers: No header row required (will be automatically detected and skipped if present)

Example CSV Structure

0x1234567890123456789012345678901234567890,1.5
0x2345678901234567890123456789012345678901,2.75
0x3456789012345678901234567890123456789012,0.5

Advanced Format Options

You can also include headers and additional data if needed:

address,amount,note
0x1234567890123456789012345678901234567890,1.5,Team member bonus
0x2345678901234567890123456789012345678901,2.75,Marketing reward
0x3456789012345678901234567890123456789012,0.5,Community prize

Note: Only the first two columns (address and amount) will be processed. Additional columns will be ignored.

πŸ‘₯ Contributing

We welcome contributions from the community! Here's how you can help:

Contribution Guidelines

  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

Code Style and Standards

  • Follow the existing code style
  • Write clear, commented, and testable code
  • Include unit tests for new features
  • Update documentation as needed

Development Process

  • Issues are tracked on GitHub
  • Pull requests require review before merging
  • Continuous integration checks must pass

πŸ“„ License

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

❓ Frequently Asked Questions

What is the maximum number of recipients in a single transaction?
The MultiSender contract limits each batch to 200 recipients to prevent gas limit issues. If you have more than 200 recipients, the application will automatically split them into multiple batches.
Is there a fee for using GravityMultiSender?
Yes, the service charges a 1% fee on all transactions to support ongoing development and maintenance of the platform.
Can I send ERC-20 tokens?
Yes, GravityMultiSender supports both native G tokens and any ERC-20 token on the Gravity blockchain.
How do I know my transaction was successful?
The application provides real-time status updates and confirms when transactions are completed. You can also verify all transactions on the Gravity Explorer using the provided links.
Do I need to approve tokens before sending?
Yes, for ERC-20 tokens, you'll need to approve the MultiSender contract to spend your tokens. The application will guide you through this process when needed.

πŸ“ž Support & Contact

πŸ” Connect with Gravity Ecosystem

Website Explorer Twitter Telegram

Β© 2025 GravityMultiSender - All rights reserved

About

Gravity Multi Sender is an innovative platform that allows the seamless transfer of tokens $G In Gravity Alpha Mainnet to multiple addresses simultaneously, all within a single transaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published