{"id":30616446,"url":"https://github.com/sky-ecosystem/petrometer","last_synced_at":"2025-08-30T09:33:38.257Z","repository":{"id":47030942,"uuid":"187795237","full_name":"sky-ecosystem/petrometer","owner":"sky-ecosystem","description":"Tool which summarizes daily and total gas consumption of all transactions sent from a specified Ethereum address.","archived":false,"fork":false,"pushed_at":"2023-06-28T21:26:50.000Z","size":259,"stargazers_count":16,"open_issues_count":3,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-12T04:48:25.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sky-ecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-21T08:31:12.000Z","updated_at":"2023-03-15T03:19:00.000Z","dependencies_parsed_at":"2023-10-21T12:07:27.769Z","dependency_job_id":null,"html_url":"https://github.com/sky-ecosystem/petrometer","commit_stats":null,"previous_names":["sky-ecosystem/petrometer","makerdao/petrometer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sky-ecosystem/petrometer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-ecosystem%2Fpetrometer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-ecosystem%2Fpetrometer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-ecosystem%2Fpetrometer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-ecosystem%2Fpetrometer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sky-ecosystem","download_url":"https://codeload.github.com/sky-ecosystem/petrometer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-ecosystem%2Fpetrometer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833298,"owners_count":25000870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-30T09:33:08.342Z","updated_at":"2025-08-30T09:33:38.240Z","avatar_url":"https://github.com/sky-ecosystem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# petrometer\n\n![Build Status](https://github.com/makerdao/petrometer/actions/workflows/.github/workflows/tests.yaml/badge.svg?branch=master)\n\n`petrometer` is a tool which summarizes daily and total gas consumption of all transactions sent\nfrom or received by one or more specified Ethereum addresses.\n\nIt uses the etherscan.io API (\u003chttps://etherscan.io/apis\u003e) to download the transaction data as it's\nmuch more effective than querying an Ethereum node directly. What even more, it caches the downloaded\ndata between invocations and only downloads new transactions when run again. Thanks to `appdirs`\n(\u003chttps://pypi.python.org/pypi/appdirs\u003e), standard OS locations are used for storing cached data.\n\nYou do need an etherscan.io API key (\u003chttps://etherscan.io/apis\u003e) in order to use this tool,\nit needs to be passed as the `--etherscan-api-key` parameter. You need to create an etherscan.io\naccount (\u003chttps://etherscan.io/register\u003e) in order to be able to generate an API key.\n\n\u003chttps://chat.makerdao.com/channel/keeper\u003e\n\n## Installation\n\nThis project uses _Python 3.6.6_.\n\nIn order to clone the project and install required third-party packages please execute:\n\n```\ngit clone https://github.com/makerdao/petrometer.git\ncd petrometer\npip3 install -r requirements.txt\n```\n\n## Usage\n\n```\nusage: petrometer [-h] --etherscan-api-key ETHERSCAN_API_KEY [--graphite-key GRAPHITE_KEY] [--graphite-endpoint GRAPHITE_ENDPOINT] [--alias SOME_ALIAS] [-j] [-o OUTPUT] [-i] ADDRESSES [ADDRESSES ...]\n\npositional arguments:\n  ADDRESSES             Ethereum addresses to get the gas usage of\n\noptional arguments:\n  -h, --help                                show this help message and exit\n  --etherscan-api-key ETHERSCAN_API_KEY     Etherscan API key\n  --graphite-endpoint GRAPHITE_ENDPOINT     Endpoint of GraphiteDB to publish metrics to Grafana\n  --graphite-key GRAPHITE_KEY               GraphiteDB key to publish metrics to Grafana\n  -j, --json                                Generate result as JSON\n  -o OUTPUT, --output OUTPUT                File to save the output to\n  -i, --incoming                            Show incoming transaction gas usage, defaut outgoing\n```\n\nSample invocation:\n\n```\nbin/petrometer --etherscan-api-key ABCDFDBCBAFDBCFBDFCBFDBAFB --graphite-key \"0123:abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc=\" --graphite-endpoint \"https://graphite-us-central1.grafana.net/metrics\" 0x1212121212343434343456565656565454545454 --alias SOME_ALIAS\n```\n\nSample output:\n\n```\nGas usage summary for: 0x00......................................\n\n    Day       # transactions        Average gas price              Average gas cost                  Total gas cost\n===========================================================================================================================\n2018-01-06                 12                   39.7 GWei         0.005078854742238021 ETH         0.060946256906856247 ETH\n2018-01-07                 22                   22.0 GWei         0.003037521765674030 ETH         0.066825478844828673 ETH\n2018-01-08                 76                   27.7 GWei         0.003806332034057282 ETH         0.289281234588353420 ETH\n\nNumber of transactions: 351\nTotal gas cost: 1.526090324569235879 ETH\n```\n\n## License\n\nSee [COPYING](https://github.com/makerdao/petrometer/blob/master/COPYING) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-ecosystem%2Fpetrometer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsky-ecosystem%2Fpetrometer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-ecosystem%2Fpetrometer/lists"}