ethereum-emissions-calculator
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -41,2 +41,5 @@ "use strict"; | ||
} | ||
if (response.result.length >= 10000) { | ||
throw new Error(`This address has too many ${options.transactionType} transactions to count! This calculator can't handle addresses with more than 10,000 transactions of any one type.`); | ||
} | ||
const txns = filterValidOutgoingTransactions_1.default(response.result, options.address); | ||
@@ -43,0 +46,0 @@ const totalGasUsed = getSumGasUsed_1.default(txns); |
{ | ||
"name": "ethereum-emissions-calculator", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "TypeScript utils to calculate the CO2 emissions of an Ethereum wallet. Powered by the Etherscan.io API.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
# Ethereum Carbon Emissions Calculator | ||
Made with ♥ by [Offsetra.com](https://offsetra.com/about) for [carbon.fyi](https://carbon.fyi). License: MIT. | ||
Made with ♥ by [Offsetra.com](https://offsetra.com/about) for [carbon.fyi](https://carbon.fyi). | ||
License: MIT. | ||
Please cite Offsetra if you use this in your project, we really appreciate it! 🙏 | ||
## Summary | ||
JavaScript utility to calculate the CO2 emissions of any Ethereum address. | ||
@@ -12,6 +18,7 @@ | ||
## Usage | ||
NOTE: Currently this calculator can only tally emissions for <10k transactions, which is the API page limit from Etherscan.io. | ||
If the address has >10k transactions of the specified transaction type (eth/erc20/erc721), the function will throw an error. | ||
## Usage | ||
``` | ||
@@ -18,0 +25,0 @@ npm install ethereum-emissions-calculator |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13873
211
55