Comparing version 4.6.1-dev.2f73aa5.0 to 4.6.1-dev.32b6b29.0
@@ -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); |
{ | ||
"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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1312638
23279