hardhat 2.16.1-dev.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +34 -3
- package/builtin-tasks/compile.js +2 -2
- package/builtin-tasks/compile.js.map +1 -1
- package/builtin-tasks/flatten.js +1 -1
- package/builtin-tasks/flatten.js.map +1 -1
- package/builtin-tasks/node.js +1 -1
- package/builtin-tasks/node.js.map +1 -1
- package/builtin-tasks/run.js +1 -1
- package/builtin-tasks/run.js.map +1 -1
- package/internal/artifacts.d.ts +1 -2
- package/internal/artifacts.d.ts.map +1 -1
- package/internal/artifacts.js +3 -11
- package/internal/artifacts.js.map +1 -1
- package/internal/cli/analytics.d.ts.map +1 -1
- package/internal/cli/analytics.js +27 -4
- package/internal/cli/analytics.js.map +1 -1
- package/internal/cli/bootstrap.js +3 -3
- package/internal/cli/bootstrap.js.map +1 -1
- package/internal/cli/constants.d.ts +2 -0
- package/internal/cli/constants.d.ts.map +1 -0
- package/internal/cli/constants.js +5 -0
- package/internal/cli/constants.js.map +1 -0
- package/internal/cli/project-creation.d.ts +1 -1
- package/internal/cli/project-creation.js +4 -4
- package/internal/cli/project-creation.js.map +1 -1
- package/internal/cli/prompt.js +2 -2
- package/internal/cli/prompt.js.map +1 -1
- package/internal/core/config/config-loading.js +2 -2
- package/internal/core/config/config-loading.js.map +1 -1
- package/internal/core/jsonrpc/types/input/validation.js +1 -1
- package/internal/core/jsonrpc/types/input/validation.js.map +1 -1
- package/internal/core/jsonrpc/types/output/decodeJsonRpcResponse.js +1 -1
- package/internal/core/jsonrpc/types/output/decodeJsonRpcResponse.js.map +1 -1
- package/internal/core/params/argumentTypes.js +4 -4
- package/internal/core/params/argumentTypes.js.map +1 -1
- package/internal/core/params/env-variables.js +1 -1
- package/internal/core/params/env-variables.js.map +1 -1
- package/internal/core/providers/backwards-compatibility.js +1 -1
- package/internal/core/providers/backwards-compatibility.js.map +1 -1
- package/internal/core/providers/gas-providers.js +1 -1
- package/internal/core/providers/gas-providers.js.map +1 -1
- package/internal/core/providers/http.js +5 -5
- package/internal/core/providers/http.js.map +1 -1
- package/internal/core/providers/wrapper.js +1 -1
- package/internal/core/providers/wrapper.js.map +1 -1
- package/internal/core/runtime-environment.js +1 -1
- package/internal/core/runtime-environment.js.map +1 -1
- package/internal/hardhat-network/jsonrpc/client.js +3 -3
- package/internal/hardhat-network/jsonrpc/client.js.map +1 -1
- package/internal/hardhat-network/jsonrpc/handler.js +3 -3
- package/internal/hardhat-network/jsonrpc/handler.js.map +1 -1
- package/internal/hardhat-network/provider/BlockchainBase.js +1 -1
- package/internal/hardhat-network/provider/BlockchainBase.js.map +1 -1
- package/internal/hardhat-network/provider/HardhatBlockchain.js +1 -1
- package/internal/hardhat-network/provider/HardhatBlockchain.js.map +1 -1
- package/internal/hardhat-network/provider/MiningTimer.js +1 -1
- package/internal/hardhat-network/provider/MiningTimer.js.map +1 -1
- package/internal/hardhat-network/provider/TransactionQueue.js +3 -3
- package/internal/hardhat-network/provider/TransactionQueue.js.map +1 -1
- package/internal/hardhat-network/provider/TxPool.js +1 -1
- package/internal/hardhat-network/provider/TxPool.js.map +1 -1
- package/internal/hardhat-network/provider/fork/ForkBlockchain.js +1 -1
- package/internal/hardhat-network/provider/fork/ForkBlockchain.js.map +1 -1
- package/internal/hardhat-network/provider/modules/debug.js +1 -1
- package/internal/hardhat-network/provider/modules/debug.js.map +1 -1
- package/internal/hardhat-network/provider/modules/eth.js +1 -1
- package/internal/hardhat-network/provider/modules/eth.js.map +1 -1
- package/internal/hardhat-network/provider/modules/evm.js +1 -1
- package/internal/hardhat-network/provider/modules/evm.js.map +1 -1
- package/internal/hardhat-network/provider/modules/hardhat.js +1 -1
- package/internal/hardhat-network/provider/modules/hardhat.js.map +1 -1
- package/internal/hardhat-network/provider/modules/net.js +1 -1
- package/internal/hardhat-network/provider/modules/net.js.map +1 -1
- package/internal/hardhat-network/provider/modules/personal.js +1 -1
- package/internal/hardhat-network/provider/modules/personal.js.map +1 -1
- package/internal/hardhat-network/provider/modules/web3.js +1 -1
- package/internal/hardhat-network/provider/modules/web3.js.map +1 -1
- package/internal/hardhat-network/provider/node.js +3 -3
- package/internal/hardhat-network/provider/node.js.map +1 -1
- package/internal/hardhat-network/provider/output.js +1 -1
- package/internal/hardhat-network/provider/output.js.map +1 -1
- package/internal/hardhat-network/provider/provider.js +1 -1
- package/internal/hardhat-network/provider/provider.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/utils/assertions.js +1 -1
- package/internal/hardhat-network/provider/utils/assertions.js.map +1 -1
- package/internal/hardhat-network/provider/utils/makeForkClient.d.ts +1 -0
- package/internal/hardhat-network/provider/utils/makeForkClient.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/makeForkClient.js +9 -3
- package/internal/hardhat-network/provider/utils/makeForkClient.js.map +1 -1
- package/internal/hardhat-network/provider/utils/reorganizeTransactionsLists.js +1 -1
- package/internal/hardhat-network/provider/utils/reorganizeTransactionsLists.js.map +1 -1
- package/internal/hardhat-network/stack-traces/compiler-to-model.js +1 -1
- package/internal/hardhat-network/stack-traces/compiler-to-model.js.map +1 -1
- package/internal/hardhat-network/stack-traces/consoleLogger.d.ts +1 -0
- package/internal/hardhat-network/stack-traces/consoleLogger.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/consoleLogger.js +20 -1
- package/internal/hardhat-network/stack-traces/consoleLogger.js.map +1 -1
- package/internal/hardhat-network/stack-traces/constants.d.ts +1 -1
- package/internal/hardhat-network/stack-traces/constants.js +1 -1
- package/internal/hardhat-network/stack-traces/error-inferrer.js +1 -1
- package/internal/hardhat-network/stack-traces/error-inferrer.js.map +1 -1
- package/internal/hardhat-network/stack-traces/model.js +1 -1
- package/internal/hardhat-network/stack-traces/model.js.map +1 -1
- package/internal/hardhat-network/stack-traces/solidity-errors.js +2 -2
- package/internal/hardhat-network/stack-traces/solidity-errors.js.map +1 -1
- package/internal/hardhat-network/stack-traces/solidityTracer.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/solidityTracer.js +2 -1
- package/internal/hardhat-network/stack-traces/solidityTracer.js.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-tracer.js +1 -1
- package/internal/hardhat-network/stack-traces/vm-tracer.js.map +1 -1
- package/internal/solidity/parse.js +1 -1
- package/internal/solidity/parse.js.map +1 -1
- package/internal/solidity/resolver.js +2 -2
- package/internal/solidity/resolver.js.map +1 -1
- package/internal/util/caller-package.d.ts.map +1 -1
- package/internal/util/caller-package.js +5 -1
- package/internal/util/caller-package.js.map +1 -1
- package/internal/util/ci-detection.d.ts.map +1 -1
- package/internal/util/ci-detection.js +2 -2
- package/internal/util/ci-detection.js.map +1 -1
- package/internal/util/download.d.ts.map +1 -1
- package/internal/util/download.js +1 -1
- package/internal/util/download.js.map +1 -1
- package/internal/util/fs-utils.js +10 -10
- package/internal/util/fs-utils.js.map +1 -1
- package/internal/util/jsonrpc.js +1 -1
- package/internal/util/jsonrpc.js.map +1 -1
- package/internal/vendor/await-semaphore/index.js +1 -1
- package/internal/vendor/await-semaphore/index.js.map +1 -1
- package/package.json +9 -8
- package/sample-projects/javascript/hardhat.config.js +1 -1
- package/sample-projects/javascript-esm/hardhat.config.cjs +1 -1
- package/sample-projects/typescript/hardhat.config.ts +1 -1
- package/src/builtin-tasks/compile.ts +2 -2
- package/src/builtin-tasks/flatten.ts +1 -1
- package/src/builtin-tasks/node.ts +1 -1
- package/src/builtin-tasks/run.ts +1 -1
- package/src/internal/artifacts.ts +3 -11
- package/src/internal/cli/analytics.ts +5 -2
- package/src/internal/cli/bootstrap.ts +2 -2
- package/src/internal/cli/constants.ts +1 -0
- package/src/internal/cli/project-creation.ts +4 -4
- package/src/internal/cli/prompt.ts +2 -2
- package/src/internal/core/config/config-loading.ts +2 -2
- package/src/internal/core/jsonrpc/types/input/validation.ts +1 -1
- package/src/internal/core/jsonrpc/types/output/decodeJsonRpcResponse.ts +1 -1
- package/src/internal/core/params/argumentTypes.ts +4 -4
- package/src/internal/core/params/env-variables.ts +1 -1
- package/src/internal/core/providers/backwards-compatibility.ts +1 -1
- package/src/internal/core/providers/gas-providers.ts +1 -1
- package/src/internal/core/providers/http.ts +5 -5
- package/src/internal/core/providers/wrapper.ts +1 -1
- package/src/internal/core/runtime-environment.ts +1 -1
- package/src/internal/hardhat-network/jsonrpc/client.ts +3 -3
- package/src/internal/hardhat-network/jsonrpc/handler.ts +3 -3
- package/src/internal/hardhat-network/provider/BlockchainBase.ts +1 -1
- package/src/internal/hardhat-network/provider/HardhatBlockchain.ts +1 -1
- package/src/internal/hardhat-network/provider/MiningTimer.ts +1 -1
- package/src/internal/hardhat-network/provider/TransactionQueue.ts +3 -3
- package/src/internal/hardhat-network/provider/TxPool.ts +1 -1
- package/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts +1 -1
- package/src/internal/hardhat-network/provider/fork/ForkStateManager.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/debug.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/eth.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/evm.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/hardhat.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/net.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/personal.ts +1 -1
- package/src/internal/hardhat-network/provider/modules/web3.ts +1 -1
- package/src/internal/hardhat-network/provider/node.ts +3 -3
- package/src/internal/hardhat-network/provider/output.ts +1 -1
- package/src/internal/hardhat-network/provider/provider.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/FakeSenderTransaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.ts +1 -1
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.ts +1 -1
- package/src/internal/hardhat-network/provider/utils/assertions.ts +1 -1
- package/src/internal/hardhat-network/provider/utils/makeForkClient.ts +11 -2
- package/src/internal/hardhat-network/provider/utils/reorganizeTransactionsLists.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/compiler-to-model.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/consoleLogger.ts +26 -1
- package/src/internal/hardhat-network/stack-traces/constants.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/error-inferrer.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/model.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/solidity-errors.ts +2 -2
- package/src/internal/hardhat-network/stack-traces/solidityTracer.ts +4 -1
- package/src/internal/hardhat-network/stack-traces/vm-debug-tracer.ts +1 -1
- package/src/internal/hardhat-network/stack-traces/vm-tracer.ts +1 -1
- package/src/internal/solidity/parse.ts +1 -1
- package/src/internal/solidity/resolver.ts +2 -2
- package/src/internal/util/caller-package.ts +7 -1
- package/src/internal/util/ci-detection.ts +3 -1
- package/src/internal/util/download.ts +1 -3
- package/src/internal/util/fs-utils.ts +10 -10
- package/src/internal/util/jsonrpc.ts +1 -1
- package/src/internal/vendor/await-semaphore/index.ts +1 -1
- package/src/utils/source-names.ts +2 -2
- package/utils/source-names.js +2 -2
- package/utils/source-names.js.map +1 -1
- package/internal/hardhat-network/provider/RethnetState.d.ts +0 -29
- package/internal/hardhat-network/provider/RethnetState.d.ts.map +0 -1
- package/internal/hardhat-network/provider/RethnetState.js +0 -110
- package/internal/hardhat-network/provider/RethnetState.js.map +0 -1
- package/internal/hardhat-network/provider/utils/bloom.d.ts +0 -32
- package/internal/hardhat-network/provider/utils/bloom.d.ts.map +0 -1
- package/internal/hardhat-network/provider/utils/bloom.js +0 -79
- package/internal/hardhat-network/provider/utils/bloom.js.map +0 -1
- package/internal/hardhat-network/provider/utils/convertToRethnet.d.ts +0 -17
- package/internal/hardhat-network/provider/utils/convertToRethnet.d.ts.map +0 -1
- package/internal/hardhat-network/provider/utils/convertToRethnet.js +0 -392
- package/internal/hardhat-network/provider/utils/convertToRethnet.js.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/dual.d.ts +0 -14
- package/internal/hardhat-network/provider/vm/block-builder/dual.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/dual.js +0 -47
- package/internal/hardhat-network/provider/vm/block-builder/dual.js.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/hardhat.d.ts +0 -27
- package/internal/hardhat-network/provider/vm/block-builder/hardhat.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/hardhat.js +0 -136
- package/internal/hardhat-network/provider/vm/block-builder/hardhat.js.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/rethnet.d.ts +0 -20
- package/internal/hardhat-network/provider/vm/block-builder/rethnet.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder/rethnet.js +0 -55
- package/internal/hardhat-network/provider/vm/block-builder/rethnet.js.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder.d.ts +0 -19
- package/internal/hardhat-network/provider/vm/block-builder.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/block-builder.js +0 -24
- package/internal/hardhat-network/provider/vm/block-builder.js.map +0 -1
- package/internal/hardhat-network/provider/vm/creation.d.ts +0 -10
- package/internal/hardhat-network/provider/vm/creation.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/creation.js +0 -29
- package/internal/hardhat-network/provider/vm/creation.js.map +0 -1
- package/internal/hardhat-network/provider/vm/dual.d.ts +0 -43
- package/internal/hardhat-network/provider/vm/dual.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/dual.js +0 -487
- package/internal/hardhat-network/provider/vm/dual.js.map +0 -1
- package/internal/hardhat-network/provider/vm/ethereumjs.d.ts +0 -61
- package/internal/hardhat-network/provider/vm/ethereumjs.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/ethereumjs.js +0 -517
- package/internal/hardhat-network/provider/vm/ethereumjs.js.map +0 -1
- package/internal/hardhat-network/provider/vm/exit.d.ts +0 -24
- package/internal/hardhat-network/provider/vm/exit.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/exit.js +0 -140
- package/internal/hardhat-network/provider/vm/exit.js.map +0 -1
- package/internal/hardhat-network/provider/vm/rethnet.d.ts +0 -87
- package/internal/hardhat-network/provider/vm/rethnet.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/rethnet.js +0 -262
- package/internal/hardhat-network/provider/vm/rethnet.js.map +0 -1
- package/internal/hardhat-network/provider/vm/vm-adapter.d.ts +0 -53
- package/internal/hardhat-network/provider/vm/vm-adapter.d.ts.map +0 -1
- package/internal/hardhat-network/provider/vm/vm-adapter.js +0 -3
- package/internal/hardhat-network/provider/vm/vm-adapter.js.map +0 -1
|
@@ -58,7 +58,7 @@ function getSortedFiles(dependenciesGraph: DependencyGraph) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// eslint-disable-next-line @
|
|
61
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
62
62
|
throw error;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -374,7 +374,7 @@ task(TASK_NODE, "Starts a JSON-RPC server on top of Hardhat Network")
|
|
|
374
374
|
);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
// eslint-disable-next-line @
|
|
377
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
378
378
|
throw error;
|
|
379
379
|
}
|
|
380
380
|
}
|
package/src/builtin-tasks/run.ts
CHANGED
|
@@ -49,7 +49,7 @@ task(TASK_RUN, "Runs a user-defined script after compiling the project")
|
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// eslint-disable-next-line @
|
|
52
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
53
53
|
throw error;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -444,8 +444,6 @@ export class Artifacts implements IArtifacts {
|
|
|
444
444
|
const buildInfoFile = await this._getBuildInfoFromDebugFile(debugFile);
|
|
445
445
|
if (buildInfoFile !== undefined) {
|
|
446
446
|
return path.resolve(path.dirname(debugFile), buildInfoFile);
|
|
447
|
-
} else {
|
|
448
|
-
return undefined;
|
|
449
447
|
}
|
|
450
448
|
})
|
|
451
449
|
);
|
|
@@ -635,7 +633,7 @@ export class Artifacts implements IArtifacts {
|
|
|
635
633
|
);
|
|
636
634
|
}
|
|
637
635
|
|
|
638
|
-
// eslint-disable-next-line @
|
|
636
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
639
637
|
throw e;
|
|
640
638
|
}
|
|
641
639
|
}
|
|
@@ -806,7 +804,7 @@ Please replace "${contractName}" for the correct contract name wherever you are
|
|
|
806
804
|
);
|
|
807
805
|
}
|
|
808
806
|
|
|
809
|
-
// eslint-disable-next-line @
|
|
807
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
810
808
|
throw e;
|
|
811
809
|
}
|
|
812
810
|
}
|
|
@@ -859,20 +857,14 @@ Please replace "${contractName}" for the correct contract name wherever you are
|
|
|
859
857
|
}
|
|
860
858
|
|
|
861
859
|
/**
|
|
862
|
-
* Remove the artifact file
|
|
863
|
-
* info file.
|
|
860
|
+
* Remove the artifact file and its debug file.
|
|
864
861
|
*/
|
|
865
862
|
private async _removeArtifactFiles(artifactPath: string) {
|
|
866
863
|
await fsExtra.remove(artifactPath);
|
|
867
864
|
|
|
868
865
|
const debugFilePath = this._getDebugFilePath(artifactPath);
|
|
869
|
-
const buildInfoPath = await this._getBuildInfoFromDebugFile(debugFilePath);
|
|
870
866
|
|
|
871
867
|
await fsExtra.remove(debugFilePath);
|
|
872
|
-
|
|
873
|
-
if (buildInfoPath !== undefined) {
|
|
874
|
-
await fsExtra.remove(buildInfoPath);
|
|
875
|
-
}
|
|
876
868
|
}
|
|
877
869
|
|
|
878
870
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type AbortControllerT from "abort-controller";
|
|
1
2
|
import type { request as RequestT } from "undici";
|
|
2
3
|
|
|
3
|
-
import AbortController from "abort-controller";
|
|
4
4
|
import debug from "debug";
|
|
5
5
|
import os from "os";
|
|
6
|
-
import { v4 as uuid } from "uuid";
|
|
7
6
|
|
|
8
7
|
import { isLocalDev } from "../core/execution-mode";
|
|
9
8
|
import { isRunningOnCiServer } from "../util/ci-detection";
|
|
@@ -129,6 +128,9 @@ export class Analytics {
|
|
|
129
128
|
|
|
130
129
|
private _sendHit(payload: AnalyticsPayload): [AbortAnalytics, Promise<void>] {
|
|
131
130
|
const { request } = require("undici") as { request: typeof RequestT };
|
|
131
|
+
const AbortController =
|
|
132
|
+
require("abort-controller") as typeof AbortControllerT;
|
|
133
|
+
|
|
132
134
|
const eventName = payload.events[0].name;
|
|
133
135
|
log(`Sending hit for ${eventName}`);
|
|
134
136
|
|
|
@@ -171,6 +173,7 @@ async function getClientId() {
|
|
|
171
173
|
(await readFirstLegacyAnalyticsId());
|
|
172
174
|
|
|
173
175
|
if (clientId === undefined) {
|
|
176
|
+
const { v4: uuid } = await import("uuid");
|
|
174
177
|
log("Client Id not found, generating a new one");
|
|
175
178
|
clientId = uuid();
|
|
176
179
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import semver from "semver";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { SUPPORTED_NODE_VERSIONS } from "./constants";
|
|
6
6
|
|
|
7
7
|
if (!semver.satisfies(process.version, SUPPORTED_NODE_VERSIONS.join(" || "))) {
|
|
8
8
|
console.warn(
|
|
9
9
|
chalk.yellow.bold(`WARNING:`),
|
|
10
|
-
`You are using
|
|
10
|
+
`You are currently using Node.js ${process.version}, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions`
|
|
11
11
|
);
|
|
12
12
|
console.log();
|
|
13
13
|
console.log();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SUPPORTED_NODE_VERSIONS = ["^16.0.0", "^18.0.0", "^20.0.0"];
|
|
@@ -64,7 +64,7 @@ const TYPESCRIPT_DEPENDENCIES: Dependencies = {};
|
|
|
64
64
|
const TYPESCRIPT_PEER_DEPENDENCIES: Dependencies = {
|
|
65
65
|
"@types/chai": "^4.2.0",
|
|
66
66
|
"@types/mocha": ">=9.1.0",
|
|
67
|
-
"@types/node": ">=
|
|
67
|
+
"@types/node": ">=16.0.0",
|
|
68
68
|
"ts-node": ">=8.0.0",
|
|
69
69
|
typescript: ">=4.5.0",
|
|
70
70
|
};
|
|
@@ -227,7 +227,7 @@ async function printRecommendedDepsInstallationInstructions(
|
|
|
227
227
|
// exported so we can test that it uses the latest supported version of solidity
|
|
228
228
|
export const EMPTY_HARDHAT_CONFIG = `/** @type import('hardhat/config').HardhatUserConfig */
|
|
229
229
|
module.exports = {
|
|
230
|
-
solidity: "0.8.
|
|
230
|
+
solidity: "0.8.19",
|
|
231
231
|
};
|
|
232
232
|
`;
|
|
233
233
|
|
|
@@ -297,7 +297,7 @@ async function getAction(isEsm: boolean): Promise<Action> {
|
|
|
297
297
|
return Action.QUIT_ACTION;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
// eslint-disable-next-line @
|
|
300
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
301
301
|
throw e;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
@@ -392,7 +392,7 @@ export async function createProject() {
|
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
// eslint-disable-next-line @
|
|
395
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
396
396
|
throw e;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
@@ -58,7 +58,7 @@ export async function confirmRecommendedDepsInstallation(
|
|
|
58
58
|
return false;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// eslint-disable-next-line @
|
|
61
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
62
62
|
throw e;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -135,7 +135,7 @@ async function confirmationPromptWithTimeout(
|
|
|
135
135
|
return undefined;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
// eslint-disable-next-line @
|
|
138
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
139
139
|
throw e;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -38,7 +38,7 @@ function importCsjOrEsModule(filePath: string): any {
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
// eslint-disable-next-line @
|
|
41
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
42
42
|
throw e;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -95,7 +95,7 @@ export function loadConfigAndTasks(
|
|
|
95
95
|
} catch (e) {
|
|
96
96
|
analyzeModuleNotFoundError(e, configPath);
|
|
97
97
|
|
|
98
|
-
// eslint-disable-next-line @
|
|
98
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
99
99
|
throw e;
|
|
100
100
|
} finally {
|
|
101
101
|
ctx.setConfigLoadingAsFinished();
|
|
@@ -3,7 +3,7 @@ import { PathReporter } from "io-ts/lib/PathReporter";
|
|
|
3
3
|
|
|
4
4
|
import { InvalidArgumentsError } from "../../../providers/errors";
|
|
5
5
|
|
|
6
|
-
/* eslint-disable @
|
|
6
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This function validates a list of params, throwing InvalidArgumentsError
|
|
@@ -3,7 +3,7 @@ import { PathReporter } from "io-ts/lib/PathReporter";
|
|
|
3
3
|
|
|
4
4
|
import { InvalidResponseError } from "../../../providers/errors";
|
|
5
5
|
|
|
6
|
-
/* eslint-disable @
|
|
6
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This function decodes an RPC out type, throwing InvalidResponseError if it's not valid.
|
|
@@ -181,7 +181,7 @@ export const inputFile: CLIArgumentType<string> = {
|
|
|
181
181
|
|
|
182
182
|
if (stats.isDirectory()) {
|
|
183
183
|
// This is caught and encapsulated in a hardhat error.
|
|
184
|
-
// eslint-disable-next-line @
|
|
184
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
185
185
|
throw new Error(`${strValue} is a directory, not a file`);
|
|
186
186
|
}
|
|
187
187
|
} catch (error) {
|
|
@@ -196,7 +196,7 @@ export const inputFile: CLIArgumentType<string> = {
|
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
// eslint-disable-next-line @
|
|
199
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
200
200
|
throw error;
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -229,7 +229,7 @@ export const inputFile: CLIArgumentType<string> = {
|
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
// eslint-disable-next-line @
|
|
232
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
233
233
|
throw error;
|
|
234
234
|
}
|
|
235
235
|
},
|
|
@@ -252,7 +252,7 @@ export const json: CLIArgumentType<any> = {
|
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
// eslint-disable-next-line @
|
|
255
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
256
256
|
throw error;
|
|
257
257
|
}
|
|
258
258
|
},
|
|
@@ -59,7 +59,7 @@ export function getEnvHardhatArguments(
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// eslint-disable-next-line @
|
|
62
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
63
63
|
throw error;
|
|
64
64
|
}
|
|
65
65
|
} else {
|
|
@@ -58,7 +58,7 @@ export class BackwardsCompatibilityProviderAdapter
|
|
|
58
58
|
});
|
|
59
59
|
} catch (error: any) {
|
|
60
60
|
if (error.code === undefined) {
|
|
61
|
-
// eslint-disable-next-line @
|
|
61
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
62
62
|
throw error;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -91,7 +91,7 @@ abstract class MultipliedGasEstimationProvider extends ProviderWrapper {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// eslint-disable-next-line @
|
|
94
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
95
95
|
throw error;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -68,7 +68,7 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
68
68
|
if (e instanceof TypeError && e.message === "Invalid URL") {
|
|
69
69
|
e.message += ` ${url.origin}`;
|
|
70
70
|
}
|
|
71
|
-
// eslint-disable-next-line @
|
|
71
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
72
72
|
throw e;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -90,7 +90,7 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
90
90
|
jsonRpcResponse.error.code
|
|
91
91
|
);
|
|
92
92
|
error.data = jsonRpcResponse.error.data;
|
|
93
|
-
// eslint-disable-next-line @
|
|
93
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
94
94
|
throw error;
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -133,7 +133,7 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
133
133
|
stackSavingError
|
|
134
134
|
);
|
|
135
135
|
error.data = response.error.data;
|
|
136
|
-
// eslint-disable-next-line @
|
|
136
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
137
137
|
throw error;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -208,7 +208,7 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
208
208
|
return await this._retry(request, seconds, retryNumber);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
// eslint-disable-next-line @
|
|
211
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
212
212
|
throw new ProviderError(
|
|
213
213
|
`Too Many Requests error received from ${url.hostname}`,
|
|
214
214
|
-32005 // Limit exceeded according to EIP1474
|
|
@@ -229,7 +229,7 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
229
229
|
throw new HardhatError(ERRORS.NETWORK.NETWORK_TIMEOUT, {}, error);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
// eslint-disable-next-line @
|
|
232
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
233
233
|
throw error;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -33,7 +33,7 @@ export abstract class ProviderWrapper
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
if (!Array.isArray(params)) {
|
|
36
|
-
// eslint-disable-next-line @
|
|
36
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
37
37
|
throw new InvalidInputError(
|
|
38
38
|
"Hardhat Network doesn't support JSON-RPC params sent as an object"
|
|
39
39
|
);
|
|
@@ -172,7 +172,7 @@ export class Environment implements HardhatRuntimeEnvironment {
|
|
|
172
172
|
} catch (e) {
|
|
173
173
|
analyzeModuleNotFoundError(e, this.config.paths.configFile);
|
|
174
174
|
|
|
175
|
-
// eslint-disable-next-line @
|
|
175
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
176
176
|
throw e;
|
|
177
177
|
} finally {
|
|
178
178
|
if (taskProfile !== undefined) {
|
|
@@ -364,7 +364,7 @@ export class JsonRpcClient {
|
|
|
364
364
|
return null;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
// eslint-disable-next-line @
|
|
367
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
368
368
|
throw err;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
@@ -379,7 +379,7 @@ export class JsonRpcClient {
|
|
|
379
379
|
if (this._shouldRetry(isRetryCall, err)) {
|
|
380
380
|
return this._sendBatch(batch, true);
|
|
381
381
|
}
|
|
382
|
-
// eslint-disable-next-line @
|
|
382
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
383
383
|
throw err;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -473,7 +473,7 @@ export class JsonRpcClient {
|
|
|
473
473
|
return undefined;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
// eslint-disable-next-line @
|
|
476
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
477
477
|
throw error;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
JsonRpcResponse,
|
|
19
19
|
} from "../../util/jsonrpc";
|
|
20
20
|
|
|
21
|
-
/* eslint-disable @
|
|
21
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
22
22
|
|
|
23
23
|
export class JsonRpcHandler {
|
|
24
24
|
constructor(private readonly _provider: EIP1193Provider) {}
|
|
@@ -214,7 +214,7 @@ const _readJsonHttpRequest = async (req: IncomingMessage): Promise<any> => {
|
|
|
214
214
|
throw new InvalidJsonInputError(`Parse error: ${error.message}`);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
// eslint-disable-next-line @
|
|
217
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
218
218
|
throw error;
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -230,7 +230,7 @@ const _readWsRequest = (msg: string): JsonRpcRequest | JsonRpcRequest[] => {
|
|
|
230
230
|
throw new InvalidJsonInputError(`Parse error: ${error.message}`);
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
// eslint-disable-next-line @
|
|
233
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
234
234
|
throw error;
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -14,7 +14,7 @@ import * as BigIntUtils from "../../util/bigint";
|
|
|
14
14
|
import { BlockchainData } from "./BlockchainData";
|
|
15
15
|
import { RpcReceiptOutput } from "./output";
|
|
16
16
|
|
|
17
|
-
/* eslint-disable @
|
|
17
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
18
18
|
|
|
19
19
|
export abstract class BlockchainBase {
|
|
20
20
|
public consensus: Consensus;
|
|
@@ -8,7 +8,7 @@ import { FilterParams } from "./node-types";
|
|
|
8
8
|
import { RpcLogOutput } from "./output";
|
|
9
9
|
import { HardhatBlockchainInterface } from "./types/HardhatBlockchainInterface";
|
|
10
10
|
|
|
11
|
-
/* eslint-disable @
|
|
11
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
12
12
|
|
|
13
13
|
export class HardhatBlockchain
|
|
14
14
|
extends BlockchainBase
|
|
@@ -5,7 +5,7 @@ enum MiningTimerState {
|
|
|
5
5
|
RUNNING,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
/* eslint-disable @
|
|
8
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Timer used to periodically call the given mining function.
|
|
@@ -64,7 +64,7 @@ function getOrderedTransactionHeap(
|
|
|
64
64
|
decreasingOrderComparator(a, b)
|
|
65
65
|
);
|
|
66
66
|
default:
|
|
67
|
-
// eslint-disable-next-line @
|
|
67
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
68
68
|
throw new InvalidInputError(
|
|
69
69
|
`Invalid mempool order: ${mempoolOrder as any}`
|
|
70
70
|
);
|
|
@@ -107,7 +107,7 @@ export class TransactionQueue {
|
|
|
107
107
|
|
|
108
108
|
for (const [address, txList] of pendingTransactions) {
|
|
109
109
|
if (baseFee === undefined && txList.some((tx) => tx.data.type === 2)) {
|
|
110
|
-
// eslint-disable-next-line @
|
|
110
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
111
111
|
throw new InternalError(
|
|
112
112
|
"Trying to initialize and sort a mempool with an EIP-1559 tx but no base fee"
|
|
113
113
|
);
|
|
@@ -135,7 +135,7 @@ export class TransactionQueue {
|
|
|
135
135
|
|
|
136
136
|
public removeLastSenderTransactions() {
|
|
137
137
|
if (this._lastTransactionSender === undefined) {
|
|
138
|
-
// eslint-disable-next-line @
|
|
138
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
139
139
|
throw new InternalError(
|
|
140
140
|
"TransactionQueue#removeLastSenderTransactions called before TransactionQueue#getNextTransaction"
|
|
141
141
|
);
|
|
@@ -28,7 +28,7 @@ import { FakeSenderTransaction } from "./transactions/FakeSenderTransaction";
|
|
|
28
28
|
import { reorganizeTransactionsLists } from "./utils/reorganizeTransactionsLists";
|
|
29
29
|
import { FakeSenderEIP1559Transaction } from "./transactions/FakeSenderEIP1559Transaction";
|
|
30
30
|
|
|
31
|
-
/* eslint-disable @
|
|
31
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
32
32
|
|
|
33
33
|
export function serializeTransaction(
|
|
34
34
|
tx: OrderedTransaction
|
|
@@ -28,7 +28,7 @@ import { ReadOnlyValidUnknownTypeTransaction } from "../transactions/ReadOnlyVal
|
|
|
28
28
|
import { rpcToBlockData } from "./rpcToBlockData";
|
|
29
29
|
import { rpcToTxData } from "./rpcToTxData";
|
|
30
30
|
|
|
31
|
-
/* eslint-disable @
|
|
31
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
32
32
|
|
|
33
33
|
export class ForkBlockchain
|
|
34
34
|
extends BlockchainBase
|
|
@@ -29,7 +29,7 @@ const encodeStorageKey = (address: Buffer, position: Buffer): string => {
|
|
|
29
29
|
return `${address.toString("hex")}${unpadBuffer(position).toString("hex")}`;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
/* eslint-disable @
|
|
32
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
33
33
|
|
|
34
34
|
type State = ImmutableMap<string, ImmutableRecord<AccountState>>;
|
|
35
35
|
|
|
@@ -8,7 +8,7 @@ import { MethodNotFoundError } from "../../../core/providers/errors";
|
|
|
8
8
|
import { HardhatNode } from "../node";
|
|
9
9
|
import { RpcDebugTraceOutput } from "../output";
|
|
10
10
|
|
|
11
|
-
/* eslint-disable @
|
|
11
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
12
12
|
|
|
13
13
|
export class DebugModule {
|
|
14
14
|
constructor(private readonly _node: HardhatNode) {}
|
|
@@ -94,7 +94,7 @@ const ACCESS_LIST_MIN_HARDFORK = HardforkName.BERLIN;
|
|
|
94
94
|
const EIP155_MIN_HARDFORK = HardforkName.SPURIOUS_DRAGON;
|
|
95
95
|
const EIP3860_MIN_HARDFORK = HardforkName.SHANGHAI;
|
|
96
96
|
|
|
97
|
-
/* eslint-disable @
|
|
97
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
98
98
|
export class EthModule {
|
|
99
99
|
constructor(
|
|
100
100
|
private readonly _common: Common,
|
|
@@ -21,7 +21,7 @@ import { MineBlockResult } from "../node-types";
|
|
|
21
21
|
|
|
22
22
|
import { ModulesLogger } from "./logger";
|
|
23
23
|
|
|
24
|
-
/* eslint-disable @
|
|
24
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
25
25
|
|
|
26
26
|
// Type to accept decimal or hex-encoded params (for test rpc methods only)
|
|
27
27
|
const rpcQuantityOrNumber = t.union([rpcQuantity, t.number]);
|
|
@@ -34,7 +34,7 @@ import { ForkConfig, MineBlockResult } from "../node-types";
|
|
|
34
34
|
|
|
35
35
|
import { ModulesLogger } from "./logger";
|
|
36
36
|
|
|
37
|
-
/* eslint-disable @
|
|
37
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
38
38
|
|
|
39
39
|
export class HardhatModule {
|
|
40
40
|
constructor(
|
|
@@ -4,7 +4,7 @@ import { numberToRpcQuantity } from "../../../core/jsonrpc/types/base-types";
|
|
|
4
4
|
import { validateParams } from "../../../core/jsonrpc/types/input/validation";
|
|
5
5
|
import { MethodNotFoundError } from "../../../core/providers/errors";
|
|
6
6
|
|
|
7
|
-
/* eslint-disable @
|
|
7
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
8
8
|
|
|
9
9
|
export class NetModule {
|
|
10
10
|
constructor(private readonly _common: Common) {}
|
|
@@ -5,7 +5,7 @@ import { validateParams } from "../../../core/jsonrpc/types/input/validation";
|
|
|
5
5
|
import { MethodNotFoundError } from "../../../core/providers/errors";
|
|
6
6
|
import { HardhatNode } from "../node";
|
|
7
7
|
|
|
8
|
-
/* eslint-disable @
|
|
8
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
9
9
|
|
|
10
10
|
export class PersonalModule {
|
|
11
11
|
constructor(private readonly _node: HardhatNode) {}
|
|
@@ -7,7 +7,7 @@ import { MethodNotFoundError } from "../../../core/providers/errors";
|
|
|
7
7
|
import { keccak256 } from "../../../util/keccak";
|
|
8
8
|
import { HardhatNode } from "../node";
|
|
9
9
|
|
|
10
|
-
/* eslint-disable @
|
|
10
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
11
11
|
|
|
12
12
|
export class Web3Module {
|
|
13
13
|
constructor(private readonly _node: HardhatNode) {}
|
|
@@ -130,7 +130,7 @@ type ExecResult = EVMResult["execResult"];
|
|
|
130
130
|
|
|
131
131
|
const log = debug("hardhat:core:hardhat-network:node");
|
|
132
132
|
|
|
133
|
-
/* eslint-disable @
|
|
133
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
134
134
|
|
|
135
135
|
export class HardhatNode extends EventEmitter {
|
|
136
136
|
public static async create(
|
|
@@ -529,7 +529,7 @@ Hardhat Network's forking functionality only works with blocks from at least spu
|
|
|
529
529
|
throw new TransactionExecutionError(err);
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
// eslint-disable-next-line @
|
|
532
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
533
533
|
throw err;
|
|
534
534
|
}
|
|
535
535
|
|
|
@@ -1730,7 +1730,7 @@ Hardhat Network's forking functionality only works with blocks from at least spu
|
|
|
1730
1730
|
throw new InvalidInputError(e.message);
|
|
1731
1731
|
}
|
|
1732
1732
|
|
|
1733
|
-
// eslint-disable-next-line @
|
|
1733
|
+
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
|
|
1734
1734
|
throw e;
|
|
1735
1735
|
}
|
|
1736
1736
|
|
|
@@ -156,7 +156,7 @@ export interface RpcWithdrawalItem {
|
|
|
156
156
|
amount: string;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
/* eslint-disable @
|
|
159
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
160
160
|
|
|
161
161
|
export function getRpcBlock(
|
|
162
162
|
block: Block,
|
|
@@ -54,7 +54,7 @@ const PRIVATE_RPC_METHODS = new Set([
|
|
|
54
54
|
"hardhat_setLoggingEnabled",
|
|
55
55
|
]);
|
|
56
56
|
|
|
57
|
-
/* eslint-disable @
|
|
57
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
58
58
|
|
|
59
59
|
export const DEFAULT_COINBASE = "0xc014ba5ec014ba5ec014ba5ec014ba5ec014ba5e";
|
|
60
60
|
|
package/src/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.ts
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../../../core/providers/errors";
|
|
19
19
|
import { makeFakeSignature } from "../utils/makeFakeSignature";
|
|
20
20
|
|
|
21
|
-
/* eslint-disable @
|
|
21
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* This class is the EIP-2930 version of FakeSenderTransaction.
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../../../core/providers/errors";
|
|
18
18
|
import { makeFakeSignature } from "../utils/makeFakeSignature";
|
|
19
19
|
|
|
20
|
-
/* eslint-disable @
|
|
20
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* This class is the EIP-1559 version of FakeSenderTransaction.
|