hardhat 3.3.0 → 3.4.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/CHANGELOG.md +54 -0
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js +5 -13
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/console/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/console/task-action.js +2 -1
- package/dist/src/internal/builtin-plugins/console/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/exports.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/exports.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/exports.js +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/exports.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.js +1 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.d.ts +7 -5
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js +60 -44
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.d.ts +6 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js +14 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/compat.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/compat.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/compat.js +27 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/compat.js.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.d.ts +36 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.js +86 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.js.map +1 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.js +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/test.js +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/test.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js +1 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/types.d.ts +10 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/types.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/solidity-stack-trace.d.ts +4 -4
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/solidity-stack-trace.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/solidity-stack-trace.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/solidity-stack-trace.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts +6 -3
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js +23 -5
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js +2 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.js +22 -0
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js +17 -9
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.d.ts +11 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js +86 -19
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/hd-wallet-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/hd-wallet-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/local-accounts.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/local-accounts.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/local-accounts.js +22 -8
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/local-accounts.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/sender.d.ts +2 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/sender.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/sender.js +19 -12
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/sender.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/chain-id/chain-id-handler.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/chain-id/chain-id-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/chain-id/chain-id-handler.js +9 -3
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/chain-id/chain-id-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-handler.d.ts +2 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-handler.js +5 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-price-handler.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-price-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-price-handler.js +5 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-price-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-handler.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-handler.js +5 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-price-handler.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-price-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-price-handler.js +5 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-price-handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/types.d.ts +9 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/types.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/revert-error-code.d.ts +2 -0
- package/dist/src/internal/builtin-plugins/network-manager/revert-error-code.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/revert-error-code.js +3 -0
- package/dist/src/internal/builtin-plugins/network-manager/revert-error-code.js.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/type-extensions/config.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-extensions/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.js +2 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/json-rpc/handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/node/json-rpc/handler.js +8 -2
- package/dist/src/internal/builtin-plugins/node/json-rpc/handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/task-action.js +2 -2
- package/dist/src/internal/builtin-plugins/node/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/run/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/run/task-action.js +2 -1
- package/dist/src/internal/builtin-plugins/run/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/artifacts.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/artifacts.js +3 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/artifacts.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js +114 -31
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/cache.d.ts +2 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/cache.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/cache.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.d.ts +3 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js +11 -3
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph.js +5 -5
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.js +1 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/config.js +19 -16
- package/dist/src/internal/builtin-plugins/solidity/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts +3 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.js +19 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js +225 -55
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/type-extensions.d.ts +30 -4
- package/dist/src/internal/builtin-plugins/solidity/type-extensions.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/type-extensions.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/config.js +5 -3
- package/dist/src/internal/builtin-plugins/solidity-test/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts +0 -2
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js +0 -3
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/runner.d.ts +2 -8
- package/dist/src/internal/builtin-plugins/solidity-test/runner.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/runner.js +47 -50
- package/dist/src/internal/builtin-plugins/solidity-test/runner.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.js +11 -2
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js +108 -32
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts +1 -2
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.js +3 -4
- package/dist/src/internal/builtin-plugins/test/task-action.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +8 -0
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/types/artifacts.d.ts +5 -4
- package/dist/src/types/artifacts.d.ts.map +1 -1
- package/dist/src/types/network.d.ts +39 -0
- package/dist/src/types/network.d.ts.map +1 -1
- package/dist/src/types/solidity/build-system.d.ts +66 -3
- package/dist/src/types/solidity/build-system.d.ts.map +1 -1
- package/dist/src/types/solidity/build-system.js.map +1 -1
- package/dist/src/types/solidity/compilation-job.d.ts +6 -0
- package/dist/src/types/solidity/compilation-job.d.ts.map +1 -1
- package/dist/src/types/solidity/solidity-artifacts.d.ts +14 -0
- package/dist/src/types/solidity/solidity-artifacts.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/internal/builtin-plugins/artifacts/artifact-manager.ts +9 -15
- package/src/internal/builtin-plugins/console/task-action.ts +2 -1
- package/src/internal/builtin-plugins/gas-analytics/exports.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.ts +1 -2
- package/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.ts +100 -61
- package/src/internal/builtin-plugins/gas-analytics/helpers/accessors.ts +31 -0
- package/src/internal/builtin-plugins/gas-analytics/helpers/compat.ts +37 -0
- package/src/internal/builtin-plugins/gas-analytics/helpers/utils.ts +112 -0
- package/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/hook-handlers/test.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.ts +1 -2
- package/src/internal/builtin-plugins/gas-analytics/types.ts +11 -2
- package/src/internal/builtin-plugins/network-manager/edr/stack-traces/solidity-stack-trace.ts +4 -0
- package/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.ts +28 -4
- package/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts +2 -1
- package/src/internal/builtin-plugins/network-manager/hook-handlers/hre.ts +29 -0
- package/src/internal/builtin-plugins/network-manager/hook-handlers/network.ts +20 -14
- package/src/internal/builtin-plugins/network-manager/network-manager.ts +130 -27
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/hd-wallet-handler.ts +1 -0
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/local-accounts.ts +30 -13
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/sender.ts +25 -17
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/chain-id/chain-id-handler.ts +13 -5
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-handler.ts +7 -1
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/automatic-gas-price-handler.ts +7 -1
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-handler.ts +7 -1
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/gas/fixed-gas-price-handler.ts +7 -1
- package/src/internal/builtin-plugins/network-manager/request-handlers/types.ts +10 -0
- package/src/internal/builtin-plugins/network-manager/revert-error-code.ts +2 -0
- package/src/internal/builtin-plugins/network-manager/type-extensions/config.ts +1 -1
- package/src/internal/builtin-plugins/network-manager/type-validation.ts +5 -1
- package/src/internal/builtin-plugins/node/json-rpc/handler.ts +10 -2
- package/src/internal/builtin-plugins/node/task-action.ts +2 -2
- package/src/internal/builtin-plugins/run/task-action.ts +2 -1
- package/src/internal/builtin-plugins/solidity/build-system/artifacts.ts +3 -0
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +156 -34
- package/src/internal/builtin-plugins/solidity/build-system/cache.ts +2 -0
- package/src/internal/builtin-plugins/solidity/build-system/compilation-job.ts +15 -9
- package/src/internal/builtin-plugins/solidity/build-system/dependency-graph.ts +9 -7
- package/src/internal/builtin-plugins/solidity/build-system/solc-info.ts +1 -0
- package/src/internal/builtin-plugins/solidity/build-system/warning-suppression.ts +2 -2
- package/src/internal/builtin-plugins/solidity/config.ts +23 -13
- package/src/internal/builtin-plugins/solidity/constants.ts +21 -0
- package/src/internal/builtin-plugins/solidity/tasks/build.ts +359 -74
- package/src/internal/builtin-plugins/solidity/type-extensions.ts +38 -8
- package/src/internal/builtin-plugins/solidity-test/config.ts +11 -2
- package/src/internal/builtin-plugins/solidity-test/helpers.ts +0 -7
- package/src/internal/builtin-plugins/solidity-test/runner.ts +64 -83
- package/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.ts +15 -2
- package/src/internal/builtin-plugins/solidity-test/task-action.ts +161 -43
- package/src/internal/builtin-plugins/solidity-test/type-extensions.ts +1 -2
- package/src/internal/builtin-plugins/test/task-action.ts +3 -4
- package/src/internal/cli/main.ts +14 -0
- package/src/types/artifacts.ts +5 -4
- package/src/types/network.ts +48 -0
- package/src/types/solidity/build-system.ts +66 -3
- package/src/types/solidity/compilation-job.ts +7 -0
- package/src/types/solidity/solidity-artifacts.ts +16 -0
- package/templates/hardhat-2/04-mocha-viem-ts/package.json +1 -1
- package/templates/hardhat-3/01-node-test-runner-viem/gitignore +11 -0
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +12 -12
- package/templates/hardhat-3/01-node-test-runner-viem/scripts/send-op-tx.ts +1 -1
- package/templates/hardhat-3/01-node-test-runner-viem/test/Counter.ts +1 -1
- package/templates/hardhat-3/02-mocha-ethers/gitignore +11 -0
- package/templates/hardhat-3/02-mocha-ethers/package.json +14 -14
- package/templates/hardhat-3/02-mocha-ethers/scripts/send-op-tx.ts +1 -1
- package/templates/hardhat-3/02-mocha-ethers/test/Counter.ts +1 -1
- package/templates/hardhat-3/03-minimal/gitignore +11 -0
- package/templates/hardhat-3/03-minimal/package.json +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers.d.ts +0 -14
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers.d.ts.map +0 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers.js +0 -55
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers.js.map +0 -1
- package/src/internal/builtin-plugins/gas-analytics/helpers.ts +0 -96
|
@@ -70,11 +70,11 @@ export interface ArtifactManager {
|
|
|
70
70
|
/**
|
|
71
71
|
* Returns true if an artifact exists.
|
|
72
72
|
*
|
|
73
|
-
* This function doesn't throw if the name is not unique
|
|
73
|
+
* This function doesn't throw if the name is not unique, this means that
|
|
74
|
+
* this method may return `true`, and a successive call to `readArtifact` can
|
|
75
|
+
* throw because of a duplicated name.
|
|
74
76
|
*
|
|
75
77
|
* @param contractNameOrFullyQualifiedName Contract or fully qualified name.
|
|
76
|
-
* @throws Throws an error if a non-unique contract name is used,
|
|
77
|
-
* indicating which fully qualified names can be used instead.
|
|
78
78
|
*/
|
|
79
79
|
artifactExists(contractNameOrFullyQualifiedName: string): Promise<boolean>;
|
|
80
80
|
/**
|
|
@@ -98,7 +98,8 @@ export interface ArtifactManager {
|
|
|
98
98
|
* If it does return an id, it's not guaranteed that the build info is
|
|
99
99
|
* present.
|
|
100
100
|
*
|
|
101
|
-
* @param contractNameOrFullyQualifiedName Contract or fully qualified name,
|
|
101
|
+
* @param contractNameOrFullyQualifiedName Contract or fully qualified name,
|
|
102
|
+
* whose artifact must exist.
|
|
102
103
|
* @throws Throws an error if a non-unique contract name is used,
|
|
103
104
|
* indicating which fully qualified names can be used instead.
|
|
104
105
|
* @throws Throws an error if the artifact doesn't exist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/types/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO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,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjE,CAAC;CACH;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAC"}
|
|
@@ -35,8 +35,47 @@ export interface NetworkConnectionParams<ChainTypeT extends ChainType | string =
|
|
|
35
35
|
chainType?: ChainTypeT;
|
|
36
36
|
override?: NetworkConfigOverride;
|
|
37
37
|
}
|
|
38
|
+
export interface CachedNetworkConnectionParams<ChainTypeT extends ChainType | string = DefaultChainType> extends NetworkConnectionParams<ChainTypeT> {
|
|
39
|
+
override?: never;
|
|
40
|
+
}
|
|
38
41
|
export interface NetworkManager {
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new network connection based on the provided parameters.
|
|
44
|
+
*
|
|
45
|
+
* @param networkOrParams The network name or connection parameters. When
|
|
46
|
+
* omitted, the default network is used.
|
|
47
|
+
*
|
|
48
|
+
* @returns A new {@link NetworkConnection} for the specified network.
|
|
49
|
+
*/
|
|
50
|
+
create<ChainTypeT extends ChainType | string = DefaultChainType>(networkOrParams?: NetworkConnectionParams<ChainTypeT> | string): Promise<NetworkConnection<ChainTypeT>>;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a new network connection based on the provided parameters.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated Use {@link NetworkManager.create} or
|
|
55
|
+
* {@link NetworkManager.getOrCreate} instead.
|
|
56
|
+
*
|
|
57
|
+
* - {@link NetworkManager.create} always creates a new network instance.
|
|
58
|
+
* - {@link NetworkManager.getOrCreate} returns an existing instance if one exists.
|
|
59
|
+
*
|
|
60
|
+
* `connect` will be removed in a future version of Hardhat.
|
|
61
|
+
*
|
|
62
|
+
* @param networkOrParams The network name or connection parameters. When
|
|
63
|
+
* omitted, the default network is used.
|
|
64
|
+
*
|
|
65
|
+
* @returns A new {@link NetworkConnection} for the specified network.
|
|
66
|
+
*/
|
|
39
67
|
connect<ChainTypeT extends ChainType | string = DefaultChainType>(networkOrParams?: NetworkConnectionParams<ChainTypeT> | string): Promise<NetworkConnection<ChainTypeT>>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns an existing network connection if one was previously created
|
|
70
|
+
* with the same network name and chain type. Creates a new one otherwise.
|
|
71
|
+
*
|
|
72
|
+
* @param networkOrParams The network name or connection parameters. When
|
|
73
|
+
* omitted, the default network is used. Overrides are not supported.
|
|
74
|
+
*
|
|
75
|
+
* @returns A {@link NetworkConnection} for the specified network, cached
|
|
76
|
+
* by network name and chain type.
|
|
77
|
+
*/
|
|
78
|
+
getOrCreate<ChainTypeT extends ChainType | string = DefaultChainType>(networkOrParams?: CachedNetworkConnectionParams<ChainTypeT> | string): Promise<NetworkConnection<ChainTypeT>>;
|
|
40
79
|
/**
|
|
41
80
|
* Spawns an Ethereum JSON-RPC server listening on HTTP and Websocket.
|
|
42
81
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/types/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,SAAS;IACrD,gBAAgB,EAAE,MAAM,CAAC,CAAC;CAC3B,GACG,CAAC,SAAS,SAAS,GACjB,CA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AAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAErD;;;;OAIG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;;;;;;;OAQG;IACH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B"}
|
|
@@ -37,7 +37,13 @@ export interface BuildOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
quiet?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
* Whether to compile contracts or tests. Defaults to contracts
|
|
40
|
+
* Whether to compile contracts or tests. Defaults to contracts.
|
|
41
|
+
*
|
|
42
|
+
* When `solidity.splitTestsCompilation` is `false` (the default), only
|
|
43
|
+
* `"contracts"` is accepted.
|
|
44
|
+
*
|
|
45
|
+
* When `solidity.splitTestsCompilation` is `true`, both scopes are valid
|
|
46
|
+
* and produce separate compilation passes.
|
|
41
47
|
*/
|
|
42
48
|
scope?: BuildScope;
|
|
43
49
|
}
|
|
@@ -212,6 +218,16 @@ export interface SolidityBuildSystem {
|
|
|
212
218
|
* The root files are either absolute paths or
|
|
213
219
|
* `npm:<package-name>/<file-path>` URIs.
|
|
214
220
|
*
|
|
221
|
+
* When `solidity.splitTestsCompilation` is `false`, contracts and tests are
|
|
222
|
+
* compiled together and `scope: "contracts"` returns every build root:
|
|
223
|
+
* contract roots, test roots, and `npmFilesToBuild` roots.
|
|
224
|
+
*
|
|
225
|
+
* Calling this method with `scope: "tests"` in this mode is a logic error and
|
|
226
|
+
* throws a `HardhatError`.
|
|
227
|
+
*
|
|
228
|
+
* When `solidity.splitTestsCompilation` is `true`, `scope: "contracts"`
|
|
229
|
+
* returns only contract roots and `scope: "tests"` returns only test roots.
|
|
230
|
+
*
|
|
215
231
|
* @returns An array of root file paths.
|
|
216
232
|
*/
|
|
217
233
|
getRootFilePaths(options?: {
|
|
@@ -224,6 +240,15 @@ export interface SolidityBuildSystem {
|
|
|
224
240
|
/**
|
|
225
241
|
* Builds the provided files, generating their compilation artifacts.
|
|
226
242
|
*
|
|
243
|
+
* When `solidity.splitTestsCompilation` is `false`, this method rejects
|
|
244
|
+
* `scope: "tests"` as a logic error and throws a `HardhatError`
|
|
245
|
+
*
|
|
246
|
+
* In this mode, callers must use `scope: "contracts"` and contracts and tests
|
|
247
|
+
* are built together, emitting their artifacts into the same directory.
|
|
248
|
+
*
|
|
249
|
+
* When `solidity.splitTestsCompilation` is `true`, both scopes are valid
|
|
250
|
+
* and are built into separate artifact directories.
|
|
251
|
+
*
|
|
227
252
|
* @param rootFilePaths The files to build, which can be either absolute paths
|
|
228
253
|
* or `npm:<package-name>/<file-path>` URIs.
|
|
229
254
|
* @param options The options to use when building the files.
|
|
@@ -246,6 +271,9 @@ export interface SolidityBuildSystem {
|
|
|
246
271
|
* can be returned for multiple files, so you should deduplicate the results
|
|
247
272
|
* before using them.
|
|
248
273
|
*
|
|
274
|
+
* When `solidity.splitTestsCompilation` is `false`, this method rejects
|
|
275
|
+
* `scope: "tests"` as a logic error and throws a `HardhatError`.
|
|
276
|
+
*
|
|
249
277
|
* @param rootFilePaths The files to analyze, which can be either absolute
|
|
250
278
|
* paths or `npm:<package-name>/<file-path>` URIs.
|
|
251
279
|
* @param options The options to use when analyzing the files.
|
|
@@ -278,6 +306,13 @@ export interface SolidityBuildSystem {
|
|
|
278
306
|
/**
|
|
279
307
|
* Emits the artifacts of the given compilation job.
|
|
280
308
|
*
|
|
309
|
+
* When `solidity.splitTestsCompilation` is `false`, this method rejects
|
|
310
|
+
* `scope: "tests"` as a logic error and throws a `HardhatError`
|
|
311
|
+
*
|
|
312
|
+
* Artifacts for both contracts and tests are emitted under the main artifacts
|
|
313
|
+
* directory when built with `scope: "contracts"` and `splitTestsCompilation`
|
|
314
|
+
* `false`.
|
|
315
|
+
*
|
|
281
316
|
* @param compilationJob The compilation job to emit the artifacts of.
|
|
282
317
|
* @param compilerOutput The result of running the compilation job.
|
|
283
318
|
* @returns A map from user source name to the absolute paths of the
|
|
@@ -296,7 +331,25 @@ export interface SolidityBuildSystem {
|
|
|
296
331
|
* This method should only be used after a complete build has succeeded, as
|
|
297
332
|
* it relies on the build system to have generated all the necessary artifact
|
|
298
333
|
* files.
|
|
299
|
-
|
|
334
|
+
*
|
|
335
|
+
* When `solidity.splitTestsCompilation` is `false`, this method rejects
|
|
336
|
+
* `scope: "tests"` as a logic error and throws a `HardhatError`. Cleanup in
|
|
337
|
+
* this mode operates on the main artifacts directory using `scope:
|
|
338
|
+
* "contracts"`.
|
|
339
|
+
*
|
|
340
|
+
* What is considered a complete build changes according to
|
|
341
|
+
* `splitTestsCompilation`:
|
|
342
|
+
* - When it's `true`
|
|
343
|
+
* - A full "contracts" build is run when `--no-contracts` isn't used, and
|
|
344
|
+
* no explicit contract `files` are provided (i.e. you can still provide
|
|
345
|
+
* explicit test `files`).
|
|
346
|
+
* - A full "tests" build is run when `--no-tests` isn't used, and no
|
|
347
|
+
* explicit test files `files` are provided (i.e. you can still provide
|
|
348
|
+
* explicit contract `files`)
|
|
349
|
+
* - When it's `false`
|
|
350
|
+
* - A full build is when `files`, `--no-contracts`, nor `--no-tests` are
|
|
351
|
+
* used.
|
|
352
|
+
*
|
|
300
353
|
* @param rootFilePaths All the root files of the project.
|
|
301
354
|
*/
|
|
302
355
|
cleanupArtifacts(rootFilePaths: string[], options?: {
|
|
@@ -316,7 +369,17 @@ export interface SolidityBuildSystem {
|
|
|
316
369
|
*/
|
|
317
370
|
compileBuildInfo(buildInfo: SolidityBuildInfo, options?: CompileBuildInfoOptions): Promise<CompilerOutput>;
|
|
318
371
|
/**
|
|
319
|
-
* Gets the artifacts directory for a given target (contracts/tests)
|
|
372
|
+
* Gets the artifacts directory for a given target (contracts/tests).
|
|
373
|
+
*
|
|
374
|
+
* When `solidity.splitTestsCompilation` is `false`, both scopes return the
|
|
375
|
+
* main artifacts directory, because contracts and tests share it.
|
|
376
|
+
*
|
|
377
|
+
* Unlike the other scope-aware methods, this one does not throw on that mode,
|
|
378
|
+
* as it's a read-only method that can be helpful for plugins.
|
|
379
|
+
*
|
|
380
|
+
* When `solidity.splitTestsCompilation` is `true`, `scope: "contracts"`
|
|
381
|
+
* returns the main artifacts directory and `scope: "tests"` returns a
|
|
382
|
+
* separate test-artifacts directory under the cache path.
|
|
320
383
|
*/
|
|
321
384
|
getArtifactsDirectory(scope: BuildScope): Promise<string>;
|
|
322
385
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-system.d.ts","sourceRoot":"","sources":["../../../../src/types/solidity/build-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB
|
|
1
|
+
{"version":3,"file":"build-system.d.ts","sourceRoot":"","sources":["../../../../src/types/solidity/build-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;GAEG;A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C;IAEjB;;;;;;;;;;;OAWG;IACH,gBAAgB,CACd,SAAS,EAAE,iBAAiB,EAC5B,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B;;;;;;;;;;;;OAYG;IACH,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-system.js","sourceRoot":"","sources":["../../../../src/types/solidity/build-system.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-system.js","sourceRoot":"","sources":["../../../../src/types/solidity/build-system.ts"],"names":[],"mappings":"AA2FA,MAAM,CAAN,IAAY,iCAmCX;AAnCD,WAAY,iCAAiC;IAC3C;;OAEG;IACH,kHAA6E,CAAA;IAE7E;;OAEG;IACH,8HAAyF,CAAA;IAEzF;;OAEG;IACH,gGAA2D,CAAA;IAE3D;;OAEG;IACH,oJAA+G,CAAA;IAE/G;;OAEG;IACH,kHAA6E,CAAA;IAE7E;;OAEG;IACH,kJAA6G,CAAA;IAE7G;;OAEG;IACH,0GAAqE,CAAA;AACvE,CAAC,EAnCW,iCAAiC,KAAjC,iCAAiC,QAmC5C;AAyDD;;GAEG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,sDAA+B,CAAA;IAC/B,sDAA+B,CAAA;AACjC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CompilerInput } from "./compiler-io.js";
|
|
2
2
|
import type { DependencyGraph } from "./dependency-graph.js";
|
|
3
|
+
import type { ToolVersions } from "./solidity-artifacts.js";
|
|
3
4
|
import type { SolidityCompilerConfig } from "../config.js";
|
|
4
5
|
/**
|
|
5
6
|
* A compilation job to be run.
|
|
@@ -18,6 +19,11 @@ export interface CompilationJob {
|
|
|
18
19
|
* The long version of the compiler to be used.
|
|
19
20
|
*/
|
|
20
21
|
solcLongVersion: string;
|
|
22
|
+
/**
|
|
23
|
+
* The versions to include in the build info, if any.
|
|
24
|
+
* When present, these versions influence the build id.
|
|
25
|
+
*/
|
|
26
|
+
toolVersions?: ToolVersions;
|
|
21
27
|
/**
|
|
22
28
|
* Returns the solc input to be used.
|
|
23
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compilation-job.d.ts","sourceRoot":"","sources":["../../../../src/types/solidity/compilation-job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;OAEG;IACH,UAAU,EAAE,sBAAsB,CAAC;IAEnC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvC;;;;;;;;;OASG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"compilation-job.d.ts","sourceRoot":"","sources":["../../../../src/types/solidity/compilation-job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;OAEG;IACH,UAAU,EAAE,sBAAsB,CAAC;IAEnC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvC;;;;;;;;;OASG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/B"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { CompilerInput, CompilerOutput } from "./compiler-io.js";
|
|
2
|
+
/**
|
|
3
|
+
* A record with the versions of the different tools used to create a
|
|
4
|
+
* build info.
|
|
5
|
+
*/
|
|
6
|
+
export interface ToolVersions {
|
|
7
|
+
readonly hardhat: string;
|
|
8
|
+
}
|
|
2
9
|
/**
|
|
3
10
|
* A SolidityBuildInfo is a file that contains all the information of a solc
|
|
4
11
|
* run. It includes all the necessary information to recreate that exact same
|
|
@@ -37,6 +44,13 @@ export interface SolidityBuildInfo {
|
|
|
37
44
|
* type may not be registered in the current type definitions.
|
|
38
45
|
*/
|
|
39
46
|
readonly compilerType?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Versions of the different tools used to create this build info.
|
|
49
|
+
*
|
|
50
|
+
* Not present if the build profile used to create this build info
|
|
51
|
+
* had `toolVersionsInBuildInfo` as `false`.
|
|
52
|
+
*/
|
|
53
|
+
readonly toolVersions?: ToolVersions;
|
|
40
54
|
/**
|
|
41
55
|
* A mapping from user source names to input source names, for the root
|
|
42
56
|
* files of the build (i.e. the files whose artifacts where being compiled).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidity-artifacts.d.ts","sourceRoot":"","sources":["../../../../src/types/solidity/solidity-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAA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,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAErC;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAEhD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hardhat",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://hardhat.org",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/NomicFoundation/hardhat",
|
|
9
|
-
"directory": "
|
|
9
|
+
"directory": "packages/hardhat"
|
|
10
10
|
},
|
|
11
11
|
"author": "Nomic Foundation",
|
|
12
12
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"README.md"
|
|
63
63
|
],
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@nomicfoundation/hardhat-node-test-reporter": "^3.0.
|
|
65
|
+
"@nomicfoundation/hardhat-node-test-reporter": "^3.0.4",
|
|
66
66
|
"@types/adm-zip": "^0.5.5",
|
|
67
67
|
"@types/debug": "^4.1.7",
|
|
68
68
|
"@types/node": "^22.0.0",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@nomicfoundation/edr": "0.12.0-next.29",
|
|
81
|
-
"@nomicfoundation/hardhat-errors": "^3.0.
|
|
82
|
-
"@nomicfoundation/hardhat-utils": "^4.0.
|
|
83
|
-
"@nomicfoundation/hardhat-vendored": "^3.0.
|
|
84
|
-
"@nomicfoundation/hardhat-zod-utils": "^3.0.
|
|
81
|
+
"@nomicfoundation/hardhat-errors": "^3.0.11",
|
|
82
|
+
"@nomicfoundation/hardhat-utils": "^4.0.3",
|
|
83
|
+
"@nomicfoundation/hardhat-vendored": "^3.0.2",
|
|
84
|
+
"@nomicfoundation/hardhat-zod-utils": "^3.0.4",
|
|
85
85
|
"@nomicfoundation/solidity-analyzer": "^0.1.1",
|
|
86
86
|
"@sentry/core": "^9.4.0",
|
|
87
87
|
"adm-zip": "^0.4.16",
|
|
@@ -81,22 +81,16 @@ export class ArtifactManagerImplementation implements ArtifactManager {
|
|
|
81
81
|
public async artifactExists(
|
|
82
82
|
contractNameOrFullyQualifiedName: string,
|
|
83
83
|
): Promise<boolean> {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
await this.getArtifactPath(contractNameOrFullyQualifiedName);
|
|
87
|
-
|
|
88
|
-
return true;
|
|
89
|
-
} catch (error) {
|
|
90
|
-
if (HardhatError.isHardhatError(error)) {
|
|
91
|
-
if (
|
|
92
|
-
error.number === HardhatError.ERRORS.CORE.ARTIFACTS.NOT_FOUND.number
|
|
93
|
-
) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
84
|
+
const { bareNameToFullyQualifiedNameMap, allFullyQualifiedNames } =
|
|
85
|
+
await this.#getFsData();
|
|
97
86
|
|
|
98
|
-
|
|
87
|
+
if (this.#isFullyQualifiedName(contractNameOrFullyQualifiedName)) {
|
|
88
|
+
return allFullyQualifiedNames.has(contractNameOrFullyQualifiedName);
|
|
99
89
|
}
|
|
90
|
+
|
|
91
|
+
return bareNameToFullyQualifiedNameMap.has(
|
|
92
|
+
contractNameOrFullyQualifiedName,
|
|
93
|
+
);
|
|
100
94
|
}
|
|
101
95
|
|
|
102
96
|
public async getBuildInfoId(
|
|
@@ -191,7 +185,7 @@ export class ArtifactManagerImplementation implements ArtifactManager {
|
|
|
191
185
|
HardhatError.ERRORS.CORE.ARTIFACTS.MULTIPLE_FOUND,
|
|
192
186
|
{
|
|
193
187
|
contractName: contractNameOrFullyQualifiedName,
|
|
194
|
-
candidates: Array.from(fqns).join(EOL),
|
|
188
|
+
candidates: Array.from(fqns).sort().join(EOL),
|
|
195
189
|
},
|
|
196
190
|
);
|
|
197
191
|
}
|
|
@@ -42,7 +42,8 @@ const consoleAction: NewTaskActionFunction<ConsoleActionArguments> = async (
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (!noCompile) {
|
|
45
|
-
|
|
45
|
+
const noTests = hre.config.solidity.splitTestsCompilation;
|
|
46
|
+
await hre.tasks.getTask("build").run({ noTests, quiet: true });
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
return await new Promise<REPLServer>(async (resolve) => {
|
|
@@ -17,8 +17,7 @@ import {
|
|
|
17
17
|
parseFullyQualifiedName,
|
|
18
18
|
} from "../../../utils/contract-names.js";
|
|
19
19
|
|
|
20
|
-
import { getUserFqn } from "./
|
|
21
|
-
import { formatSectionHeader } from "./helpers.js";
|
|
20
|
+
import { formatSectionHeader, getUserFqn } from "./helpers/utils.js";
|
|
22
21
|
|
|
23
22
|
export const FUNCTION_GAS_SNAPSHOTS_FILE = ".gas-snapshot";
|
|
24
23
|
|