Socket
Socket
Sign inDemoInstall

ethereum-emissions-calculator

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-emissions-calculator - npm Package Compare versions

Comparing version 1.8.2-7 to 1.8.2-8

10

lib/index.js

@@ -27,2 +27,3 @@ "use strict";

const calculateAddressEmissions = (options) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c, _d;
validateCalculatorOptions_1.validateCalculatorOptions(options);

@@ -37,4 +38,4 @@ const { transactions, done } = yield getAddressTransactions_1.getAddressTransactions(options);

gasUsed,
highestBlockNumber: Number(transactions[0].blockNumber),
lowestBlockNumber: Number(transactions[transactions.length - 1].blockNumber),
highestBlockNumber: Number((_b = (_a = transactions[0]) === null || _a === void 0 ? void 0 : _a.blockNumber) !== null && _b !== void 0 ? _b : "0"),
lowestBlockNumber: Number((_d = (_c = transactions[transactions.length - 1]) === null || _c === void 0 ? void 0 : _c.blockNumber) !== null && _d !== void 0 ? _d : "0"),
done,

@@ -48,2 +49,3 @@ };

const calculateContractEmissions = (options) => __awaiter(void 0, void 0, void 0, function* () {
var _e, _f, _g, _h;
validateCalculatorOptions_1.validateCalculatorOptions(options);

@@ -58,4 +60,4 @@ const { transactions, done } = yield getAddressTransactions_1.getAddressTransactions(options);

gasUsed,
highestBlockNumber: Number(transactions[0].blockNumber),
lowestBlockNumber: Number(transactions[transactions.length - 1].blockNumber),
highestBlockNumber: Number((_f = (_e = transactions[0]) === null || _e === void 0 ? void 0 : _e.blockNumber) !== null && _f !== void 0 ? _f : "0"),
lowestBlockNumber: Number((_h = (_g = transactions[transactions.length - 1]) === null || _g === void 0 ? void 0 : _g.blockNumber) !== null && _h !== void 0 ? _h : "0"),
done,

@@ -62,0 +64,0 @@ };

2

package.json
{
"name": "ethereum-emissions-calculator",
"version": "1.8.2-7",
"version": "1.8.2-8",
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc