hardhat-tracer
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-beta.6
@@ -17,2 +17,24 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
try { | ||
// Try to check if hardhat version is compatible by checking if the package is available | ||
require("@nomicfoundation/ethereumjs-vm"); | ||
} | ||
catch { | ||
console.error(` | ||
ERROR | ||
Please upgrade your hardhat version to 2.11 or above. | ||
This error is generated by plugin "hardhat-tracer" because it is | ||
dependent on some features available in hardhat >=2.11.0 <3.0.0. | ||
npm i hardhat@latest | ||
or | ||
yarn add hardhat@latest | ||
`); | ||
process.exit(1); | ||
} | ||
require("./extend"); | ||
@@ -19,0 +41,0 @@ require("./tasks"); |
@@ -30,5 +30,7 @@ "use strict"; | ||
const isSendTransaction = args.method === "eth_sendTransaction"; | ||
const isSendRawTransaction = args.method === "eth_sendRawTransaction"; | ||
const isEthCall = args.method === "eth_call"; | ||
const isEstimateGas = args.method === "eth_estimateGas"; | ||
const isSendTransactionFailed = isSendTransaction && !!error; | ||
const isSendRawTransactionFailed = isSendRawTransaction && !!error; | ||
const isEthCallFailed = isEthCall && !!error; | ||
@@ -45,10 +47,18 @@ const isEstimateGasFailed = isEstimateGas && !!error; | ||
isSendTransactionFailed || | ||
isSendRawTransactionFailed || | ||
isEthCallFailed || | ||
isEstimateGasFailed || | ||
(!!this.dependencies.tracerEnv.printNext && | ||
(isSendTransaction || isEthCall || isEstimateGas)); | ||
(isSendTransaction || | ||
isSendRawTransaction || | ||
isEthCall || | ||
isEstimateGas)); | ||
break; | ||
case 3: | ||
case 4: | ||
shouldPrint = isSendTransaction || isEthCall || isEstimateGas; | ||
shouldPrint = | ||
isSendTransaction || | ||
isSendRawTransaction || | ||
isEthCall || | ||
isEstimateGas; | ||
break; | ||
@@ -55,0 +65,0 @@ default: |
{ | ||
"name": "hardhat-tracer", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-beta.6", | ||
"description": "Hardhat Tracer plugin", | ||
@@ -5,0 +5,0 @@ "repository": "github:zemse/hardhat-tracer", |
@@ -0,1 +1,25 @@ | ||
try { | ||
// Try to check if hardhat version is compatible by checking if the package is available | ||
require("@nomicfoundation/ethereumjs-vm"); | ||
} catch { | ||
console.error( | ||
` | ||
ERROR | ||
Please upgrade your hardhat version to 2.11 or above. | ||
This error is generated by plugin "hardhat-tracer" because it is | ||
dependent on some features available in hardhat >=2.11.0 <3.0.0. | ||
npm i hardhat@latest | ||
or | ||
yarn add hardhat@latest | ||
` | ||
); | ||
process.exit(1); | ||
} | ||
import "./extend"; | ||
@@ -2,0 +26,0 @@ import "./tasks"; |
@@ -42,2 +42,3 @@ import { BackwardsCompatibilityProviderAdapter } from "hardhat/internal/core/providers/backwards-compatibility"; | ||
const isSendTransaction = args.method === "eth_sendTransaction"; | ||
const isSendRawTransaction = args.method === "eth_sendRawTransaction"; | ||
const isEthCall = args.method === "eth_call"; | ||
@@ -47,2 +48,3 @@ const isEstimateGas = args.method === "eth_estimateGas"; | ||
const isSendTransactionFailed = isSendTransaction && !!error; | ||
const isSendRawTransactionFailed = isSendRawTransaction && !!error; | ||
const isEthCallFailed = isEthCall && !!error; | ||
@@ -61,10 +63,18 @@ const isEstimateGasFailed = isEstimateGas && !!error; | ||
isSendTransactionFailed || | ||
isSendRawTransactionFailed || | ||
isEthCallFailed || | ||
isEstimateGasFailed || | ||
(!!this.dependencies.tracerEnv.printNext && | ||
(isSendTransaction || isEthCall || isEstimateGas)); | ||
(isSendTransaction || | ||
isSendRawTransaction || | ||
isEthCall || | ||
isEstimateGas)); | ||
break; | ||
case 3: | ||
case 4: | ||
shouldPrint = isSendTransaction || isEthCall || isEstimateGas; | ||
shouldPrint = | ||
isSendTransaction || | ||
isSendRawTransaction || | ||
isEthCall || | ||
isEstimateGas; | ||
break; | ||
@@ -71,0 +81,0 @@ default: |
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
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
399946
7043
0