Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rauljordan/gas-used
Simple CLI tool to count the gas used by Ethereum accounts interacting with a specific contract
https://github.com/rauljordan/gas-used
Last synced: 8 days ago
JSON representation
Simple CLI tool to count the gas used by Ethereum accounts interacting with a specific contract
- Host: GitHub
- URL: https://github.com/rauljordan/gas-used
- Owner: rauljordan
- License: mit
- Created: 2022-01-08T21:01:26.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-09T00:57:59.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T14:30:00.780Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Gas Used
> **Simple CLI tool to count the gas used by accounts interacting with a specific Ethereum contract**
[![Crates.io](https://img.shields.io/crates/v/clap?style=flat-square)](https://crates.io/crates/gas-used)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Rust](https://github.com/rauljordan/gas-used/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/rauljordan/gas-used/actions/workflows/rust.yml)1. [About](#about)
2. [Installing](#installing)
3. [Usage](#usage)## About
This is a simple CLI that can compute the total amount of gas used by a list of account addresses interacting with a specific contract on Ethereum. It can, for example, be used to count the total gas used by owners of a multisig contract when interacting with the multisig.
## Installing
```
git clone https://github.com/rauljordan/gas-used && cd gas-used
cargo install --bin gas-used --path .
```## Usage
```
gas-used \
--api-key= \
--contract= \
-- ADDRESS_1 ADDRESS_2
```Sample output
```
Computing gas used for addresses: 0xf, 0x3
Contract address: 0x9b984d5a03980d8dc0a24506c968465424c81dbe
Querying page 1 of Etherscan API
Querying page 2 of Etherscan API
Querying page 3 of Etherscan API
Querying page 4 of Etherscan API
Address "0xf" has used 0.775665286702632882 ETH for gas
Address "0x3" has used 1.220864757568855979 ETH for gas