#gas #ethereum #cli #command-line-tool #web3

app gas-lookup

A tool to calculate total gas spent by an address within a given time frame

10 releases

0.1.9 Mar 10, 2024
0.1.8 Mar 10, 2024
0.1.7 Feb 19, 2024
0.1.6 Jan 10, 2024
0.1.5 Dec 31, 2023

#12 in #gas

MIT/Apache

145KB
210 lines

Gas-Lookup

A cli tool to calculate total gas spent by an address within a given time frame.

Static Badge crates github twitter

A CLI tool to calculate the total amount of Ether spent on gas on transacting on a specific blockchain withing a given date frame.

Installation

Install gas-lookup with cargo

  cargo install gas-lookup

Usage

Once the install is completed, the cli command will be available globally on your system. To run the application:

gas-lookup <address> <start_date> <end_date> [chain]

Parameters passed are:

  • address: The address whose gas spent needs to be calculated
  • start date: The start date to calculate gas from. Format - dd/mm/yyy
  • end date: The date till which gas needs to be calculated. Format - dd/mm/yyy
  • [OPTIONAL]chain: Specify the chain to claculate gas on. Defaults to Ethereum Mainnet. Available options:
    • eth: For Ethereum Mainnet
    • pol: For Polygon Mainnet
    • opt: For Optimism Mainnet

For help,

  gas-lookup --help

Screenshots

gas-lookup

Updates

v0.1.8 & v0.1.9

Gas-lookup has been optimized for more than 37% faster result generation. Throught Rust's powerful thread concurrency, dates and blocks are calculated in parallel executions.

Improvement Metrics
Before

pre-optimized

After

optimized

v0.1.7

Updated code to correct bug which caused the binary file to crash for certain cases.

v0.1.6

Support for Polygon Mainnet and Optimism Mainnet has been added. Use the chain flag to specific desired chain.

gas-lookup <address_OR_ENS_name> <start_date> <end_date> [chain]

v0.1.5

Support for ENS names have been added. Search with either ETH address or ENS name

gas-lookup <ETH_address OR ENS_name> <start_date> <end_date>

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~38–55MB
~1M SLoC