Socket
Socket
Sign inDemoInstall

web3-eth

Package Overview
Dependencies
Maintainers
4
Versions
446
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth - npm Package Compare versions

Comparing version 4.6.1-dev.2f73aa5.0 to 4.6.1-dev.32b6b29.0

6

lib/commonjs/utils/send_tx_helper.js

@@ -72,3 +72,7 @@ "use strict";

if (this.options.checkRevertBeforeSending !== false) {
const reason = yield (0, get_revert_reason_js_1.getRevertReason)(this.web3Context, tx, this.options.contractAbi);
let formatTx = tx;
if ((0, web3_validator_1.isNullish)(tx.data) && (0, web3_validator_1.isNullish)(tx.input) && (0, web3_validator_1.isNullish)(tx.gas)) { // eth.call runs into error if data isnt filled and gas is not defined, its a simple transaction so we fill it with 21000
formatTx = Object.assign(Object.assign({}, tx), { gas: 21000 });
}
const reason = yield (0, get_revert_reason_js_1.getRevertReason)(this.web3Context, formatTx, this.options.contractAbi);
if (reason !== undefined) {

@@ -75,0 +79,0 @@ throw yield (0, get_transaction_error_js_1.getTransactionError)(this.web3Context, tx, undefined, undefined, this.options.contractAbi, reason);

@@ -69,3 +69,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

if (this.options.checkRevertBeforeSending !== false) {
const reason = yield getRevertReason(this.web3Context, tx, this.options.contractAbi);
let formatTx = tx;
if (isNullish(tx.data) && isNullish(tx.input) && isNullish(tx.gas)) { // eth.call runs into error if data isnt filled and gas is not defined, its a simple transaction so we fill it with 21000
formatTx = Object.assign(Object.assign({}, tx), { gas: 21000 });
}
const reason = yield getRevertReason(this.web3Context, formatTx, this.options.contractAbi);
if (reason !== undefined) {

@@ -72,0 +76,0 @@ throw yield getTransactionError(this.web3Context, tx, undefined, undefined, this.options.contractAbi, reason);

26

package.json
{
"name": "web3-eth",
"version": "4.6.1-dev.2f73aa5.0+2f73aa5",
"version": "4.6.1-dev.32b6b29.0+32b6b29",
"description": "Web3 module to interact with the Ethereum blockchain and smart contracts.",

@@ -62,18 +62,18 @@ "main": "./lib/commonjs/index.js",

"typescript": "^4.7.4",
"web3-providers-http": "4.1.1-dev.2f73aa5.0+2f73aa5"
"web3-providers-http": "4.1.1-dev.32b6b29.0+32b6b29"
},
"dependencies": {
"setimmediate": "^1.0.5",
"web3-core": "4.3.3-dev.2f73aa5.0+2f73aa5",
"web3-errors": "1.1.5-dev.2f73aa5.0+2f73aa5",
"web3-eth-abi": "4.2.2-dev.2f73aa5.0+2f73aa5",
"web3-eth-accounts": "4.1.3-dev.2f73aa5.0+2f73aa5",
"web3-net": "4.0.8-dev.2f73aa5.0+2f73aa5",
"web3-providers-ws": "4.0.8-dev.2f73aa5.0+2f73aa5",
"web3-rpc-methods": "1.2.1-dev.2f73aa5.0+2f73aa5",
"web3-types": "1.6.1-dev.2f73aa5.0+2f73aa5",
"web3-utils": "4.2.4-dev.2f73aa5.0+2f73aa5",
"web3-validator": "2.0.6-dev.2f73aa5.0+2f73aa5"
"web3-core": "4.3.3-dev.32b6b29.0+32b6b29",
"web3-errors": "1.1.5-dev.32b6b29.0+32b6b29",
"web3-eth-abi": "4.2.2-dev.32b6b29.0+32b6b29",
"web3-eth-accounts": "4.1.3-dev.32b6b29.0+32b6b29",
"web3-net": "4.0.8-dev.32b6b29.0+32b6b29",
"web3-providers-ws": "4.0.8-dev.32b6b29.0+32b6b29",
"web3-rpc-methods": "1.2.1-dev.32b6b29.0+32b6b29",
"web3-types": "1.6.1-dev.32b6b29.0+32b6b29",
"web3-utils": "4.2.4-dev.32b6b29.0+32b6b29",
"web3-validator": "2.0.6-dev.32b6b29.0+32b6b29"
},
"gitHead": "2f73aa5c1de205f30a3961388be27c47c7a28dc5"
"gitHead": "32b6b296fffc7084f7688a136c6a0eaf6e369012"
}

@@ -125,3 +125,10 @@ /*

if (this.options.checkRevertBeforeSending !== false) {
const reason = await getRevertReason(this.web3Context, tx, this.options.contractAbi);
let formatTx = tx;
if (isNullish(tx.data) && isNullish(tx.input) && isNullish(tx.gas)) { // eth.call runs into error if data isnt filled and gas is not defined, its a simple transaction so we fill it with 21000
formatTx = {
...tx,
gas: 21000
}
}
const reason = await getRevertReason(this.web3Context, formatTx, this.options.contractAbi);
if (reason !== undefined) {

@@ -128,0 +135,0 @@ throw await getTransactionError<ReturnFormat>(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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