GithubHelp home page GithubHelp logo

okeyzero / batchmoney Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amazingang/batchmoney

2.0 1.0 0.0 212 KB

Efficiently transfer ether or tokens to many addresses in batch, powered by Huff.

Home Page: https://batch.money

License: MIT License

JavaScript 76.20% CSS 0.22% HTML 1.21% Solidity 22.37%

batchmoney's Introduction

Batch.Money

Efficiently transfer ether or tokens to many addresses in batch, powered by Huff and WTF Academy, supporting 15 chains!

Key Features

  1. Efficiently transfer ether or tokens in batch. Saves 2~3% gas compared to Disperse App.

  2. Support non-standard ERC20 (i.e. USDT).

  3. Small contract size, saves ~80% gas on deployment.

Supported Networks

website: batch.money

Network Contract address
ETH 0xD35a289c1D5F6f6a604d6026111109694e51BA25
Optimism 0x3484593c456D9C598C47754341718062318066Ba
Scroll 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Base 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Arbitrum One 0x63d9C12865336322Ca981E5d1392acde4fAdD3Dc
Linea 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
BNB Chain 0x0D69079B60484ae97EA7DEaad370B61f9Da401F8
opBNB Chain 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Polygon 0x927ec65329636525a5B00103De1c00d8Da9b08aD
Polygon zkevm 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Public Goods Network 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Gnosis Chain 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Goerli 0xDC7a1993196d63db926c3B2e1C42682f39885B96
Holesky 0x1b285Ffd0B19805947E7F285A922d2fFe5c4FE4d
Sepolia 0x800A2bE9B6259E252eDE4a5a041C23ab994F2962
Scroll Sepolia 0x1726348d59697D19Ce307E662da6a631381dB8dD

Test Results

Transfer ERC20 to 100 addresses on Goerli

To test the gas consumption fairly, we created a new tokens for different methods. For normal transfer, we record the gas used by transfering token to 1 address, and then multiply it by 100.

type gas consumption txn proof
Normal Transfer 5,212,400 link single txn
Disperse 2,754,920 link
BatchMoney 2,694,098 โœ… link

Transfer ERC20/ETH to 1,000 addresses in Foundry

Compared to Dipserse, BatchMoney saves 80% on deployment and 2~3% on transfer ERC20/ETH to 1,000 addresses.

Quick Start

  1. Clone this repo or use template
git clone https://github.com/AmazingAng/BatchMoney
cd BatchMoney
  1. Install dependencies
forge install
  1. Build & Test
forge build
forge test

Details

  1. Contracts: check src folder.
  2. Tests: check test folder.
  3. Frontend: check frontend folder.
  4. Runtime bytecode:
    • evm-shanghai: 0x5f3560e01c8063ae4edb2c1461001e578063a0ce91d8146100be575f5ffd5b600435602435306323b872dd5f52336020528060405281606052602060606064601c5f875af13d156060516001141716610056575f80fd5b60443560040180356064356004018035828114610071575f80fd5b600163a9059cbb5f525b8181116100bc578481602002013560205282816020020135604052602060606044601c5f8c5af13d1560605160011417166100b4575f80fd5b60010161007b565b005b600435600401803560243560040180358281146100d9575f80fd5b60015b818111610107575f80808086856020020135898660200201355af16100ff575f80fd5b6001016100dc565b00
    • evm-paris(PUSH0 not available): 60003560e01c8063ae4edb2c14610021578063a0ce91d8146100c85760006000fd5b600435602435306323b872dd600052336020528060405281606052602060606064601c6000875af13d15606051600114171661005c57600080fd5b6044356004018035606435600401803582811461007857600080fd5b600163a9059cbb6000525b8181116100c6578481602002013560205282816020020135604052602060606044601c60008c5af13d1560605160011417166100be57600080fd5b600101610083565b005b600435600401803560243560040180358281146100e457600080fd5b60015b81811161011457600080808086856020020135898660200201355af161010c57600080fd5b6001016100e7565b00

Disclamer

These contracts are unaudited and are not recommended for use in production.

The contract is experimental software and is provided on an "as is" and "as available" basis.

We do not give any warranties and will not be liable for any loss incurred through any use of this codebase and product.

Reference

  1. disperse research
  2. disperse clone
  3. huffmate
  4. TxRouter

batchmoney's People

Contributors

amazingang avatar bitcoke avatar

Stargazers

MeXoo avatar Necro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.