NingLin-P / evm-transactions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EVM Transaction Generator

Description

This Rust application is designed to generate and send a specified number of transactions across the Ethereum Virtual Machine (EVM). It supports multiple accounts to distribute transactions and is configurable via environment variables and command-line arguments.

Features

  • Generate a specified number of EVM transactions.
  • Support for multiple accounts to distribute the transaction load.
  • Environment variable and command-line configuration.
  • Integration with contract calls for funding and transaction load testing.
  • Transaction management with automatic retries and error handling.

Installation

Before you begin, ensure that Rust is installed on your system. You can install Rust through rustup.

  1. Clone the repository:

    git clone https://github.com/your-username/evm-transaction-generator.git
    cd evm-transaction-generator
  2. Build the project:

    cargo build --release

Usage

Before running the application, set the necessary environment variables in a .env file or export them directly in your shell:

FUNDER_PRIVATE_KEY=your_funder_private_key
FUNDING_CONTRACT_ADDRESS=your_funding_contract_address
LOAD_CONTRACT_ADDRESS=your_load_contract_address
RPC_URL=your_rpc_url

Run the application with the following command:

cargo run --release -- -t <tx_count> -a <num_accounts>
  • -t, --tx_count <tx_count>: The number of transactions to generate.
  • -a, --num_accounts <num_accounts>: The number of accounts to use for generating transactions.
  • -f, --funding_amount_tssc <funding_amount_tssc>: The amount of TSSC to fund the accounts with.
  • -set_array_acounts <set_array_acounts>: This larger this value, the more each transaction will cost. Reasonable values are 1-1000.
  • -h, --help: Prints help information.

About


Languages

Language:Rust 100.0%