hardhat 2.16.1 → 2.17.1
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 +132 -6
- 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/builtin-tasks/task-names.d.ts +1 -0
- package/builtin-tasks/task-names.d.ts.map +1 -1
- package/builtin-tasks/task-names.js +3 -2
- package/builtin-tasks/task-names.js.map +1 -1
- package/builtin-tasks/utils/solidity-files-cache.js +3 -3
- package/builtin-tasks/utils/solidity-files-cache.js.map +1 -1
- package/builtin-tasks/utils/watch.d.ts +1 -1
- package/builtin-tasks/utils/watch.d.ts.map +1 -1
- package/console.sol +1192 -1171
- 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/ArgumentsParser.js +1 -1
- package/internal/cli/ArgumentsParser.js.map +1 -1
- package/internal/cli/analytics.d.ts +1 -1
- package/internal/cli/analytics.d.ts.map +1 -1
- package/internal/cli/analytics.js +30 -8
- 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/cli/types.d.ts +1 -1
- package/internal/cli/types.d.ts.map +1 -1
- package/internal/context.d.ts +1 -1
- package/internal/context.d.ts.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/errors.js +17 -17
- package/internal/core/errors.js.map +1 -1
- package/internal/core/jsonrpc/types/access-list.d.ts +2 -2
- package/internal/core/jsonrpc/types/access-list.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/blockTag.d.ts +4 -4
- package/internal/core/jsonrpc/types/input/blockTag.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/callRequest.d.ts +1 -1
- package/internal/core/jsonrpc/types/input/callRequest.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/debugTraceTransaction.d.ts +3 -1
- package/internal/core/jsonrpc/types/input/debugTraceTransaction.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/debugTraceTransaction.js +1 -0
- package/internal/core/jsonrpc/types/input/debugTraceTransaction.js.map +1 -1
- package/internal/core/jsonrpc/types/input/filterRequest.d.ts +2 -2
- package/internal/core/jsonrpc/types/input/filterRequest.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/hardhat-network.d.ts +3 -3
- package/internal/core/jsonrpc/types/input/hardhat-network.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/logAddress.d.ts +2 -2
- package/internal/core/jsonrpc/types/input/logAddress.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/logTopics.d.ts +2 -2
- package/internal/core/jsonrpc/types/input/logTopics.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/solc.d.ts +2 -2
- package/internal/core/jsonrpc/types/input/solc.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/subscribeRequest.d.ts +1 -1
- package/internal/core/jsonrpc/types/input/subscribeRequest.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/input/transactionRequest.d.ts +1 -1
- package/internal/core/jsonrpc/types/input/transactionRequest.d.ts.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/block.d.ts +2 -2
- package/internal/core/jsonrpc/types/output/block.d.ts.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/jsonrpc/types/output/log.d.ts +1 -1
- package/internal/core/jsonrpc/types/output/log.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/output/receipt.d.ts +1 -1
- package/internal/core/jsonrpc/types/output/receipt.d.ts.map +1 -1
- package/internal/core/jsonrpc/types/output/transaction.d.ts +1 -1
- package/internal/core/jsonrpc/types/output/transaction.d.ts.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/errors.js +12 -12
- package/internal/core/providers/errors.js.map +1 -1
- package/internal/core/providers/gas-providers.js +2 -2
- package/internal/core/providers/gas-providers.js.map +1 -1
- package/internal/core/providers/http.d.ts.map +1 -1
- package/internal/core/providers/http.js +10 -8
- package/internal/core/providers/http.js.map +1 -1
- package/internal/core/providers/lazy-initialization.d.ts +2 -2
- package/internal/core/providers/lazy-initialization.d.ts.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 +2 -2
- package/internal/core/runtime-environment.js.map +1 -1
- package/internal/core/tasks/task-definitions.js +3 -3
- package/internal/core/tasks/task-definitions.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/PoolState.d.ts +4 -4
- package/internal/hardhat-network/provider/PoolState.d.ts.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/fork/rpcToTxData.d.ts +6 -1
- package/internal/hardhat-network/provider/fork/rpcToTxData.d.ts.map +1 -1
- package/internal/hardhat-network/provider/fork/rpcToTxData.js.map +1 -1
- package/internal/hardhat-network/provider/modules/debug.d.ts +1 -0
- package/internal/hardhat-network/provider/modules/debug.d.ts.map +1 -1
- package/internal/hardhat-network/provider/modules/debug.js +9 -2
- 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-types.d.ts +7 -7
- package/internal/hardhat-network/provider/node-types.d.ts.map +1 -1
- package/internal/hardhat-network/provider/node.js +65 -65
- package/internal/hardhat-network/provider/node.js.map +1 -1
- package/internal/hardhat-network/provider/output.d.ts +2 -2
- package/internal/hardhat-network/provider/output.d.ts.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 +12 -12
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js +11 -11
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js +12 -12
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js +13 -13
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js +13 -13
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js +6 -6
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.js +7 -7
- 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 +3 -2
- 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/contracts-identifier.js +5 -5
- package/internal/hardhat-network/stack-traces/contracts-identifier.js.map +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/message-trace.d.ts +4 -4
- package/internal/hardhat-network/stack-traces/message-trace.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/model.js +6 -6
- 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/solidity-stack-trace.d.ts +2 -2
- package/internal/hardhat-network/stack-traces/solidity-stack-trace.d.ts.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/sentry/reporter.js +12 -12
- package/internal/sentry/reporter.js.map +1 -1
- package/internal/solidity/compiler/downloader.js +11 -11
- package/internal/solidity/compiler/downloader.js.map +1 -1
- package/internal/solidity/dependencyGraph.js +5 -5
- package/internal/solidity/dependencyGraph.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.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.d.ts +1 -1
- package/internal/util/jsonrpc.d.ts.map +1 -1
- package/internal/util/jsonrpc.js +1 -1
- package/internal/util/jsonrpc.js.map +1 -1
- package/internal/util/unsafe.d.ts +1 -1
- package/internal/util/unsafe.d.ts.map +1 -1
- package/internal/util/unsafe.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 -12
- 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 +229 -20
- package/src/builtin-tasks/node.ts +1 -1
- package/src/builtin-tasks/run.ts +1 -1
- package/src/builtin-tasks/task-names.ts +2 -0
- package/src/internal/artifacts.ts +3 -11
- package/src/internal/cli/analytics.ts +2 -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/debugTraceTransaction.ts +1 -0
- 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 +11 -8
- 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/fork/rpcToTxData.ts +10 -1
- package/src/internal/hardhat-network/provider/modules/debug.ts +22 -3
- 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 -1
- package/src/internal/util/fs-utils.ts +10 -10
- package/src/internal/util/jsonrpc.ts +1 -1
- package/src/internal/util/unsafe.ts +1 -1
- package/src/internal/vendor/await-semaphore/index.ts +1 -1
- package/src/utils/source-names.ts +2 -2
- package/types/config.d.ts +10 -10
- package/types/config.d.ts.map +1 -1
- package/types/experimental.d.ts +2 -2
- package/types/experimental.d.ts.map +1 -1
- package/types/runtime.d.ts +6 -6
- package/types/runtime.d.ts.map +1 -1
- package/utils/source-names.js +2 -2
- package/utils/source-names.js.map +1 -1
|
@@ -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();
|
|
@@ -5,6 +5,7 @@ import { optionalOrNullable } from "../../../../util/io-ts";
|
|
|
5
5
|
export const rpcDebugTracingConfig = optionalOrNullable(
|
|
6
6
|
t.type(
|
|
7
7
|
{
|
|
8
|
+
tracer: optionalOrNullable(t.string),
|
|
8
9
|
disableStorage: optionalOrNullable(t.boolean),
|
|
9
10
|
disableMemory: optionalOrNullable(t.boolean),
|
|
10
11
|
disableStack: optionalOrNullable(t.boolean),
|
|
@@ -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
|
}
|
|
@@ -203,12 +203,12 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
203
203
|
// https://undici.nodejs.org/#/?id=garbage-collection
|
|
204
204
|
// It's not clear how to "cancel", so we'll just consume:
|
|
205
205
|
await response.body.text();
|
|
206
|
-
const seconds = this._getRetryAfterSeconds(response);
|
|
206
|
+
const seconds = this._getRetryAfterSeconds(response, retryNumber);
|
|
207
207
|
if (seconds !== undefined && this._shouldRetry(retryNumber, seconds)) {
|
|
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
|
}
|
|
@@ -272,12 +272,15 @@ export class HttpProvider extends EventEmitter implements EIP1193Provider {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
private _getRetryAfterSeconds(
|
|
275
|
-
response: Undici.Dispatcher.ResponseData
|
|
275
|
+
response: Undici.Dispatcher.ResponseData,
|
|
276
|
+
retryNumber: number
|
|
276
277
|
): number | undefined {
|
|
277
278
|
const header = response.headers["retry-after"];
|
|
278
279
|
|
|
279
280
|
if (header === undefined || header === null || Array.isArray(header)) {
|
|
280
|
-
|
|
281
|
+
// if the response doesn't have a retry-after header, we do
|
|
282
|
+
// an exponential backoff
|
|
283
|
+
return Math.min(2 ** retryNumber, MAX_RETRY_AWAIT_SECONDS);
|
|
281
284
|
}
|
|
282
285
|
|
|
283
286
|
const parsed = parseInt(header, 10);
|
|
@@ -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
|
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import type { BigIntLike } from "@nomicfoundation/ethereumjs-util";
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
AccessListEIP2930TxData,
|
|
3
5
|
TxData,
|
|
4
6
|
} from "@nomicfoundation/ethereumjs-tx";
|
|
5
7
|
|
|
6
|
-
import { FeeMarketEIP1559TxData } from "@nomicfoundation/ethereumjs-tx/dist/types";
|
|
7
8
|
import { RpcTransaction } from "../../../core/jsonrpc/types/output/transaction";
|
|
8
9
|
|
|
10
|
+
// the FeeMarketEIP1559TxData interface from ethereum js also has a
|
|
11
|
+
// `gasPrice?: never | null` property, which causes a compilation
|
|
12
|
+
// error in the latest version of typescript
|
|
13
|
+
interface FeeMarketEIP1559TxData extends AccessListEIP2930TxData {
|
|
14
|
+
maxPriorityFeePerGas?: BigIntLike;
|
|
15
|
+
maxFeePerGas?: BigIntLike;
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
export function rpcToTxData(
|
|
10
19
|
rpcTransaction: RpcTransaction
|
|
11
20
|
): TxData | AccessListEIP2930TxData | FeeMarketEIP1559TxData {
|
|
@@ -4,11 +4,14 @@ import {
|
|
|
4
4
|
RpcDebugTracingConfig,
|
|
5
5
|
} from "../../../core/jsonrpc/types/input/debugTraceTransaction";
|
|
6
6
|
import { validateParams } from "../../../core/jsonrpc/types/input/validation";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
InvalidArgumentsError,
|
|
9
|
+
MethodNotFoundError,
|
|
10
|
+
} from "../../../core/providers/errors";
|
|
8
11
|
import { HardhatNode } from "../node";
|
|
9
12
|
import { RpcDebugTraceOutput } from "../output";
|
|
10
13
|
|
|
11
|
-
/* eslint-disable @
|
|
14
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
12
15
|
|
|
13
16
|
export class DebugModule {
|
|
14
17
|
constructor(private readonly _node: HardhatNode) {}
|
|
@@ -32,7 +35,23 @@ export class DebugModule {
|
|
|
32
35
|
private _traceTransactionParams(
|
|
33
36
|
params: any[]
|
|
34
37
|
): [Buffer, RpcDebugTracingConfig] {
|
|
35
|
-
|
|
38
|
+
const validatedParams = validateParams(
|
|
39
|
+
params,
|
|
40
|
+
rpcHash,
|
|
41
|
+
rpcDebugTracingConfig
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
this._validateTracerParam(validatedParams[1]);
|
|
45
|
+
|
|
46
|
+
return validatedParams;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private _validateTracerParam(config: RpcDebugTracingConfig) {
|
|
50
|
+
if (config?.tracer !== undefined) {
|
|
51
|
+
throw new InvalidArgumentsError(
|
|
52
|
+
"Hardhat currently only supports the default tracer, so no tracer parameter should be passed."
|
|
53
|
+
);
|
|
54
|
+
}
|
|
36
55
|
}
|
|
37
56
|
|
|
38
57
|
private async _traceTransactionAction(
|
|
@@ -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.
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../../../core/providers/errors";
|
|
10
10
|
import { makeFakeSignature } from "../utils/makeFakeSignature";
|
|
11
11
|
|
|
12
|
-
/* eslint-disable @
|
|
12
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* This class represents a legacy transaction sent by a sender whose private
|
package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { InternalError } from "../../../core/providers/errors";
|
|
13
13
|
import * as BigIntUtils from "../../../util/bigint";
|
|
14
14
|
|
|
15
|
-
/* eslint-disable @
|
|
15
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* This class is like `ReadOnlyValidTransaction` but for EIP-1559 transactions.
|
package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
|
10
10
|
import { InternalError } from "../../../core/providers/errors";
|
|
11
11
|
import * as BigIntUtils from "../../../util/bigint";
|
|
12
12
|
|
|
13
|
-
/* eslint-disable @
|
|
13
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* This class is like `ReadOnlyValidTransaction` but for
|
|
@@ -4,7 +4,7 @@ import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
|
4
4
|
|
|
5
5
|
import { InternalError } from "../../../core/providers/errors";
|
|
6
6
|
|
|
7
|
-
/* eslint-disable @
|
|
7
|
+
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This class represents a transaction that is assumed to be valid.
|