gate-evm-tools 1.0.28 → 1.2.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/README.md +47 -18
- package/bin/cli.js +6 -0
- package/bin/delivery.cjs +52 -0
- package/bin/manifest-bootstrap.js +4 -15
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +26 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/plan/file-store.d.ts.map +1 -0
- package/dist/commands/plan/generate-deployment.d.ts +48 -0
- package/dist/commands/plan/generate-deployment.d.ts.map +1 -0
- package/dist/commands/plan/generate-deployment.js +211 -0
- package/dist/commands/plan/generate-deployment.js.map +1 -0
- package/dist/commands/plan/helpers.d.ts.map +1 -0
- package/dist/commands/plan/index.d.ts +3 -0
- package/dist/commands/plan/index.d.ts.map +1 -0
- package/dist/commands/plan/index.js +88 -0
- package/dist/commands/plan/index.js.map +1 -0
- package/dist/commands/sync.js +1 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/core/BytecodeChecker.d.ts.map +1 -1
- package/dist/core/BytecodeChecker.js +27 -8
- package/dist/core/BytecodeChecker.js.map +1 -1
- package/dist/core/preparation/artifacts.d.ts +2 -0
- package/dist/core/preparation/artifacts.d.ts.map +1 -1
- package/dist/core/preparation/artifacts.js +9 -3
- package/dist/core/preparation/artifacts.js.map +1 -1
- package/dist/core/preparation/batch.d.ts +26 -0
- package/dist/core/preparation/batch.d.ts.map +1 -0
- package/dist/core/preparation/batch.js +72 -0
- package/dist/core/preparation/batch.js.map +1 -0
- package/dist/core/preparation/evm.d.ts +61 -6
- package/dist/core/preparation/evm.d.ts.map +1 -1
- package/dist/core/preparation/evm.js +122 -34
- package/dist/core/preparation/evm.js.map +1 -1
- package/dist/core/preparation/evmManifestSync.d.ts +68 -0
- package/dist/core/preparation/evmManifestSync.d.ts.map +1 -0
- package/dist/core/preparation/evmManifestSync.js +154 -0
- package/dist/core/preparation/evmManifestSync.js.map +1 -0
- package/dist/core/preparation/index.d.ts +40 -2
- package/dist/core/preparation/index.d.ts.map +1 -1
- package/dist/core/preparation/index.js +3 -3
- package/dist/core/preparation/index.js.map +1 -1
- package/dist/core/preparation/manifest.d.ts +17 -3
- package/dist/core/preparation/manifest.d.ts.map +1 -1
- package/dist/core/preparation/manifest.js +23 -28
- package/dist/core/preparation/manifest.js.map +1 -1
- package/dist/core/preparation/normalize.d.ts.map +1 -1
- package/dist/core/preparation/normalize.js +67 -20
- package/dist/core/preparation/normalize.js.map +1 -1
- package/dist/core/preparation/transparent.d.ts +23 -0
- package/dist/core/preparation/transparent.d.ts.map +1 -0
- package/dist/core/preparation/transparent.js +103 -0
- package/dist/core/preparation/transparent.js.map +1 -0
- package/dist/core/preparation/types.d.ts +54 -7
- package/dist/core/preparation/types.d.ts.map +1 -1
- package/dist/core/preparation/zksync.d.ts.map +1 -1
- package/dist/core/preparation/zksync.js +2 -0
- package/dist/core/preparation/zksync.js.map +1 -1
- package/dist/custody/credential.d.ts.map +1 -1
- package/dist/custody/credential.js +1 -6
- package/dist/custody/credential.js.map +1 -1
- package/dist/custody/hardhat-runtime.d.ts.map +1 -1
- package/dist/custody/hardhat-runtime.js +2 -0
- package/dist/custody/hardhat-runtime.js.map +1 -1
- package/dist/custody/hardhat.d.ts +1 -0
- package/dist/custody/hardhat.d.ts.map +1 -1
- package/dist/custody/hardhat.js +1 -0
- package/dist/custody/hardhat.js.map +1 -1
- package/dist/custody/index.d.ts +1 -0
- package/dist/custody/index.d.ts.map +1 -1
- package/dist/custody/index.js +1 -0
- package/dist/custody/index.js.map +1 -1
- package/dist/custody/provider-wait.d.ts +13 -0
- package/dist/custody/provider-wait.d.ts.map +1 -0
- package/dist/custody/provider-wait.js +78 -0
- package/dist/custody/provider-wait.js.map +1 -0
- package/dist/delivery/policy.d.ts +6 -0
- package/dist/delivery/policy.d.ts.map +1 -0
- package/dist/delivery/policy.js +24 -0
- package/dist/delivery/policy.js.map +1 -0
- package/dist/deployment-evm/index.d.ts +4 -0
- package/dist/deployment-evm/index.d.ts.map +1 -0
- package/dist/deployment-evm/index.js +3 -0
- package/dist/deployment-evm/index.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/sync/index.d.ts +15 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +13 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow/index.d.ts +10 -2
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +6 -0
- package/dist/workflow/index.js.map +1 -1
- package/dist-cjs/core/BytecodeChecker.js +526 -0
- package/dist-cjs/core/BytecodeChecker.js.map +1 -0
- package/dist-cjs/core/legacyProxyArtifact.js +42 -0
- package/dist-cjs/core/legacyProxyArtifact.js.map +1 -0
- package/dist-cjs/core/preparation/artifacts.js +11 -4
- package/dist-cjs/core/preparation/artifacts.js.map +1 -1
- package/dist-cjs/core/preparation/batch.js +76 -0
- package/dist-cjs/core/preparation/batch.js.map +1 -0
- package/dist-cjs/core/preparation/evm.js +128 -37
- package/dist-cjs/core/preparation/evm.js.map +1 -1
- package/dist-cjs/core/preparation/evmManifestSync.js +163 -0
- package/dist-cjs/core/preparation/evmManifestSync.js.map +1 -0
- package/dist-cjs/core/preparation/index.js +3 -3
- package/dist-cjs/core/preparation/index.js.map +1 -1
- package/dist-cjs/core/preparation/manifest.js +25 -30
- package/dist-cjs/core/preparation/manifest.js.map +1 -1
- package/dist-cjs/core/preparation/normalize.js +67 -20
- package/dist-cjs/core/preparation/normalize.js.map +1 -1
- package/dist-cjs/core/preparation/transparent.js +110 -0
- package/dist-cjs/core/preparation/transparent.js.map +1 -0
- package/dist-cjs/core/preparation/zksync.js +2 -0
- package/dist-cjs/core/preparation/zksync.js.map +1 -1
- package/dist-cjs/custody/credential.js +1 -6
- package/dist-cjs/custody/credential.js.map +1 -1
- package/dist-cjs/custody/hardhat-runtime.js +2 -0
- package/dist-cjs/custody/hardhat-runtime.js.map +1 -1
- package/dist-cjs/custody/hardhat.js +3 -1
- package/dist-cjs/custody/hardhat.js.map +1 -1
- package/dist-cjs/custody/index.js +3 -1
- package/dist-cjs/custody/index.js.map +1 -1
- package/dist-cjs/custody/provider-wait.js +81 -0
- package/dist-cjs/custody/provider-wait.js.map +1 -0
- package/dist-cjs/delivery/policy.js +29 -0
- package/dist-cjs/delivery/policy.js.map +1 -0
- package/dist-cjs/deployment-evm/index.js +10 -0
- package/dist-cjs/deployment-evm/index.js.map +1 -0
- package/dist-cjs/sync/index.js +13 -0
- package/dist-cjs/sync/index.js.map +1 -1
- package/dist-cjs/workflow/index.js +22 -1
- package/dist-cjs/workflow/index.js.map +1 -1
- package/dist-runtime/config/hardhatAdapters.js +2 -1
- package/dist-runtime/config/hardhatAdapters.js.map +1 -1
- package/dist-runtime/config/openzeppelin.d.ts +2 -1
- package/dist-runtime/config/openzeppelin.js +2 -19
- package/dist-runtime/config/openzeppelin.js.map +1 -1
- package/dist-runtime/delivery/abi.d.ts +14 -0
- package/dist-runtime/delivery/abi.js +161 -0
- package/dist-runtime/delivery/abi.js.map +1 -0
- package/dist-runtime/delivery/aggregate-bootstrap.d.ts +12 -0
- package/dist-runtime/delivery/aggregate-bootstrap.js +42 -0
- package/dist-runtime/delivery/aggregate-bootstrap.js.map +1 -0
- package/dist-runtime/delivery/aggregate-channel.d.ts +28 -0
- package/dist-runtime/delivery/aggregate-channel.js +159 -0
- package/dist-runtime/delivery/aggregate-channel.js.map +1 -0
- package/dist-runtime/delivery/aggregate-diagnostics.d.ts +14 -0
- package/dist-runtime/delivery/aggregate-diagnostics.js +73 -0
- package/dist-runtime/delivery/aggregate-diagnostics.js.map +1 -0
- package/dist-runtime/delivery/aggregate-inputs.d.ts +172 -0
- package/dist-runtime/delivery/aggregate-inputs.js +57 -0
- package/dist-runtime/delivery/aggregate-inputs.js.map +1 -0
- package/dist-runtime/delivery/aggregate-source.d.ts +25 -0
- package/dist-runtime/delivery/aggregate-source.js +87 -0
- package/dist-runtime/delivery/aggregate-source.js.map +1 -0
- package/dist-runtime/delivery/aggregate-worker.d.ts +1 -0
- package/dist-runtime/delivery/aggregate-worker.js +199 -0
- package/dist-runtime/delivery/aggregate-worker.js.map +1 -0
- package/dist-runtime/delivery/aggregate.d.ts +51 -0
- package/dist-runtime/delivery/aggregate.js +190 -0
- package/dist-runtime/delivery/aggregate.js.map +1 -0
- package/dist-runtime/delivery/bindings.d.ts +21 -0
- package/dist-runtime/delivery/bindings.js +53 -0
- package/dist-runtime/delivery/bindings.js.map +1 -0
- package/dist-runtime/delivery/business-extension.d.ts +10 -0
- package/dist-runtime/delivery/business-extension.js +38 -0
- package/dist-runtime/delivery/business-extension.js.map +1 -0
- package/dist-runtime/delivery/calldata-archive.d.ts +18 -0
- package/dist-runtime/delivery/calldata-archive.js +31 -0
- package/dist-runtime/delivery/calldata-archive.js.map +1 -0
- package/dist-runtime/delivery/calldata-details.d.ts +47 -0
- package/dist-runtime/delivery/calldata-details.js +94 -0
- package/dist-runtime/delivery/calldata-details.js.map +1 -0
- package/dist-runtime/delivery/calldata-format.d.ts +4 -0
- package/dist-runtime/delivery/calldata-format.js +17 -0
- package/dist-runtime/delivery/calldata-format.js.map +1 -0
- package/dist-runtime/delivery/calldata-preparations.d.ts +13 -0
- package/dist-runtime/delivery/calldata-preparations.js +85 -0
- package/dist-runtime/delivery/calldata-preparations.js.map +1 -0
- package/dist-runtime/delivery/calldata-review.d.ts +44 -0
- package/dist-runtime/delivery/calldata-review.js +131 -0
- package/dist-runtime/delivery/calldata-review.js.map +1 -0
- package/dist-runtime/delivery/check-code.d.ts +19 -0
- package/dist-runtime/delivery/check-code.js +63 -0
- package/dist-runtime/delivery/check-code.js.map +1 -0
- package/dist-runtime/delivery/closure-format.d.ts +77 -0
- package/dist-runtime/delivery/closure-format.js +225 -0
- package/dist-runtime/delivery/closure-format.js.map +1 -0
- package/dist-runtime/delivery/codec-pin.d.ts +2 -0
- package/dist-runtime/delivery/codec-pin.js +7 -0
- package/dist-runtime/delivery/codec-pin.js.map +1 -0
- package/dist-runtime/delivery/codec.d.ts +19 -0
- package/dist-runtime/delivery/codec.js +73 -0
- package/dist-runtime/delivery/codec.js.map +1 -0
- package/dist-runtime/delivery/compiler-dependency-pins.d.ts +7 -0
- package/dist-runtime/delivery/compiler-dependency-pins.js +1689 -0
- package/dist-runtime/delivery/compiler-dependency-pins.js.map +1 -0
- package/dist-runtime/delivery/compiler-files.d.ts +40 -0
- package/dist-runtime/delivery/compiler-files.js +222 -0
- package/dist-runtime/delivery/compiler-files.js.map +1 -0
- package/dist-runtime/delivery/compiler-io.d.ts +2 -0
- package/dist-runtime/delivery/compiler-io.js +13 -0
- package/dist-runtime/delivery/compiler-io.js.map +1 -0
- package/dist-runtime/delivery/compiler-pins.d.ts +10 -0
- package/dist-runtime/delivery/compiler-pins.js +147 -0
- package/dist-runtime/delivery/compiler-pins.js.map +1 -0
- package/dist-runtime/delivery/compiler.d.ts +188 -0
- package/dist-runtime/delivery/compiler.js +851 -0
- package/dist-runtime/delivery/compiler.js.map +1 -0
- package/dist-runtime/delivery/config.d.ts +48 -0
- package/dist-runtime/delivery/config.js +124 -0
- package/dist-runtime/delivery/config.js.map +1 -0
- package/dist-runtime/delivery/configuration-definition.d.ts +31 -0
- package/dist-runtime/delivery/configuration-definition.js +343 -0
- package/dist-runtime/delivery/configuration-definition.js.map +1 -0
- package/dist-runtime/delivery/configuration-hre.d.ts +17 -0
- package/dist-runtime/delivery/configuration-hre.js +198 -0
- package/dist-runtime/delivery/configuration-hre.js.map +1 -0
- package/dist-runtime/delivery/configuration-runtime.d.ts +36 -0
- package/dist-runtime/delivery/configuration-runtime.js +248 -0
- package/dist-runtime/delivery/configuration-runtime.js.map +1 -0
- package/dist-runtime/delivery/configuration.d.ts +35 -0
- package/dist-runtime/delivery/configuration.js +86 -0
- package/dist-runtime/delivery/configuration.js.map +1 -0
- package/dist-runtime/delivery/contract-source.d.ts +14 -0
- package/dist-runtime/delivery/contract-source.js +138 -0
- package/dist-runtime/delivery/contract-source.js.map +1 -0
- package/dist-runtime/delivery/create2.d.ts +3 -0
- package/dist-runtime/delivery/create2.js +48 -0
- package/dist-runtime/delivery/create2.js.map +1 -0
- package/dist-runtime/delivery/custom-closure.d.ts +27 -0
- package/dist-runtime/delivery/custom-closure.js +818 -0
- package/dist-runtime/delivery/custom-closure.js.map +1 -0
- package/dist-runtime/delivery/custom-format.d.ts +35 -0
- package/dist-runtime/delivery/custom-format.js +410 -0
- package/dist-runtime/delivery/custom-format.js.map +1 -0
- package/dist-runtime/delivery/custom.d.ts +32 -0
- package/dist-runtime/delivery/custom.js +158 -0
- package/dist-runtime/delivery/custom.js.map +1 -0
- package/dist-runtime/delivery/data.d.ts +7 -0
- package/dist-runtime/delivery/data.js +86 -0
- package/dist-runtime/delivery/data.js.map +1 -0
- package/dist-runtime/delivery/development.d.ts +92 -0
- package/dist-runtime/delivery/development.js +406 -0
- package/dist-runtime/delivery/development.js.map +1 -0
- package/dist-runtime/delivery/engine.d.ts +9 -0
- package/dist-runtime/delivery/engine.js +23 -0
- package/dist-runtime/delivery/engine.js.map +1 -0
- package/dist-runtime/delivery/eoa-observation.d.ts +43 -0
- package/dist-runtime/delivery/eoa-observation.js +145 -0
- package/dist-runtime/delivery/eoa-observation.js.map +1 -0
- package/dist-runtime/delivery/eoa-signed.d.ts +2 -0
- package/dist-runtime/delivery/eoa-signed.js +74 -0
- package/dist-runtime/delivery/eoa-signed.js.map +1 -0
- package/dist-runtime/delivery/eoa.d.ts +82 -0
- package/dist-runtime/delivery/eoa.js +274 -0
- package/dist-runtime/delivery/eoa.js.map +1 -0
- package/dist-runtime/delivery/execution-db.d.ts +20 -0
- package/dist-runtime/delivery/execution-db.js +153 -0
- package/dist-runtime/delivery/execution-db.js.map +1 -0
- package/dist-runtime/delivery/execution-files.d.ts +9 -0
- package/dist-runtime/delivery/execution-files.js +138 -0
- package/dist-runtime/delivery/execution-files.js.map +1 -0
- package/dist-runtime/delivery/execution-identity.d.ts +15 -0
- package/dist-runtime/delivery/execution-identity.js +33 -0
- package/dist-runtime/delivery/execution-identity.js.map +1 -0
- package/dist-runtime/delivery/execution-model.d.ts +56 -0
- package/dist-runtime/delivery/execution-model.js +66 -0
- package/dist-runtime/delivery/execution-model.js.map +1 -0
- package/dist-runtime/delivery/execution-store.d.ts +48 -0
- package/dist-runtime/delivery/execution-store.js +361 -0
- package/dist-runtime/delivery/execution-store.js.map +1 -0
- package/dist-runtime/delivery/existing-code.d.ts +37 -0
- package/dist-runtime/delivery/existing-code.js +83 -0
- package/dist-runtime/delivery/existing-code.js.map +1 -0
- package/dist-runtime/delivery/export.d.ts +51 -0
- package/dist-runtime/delivery/export.js +69 -0
- package/dist-runtime/delivery/export.js.map +1 -0
- package/dist-runtime/delivery/forkAudit.d.ts +119 -0
- package/dist-runtime/delivery/forkAudit.js +473 -0
- package/dist-runtime/delivery/forkAudit.js.map +1 -0
- package/dist-runtime/delivery/hardhat.d.ts +3 -0
- package/dist-runtime/delivery/hardhat.js +45 -0
- package/dist-runtime/delivery/hardhat.js.map +1 -0
- package/dist-runtime/delivery/history-registration.d.ts +2 -0
- package/dist-runtime/delivery/history-registration.js +17 -0
- package/dist-runtime/delivery/history-registration.js.map +1 -0
- package/dist-runtime/delivery/identities.d.ts +22 -0
- package/dist-runtime/delivery/identities.js +97 -0
- package/dist-runtime/delivery/identities.js.map +1 -0
- package/dist-runtime/delivery/input-files.d.ts +5 -0
- package/dist-runtime/delivery/input-files.js +70 -0
- package/dist-runtime/delivery/input-files.js.map +1 -0
- package/dist-runtime/delivery/inputs.d.ts +62 -0
- package/dist-runtime/delivery/inputs.js +194 -0
- package/dist-runtime/delivery/inputs.js.map +1 -0
- package/dist-runtime/delivery/journal.d.ts +35 -0
- package/dist-runtime/delivery/journal.js +278 -0
- package/dist-runtime/delivery/journal.js.map +1 -0
- package/dist-runtime/delivery/manifest.d.ts +14 -0
- package/dist-runtime/delivery/manifest.js +68 -0
- package/dist-runtime/delivery/manifest.js.map +1 -0
- package/dist-runtime/delivery/materialization.d.ts +20 -0
- package/dist-runtime/delivery/materialization.js +138 -0
- package/dist-runtime/delivery/materialization.js.map +1 -0
- package/dist-runtime/delivery/observations.d.ts +31 -0
- package/dist-runtime/delivery/observations.js +38 -0
- package/dist-runtime/delivery/observations.js.map +1 -0
- package/dist-runtime/delivery/parameter-defaults.d.ts +10 -0
- package/dist-runtime/delivery/parameter-defaults.js +86 -0
- package/dist-runtime/delivery/parameter-defaults.js.map +1 -0
- package/dist-runtime/delivery/parameters.d.ts +55 -0
- package/dist-runtime/delivery/parameters.js +279 -0
- package/dist-runtime/delivery/parameters.js.map +1 -0
- package/dist-runtime/delivery/pending.d.ts +70 -0
- package/dist-runtime/delivery/pending.js +99 -0
- package/dist-runtime/delivery/pending.js.map +1 -0
- package/dist-runtime/delivery/plan.d.ts +50 -0
- package/dist-runtime/delivery/plan.js +209 -0
- package/dist-runtime/delivery/plan.js.map +1 -0
- package/dist-runtime/delivery/planning.d.ts +84 -0
- package/dist-runtime/delivery/planning.js +318 -0
- package/dist-runtime/delivery/planning.js.map +1 -0
- package/dist-runtime/delivery/policy.d.ts +4 -0
- package/dist-runtime/delivery/policy.js +9 -0
- package/dist-runtime/delivery/policy.js.map +1 -0
- package/dist-runtime/delivery/preparation.d.ts +6 -0
- package/dist-runtime/delivery/preparation.js +178 -0
- package/dist-runtime/delivery/preparation.js.map +1 -0
- package/dist-runtime/delivery/production-environment.d.ts +2 -0
- package/dist-runtime/delivery/production-environment.js +13 -0
- package/dist-runtime/delivery/production-environment.js.map +1 -0
- package/dist-runtime/delivery/production-finalization.d.ts +86 -0
- package/dist-runtime/delivery/production-finalization.js +292 -0
- package/dist-runtime/delivery/production-finalization.js.map +1 -0
- package/dist-runtime/delivery/production-intent.d.ts +2 -0
- package/dist-runtime/delivery/production-intent.js +16 -0
- package/dist-runtime/delivery/production-intent.js.map +1 -0
- package/dist-runtime/delivery/production.d.ts +582 -0
- package/dist-runtime/delivery/production.js +445 -0
- package/dist-runtime/delivery/production.js.map +1 -0
- package/dist-runtime/delivery/project-files.d.ts +8 -0
- package/dist-runtime/delivery/project-files.js +87 -0
- package/dist-runtime/delivery/project-files.js.map +1 -0
- package/dist-runtime/delivery/project-rpc.d.ts +19 -0
- package/dist-runtime/delivery/project-rpc.js +138 -0
- package/dist-runtime/delivery/project-rpc.js.map +1 -0
- package/dist-runtime/delivery/project.d.ts +17 -0
- package/dist-runtime/delivery/project.js +170 -0
- package/dist-runtime/delivery/project.js.map +1 -0
- package/dist-runtime/delivery/protocol.d.ts +49 -0
- package/dist-runtime/delivery/protocol.js +112 -0
- package/dist-runtime/delivery/protocol.js.map +1 -0
- package/dist-runtime/delivery/public-calldata.d.ts +25 -0
- package/dist-runtime/delivery/public-calldata.js +97 -0
- package/dist-runtime/delivery/public-calldata.js.map +1 -0
- package/dist-runtime/delivery/references.d.ts +19 -0
- package/dist-runtime/delivery/references.js +84 -0
- package/dist-runtime/delivery/references.js.map +1 -0
- package/dist-runtime/delivery/release-graph.d.ts +97 -0
- package/dist-runtime/delivery/release-graph.js +139 -0
- package/dist-runtime/delivery/release-graph.js.map +1 -0
- package/dist-runtime/delivery/release-history-capture.d.ts +7 -0
- package/dist-runtime/delivery/release-history-capture.js +76 -0
- package/dist-runtime/delivery/release-history-capture.js.map +1 -0
- package/dist-runtime/delivery/release-history.d.ts +43 -0
- package/dist-runtime/delivery/release-history.js +322 -0
- package/dist-runtime/delivery/release-history.js.map +1 -0
- package/dist-runtime/delivery/release-inputs.d.ts +33 -0
- package/dist-runtime/delivery/release-inputs.js +129 -0
- package/dist-runtime/delivery/release-inputs.js.map +1 -0
- package/dist-runtime/delivery/release.d.ts +196 -0
- package/dist-runtime/delivery/release.js +261 -0
- package/dist-runtime/delivery/release.js.map +1 -0
- package/dist-runtime/delivery/safe-manifest.d.ts +9 -0
- package/dist-runtime/delivery/safe-manifest.js +13 -0
- package/dist-runtime/delivery/safe-manifest.js.map +1 -0
- package/dist-runtime/delivery/safe-observation.d.ts +30 -0
- package/dist-runtime/delivery/safe-observation.js +487 -0
- package/dist-runtime/delivery/safe-observation.js.map +1 -0
- package/dist-runtime/delivery/safe-prepare.d.ts +13 -0
- package/dist-runtime/delivery/safe-prepare.js +81 -0
- package/dist-runtime/delivery/safe-prepare.js.map +1 -0
- package/dist-runtime/delivery/safe.d.ts +92 -0
- package/dist-runtime/delivery/safe.js +254 -0
- package/dist-runtime/delivery/safe.js.map +1 -0
- package/dist-runtime/delivery/same-fork-baseline.d.ts +8 -0
- package/dist-runtime/delivery/same-fork-baseline.js +21 -0
- package/dist-runtime/delivery/same-fork-baseline.js.map +1 -0
- package/dist-runtime/delivery/setup.d.ts +31 -0
- package/dist-runtime/delivery/setup.js +230 -0
- package/dist-runtime/delivery/setup.js.map +1 -0
- package/dist-runtime/delivery/source.d.ts +42 -0
- package/dist-runtime/delivery/source.js +139 -0
- package/dist-runtime/delivery/source.js.map +1 -0
- package/dist-runtime/delivery/target-fields.d.ts +2 -0
- package/dist-runtime/delivery/target-fields.js +11 -0
- package/dist-runtime/delivery/target-fields.js.map +1 -0
- package/dist-runtime/delivery/task-identity.d.ts +23 -0
- package/dist-runtime/delivery/task-identity.js +109 -0
- package/dist-runtime/delivery/task-identity.js.map +1 -0
- package/dist-runtime/delivery/toolchain.d.ts +3 -0
- package/dist-runtime/delivery/toolchain.js +52 -0
- package/dist-runtime/delivery/toolchain.js.map +1 -0
- package/dist-runtime/delivery/validation.d.ts +9 -0
- package/dist-runtime/delivery/validation.js +155 -0
- package/dist-runtime/delivery/validation.js.map +1 -0
- package/dist-runtime/delivery/verification.d.ts +16 -0
- package/dist-runtime/delivery/verification.js +65 -0
- package/dist-runtime/delivery/verification.js.map +1 -0
- package/dist-runtime/migrate.js +1 -0
- package/dist-runtime/migrate.js.map +1 -1
- package/dist-runtime/miner/binary.d.ts +2 -0
- package/dist-runtime/miner/binary.js +54 -0
- package/dist-runtime/miner/binary.js.map +1 -0
- package/dist-runtime/miner/cli.d.ts +1 -0
- package/dist-runtime/miner/cli.js +131 -0
- package/dist-runtime/miner/cli.js.map +1 -0
- package/dist-runtime/miner/index.d.ts +5 -0
- package/dist-runtime/miner/index.js +13 -0
- package/dist-runtime/miner/index.js.map +1 -0
- package/dist-runtime/miner/request.d.ts +7 -0
- package/dist-runtime/miner/request.js +73 -0
- package/dist-runtime/miner/request.js.map +1 -0
- package/dist-runtime/miner/runner.d.ts +2 -0
- package/dist-runtime/miner/runner.js +131 -0
- package/dist-runtime/miner/runner.js.map +1 -0
- package/dist-runtime/miner/types.d.ts +89 -0
- package/dist-runtime/miner/types.js +3 -0
- package/dist-runtime/miner/types.js.map +1 -0
- package/dist-runtime/miner/verify.d.ts +2 -0
- package/dist-runtime/miner/verify.js +75 -0
- package/dist-runtime/miner/verify.js.map +1 -0
- package/dist-runtime/runtime-identity.json +2 -2
- package/dist-runtime/vendor/plan-codec/index.cjs +897 -0
- package/dist-runtime/vendor/plan-codec/index.d.cts +38 -0
- package/dist-runtime/vendor/plan-codec/provenance.json +25 -0
- package/dist-runtime/workflow/engine.d.ts +14 -0
- package/dist-runtime/workflow/engine.js +160 -0
- package/dist-runtime/workflow/engine.js.map +1 -0
- package/dist-runtime/workflow/lib/authority.d.ts +6 -3
- package/dist-runtime/workflow/lib/authority.js.map +1 -1
- package/dist-runtime/workflow/lib/calls.d.ts +1 -1
- package/dist-runtime/workflow/lib/calls.js +44 -34
- package/dist-runtime/workflow/lib/calls.js.map +1 -1
- package/dist-runtime/workflow/lib/canonicalData.d.ts +8 -0
- package/dist-runtime/workflow/lib/canonicalData.js +68 -0
- package/dist-runtime/workflow/lib/canonicalData.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCodeRunner.js +7 -4
- package/dist-runtime/workflow/lib/checkCodeRunner.js.map +1 -1
- package/dist-runtime/workflow/lib/config.d.ts +3 -1
- package/dist-runtime/workflow/lib/config.js.map +1 -1
- package/dist-runtime/workflow/lib/context.d.ts +77 -0
- package/dist-runtime/workflow/lib/context.js +3 -0
- package/dist-runtime/workflow/lib/context.js.map +1 -0
- package/dist-runtime/workflow/lib/create2.d.ts +5 -27
- package/dist-runtime/workflow/lib/create2.js +11 -79
- package/dist-runtime/workflow/lib/create2.js.map +1 -1
- package/dist-runtime/workflow/lib/deploymentInfo.d.ts +2 -0
- package/dist-runtime/workflow/lib/deploymentInfo.js +6 -0
- package/dist-runtime/workflow/lib/deploymentInfo.js.map +1 -1
- package/dist-runtime/workflow/lib/deploymentRecords.d.ts +2 -0
- package/dist-runtime/workflow/lib/deploymentRecords.js +1 -1
- package/dist-runtime/workflow/lib/deploymentRecords.js.map +1 -1
- package/dist-runtime/workflow/lib/deployments.d.ts +5 -5
- package/dist-runtime/workflow/lib/deployments.js +5 -13
- package/dist-runtime/workflow/lib/deployments.js.map +1 -1
- package/dist-runtime/workflow/lib/evidencePorts.d.ts +55 -0
- package/dist-runtime/workflow/lib/evidencePorts.js +3 -0
- package/dist-runtime/workflow/lib/evidencePorts.js.map +1 -0
- package/dist-runtime/workflow/lib/executionPlan.d.ts +4 -42
- package/dist-runtime/workflow/lib/executionPlan.js +15 -210
- package/dist-runtime/workflow/lib/executionPlan.js.map +1 -1
- package/dist-runtime/workflow/lib/externalExecutionScanner.js +2 -1
- package/dist-runtime/workflow/lib/externalExecutionScanner.js.map +1 -1
- package/dist-runtime/workflow/lib/gateTool.d.ts +6 -2
- package/dist-runtime/workflow/lib/gateTool.js +22 -12
- package/dist-runtime/workflow/lib/gateTool.js.map +1 -1
- package/dist-runtime/workflow/lib/gateToolSync.d.ts +4 -1
- package/dist-runtime/workflow/lib/gateToolSync.js +8 -2
- package/dist-runtime/workflow/lib/gateToolSync.js.map +1 -1
- package/dist-runtime/workflow/lib/operationNames.d.ts +3 -0
- package/dist-runtime/workflow/lib/operationNames.js +34 -0
- package/dist-runtime/workflow/lib/operationNames.js.map +1 -0
- package/dist-runtime/workflow/lib/parameters.d.ts +1 -1
- package/dist-runtime/workflow/lib/parameters.js +11 -22
- package/dist-runtime/workflow/lib/parameters.js.map +1 -1
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js +18 -52
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js.map +1 -1
- package/dist-runtime/workflow/lib/pendingUupsBinding.d.ts +42 -0
- package/dist-runtime/workflow/lib/pendingUupsBinding.js +39 -0
- package/dist-runtime/workflow/lib/pendingUupsBinding.js.map +1 -0
- package/dist-runtime/workflow/lib/plan.d.ts +55 -0
- package/dist-runtime/workflow/lib/plan.js +324 -0
- package/dist-runtime/workflow/lib/plan.js.map +1 -0
- package/dist-runtime/workflow/lib/planCli.d.ts +14 -0
- package/dist-runtime/workflow/lib/planCli.js +279 -0
- package/dist-runtime/workflow/lib/planCli.js.map +1 -0
- package/dist-runtime/workflow/lib/preparationEvidence.d.ts +4 -0
- package/dist-runtime/workflow/lib/preparationEvidence.js +19 -0
- package/dist-runtime/workflow/lib/preparationEvidence.js.map +1 -0
- package/dist-runtime/workflow/lib/proxy.d.ts +4 -2
- package/dist-runtime/workflow/lib/proxy.js +3 -4
- package/dist-runtime/workflow/lib/proxy.js.map +1 -1
- package/dist-runtime/workflow/lib/runtime.d.ts +6 -0
- package/dist-runtime/workflow/lib/runtime.js +48 -0
- package/dist-runtime/workflow/lib/runtime.js.map +1 -0
- package/dist-runtime/workflow/lib/signer.d.ts +3 -2
- package/dist-runtime/workflow/lib/signer.js +18 -18
- package/dist-runtime/workflow/lib/signer.js.map +1 -1
- package/dist-runtime/workflow/lib/simulation.d.ts +13 -6
- package/dist-runtime/workflow/lib/simulation.js +39 -31
- package/dist-runtime/workflow/lib/simulation.js.map +1 -1
- package/dist-runtime/workflow/lib/state.js +3 -3
- package/dist-runtime/workflow/lib/state.js.map +1 -1
- package/dist-runtime/workflow/lib/staticValidation.d.ts +28 -0
- package/dist-runtime/workflow/lib/staticValidation.js +54 -10
- package/dist-runtime/workflow/lib/staticValidation.js.map +1 -1
- package/dist-runtime/workflow/lib/transactionPlanner.d.ts +62 -0
- package/dist-runtime/workflow/lib/transactionPlanner.js +258 -0
- package/dist-runtime/workflow/lib/transactionPlanner.js.map +1 -0
- package/dist-runtime/workflow/lib/typedValue.d.ts +3 -0
- package/dist-runtime/workflow/lib/typedValue.js +76 -0
- package/dist-runtime/workflow/lib/typedValue.js.map +1 -0
- package/dist-runtime/workflow/lib/validation.d.ts +23 -0
- package/dist-runtime/workflow/lib/validation.js +15 -0
- package/dist-runtime/workflow/lib/validation.js.map +1 -0
- package/dist-runtime/workflow/planAdd.d.ts +1 -0
- package/dist-runtime/workflow/planAdd.js +11 -0
- package/dist-runtime/workflow/planAdd.js.map +1 -0
- package/dist-runtime/workflow/planRead.d.ts +1 -0
- package/dist-runtime/workflow/planRead.js +11 -0
- package/dist-runtime/workflow/planRead.js.map +1 -0
- package/dist-runtime/workflow/planStatus.d.ts +1 -0
- package/dist-runtime/workflow/planStatus.js +11 -0
- package/dist-runtime/workflow/planStatus.js.map +1 -0
- package/dist-runtime/workflow/planWrite.d.ts +1 -0
- package/dist-runtime/workflow/planWrite.js +11 -0
- package/dist-runtime/workflow/planWrite.js.map +1 -0
- package/dist-runtime/workflow/run.d.ts +1 -40
- package/dist-runtime/workflow/run.js +69 -139
- package/dist-runtime/workflow/run.js.map +1 -1
- package/dist-runtime/workflow/staticValidate.js +8 -3
- package/dist-runtime/workflow/staticValidate.js.map +1 -1
- package/dist-runtime/workflow/steps/call.d.ts +1 -1
- package/dist-runtime/workflow/steps/check.d.ts +1 -1
- package/dist-runtime/workflow/steps/custom.d.ts +1 -1
- package/dist-runtime/workflow/steps/deploy.d.ts +1 -1
- package/dist-runtime/workflow/steps/deploy.js +110 -55
- package/dist-runtime/workflow/steps/deploy.js.map +1 -1
- package/dist-runtime/workflow/steps/upgrade.d.ts +1 -1
- package/dist-runtime/workflow/steps/upgrade.js +84 -49
- package/dist-runtime/workflow/steps/upgrade.js.map +1 -1
- package/dist-runtime/workflow/steps/view.d.ts +1 -1
- package/docs/compiler-qualification.md +38 -0
- package/docs/configuration-runtime-observation.md +29 -0
- package/docs/create2-miner.md +100 -0
- package/docs/delivery-aggregate.md +29 -0
- package/docs/delivery-calldata.md +27 -0
- package/docs/delivery-custom-input-closure.md +51 -0
- package/docs/delivery-development.md +38 -0
- package/docs/delivery-eoa.md +46 -0
- package/docs/delivery-evm-manifest.md +20 -0
- package/docs/delivery-execution-store.md +33 -0
- package/docs/delivery-inputs.md +95 -0
- package/docs/delivery-parameters.md +65 -0
- package/docs/delivery-planning.md +140 -0
- package/docs/delivery-release.md +119 -0
- package/docs/delivery-safe.md +75 -0
- package/docs/delivery-setup.md +198 -0
- package/docs/delivery-source.md +67 -0
- package/docs/direct-package-acceptance.md +2 -0
- package/docs/openzeppelin-acceptance.md +86 -0
- package/docs/openzeppelin-baseline.json +27 -0
- package/docs/openzeppelin-integration.md +115 -0
- package/docs/plans/2026-10-28-openzeppelin-toolkit-consolidation.md +396 -0
- package/docs/plans/2026-11-02-transparent-proxy-delivery.md +78 -0
- package/docs/superpowers/plans/2026-08-17-custody-hardhat-signers.md +1 -1
- package/docs/superpowers/plans/2026-09-24-scheme-aware-static-validation.md +193 -0
- package/docs/superpowers/plans/2026-10-28-create2-miner.md +82 -0
- package/docs/workflow-reference.md +12 -4
- package/docs/workflow-runtime.md +6 -0
- package/package.json +148 -10
- package/resources/create2/LICENSE +21 -0
- package/resources/create2/README.md +9 -0
- package/resources/create2/darwin-arm64/smartflow_miner +0 -0
- package/resources/create2/darwin-x64/smartflow_miner +0 -0
- package/resources/create2/manifest.json +27 -0
- package/runtime/config/hardhatAdapters.ts +2 -1
- package/runtime/config/openzeppelin.ts +3 -21
- package/runtime/delivery/abi.ts +225 -0
- package/runtime/delivery/aggregate-bootstrap.ts +31 -0
- package/runtime/delivery/aggregate-channel.ts +88 -0
- package/runtime/delivery/aggregate-diagnostics.ts +63 -0
- package/runtime/delivery/aggregate-inputs.ts +39 -0
- package/runtime/delivery/aggregate-source.ts +57 -0
- package/runtime/delivery/aggregate-worker.ts +143 -0
- package/runtime/delivery/aggregate.ts +139 -0
- package/runtime/delivery/bindings.ts +37 -0
- package/runtime/delivery/business-extension.ts +33 -0
- package/runtime/delivery/calldata-archive.ts +25 -0
- package/runtime/delivery/calldata-details.ts +90 -0
- package/runtime/delivery/calldata-format.ts +14 -0
- package/runtime/delivery/calldata-preparations.ts +76 -0
- package/runtime/delivery/calldata-review.ts +126 -0
- package/runtime/delivery/check-code.ts +38 -0
- package/runtime/delivery/closure-format.ts +350 -0
- package/runtime/delivery/codec-pin.ts +3 -0
- package/runtime/delivery/codec.ts +50 -0
- package/runtime/delivery/compiler-dependency-pins.ts +1685 -0
- package/runtime/delivery/compiler-files.ts +181 -0
- package/runtime/delivery/compiler-io.ts +10 -0
- package/runtime/delivery/compiler-pins.ts +143 -0
- package/runtime/delivery/compiler.ts +701 -0
- package/runtime/delivery/config.ts +116 -0
- package/runtime/delivery/configuration-definition.ts +160 -0
- package/runtime/delivery/configuration-hre.ts +130 -0
- package/runtime/delivery/configuration-runtime.ts +163 -0
- package/runtime/delivery/configuration.ts +67 -0
- package/runtime/delivery/contract-source.ts +112 -0
- package/runtime/delivery/create2.ts +57 -0
- package/runtime/delivery/custom-closure.ts +993 -0
- package/runtime/delivery/custom-format.ts +479 -0
- package/runtime/delivery/custom.ts +219 -0
- package/runtime/delivery/data.ts +94 -0
- package/runtime/delivery/development.ts +264 -0
- package/runtime/delivery/engine.ts +29 -0
- package/runtime/delivery/eoa-observation.ts +106 -0
- package/runtime/delivery/eoa-signed.ts +55 -0
- package/runtime/delivery/eoa.ts +288 -0
- package/runtime/delivery/execution-db.ts +131 -0
- package/runtime/delivery/execution-files.ts +135 -0
- package/runtime/delivery/execution-identity.ts +32 -0
- package/runtime/delivery/execution-model.ts +102 -0
- package/runtime/delivery/execution-store.ts +411 -0
- package/runtime/delivery/existing-code.ts +45 -0
- package/runtime/delivery/export.ts +99 -0
- package/runtime/delivery/forkAudit.ts +620 -0
- package/runtime/delivery/hardhat.ts +38 -0
- package/runtime/delivery/history-registration.ts +10 -0
- package/runtime/delivery/identities.ts +132 -0
- package/runtime/delivery/input-files.ts +46 -0
- package/runtime/delivery/inputs.ts +204 -0
- package/runtime/delivery/journal.ts +205 -0
- package/runtime/delivery/manifest.ts +54 -0
- package/runtime/delivery/materialization.ts +53 -0
- package/runtime/delivery/observations.ts +60 -0
- package/runtime/delivery/parameter-defaults.ts +75 -0
- package/runtime/delivery/parameters.ts +367 -0
- package/runtime/delivery/pending.ts +98 -0
- package/runtime/delivery/plan.ts +337 -0
- package/runtime/delivery/planning.ts +411 -0
- package/runtime/delivery/policy.ts +9 -0
- package/runtime/delivery/preparation.ts +240 -0
- package/runtime/delivery/production-environment.ts +7 -0
- package/runtime/delivery/production-finalization.ts +181 -0
- package/runtime/delivery/production-intent.ts +14 -0
- package/runtime/delivery/production.ts +415 -0
- package/runtime/delivery/project-files.ts +63 -0
- package/runtime/delivery/project-rpc.ts +116 -0
- package/runtime/delivery/project.ts +129 -0
- package/runtime/delivery/protocol.ts +94 -0
- package/runtime/delivery/public-calldata.ts +74 -0
- package/runtime/delivery/references.ts +106 -0
- package/runtime/delivery/release-graph.ts +79 -0
- package/runtime/delivery/release-history-capture.ts +32 -0
- package/runtime/delivery/release-history.ts +178 -0
- package/runtime/delivery/release-inputs.ts +107 -0
- package/runtime/delivery/release.ts +166 -0
- package/runtime/delivery/safe-manifest.ts +11 -0
- package/runtime/delivery/safe-observation.ts +626 -0
- package/runtime/delivery/safe-prepare.ts +101 -0
- package/runtime/delivery/safe.ts +355 -0
- package/runtime/delivery/same-fork-baseline.ts +17 -0
- package/runtime/delivery/setup.ts +184 -0
- package/runtime/delivery/source.ts +130 -0
- package/runtime/delivery/target-fields.ts +7 -0
- package/runtime/delivery/task-identity.ts +85 -0
- package/runtime/delivery/toolchain.ts +48 -0
- package/runtime/delivery/validation.ts +252 -0
- package/runtime/delivery/verification.ts +47 -0
- package/runtime/migrate.ts +1 -0
- package/runtime/miner/binary.ts +41 -0
- package/runtime/miner/cli.ts +87 -0
- package/runtime/miner/index.ts +5 -0
- package/runtime/miner/request.ts +54 -0
- package/runtime/miner/runner.ts +90 -0
- package/runtime/miner/types.ts +71 -0
- package/runtime/miner/verify.ts +61 -0
- package/runtime/vendor/plan-codec/index.cjs +897 -0
- package/runtime/vendor/plan-codec/index.d.cts +38 -0
- package/runtime/vendor/plan-codec/provenance.json +25 -0
- package/runtime/workflow/engine.ts +174 -0
- package/runtime/workflow/lib/authority.ts +3 -3
- package/runtime/workflow/lib/calls.ts +47 -37
- package/runtime/workflow/lib/canonicalData.ts +45 -0
- package/runtime/workflow/lib/checkCodeRunner.ts +7 -3
- package/runtime/workflow/lib/config.ts +1 -1
- package/runtime/workflow/lib/context.ts +77 -0
- package/runtime/workflow/lib/create2.ts +18 -121
- package/runtime/workflow/lib/deploymentInfo.ts +8 -0
- package/runtime/workflow/lib/deploymentRecords.ts +3 -1
- package/runtime/workflow/lib/deployments.ts +6 -14
- package/runtime/workflow/lib/evidencePorts.ts +20 -0
- package/runtime/workflow/lib/executionPlan.ts +17 -268
- package/runtime/workflow/lib/externalExecutionScanner.ts +2 -1
- package/runtime/workflow/lib/gateTool.ts +22 -10
- package/runtime/workflow/lib/gateToolSync.ts +11 -3
- package/runtime/workflow/lib/operationNames.ts +32 -0
- package/runtime/workflow/lib/parameters.ts +8 -21
- package/runtime/workflow/lib/pendingDeploymentReuse.ts +4 -56
- package/runtime/workflow/lib/pendingUupsBinding.ts +43 -0
- package/runtime/workflow/lib/plan.ts +334 -0
- package/runtime/workflow/lib/planCli.ts +279 -0
- package/runtime/workflow/lib/preparationEvidence.ts +14 -0
- package/runtime/workflow/lib/proxy.ts +6 -3
- package/runtime/workflow/lib/runtime.ts +46 -0
- package/runtime/workflow/lib/signer.ts +8 -5
- package/runtime/workflow/lib/simulation.ts +41 -17
- package/runtime/workflow/lib/state.ts +3 -3
- package/runtime/workflow/lib/staticValidation.ts +92 -11
- package/runtime/workflow/lib/transactionPlanner.ts +314 -0
- package/runtime/workflow/lib/typedValue.ts +46 -0
- package/runtime/workflow/lib/validation.ts +50 -0
- package/runtime/workflow/planAdd.ts +8 -0
- package/runtime/workflow/planRead.ts +8 -0
- package/runtime/workflow/planStatus.ts +8 -0
- package/runtime/workflow/planWrite.ts +8 -0
- package/runtime/workflow/run.ts +42 -176
- package/runtime/workflow/staticValidate.ts +8 -3
- package/runtime/workflow/steps/call.ts +1 -1
- package/runtime/workflow/steps/check.ts +1 -1
- package/runtime/workflow/steps/custom.ts +1 -1
- package/runtime/workflow/steps/deploy.ts +99 -58
- package/runtime/workflow/steps/upgrade.ts +88 -57
- package/runtime/workflow/steps/view.ts +1 -1
- package/bin/workflow.cjs +0 -19
|
@@ -0,0 +1,851 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerDeliveryCompiler = registerDeliveryCompiler;
|
|
7
|
+
exports.qualifyDeliveryCompiler = qualifyDeliveryCompiler;
|
|
8
|
+
exports.ownedDeliveryCompiler = ownedDeliveryCompiler;
|
|
9
|
+
exports.compilerPreparationHooks = compilerPreparationHooks;
|
|
10
|
+
exports.hasCompilerSameForkInitial = hasCompilerSameForkInitial;
|
|
11
|
+
exports.verifyCompilerSameForkUpgrade = verifyCompilerSameForkUpgrade;
|
|
12
|
+
exports.validateCompilerPreparationPlan = validateCompilerPreparationPlan;
|
|
13
|
+
exports.parseCompilerEvidence = parseCompilerEvidence;
|
|
14
|
+
/** Owned compiler qualification v1. Evidence parsing never creates an owned collector. */
|
|
15
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
18
|
+
const compiler_io_1 = require("./compiler-io");
|
|
19
|
+
const workflow_1 = require("gate-evm-tools/workflow");
|
|
20
|
+
const ethers_1 = require("ethers");
|
|
21
|
+
const deploy_impl_1 = require("@openzeppelin/hardhat-upgrades/dist/utils/deploy-impl");
|
|
22
|
+
const options_1 = require("@openzeppelin/hardhat-upgrades/dist/utils/options");
|
|
23
|
+
const upgrades_core_1 = require("@openzeppelin/upgrades-core");
|
|
24
|
+
const data_1 = require("./data");
|
|
25
|
+
const execution_identity_1 = require("./execution-identity");
|
|
26
|
+
const canonicalData_1 = require("../workflow/lib/canonicalData");
|
|
27
|
+
const compiler_files_1 = require("./compiler-files");
|
|
28
|
+
const compiler_pins_1 = require("./compiler-pins");
|
|
29
|
+
const compiler_pins_2 = require("./compiler-pins");
|
|
30
|
+
const compiler_dependency_pins_1 = require("./compiler-dependency-pins");
|
|
31
|
+
const same_fork_baseline_1 = require("./same-fork-baseline");
|
|
32
|
+
const preparation_1 = require("./preparation");
|
|
33
|
+
const ADAPTER = 'hardhat-2.26.3-oz-3.9.1-core-1.44.2-v1';
|
|
34
|
+
const LONG_VERSION = '0.8.28+commit.7893614a';
|
|
35
|
+
const NATIVE_HASH = '81515b0e53deaa266d549545ccaac0a5a96e6d4e8201c77f673b2c710976d9ea';
|
|
36
|
+
const JS_HASH = '9ef37cc1d2597ed6d2f706a960f449e33eb9eee920936cea77b11e6f43861970';
|
|
37
|
+
const JS_SOURCE = 'npm:solc@0.8.28/soljson.js#sha512-AFCiJ+b4RosyyNhnfdVH4ZR1+TxiL91iluPjw0EJslIu4LXGM9NYqi2z5y8TqochC4tcH9QsHfwWhOIC9jPDKA==';
|
|
38
|
+
const NATIVE_SOURCE = 'solc-bin:78d9b01518c352f6c075a9d30f7b27b6e592da1d/macosx-amd64/solc-macosx-amd64-v0.8.28+commit.7893614a';
|
|
39
|
+
// Resolve the same core manifest reader used by the actual preparation call site.
|
|
40
|
+
const { readRegisteredTargetUpgradeState, resolveTargetManifestDirectory } = require(node_path_1.default.join(node_path_1.default.dirname(require.resolve('gate-evm-tools/workflow')), '../core/preparation/manifest.js'));
|
|
41
|
+
const contexts = new node_async_hooks_1.AsyncLocalStorage();
|
|
42
|
+
const collectors = new WeakMap();
|
|
43
|
+
const owned = new WeakMap();
|
|
44
|
+
const handles = new WeakMap();
|
|
45
|
+
const initialRuntime = new WeakMap();
|
|
46
|
+
let registered;
|
|
47
|
+
let registrationError;
|
|
48
|
+
const names = (tasks) => Object.keys(tasks).filter(k => k === 'compile' || k.startsWith('compile:')).sort();
|
|
49
|
+
const chain = (task) => { const out = []; for (let t = task; t; t = t.parentTaskDefinition)
|
|
50
|
+
out.push(t); return out; };
|
|
51
|
+
const equal = (a, b, label) => { if ((0, canonicalData_1.semanticHash)(a) !== (0, canonicalData_1.semanticHash)(b))
|
|
52
|
+
throw new Error(`${label} mismatch`); };
|
|
53
|
+
/** This explicit projection applies only to official core 1.44.2 records/options. */
|
|
54
|
+
function persistedOZ(value) {
|
|
55
|
+
const optional = new Set(['version', 'solcVersion', 'layoutVersion', 'flat', 'namespaces', 'astId', 'offset', 'slot', 'renamedFrom', 'retypedFrom', 'members', 'underlying', 'numberOfBytes', 'kind', 'unsafeAllowRenames', 'unsafeSkipStorageCheck']);
|
|
56
|
+
const visit = (v) => {
|
|
57
|
+
if (Array.isArray(v))
|
|
58
|
+
return v.map(visit);
|
|
59
|
+
if (v && typeof v === 'object') {
|
|
60
|
+
if (![Object.prototype, null].includes(Object.getPrototypeOf(v)))
|
|
61
|
+
throw new Error('Invalid official OZ record');
|
|
62
|
+
const out = {};
|
|
63
|
+
for (const [key, d] of Object.entries(Object.getOwnPropertyDescriptors(v))) {
|
|
64
|
+
if (!d.enumerable || !('value' in d))
|
|
65
|
+
throw new Error('Invalid official OZ own record');
|
|
66
|
+
if (d.value === undefined) {
|
|
67
|
+
if (!optional.has(key))
|
|
68
|
+
throw new Error(`Unsupported OZ optional field ${key}`);
|
|
69
|
+
}
|
|
70
|
+
else
|
|
71
|
+
Object.defineProperty(out, key, { value: visit(d.value), enumerable: true });
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
return v;
|
|
76
|
+
};
|
|
77
|
+
return (0, data_1.strictData)(visit(value));
|
|
78
|
+
}
|
|
79
|
+
function projection(sourceName, contractName, output) {
|
|
80
|
+
const hex = (s = '') => s.slice(0, 2).toLowerCase() === '0x' ? s : `0x${s}`;
|
|
81
|
+
return (0, data_1.strictData)({ _format: 'hh-sol-artifact-1', sourceName, contractName, abi: output.abi,
|
|
82
|
+
bytecode: hex(output.evm?.bytecode?.object), deployedBytecode: hex(output.evm?.deployedBytecode?.object),
|
|
83
|
+
linkReferences: output.evm?.bytecode?.linkReferences ?? {}, deployedLinkReferences: output.evm?.deployedBytecode?.linkReferences ?? {} });
|
|
84
|
+
}
|
|
85
|
+
function stable(e) {
|
|
86
|
+
return { version: e.version, adapter: e.adapter, toolchain: (0, execution_identity_1.compilerExecutionInput)(e.toolchain),
|
|
87
|
+
jobs: e.jobs.map(j => ({ id: j.id, config: j.config, sources: j.sources, main: j.runs[0] })),
|
|
88
|
+
builds: e.builds, artifacts: e.artifacts, selections: e.selections, baselines: e.baselines.map(({ prior, ...b }) => ({ ...b, prior: { stableDigest: prior.stableDigest, selection: prior.selection } })) };
|
|
89
|
+
}
|
|
90
|
+
function jobIdentity(j) {
|
|
91
|
+
return (0, canonicalData_1.semanticHash)({ config: j.config, sources: j.sources, input: j.runs[0].input, compiler: j.runs[0].compiler });
|
|
92
|
+
}
|
|
93
|
+
function validationFor(job) {
|
|
94
|
+
if (job.runs.length !== 2)
|
|
95
|
+
throw new Error('Missing exact main/auxiliary compiler pair');
|
|
96
|
+
const [main, aux] = job.runs;
|
|
97
|
+
for (const run of job.runs)
|
|
98
|
+
if (run.output.errors?.some((e) => e.severity === 'error'))
|
|
99
|
+
throw new Error('Compiler evidence contains failed compilation');
|
|
100
|
+
return persistedOZ((0, upgrades_core_1.validate)(main.output, (0, upgrades_core_1.solcInputOutputDecoder)(main.input, main.output), main.compiler.version, main.input, aux.output));
|
|
101
|
+
}
|
|
102
|
+
function selectedClosure(run, fqn) {
|
|
103
|
+
const result = {};
|
|
104
|
+
const visit = (name) => {
|
|
105
|
+
if (result[name])
|
|
106
|
+
return;
|
|
107
|
+
if (!run[name])
|
|
108
|
+
throw new Error('Selected validation closure missing contract');
|
|
109
|
+
result[name] = run[name];
|
|
110
|
+
for (const dep of [...(run[name].inherit ?? []), ...(run[name].libraries ?? [])])
|
|
111
|
+
visit(dep);
|
|
112
|
+
};
|
|
113
|
+
visit(fqn);
|
|
114
|
+
return persistedOZ(result);
|
|
115
|
+
}
|
|
116
|
+
/** Pure artifact/ABI/OZ relationships shared by owned observation and persisted parsing. */
|
|
117
|
+
function selectedIdentity(entry, job, linkedBytecode, options) {
|
|
118
|
+
const artifact = entry.artifact;
|
|
119
|
+
if (artifact.bytecode === '0x')
|
|
120
|
+
throw new Error('ABI-only artifact cannot have an OZ deployment version');
|
|
121
|
+
// Construct from the actual artifact: the current adapter does not support library linking.
|
|
122
|
+
const factory = new ethers_1.ContractFactory(artifact.abi, artifact.bytecode);
|
|
123
|
+
if (factory.bytecode !== linkedBytecode)
|
|
124
|
+
throw new Error('Selected linked bytecode is not the qualified artifact');
|
|
125
|
+
const expected = { version: '3.4', log: [job.validation] };
|
|
126
|
+
const unlinkedBytecode = (0, upgrades_core_1.getUnlinkedBytecode)(expected, linkedBytecode);
|
|
127
|
+
if (unlinkedBytecode !== artifact.bytecode)
|
|
128
|
+
throw new Error('Actual factory bytecode is not the qualified artifact');
|
|
129
|
+
const encodedArgs = factory.interface.encodeDeploy(options.constructorArgs);
|
|
130
|
+
const version = (0, upgrades_core_1.getVersion)(unlinkedBytecode, linkedBytecode, encodedArgs);
|
|
131
|
+
const [fqn] = (0, upgrades_core_1.getContractNameAndRunValidation)(expected, version);
|
|
132
|
+
if (fqn !== entry.fqn)
|
|
133
|
+
throw new Error('Selected OZ first FQN does not match qualified artifact');
|
|
134
|
+
return { expected, fqn, unlinkedBytecode, encodedArgs, version,
|
|
135
|
+
validation: selectedClosure(job.validation, fqn), layout: persistedOZ((0, upgrades_core_1.getStorageLayout)(expected, version)) };
|
|
136
|
+
}
|
|
137
|
+
function assertFullOptions(options) {
|
|
138
|
+
const defaults = persistedOZ((0, options_1.withDefaults)((0, data_1.strictData)(options)));
|
|
139
|
+
// Official defaults append these legacy exceptions on every call, including
|
|
140
|
+
// for already-defaulted options. Preserve their recorded order/duplicates,
|
|
141
|
+
// while requiring the exceptions implied by the recorded legacy flags.
|
|
142
|
+
if (!Array.isArray(options.unsafeAllow)
|
|
143
|
+
|| (defaults.unsafeAllowCustomTypes && !['enum-definition', 'struct-definition'].every(kind => options.unsafeAllow.includes(kind)))
|
|
144
|
+
|| (defaults.unsafeAllowLinkedLibraries && !options.unsafeAllow.includes('external-library-linking')))
|
|
145
|
+
throw new Error('Persisted selected full safety options mismatch');
|
|
146
|
+
defaults.unsafeAllow = options.unsafeAllow;
|
|
147
|
+
equal(defaults, options, 'Persisted selected full safety options');
|
|
148
|
+
}
|
|
149
|
+
function registry(hre) {
|
|
150
|
+
if (registrationError)
|
|
151
|
+
throw registrationError;
|
|
152
|
+
if (!registered)
|
|
153
|
+
throw new Error('Compiler adapter was not registered by delivery bootstrap');
|
|
154
|
+
equal(names(hre.tasks), Object.keys(registered).sort(), 'Compiler task registry');
|
|
155
|
+
for (const [name, expected] of Object.entries(registered)) {
|
|
156
|
+
const actual = chain(hre.tasks[name]);
|
|
157
|
+
if (actual.length !== expected.length || actual.some((t, i) => t !== expected[i].task || t.action !== expected[i].action))
|
|
158
|
+
throw new Error(`Unsupported compiler task override: ${name}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/** Registered only after manifest bootstrap, pinned OZ and the owned proxy-source adapter. */
|
|
162
|
+
function registerDeliveryCompiler(subtask, tasks, extendEnvironment) {
|
|
163
|
+
extendEnvironment(hre => initialRuntime.set(hre, { run: hre.run, provider: hre.network.provider }));
|
|
164
|
+
try {
|
|
165
|
+
equal(names(tasks), Object.keys(compiler_pins_1.compilerTaskPins).sort(), 'Initial compiler task registry');
|
|
166
|
+
for (const name of names(tasks))
|
|
167
|
+
equal(chain(tasks[name]).map(t => (0, compiler_files_1.sha256)(Function.prototype.toString.call(t.action))), compiler_pins_1.compilerTaskPins[name], `Unsupported compiler task ${name}`);
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
registrationError = e;
|
|
171
|
+
}
|
|
172
|
+
const wrap = (name, action) => {
|
|
173
|
+
subtask(name).setAction(async (args, hre, runSuper) => {
|
|
174
|
+
const collector = collectors.get(hre.artifacts);
|
|
175
|
+
if (!collector)
|
|
176
|
+
return runSuper(args);
|
|
177
|
+
if (hre.config !== collector.hre.config || hre.tasks !== collector.hre.tasks || hre.network !== collector.hre.network)
|
|
178
|
+
throw new Error('Compiler task HRE capability association mismatch');
|
|
179
|
+
collector.assertRegistry();
|
|
180
|
+
const result = await action(args, hre, runSuper, collector);
|
|
181
|
+
collector.assertRegistry();
|
|
182
|
+
return result;
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
wrap('compile:solidity:get-dependency-graph', async (args, _hre, next, c) => {
|
|
186
|
+
const graph = await next(c.compiling ? { ...args, solidityFilesCache: undefined } : args);
|
|
187
|
+
c.graph(graph);
|
|
188
|
+
return graph;
|
|
189
|
+
});
|
|
190
|
+
wrap('compile:solidity:compile-job', async (args, _hre, next, c) => c.job(args, next));
|
|
191
|
+
wrap('compile:solidity:solc:compile', async (args, _hre, next, c) => c.run(args, next));
|
|
192
|
+
wrap('compile:solidity:solc:get-build', async (args, _hre, next, c) => c.build(args, next));
|
|
193
|
+
for (const name of ['compile:solidity:solc:run', 'compile:solidity:solcjs:run'])
|
|
194
|
+
wrap(name, async (args, _hre, next, c) => c.runner(name, args, next));
|
|
195
|
+
registered = Object.fromEntries(names(tasks).map(name => [name, chain(tasks[name]).map(task => ({ task, action: task.action }))]));
|
|
196
|
+
}
|
|
197
|
+
class CompilerSession {
|
|
198
|
+
hre;
|
|
199
|
+
options;
|
|
200
|
+
#files;
|
|
201
|
+
#jobs = [];
|
|
202
|
+
#artifacts = new Map();
|
|
203
|
+
#builds = new Map();
|
|
204
|
+
#selections = new Map();
|
|
205
|
+
#baselineSources = new Map();
|
|
206
|
+
#baselines = [];
|
|
207
|
+
#initialPreparations = new Map();
|
|
208
|
+
#observedInitials = new WeakSet();
|
|
209
|
+
#sameForkProofs = new WeakMap();
|
|
210
|
+
#edges = new Map();
|
|
211
|
+
#oldRead;
|
|
212
|
+
#read;
|
|
213
|
+
#compiling = false;
|
|
214
|
+
#failed = false;
|
|
215
|
+
#config;
|
|
216
|
+
#run;
|
|
217
|
+
#provider;
|
|
218
|
+
constructor(hre, options) {
|
|
219
|
+
this.hre = hre;
|
|
220
|
+
this.options = options;
|
|
221
|
+
const initial = initialRuntime.get(hre);
|
|
222
|
+
if (!initial || initial.run !== hre.run || (0, compiler_files_1.sha256)(Function.prototype.toString.call(hre.run)) !== compiler_pins_1.compilerDispatcherPin)
|
|
223
|
+
throw new Error('Qualification requires the stock initial Hardhat dispatcher');
|
|
224
|
+
if (initial.provider !== hre.network.provider)
|
|
225
|
+
throw new Error('Compiler provider changed before qualification');
|
|
226
|
+
this.#files = new compiler_files_1.CompilerFiles(node_fs_1.default.realpathSync(hre.config.paths.root));
|
|
227
|
+
this.#oldRead = hre.artifacts.readArtifact;
|
|
228
|
+
this.#read = this.#oldRead;
|
|
229
|
+
this.#config = this.configIdentity();
|
|
230
|
+
this.#run = hre.run;
|
|
231
|
+
this.#provider = initial.provider;
|
|
232
|
+
const { Artifacts } = require('hardhat/internal/artifacts');
|
|
233
|
+
if (this.#oldRead !== Artifacts.prototype.readArtifact)
|
|
234
|
+
throw new Error('Qualification requires stock Hardhat artifact reader');
|
|
235
|
+
}
|
|
236
|
+
configIdentity() { return (0, canonicalData_1.semanticHash)({ paths: this.hre.config.paths, solidity: this.hre.config.solidity, namespacedCompileErrors: this.hre.config.namespacedCompileErrors ?? 'error' }); }
|
|
237
|
+
get compiling() { return this.#compiling; }
|
|
238
|
+
assertRegistry() {
|
|
239
|
+
if (this.#failed)
|
|
240
|
+
throw new Error('Compiler collector failed and cannot qualify');
|
|
241
|
+
registry(this.hre);
|
|
242
|
+
if (this.configIdentity() !== this.#config)
|
|
243
|
+
throw new Error('Compiler effective config drift');
|
|
244
|
+
if (this.hre.run !== this.#run)
|
|
245
|
+
throw new Error('Compiler top-level dispatcher changed');
|
|
246
|
+
if (this.hre.network.provider !== this.#provider)
|
|
247
|
+
throw new Error('Compiler provider changed');
|
|
248
|
+
if (this.hre.artifacts.readArtifact !== this.#read)
|
|
249
|
+
throw new Error('Compiler artifact reader changed');
|
|
250
|
+
}
|
|
251
|
+
async compile() {
|
|
252
|
+
this.assertRegistry();
|
|
253
|
+
this.#files.toolchain();
|
|
254
|
+
if (this.options.compiler?.kind === 'npm-soljson-0.8.28')
|
|
255
|
+
this.#files.wrapper();
|
|
256
|
+
this.#compiling = true;
|
|
257
|
+
try {
|
|
258
|
+
await this.hre.run('compile', { force: true, quiet: true });
|
|
259
|
+
if (!this.#jobs.length)
|
|
260
|
+
throw new Error('Qualification requires actual compiler jobs');
|
|
261
|
+
this.#files.runtime();
|
|
262
|
+
this.#files.verify();
|
|
263
|
+
this.#read = async (name) => this.artifact(name, await this.#oldRead.call(this.hre.artifacts, name));
|
|
264
|
+
this.hre.artifacts.readArtifact = this.#read;
|
|
265
|
+
this.assertRegistry();
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
this.#failed = true;
|
|
269
|
+
throw error;
|
|
270
|
+
}
|
|
271
|
+
finally {
|
|
272
|
+
this.#compiling = false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
graph(graph) {
|
|
276
|
+
if (!this.#compiling)
|
|
277
|
+
return;
|
|
278
|
+
for (const file of graph.getResolvedFiles())
|
|
279
|
+
this.#edges.set(file.sourceName, graph.getDependencies(file).map((f) => f.sourceName).sort());
|
|
280
|
+
}
|
|
281
|
+
async job(args, next) {
|
|
282
|
+
if (!this.#compiling)
|
|
283
|
+
throw new Error('New unassociated compilation after qualification');
|
|
284
|
+
const sources = args.compilationJob.getResolvedFiles().map((file) => {
|
|
285
|
+
const bytes = this.#files.read(file.absolutePath), text = bytes.toString('utf8');
|
|
286
|
+
if (!Buffer.from(text).equals(bytes) || text !== file.content.rawContent)
|
|
287
|
+
throw new Error('Actual original compiler source differs from physical UTF-8 file');
|
|
288
|
+
const physical = (0, compiler_files_1.relative)(this.#files.root, file.absolutePath);
|
|
289
|
+
const pkg = physical.startsWith('node_modules/') ? this.#files.package(file.absolutePath) : undefined;
|
|
290
|
+
if (pkg && (file.library?.name !== pkg.name || file.library?.version !== pkg.version))
|
|
291
|
+
throw new Error('Compiler npm physical source identity mismatch');
|
|
292
|
+
if (pkg && file.sourceName !== `${pkg.name}/${(0, compiler_files_1.relative)(node_path_1.default.join(this.#files.root, pkg.lockLocation), file.absolutePath)}`)
|
|
293
|
+
throw new Error('Compiler package sourceName/physical path mismatch');
|
|
294
|
+
if (!pkg && file.sourceName !== physical)
|
|
295
|
+
throw new Error('Virtual/transformed project compiler source is unsupported');
|
|
296
|
+
return { sourceName: file.sourceName, path: physical, digest: (0, compiler_files_1.sha256)(bytes), package: pkg?.lockLocation ?? null, dependencies: this.#edges.get(file.sourceName) ?? [], emitsArtifact: args.compilationJob.emitsArtifacts(file) };
|
|
297
|
+
}).sort((a, b) => a.sourceName.localeCompare(b.sourceName, 'en'));
|
|
298
|
+
const captured = { id: '', config: (0, data_1.strictData)(args.compilationJob.getSolcConfig()), sources, runs: [], validation: {} };
|
|
299
|
+
const result = await contexts.run({ job: args.compilationJob, captured }, () => next(args));
|
|
300
|
+
if (captured.runs.length !== 2)
|
|
301
|
+
throw new Error('Missing actual OZ auxiliary compiler invocation');
|
|
302
|
+
equal(captured.runs[0].input, result.input, 'Actual main job input');
|
|
303
|
+
equal(captured.runs[0].output, result.output, 'Actual main job output');
|
|
304
|
+
for (const s of sources)
|
|
305
|
+
if ((0, compiler_files_1.sha256)(captured.runs[0].input.sources[s.sourceName]?.content ?? '') !== s.digest)
|
|
306
|
+
throw new Error('Original input/source mapping mismatch');
|
|
307
|
+
equal(Object.keys(captured.runs[0].input.sources).sort(), sources.map(s => s.sourceName).sort(), 'Original source set');
|
|
308
|
+
captured.id = jobIdentity(captured);
|
|
309
|
+
if (this.#jobs.some(j => j.id === captured.id))
|
|
310
|
+
throw new Error('Duplicate compiler job identity');
|
|
311
|
+
captured.validation = validationFor(captured);
|
|
312
|
+
this.#jobs.push((0, canonicalData_1.deepFreeze)(captured));
|
|
313
|
+
return result;
|
|
314
|
+
}
|
|
315
|
+
async run(args, next) {
|
|
316
|
+
const context = contexts.getStore();
|
|
317
|
+
if (!context || context.job !== args.compilationJob || context.run)
|
|
318
|
+
throw new Error('Compiler invocation has no unique job context');
|
|
319
|
+
const run = { input: (0, data_1.strictData)(args.input) };
|
|
320
|
+
const result = await contexts.run({ ...context, run }, () => next(args));
|
|
321
|
+
if (!run.build || !run.output || !run.compiler)
|
|
322
|
+
throw new Error('Missing observed compiler runner/build');
|
|
323
|
+
equal(result.output, run.output, 'Compiler runner output');
|
|
324
|
+
equal(result.solcBuild, run.build, 'Compiler build');
|
|
325
|
+
context.captured.runs.push({ input: run.input, output: run.output, compiler: run.compiler, inputDigest: (0, canonicalData_1.semanticHash)(run.input), outputDigest: (0, canonicalData_1.semanticHash)(run.output) });
|
|
326
|
+
return result;
|
|
327
|
+
}
|
|
328
|
+
async build(args, next) {
|
|
329
|
+
const run = contexts.getStore()?.run;
|
|
330
|
+
if (!run || run.build)
|
|
331
|
+
throw new Error('Compiler build outside unique invocation');
|
|
332
|
+
if (args.solcVersion !== '0.8.28')
|
|
333
|
+
throw new Error('Unsupported qualification compiler version');
|
|
334
|
+
const build = this.options.compiler ? { compilerPath: node_path_1.default.resolve(this.options.compiler.path), isSolcJs: this.options.compiler.kind === 'npm-soljson-0.8.28', version: '0.8.28', longVersion: LONG_VERSION } : await next(args);
|
|
335
|
+
if (build.version !== '0.8.28' || build.longVersion !== LONG_VERSION || (build.isSolcJs && !this.options.compiler) || (!build.isSolcJs && process.platform !== 'darwin'))
|
|
336
|
+
throw new Error('Unsupported qualification compiler backend');
|
|
337
|
+
run.build = (0, data_1.strictData)(build);
|
|
338
|
+
return build;
|
|
339
|
+
}
|
|
340
|
+
async runner(name, args, next) {
|
|
341
|
+
const run = contexts.getStore()?.run, build = run?.build;
|
|
342
|
+
if (!run || !build || run.output)
|
|
343
|
+
throw new Error('Unassociated compiler runner');
|
|
344
|
+
const file = name.endsWith('solcjs:run') ? args.solcJsPath : args.solcPath;
|
|
345
|
+
if (file !== build.compilerPath || build.isSolcJs !== name.endsWith('solcjs:run'))
|
|
346
|
+
throw new Error('Actual compiler runner/build path mismatch');
|
|
347
|
+
equal(run.input, args.input, 'Actual runner input');
|
|
348
|
+
if (build.isSolcJs)
|
|
349
|
+
this.#files.wrapper();
|
|
350
|
+
this.#files.runtime();
|
|
351
|
+
// Native host cache paths stay local. Only approved bytes/source enter portable evidence.
|
|
352
|
+
const stat = node_fs_1.default.lstatSync(file);
|
|
353
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1)
|
|
354
|
+
throw new Error('Compiler binary must be a regular unlinked file');
|
|
355
|
+
const digest = (0, compiler_files_1.sha256)(node_fs_1.default.readFileSync(file));
|
|
356
|
+
if (digest !== (build.isSolcJs ? JS_HASH : NATIVE_HASH))
|
|
357
|
+
throw new Error('Unapproved compiler binary bytes');
|
|
358
|
+
this.#files.verify();
|
|
359
|
+
const result = await next(args);
|
|
360
|
+
if ((0, compiler_files_1.sha256)(node_fs_1.default.readFileSync(file)) !== digest)
|
|
361
|
+
throw new Error('Compiler binary changed during execution');
|
|
362
|
+
this.#files.verify();
|
|
363
|
+
run.output = (0, data_1.strictData)(result);
|
|
364
|
+
run.compiler = { kind: build.isSolcJs ? 'npm-soljson-0.8.28' : 'native-macos-0.8.28', version: build.version, longVersion: build.longVersion, digest,
|
|
365
|
+
source: build.isSolcJs ? JS_SOURCE : NATIVE_SOURCE };
|
|
366
|
+
return result;
|
|
367
|
+
}
|
|
368
|
+
artifact(name, raw) {
|
|
369
|
+
this.assertRegistry();
|
|
370
|
+
const artifact = (0, data_1.strictData)(raw), fqn = `${artifact.sourceName}:${artifact.contractName}`;
|
|
371
|
+
if (name.includes(':') ? name !== fqn : name !== artifact.contractName)
|
|
372
|
+
throw new Error('Actual artifact FQN mismatch');
|
|
373
|
+
const file = node_path_1.default.join(this.hre.config.paths.artifacts, artifact.sourceName, `${artifact.contractName}.json`);
|
|
374
|
+
const contents = this.#files.read(file).toString('utf8');
|
|
375
|
+
equal(JSON.parse(contents), artifact, 'Actual persisted artifact');
|
|
376
|
+
const dbgFile = file.slice(0, -5) + '.dbg.json';
|
|
377
|
+
const debugContents = this.#files.read(dbgFile).toString('utf8'), dbg = JSON.parse(debugContents);
|
|
378
|
+
if (dbg._format !== 'hh-sol-dbg-1' || typeof dbg.buildInfo !== 'string' || node_path_1.default.isAbsolute(dbg.buildInfo))
|
|
379
|
+
throw new Error('Unsupported artifact debug pointer');
|
|
380
|
+
const infoFile = node_path_1.default.resolve(node_path_1.default.dirname(dbgFile), dbg.buildInfo);
|
|
381
|
+
(0, compiler_files_1.relative)(node_path_1.default.join(this.hre.config.paths.artifacts, 'build-info'), infoFile);
|
|
382
|
+
const infoContents = this.#files.read(infoFile).toString('utf8'), info = JSON.parse(infoContents);
|
|
383
|
+
if (info._format !== 'hh-sol-build-info-1')
|
|
384
|
+
throw new Error('Invalid compiler build-info format');
|
|
385
|
+
const matching = this.#jobs.filter(j => (0, canonicalData_1.semanticHash)(j.runs[0].input) === (0, canonicalData_1.semanticHash)(info.input) && (0, canonicalData_1.semanticHash)(j.runs[0].output) === (0, canonicalData_1.semanticHash)(info.output)
|
|
386
|
+
&& j.runs[0].compiler.version === info.solcVersion && j.runs[0].compiler.longVersion === info.solcLongVersion);
|
|
387
|
+
if (matching.length !== 1)
|
|
388
|
+
throw new Error('Artifact has no unique observed compiler job');
|
|
389
|
+
const job = matching[0], output = job.runs[0].output.contracts?.[artifact.sourceName]?.[artifact.contractName];
|
|
390
|
+
if (!output)
|
|
391
|
+
throw new Error('Artifact absent from observed compiler output');
|
|
392
|
+
equal(projection(artifact.sourceName, artifact.contractName, output), artifact, 'Independent stock artifact projection');
|
|
393
|
+
const build = { path: (0, compiler_files_1.relative)(this.#files.root, infoFile), contents: infoContents, digest: (0, compiler_files_1.sha256)(infoContents), job: job.id };
|
|
394
|
+
this.#builds.set(build.digest, (0, canonicalData_1.deepFreeze)(build));
|
|
395
|
+
const entry = { fqn, job: job.id, artifact, digest: (0, canonicalData_1.semanticHash)(artifact), path: (0, compiler_files_1.relative)(this.#files.root, file), contents, debugPath: (0, compiler_files_1.relative)(this.#files.root, dbgFile), debugContents, buildInfo: build.digest };
|
|
396
|
+
if (this.#artifacts.has(fqn))
|
|
397
|
+
equal(this.#artifacts.get(fqn), entry, 'Selected artifact drift');
|
|
398
|
+
this.#artifacts.set(fqn, (0, canonicalData_1.deepFreeze)(entry));
|
|
399
|
+
return (0, canonicalData_1.deepFreeze)(artifact);
|
|
400
|
+
}
|
|
401
|
+
async implementation(name, constructorArgs, options = {}) {
|
|
402
|
+
try {
|
|
403
|
+
const artifact = await this.hre.artifacts.readArtifact(name);
|
|
404
|
+
if (artifact.bytecode === '0x')
|
|
405
|
+
throw new Error('ABI-only artifact cannot have an OZ deployment version');
|
|
406
|
+
const factory = new ethers_1.ContractFactory(artifact.abi, artifact.bytecode);
|
|
407
|
+
const data = await (0, deploy_impl_1.getDeployData)(this.hre, factory, { ...options, constructorArgs });
|
|
408
|
+
return this.observeDeployData(artifact, factory, data, { ...options, constructorArgs });
|
|
409
|
+
}
|
|
410
|
+
finally {
|
|
411
|
+
await (0, compiler_io_1.yieldCompilerIo)();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
observeDeployData(artifact, factory, data, options) {
|
|
415
|
+
this.artifact(`${artifact.sourceName}:${artifact.contractName}`, artifact);
|
|
416
|
+
const entry = this.#artifacts.get(`${artifact.sourceName}:${artifact.contractName}`);
|
|
417
|
+
const job = this.#jobs.find(j => j.id === entry.job);
|
|
418
|
+
const { fqn, unlinkedBytecode, encodedArgs, version, validation, layout } = selectedIdentity(entry, job, factory.bytecode, options);
|
|
419
|
+
if (factory.interface.encodeDeploy(options.constructorArgs) !== encodedArgs)
|
|
420
|
+
throw new Error('Actual factory ABI constructor encoding mismatch');
|
|
421
|
+
equal(data.version, version, 'Selected OZ version');
|
|
422
|
+
if (data.encodedArgs !== encodedArgs || data.unlinkedBytecode !== unlinkedBytecode)
|
|
423
|
+
throw new Error('Selected OZ bytecode/constructor mismatch');
|
|
424
|
+
const [actualFqn, actualRun] = (0, upgrades_core_1.getContractNameAndRunValidation)(data.validations, version);
|
|
425
|
+
if (actualFqn !== fqn)
|
|
426
|
+
throw new Error('Selected OZ first FQN does not match qualified artifact');
|
|
427
|
+
equal(selectedClosure(actualRun, fqn), validation, 'Selected OZ validation');
|
|
428
|
+
equal(persistedOZ(data.layout), layout, 'Selected full effective storage layout');
|
|
429
|
+
equal(persistedOZ(data.fullOpts), persistedOZ((0, options_1.withDefaults)(options)), 'Selected full safety options');
|
|
430
|
+
(0, upgrades_core_1.assertUpgradeSafe)(data.validations, version, data.fullOpts);
|
|
431
|
+
const body = { fqn, job: job.id, artifactDigest: entry.digest, unlinkedBytecode, linkedBytecode: factory.bytecode, encodedArgs, version, layout, validation, options: persistedOZ(data.fullOpts) };
|
|
432
|
+
const result = (0, canonicalData_1.deepFreeze)({ ...body, digest: (0, canonicalData_1.semanticHash)(body) });
|
|
433
|
+
this.#selections.set(result.digest, result);
|
|
434
|
+
return result;
|
|
435
|
+
}
|
|
436
|
+
/** Explicit historical source/artifact/constructor selection, never parsed JSON authority. */
|
|
437
|
+
baseline(implementation, handle, selection) {
|
|
438
|
+
const collector = owned.get(handle);
|
|
439
|
+
if (!collector || collector.#selections.get(selection.digest) !== selection)
|
|
440
|
+
throw new Error('Baseline requires an owned qualified selection');
|
|
441
|
+
if (!/^0x[0-9a-fA-F]{40}$/.test(implementation))
|
|
442
|
+
throw new Error('Invalid baseline implementation address');
|
|
443
|
+
const key = implementation.toLowerCase(), old = this.#baselineSources.get(key);
|
|
444
|
+
if (old && old.selection.digest !== selection.digest)
|
|
445
|
+
throw new Error('Ambiguous baseline qualification');
|
|
446
|
+
this.#baselineSources.set(key, { collector, selection });
|
|
447
|
+
}
|
|
448
|
+
priorQualification(prior) {
|
|
449
|
+
// A self-reference to today's aggregate would be circular. Bind the immutable selected original job instead.
|
|
450
|
+
const priorJob = prior.collector.#jobs.find(j => j.id === prior.selection.job);
|
|
451
|
+
const priorEvidence = prior.collector.evidence();
|
|
452
|
+
const priorArtifacts = priorEvidence.artifacts.filter(a => a.digest === prior.selection.artifactDigest);
|
|
453
|
+
const priorBody = { version: 1, adapter: ADAPTER, toolchain: priorEvidence.toolchain, jobs: [priorJob], builds: priorEvidence.builds.filter(b => priorArtifacts.some(a => a.buildInfo === b.digest)), artifacts: priorArtifacts, selections: [prior.selection], baselines: [] };
|
|
454
|
+
const qualification = { ...priorBody, stableDigest: (0, canonicalData_1.semanticHash)(stable(priorBody)), exactDigest: (0, canonicalData_1.semanticHash)(priorBody) };
|
|
455
|
+
prior.collector.assertRegistry();
|
|
456
|
+
prior.collector.#files.verify();
|
|
457
|
+
return { stableDigest: qualification.stableDigest, exactDigest: qualification.exactDigest, selection: prior.selection.digest, qualification };
|
|
458
|
+
}
|
|
459
|
+
captureBaseline(request, selection, observation) {
|
|
460
|
+
const { currentImplementation, chainId } = observation;
|
|
461
|
+
const prior = this.#baselineSources.get(currentImplementation.toLowerCase());
|
|
462
|
+
if (!prior)
|
|
463
|
+
throw new Error('Historical baseline requires prior qualified source/artifact/constructor selection');
|
|
464
|
+
(0, upgrades_core_1.assertStorageUpgradeSafe)(prior.selection.layout, selection.layout, selection.options);
|
|
465
|
+
let origin;
|
|
466
|
+
if ('state' in observation) {
|
|
467
|
+
const { state } = observation;
|
|
468
|
+
if (state.implementationKey !== prior.selection.version.linkedWithoutMetadata)
|
|
469
|
+
throw new Error('Historical baseline implementation map key/version mismatch');
|
|
470
|
+
equal(persistedOZ(state.oldLayout), prior.selection.layout, 'Historical baseline layout');
|
|
471
|
+
origin = { kind: 'target-manifest', manifestPolicy: state.paths.manifestDir, manifestDigest: state.digest, proxy: state.proxyEntry, implementationEntry: persistedOZ(state.implementationEntry) };
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
const initial = this.#sameForkProofs.get(observation.sameFork);
|
|
475
|
+
if (!initial || (request.kind !== 'uups-upgrade' && request.kind !== 'transparent-upgrade') || initial.selection.digest !== prior.selection.digest
|
|
476
|
+
|| !(0, same_fork_baseline_1.matchesSameForkInitial)(initial, request.target, String(chainId), request.proxy, currentImplementation, request.proxyKind))
|
|
477
|
+
throw new Error('Same-fork baseline requires its owned initial preparation and actual deployment observation');
|
|
478
|
+
origin = { kind: 'same-fork', manifestPolicy: resolveTargetManifestDirectory(this.hre.config.paths.root, request.target), proxy: { address: request.proxy.toLowerCase(), kind: request.proxyKind }, sameForkBaselineDigest: observation.sameFork.digest, initial: { request: initial.request, plan: initial.plan } };
|
|
479
|
+
}
|
|
480
|
+
const baseline = (0, data_1.strictData)({ ...origin, target: request.target, chainId, selection: selection.digest, currentImplementation: currentImplementation.toLowerCase(), implementationKey: prior.selection.version.linkedWithoutMetadata, oldLayout: prior.selection.layout, prior: this.priorQualification(prior) });
|
|
481
|
+
if (!this.#baselines.some(b => (0, canonicalData_1.semanticHash)(b) === (0, canonicalData_1.semanticHash)(baseline)))
|
|
482
|
+
this.#baselines.push(baseline);
|
|
483
|
+
}
|
|
484
|
+
hasSameForkInitial(initial) {
|
|
485
|
+
this.assertRegistry();
|
|
486
|
+
return this.#initialPreparations.has((0, canonicalData_1.semanticHash)({ request: initial.request, plan: initial.plan }));
|
|
487
|
+
}
|
|
488
|
+
async verifySameForkUpgrade(target, proxy, sourceBlock) {
|
|
489
|
+
this.assertRegistry();
|
|
490
|
+
if (!Number.isSafeInteger(sourceBlock) || sourceBlock < 0)
|
|
491
|
+
throw new Error('Same-fork baseline requires a pinned source block');
|
|
492
|
+
const chainId = String(BigInt(await this.#provider.send('eth_chainId')));
|
|
493
|
+
const currentImplementation = await (0, upgrades_core_1.getImplementationAddress)(this.#provider, proxy);
|
|
494
|
+
const matches = [...this.#initialPreparations.values()].filter(p => (0, same_fork_baseline_1.matchesSameForkInitial)(p, target, chainId, proxy, currentImplementation));
|
|
495
|
+
if (matches.length !== 1)
|
|
496
|
+
throw new Error('Same-fork baseline requires one owned initial preparation');
|
|
497
|
+
const [sourceCode, proxyCode, implementationCode] = await Promise.all([
|
|
498
|
+
this.#provider.send('eth_getCode', [proxy, `0x${sourceBlock.toString(16)}`]),
|
|
499
|
+
this.#provider.send('eth_getCode', [proxy, 'latest']),
|
|
500
|
+
this.#provider.send('eth_getCode', [currentImplementation, 'latest']),
|
|
501
|
+
]);
|
|
502
|
+
if (sourceCode !== '0x' || proxyCode === '0x' || implementationCode === '0x')
|
|
503
|
+
throw new Error('Same-fork baseline requires source absence and actual local deployment');
|
|
504
|
+
this.assertRegistry();
|
|
505
|
+
this.#observedInitials.add(matches[0]);
|
|
506
|
+
}
|
|
507
|
+
sameForkBaseline = async (input) => {
|
|
508
|
+
this.assertRegistry();
|
|
509
|
+
const matches = [...this.#initialPreparations.values()].filter(p => this.#observedInitials.has(p) && (0, same_fork_baseline_1.matchesSameForkInitial)(p, input.request.target, String(input.chainId), input.request.proxy, input.currentImplementation, input.request.proxyKind));
|
|
510
|
+
if (!matches.length)
|
|
511
|
+
return undefined;
|
|
512
|
+
if (matches.length !== 1)
|
|
513
|
+
throw new Error('Ambiguous same-fork initial preparation');
|
|
514
|
+
const actual = await (0, upgrades_core_1.getImplementationAddress)(this.#provider, input.request.proxy);
|
|
515
|
+
const chainId = Number(BigInt(await this.#provider.send('eth_chainId')));
|
|
516
|
+
if (actual.toLowerCase() !== input.currentImplementation.toLowerCase() || chainId !== input.chainId)
|
|
517
|
+
throw new Error('Same-fork provider identity mismatch');
|
|
518
|
+
const initial = matches[0], oldLayoutHash = (0, compiler_files_1.sha256)((0, workflow_1.canonicalPreparationJson)(initial.selection.layout));
|
|
519
|
+
const proof = (0, canonicalData_1.deepFreeze)({ kind: 'same-fork', oldLayout: initial.selection.layout, digest: (0, same_fork_baseline_1.sameForkBaselineDigest)(initial, oldLayoutHash) });
|
|
520
|
+
this.#sameForkProofs.set(proof, initial);
|
|
521
|
+
this.assertRegistry();
|
|
522
|
+
return proof;
|
|
523
|
+
};
|
|
524
|
+
// Full synchronous qualification may outlast HTTP keepalive. Process queued I/O
|
|
525
|
+
// before callers resume RPCs, including recovery after a validation rejection.
|
|
526
|
+
deployData = async (input) => {
|
|
527
|
+
try {
|
|
528
|
+
const selection = this.observeDeployData(input.artifact, input.factory, input.data, input.options);
|
|
529
|
+
if (input.baseline)
|
|
530
|
+
this.captureBaseline(input.request, selection, input.baseline);
|
|
531
|
+
if (input.request.kind !== 'create2-deploy') {
|
|
532
|
+
const address = (0, ethers_1.getCreate2Address)(input.request.factory, input.request.implementationSalt, (0, ethers_1.keccak256)((0, ethers_1.concat)([input.factory.bytecode, input.data.encodedArgs])));
|
|
533
|
+
this.baseline(address, handles.get(this), selection);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
finally {
|
|
537
|
+
await (0, compiler_io_1.yieldCompilerIo)();
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
preparationSelection(request, plan) {
|
|
541
|
+
const options = persistedOZ((0, options_1.withDefaults)({ kind: request.proxyKind, constructorArgs: request.constructorArgs, ...(request.unsafeAllow ? { unsafeAllow: request.unsafeAllow } : {}) }));
|
|
542
|
+
const matches = [...this.#selections.values()].filter(s => s.fqn === `${plan.artifact.sourceName}:${plan.artifact.contractName}` && (0, canonicalData_1.semanticHash)(s.options) === (0, canonicalData_1.semanticHash)(options));
|
|
543
|
+
if (matches.length !== 1)
|
|
544
|
+
throw new Error('Preparation reuse requires one prior owned qualified OZ selection');
|
|
545
|
+
return matches[0];
|
|
546
|
+
}
|
|
547
|
+
/** Awaited read-only replay observation. No compile, preparation or DeployData invocation. */
|
|
548
|
+
async observePreparationPlan(request, plan) {
|
|
549
|
+
try {
|
|
550
|
+
this.assertRegistry();
|
|
551
|
+
if ((request.kind === 'uups-upgrade' || request.kind === 'transparent-upgrade') && (plan.validation.kind === 'uups-upgrade' || plan.validation.kind === 'transparent-upgrade')) {
|
|
552
|
+
const selected = this.preparationSelection(request, plan);
|
|
553
|
+
const chainId = Number(BigInt(await this.#provider.send('eth_chainId')));
|
|
554
|
+
if (!Number.isSafeInteger(chainId) || chainId <= 0 || String(chainId) !== plan.chainId)
|
|
555
|
+
throw new Error('Preparation baseline chain mismatch');
|
|
556
|
+
const currentImplementation = await (0, upgrades_core_1.getImplementationAddress)(this.#provider, request.proxy);
|
|
557
|
+
if (currentImplementation.toLowerCase() !== plan.validation.currentImplementation.toLowerCase())
|
|
558
|
+
throw new Error('Preparation baseline current implementation mismatch');
|
|
559
|
+
if (plan.validation.sameForkBaselineDigest !== undefined) {
|
|
560
|
+
const sameFork = await this.sameForkBaseline({ request: (0, workflow_1.normalizePreparationRequest)(request), currentImplementation, chainId });
|
|
561
|
+
if (!sameFork || sameFork.digest !== plan.validation.sameForkBaselineDigest)
|
|
562
|
+
throw new Error('Preparation same-fork baseline digest mismatch');
|
|
563
|
+
this.captureBaseline(request, selected, { sameFork, currentImplementation, chainId });
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
const state = readRegisteredTargetUpgradeState({ root: this.hre.config.paths.root, target: request.target, chainId, proxy: request.proxy, currentImplementation, proxyKind: request.proxyKind });
|
|
567
|
+
if (state.digest !== plan.validation.manifestDigest)
|
|
568
|
+
throw new Error('Preparation baseline manifest digest mismatch');
|
|
569
|
+
this.assertRegistry();
|
|
570
|
+
this.captureBaseline(request, selected, { state, currentImplementation, chainId });
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
this.preparationPlan(request, plan);
|
|
574
|
+
if (request.kind === 'uups-placeholder-deploy' || request.kind === 'transparent-deploy') {
|
|
575
|
+
await (0, preparation_1.validatePreparationSemantics)(request, plan, name => this.hre.artifacts.readArtifact(name));
|
|
576
|
+
const selection = this.preparationSelection(request, plan);
|
|
577
|
+
const initial = (0, canonicalData_1.deepFreeze)({ request: (0, workflow_1.normalizePreparationRequest)(request), plan: (0, data_1.strictData)(plan), selection });
|
|
578
|
+
this.#initialPreparations.set((0, canonicalData_1.semanticHash)({ request: initial.request, plan: initial.plan }), initial);
|
|
579
|
+
this.baseline(plan.deployments.find(d => d.role === 'implementation').address, handles.get(this), selection);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
finally {
|
|
583
|
+
await (0, compiler_io_1.yieldCompilerIo)();
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/** Pure expected/disk/reuse check over complete owned baseline observations. */
|
|
587
|
+
preparationPlan(request, plan) {
|
|
588
|
+
this.assertRegistry();
|
|
589
|
+
if (request.kind === 'create2-deploy')
|
|
590
|
+
return;
|
|
591
|
+
const selected = this.preparationSelection(request, plan);
|
|
592
|
+
if (plan.validation.kind === 'uups-upgrade' || plan.validation.kind === 'transparent-upgrade') {
|
|
593
|
+
if ((request.kind !== 'uups-upgrade' && request.kind !== 'transparent-upgrade'))
|
|
594
|
+
throw new Error('Preparation baseline request mismatch');
|
|
595
|
+
if ((0, compiler_files_1.sha256)((0, workflow_1.canonicalPreparationJson)(selected.layout)) !== plan.validation.newLayoutHash)
|
|
596
|
+
throw new Error('Preparation selected new layout mismatch');
|
|
597
|
+
const validation = plan.validation;
|
|
598
|
+
const matches = this.#baselines.filter(b => b.target === request.target && String(b.chainId) === plan.chainId && b.proxy.address.toLowerCase() === request.proxy.toLowerCase() && b.proxy.kind === request.proxyKind
|
|
599
|
+
&& b.currentImplementation === validation.currentImplementation.toLowerCase() && b.selection === selected.digest
|
|
600
|
+
&& (b.kind === 'target-manifest' ? validation.sameForkBaselineDigest === undefined && b.manifestDigest === validation.manifestDigest
|
|
601
|
+
: validation.manifestDigest === undefined && b.sameForkBaselineDigest === validation.sameForkBaselineDigest));
|
|
602
|
+
if (matches.length !== 1 || (0, compiler_files_1.sha256)((0, workflow_1.canonicalPreparationJson)(matches[0].oldLayout)) !== validation.oldLayoutHash)
|
|
603
|
+
throw new Error('Preparation requires exact qualified historical baseline observation');
|
|
604
|
+
(0, upgrades_core_1.assertStorageUpgradeSafe)(matches[0].oldLayout, selected.layout, selected.options);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
evidence() {
|
|
608
|
+
this.assertRegistry();
|
|
609
|
+
this.#files.verify();
|
|
610
|
+
const body = { version: 1, adapter: ADAPTER,
|
|
611
|
+
toolchain: { node: process.versions.node, platform: process.platform, arch: process.arch, abi: process.versions.modules, packages: [...this.#files.packages.values()].sort((a, b) => a.lockLocation.localeCompare(b.lockLocation, 'en')), resolutions: [...this.#files.resolutions].sort((a, b) => (0, canonicalData_1.semanticHash)(a).localeCompare((0, canonicalData_1.semanticHash)(b))), modules: [...this.#files.modules].sort(([a], [b]) => a.localeCompare(b, 'en')).map(([path, digest]) => ({ path, digest })) },
|
|
612
|
+
jobs: [...this.#jobs].sort((a, b) => a.id.localeCompare(b.id)), builds: [...this.#builds.values()].sort((a, b) => a.digest.localeCompare(b.digest)), artifacts: [...this.#artifacts.values()].sort((a, b) => a.fqn.localeCompare(b.fqn)), selections: [...this.#selections.values()].sort((a, b) => a.digest.localeCompare(b.digest)), baselines: [...this.#baselines] };
|
|
613
|
+
return (0, canonicalData_1.deepFreeze)({ ...body, stableDigest: (0, canonicalData_1.semanticHash)(stable(body)), exactDigest: (0, canonicalData_1.semanticHash)(body) });
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
async function qualifyDeliveryCompiler(hre, options = {}) {
|
|
617
|
+
try {
|
|
618
|
+
if (Object.keys(options).some(k => k !== 'compiler') || (options.compiler && (Object.keys(options.compiler).sort().join() !== 'kind,path' || !['npm-soljson-0.8.28', 'native-macos-0.8.28'].includes(options.compiler.kind) || !node_path_1.default.isAbsolute(options.compiler.path))))
|
|
619
|
+
throw new Error('Unsupported owned compiler adapter options');
|
|
620
|
+
if (collectors.has(hre.artifacts))
|
|
621
|
+
throw new Error('Compiler qualification already exists for this HRE');
|
|
622
|
+
const collector = new CompilerSession(hre, (0, data_1.strictData)(options));
|
|
623
|
+
collectors.set(hre.artifacts, collector);
|
|
624
|
+
await collector.compile();
|
|
625
|
+
const handle = Object.freeze({ artifact: collector.artifact.bind(collector), implementation: collector.implementation.bind(collector), baseline: collector.baseline.bind(collector), evidence: collector.evidence.bind(collector), preparationPlan: collector.preparationPlan.bind(collector) });
|
|
626
|
+
owned.set(handle, collector);
|
|
627
|
+
handles.set(collector, handle);
|
|
628
|
+
return handle;
|
|
629
|
+
}
|
|
630
|
+
finally {
|
|
631
|
+
await (0, compiler_io_1.yieldCompilerIo)();
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
function ownedDeliveryCompiler(hre) {
|
|
635
|
+
const collector = collectors.get(hre.artifacts);
|
|
636
|
+
return collector?.hre === hre ? handles.get(collector) : undefined;
|
|
637
|
+
}
|
|
638
|
+
/** Internal adapter port, intentionally absent from the public opaque handle. */
|
|
639
|
+
function compilerPreparationHooks(hre) {
|
|
640
|
+
const c = collectors.get(hre.artifacts);
|
|
641
|
+
return c?.hre === hre && handles.has(c) ? Object.freeze({ deployData: c.deployData, sameForkBaseline: c.sameForkBaseline }) : Object.freeze({});
|
|
642
|
+
}
|
|
643
|
+
function hasCompilerSameForkInitial(hre, initial) {
|
|
644
|
+
const c = collectors.get(hre.artifacts);
|
|
645
|
+
return c?.hre === hre && handles.has(c) && c.hasSameForkInitial(initial);
|
|
646
|
+
}
|
|
647
|
+
async function verifyCompilerSameForkUpgrade(hre, target, proxy, sourceBlock) {
|
|
648
|
+
const c = collectors.get(hre.artifacts);
|
|
649
|
+
if (c?.hre !== hre || !handles.has(c))
|
|
650
|
+
throw new Error('Same-fork upgrade requires an owned compiler collector');
|
|
651
|
+
await c.verifySameForkUpgrade(target, proxy, sourceBlock);
|
|
652
|
+
}
|
|
653
|
+
async function validateCompilerPreparationPlan(hre, request, plan) {
|
|
654
|
+
const c = collectors.get(hre.artifacts);
|
|
655
|
+
if (c?.hre === hre && handles.has(c))
|
|
656
|
+
await c.observePreparationPlan(request, plan);
|
|
657
|
+
}
|
|
658
|
+
function parseCompilerEvidence(raw) {
|
|
659
|
+
const e = (0, data_1.strictData)(raw);
|
|
660
|
+
const shape = (x, keys, label) => {
|
|
661
|
+
if (!x || typeof x !== 'object' || Array.isArray(x) || Object.keys(x).sort().join() !== keys.split(' ').sort().join())
|
|
662
|
+
throw new Error(`Invalid compiler ${label} shape`);
|
|
663
|
+
};
|
|
664
|
+
const digest = (x) => { if (typeof x !== 'string' || !/^[a-f0-9]{64}$/.test(x))
|
|
665
|
+
throw new Error('Invalid compiler digest'); };
|
|
666
|
+
const portable = (x) => { if (typeof x !== 'string' || !x || x.startsWith('/') || x.includes('\\') || x.split('/').some(p => !p || p === '.' || p === '..'))
|
|
667
|
+
throw new Error('Invalid portable compiler path'); };
|
|
668
|
+
if (Object.keys(e).sort().join() !== ['version', 'adapter', 'toolchain', 'jobs', 'builds', 'artifacts', 'selections', 'baselines', 'stableDigest', 'exactDigest'].sort().join() || e.version !== 1 || e.adapter !== ADAPTER || !Array.isArray(e.jobs) || !e.jobs.length || !Array.isArray(e.builds) || !Array.isArray(e.artifacts) || !Array.isArray(e.selections) || !Array.isArray(e.baselines))
|
|
669
|
+
throw new Error('Invalid compiler evidence shape');
|
|
670
|
+
const { stableDigest, exactDigest, ...body } = e;
|
|
671
|
+
if ((0, canonicalData_1.semanticHash)(body) !== exactDigest || (0, canonicalData_1.semanticHash)(stable(body)) !== stableDigest)
|
|
672
|
+
throw new Error('Compiler evidence digest mismatch');
|
|
673
|
+
const jobs = new Map();
|
|
674
|
+
shape(e.toolchain, 'node platform arch abi packages resolutions modules', 'toolchain');
|
|
675
|
+
if (!Array.isArray(e.toolchain.packages) || !Array.isArray(e.toolchain.resolutions) || !Array.isArray(e.toolchain.modules) || typeof e.toolchain.node !== 'string' || e.toolchain.platform !== 'darwin' || !['x64', 'arm64'].includes(e.toolchain.arch) || typeof e.toolchain.abi !== 'string')
|
|
676
|
+
throw new Error('Invalid compiler toolchain');
|
|
677
|
+
const packages = new Map();
|
|
678
|
+
for (const p of e.toolchain.packages) {
|
|
679
|
+
shape(p, 'lockLocation name version integrity source payload payloadDigest', 'package');
|
|
680
|
+
portable(p.lockLocation);
|
|
681
|
+
digest(p.payloadDigest);
|
|
682
|
+
shape(p.source, 'kind identity', 'package source');
|
|
683
|
+
if (!p.lockLocation.startsWith('node_modules/') || packages.has(p.lockLocation) || !/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(p.integrity) || !['registry', 'tarball'].includes(p.source.kind) || p.source.identity !== p.integrity || !Array.isArray(p.payload))
|
|
684
|
+
throw new Error('Invalid compiler package provenance');
|
|
685
|
+
const seen = new Set();
|
|
686
|
+
for (const f of p.payload) {
|
|
687
|
+
shape(f, 'path digest', 'payload');
|
|
688
|
+
portable(f.path);
|
|
689
|
+
digest(f.digest);
|
|
690
|
+
if (seen.has(f.path))
|
|
691
|
+
throw new Error('Duplicate compiler package file');
|
|
692
|
+
seen.add(f.path);
|
|
693
|
+
}
|
|
694
|
+
const sorted = [...p.payload].sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
695
|
+
equal(p.payload, sorted, 'Compiler package ordering');
|
|
696
|
+
if ((0, compiler_files_1.sha256)(p.payload.map(f => `${f.path}\0${f.digest}\n`).join('')) !== p.payloadDigest)
|
|
697
|
+
throw new Error('Compiler package payload digest mismatch');
|
|
698
|
+
const pin = compiler_pins_2.compilerPackagePins[p.name];
|
|
699
|
+
const dependency = compiler_dependency_pins_1.compilerDependencyPins[`${p.name}@${p.version}`];
|
|
700
|
+
if (pin && (p.version !== pin.version || p.integrity !== pin.integrity || p.payloadDigest !== pin.payloadDigest))
|
|
701
|
+
throw new Error('Unapproved compiler package evidence');
|
|
702
|
+
if (dependency && (p.integrity !== dependency.integrity || p.payloadDigest !== dependency.payloadDigest))
|
|
703
|
+
throw new Error('Unapproved compiler dependency evidence');
|
|
704
|
+
packages.set(p.lockLocation, p);
|
|
705
|
+
}
|
|
706
|
+
for (const edge of e.toolchain.resolutions) {
|
|
707
|
+
shape(edge, 'issuer specifier path mode', 'resolution');
|
|
708
|
+
portable(edge.issuer);
|
|
709
|
+
portable(edge.path);
|
|
710
|
+
if (!['cjs', 'esm-node'].includes(edge.mode) || typeof edge.specifier !== 'string' || ![...packages.values()].some(p => edge.path.startsWith(p.lockLocation + '/') && p.payload.some(f => edge.path === `${p.lockLocation}/${f.path}`)))
|
|
711
|
+
throw new Error('Compiler resolution lacks package payload');
|
|
712
|
+
}
|
|
713
|
+
const modules = new Set();
|
|
714
|
+
for (const module of e.toolchain.modules) {
|
|
715
|
+
shape(module, 'path digest', 'module');
|
|
716
|
+
portable(module.path);
|
|
717
|
+
digest(module.digest);
|
|
718
|
+
if (modules.has(module.path) || ![...packages.values()].some(p => p.payload.some(f => `${p.lockLocation}/${f.path}` === module.path && f.digest === module.digest)))
|
|
719
|
+
throw new Error('Compiler runtime module payload mismatch');
|
|
720
|
+
modules.add(module.path);
|
|
721
|
+
}
|
|
722
|
+
for (const job of e.jobs) {
|
|
723
|
+
shape(job, 'id config sources runs validation', 'job');
|
|
724
|
+
digest(job.id);
|
|
725
|
+
if (!Array.isArray(job.runs) || job.runs.length !== 2 || !Array.isArray(job.sources))
|
|
726
|
+
throw new Error('Invalid main/auxiliary pair');
|
|
727
|
+
if (jobs.has(job.id) || jobIdentity(job) !== job.id)
|
|
728
|
+
throw new Error('Compiler job identity mismatch');
|
|
729
|
+
for (const run of job.runs) {
|
|
730
|
+
shape(run, 'input output compiler inputDigest outputDigest', 'invocation');
|
|
731
|
+
shape(run.compiler, 'kind version longVersion digest source', 'binary');
|
|
732
|
+
const js = run.compiler.kind === 'npm-soljson-0.8.28';
|
|
733
|
+
if (!['npm-soljson-0.8.28', 'native-macos-0.8.28'].includes(run.compiler.kind) || run.compiler.version !== '0.8.28' || run.compiler.longVersion !== LONG_VERSION || run.compiler.digest !== (js ? JS_HASH : NATIVE_HASH) || run.compiler.source !== (js ? JS_SOURCE : NATIVE_SOURCE))
|
|
734
|
+
throw new Error('Unapproved compiler evidence');
|
|
735
|
+
if ((0, canonicalData_1.semanticHash)(run.input) !== run.inputDigest || (0, canonicalData_1.semanticHash)(run.output) !== run.outputDigest)
|
|
736
|
+
throw new Error('Compiler invocation digest mismatch');
|
|
737
|
+
}
|
|
738
|
+
equal(job.runs[0].compiler, job.runs[1].compiler, 'Main/auxiliary compiler');
|
|
739
|
+
equal(Object.keys(job.runs[0].input.sources).sort(), Object.keys(job.runs[1].input.sources).sort(), 'Auxiliary source set');
|
|
740
|
+
equal(Object.keys(job.runs[0].input.sources).sort(), job.sources.map(s => s.sourceName).sort(), 'Original physical source set');
|
|
741
|
+
if (job.config.version !== job.runs[0].compiler.version)
|
|
742
|
+
throw new Error('Compiler config/version mismatch');
|
|
743
|
+
equal(job.config.settings, job.runs[0].input.settings, 'Complete original compiler settings');
|
|
744
|
+
for (const source of job.sources) {
|
|
745
|
+
shape(source, 'sourceName path digest package dependencies emitsArtifact', 'source');
|
|
746
|
+
portable(source.sourceName);
|
|
747
|
+
portable(source.path);
|
|
748
|
+
digest(source.digest);
|
|
749
|
+
if ((0, compiler_files_1.sha256)(job.runs[0].input.sources[source.sourceName].content) !== source.digest || typeof source.emitsArtifact !== 'boolean' || !Array.isArray(source.dependencies) || source.dependencies.some(d => !job.sources.some(s => s.sourceName === d)))
|
|
750
|
+
throw new Error('Compiler source/graph mismatch');
|
|
751
|
+
if (source.package !== null && !packages.get(source.package)?.payload.some(f => `${source.package}/${f.path}` === source.path && f.digest === source.digest))
|
|
752
|
+
throw new Error('Compiler source package mismatch');
|
|
753
|
+
if (source.package === null && source.sourceName !== source.path)
|
|
754
|
+
throw new Error('Unsupported virtual compiler source');
|
|
755
|
+
}
|
|
756
|
+
equal(validationFor(job), job.validation, 'Compiler validation evidence');
|
|
757
|
+
jobs.set(job.id, job);
|
|
758
|
+
}
|
|
759
|
+
const builds = new Map();
|
|
760
|
+
for (const b of e.builds) {
|
|
761
|
+
shape(b, 'path contents digest job', 'build-info');
|
|
762
|
+
portable(b.path);
|
|
763
|
+
digest(b.digest);
|
|
764
|
+
if (typeof b.contents !== 'string' || (0, compiler_files_1.sha256)(b.contents) !== b.digest || builds.has(b.digest) || !jobs.has(b.job))
|
|
765
|
+
throw new Error('Invalid persisted build-info identity');
|
|
766
|
+
const info = (0, data_1.strictData)(JSON.parse(b.contents));
|
|
767
|
+
shape(info, '_format id solcVersion solcLongVersion input output', 'persisted build-info');
|
|
768
|
+
const main = jobs.get(b.job).runs[0];
|
|
769
|
+
if (info._format !== 'hh-sol-build-info-1' || info.solcVersion !== main.compiler.version || info.solcLongVersion !== main.compiler.longVersion)
|
|
770
|
+
throw new Error('Persisted build-info compiler mismatch');
|
|
771
|
+
equal(info.input, main.input, 'Persisted build-info input');
|
|
772
|
+
equal(info.output, main.output, 'Persisted build-info output');
|
|
773
|
+
builds.set(b.digest, b);
|
|
774
|
+
}
|
|
775
|
+
const artifactNames = new Set();
|
|
776
|
+
for (const a of e.artifacts) {
|
|
777
|
+
shape(a, 'fqn job artifact digest path contents debugPath debugContents buildInfo', 'artifact');
|
|
778
|
+
portable(a.path);
|
|
779
|
+
portable(a.debugPath);
|
|
780
|
+
const j = jobs.get(a.job), [source, name] = a.fqn.split(':');
|
|
781
|
+
if (!j || artifactNames.has(a.fqn) || (0, canonicalData_1.semanticHash)(a.artifact) !== a.digest)
|
|
782
|
+
throw new Error('Invalid artifact compiler relation');
|
|
783
|
+
artifactNames.add(a.fqn);
|
|
784
|
+
equal(projection(source, name, j.runs[0].output.contracts[source][name]), a.artifact, 'Persisted artifact projection');
|
|
785
|
+
equal(JSON.parse(a.contents), a.artifact, 'Persisted artifact bytes');
|
|
786
|
+
const dbg = JSON.parse(a.debugContents), build = builds.get(a.buildInfo);
|
|
787
|
+
shape(dbg, '_format buildInfo', 'debug pointer');
|
|
788
|
+
if (dbg._format !== 'hh-sol-dbg-1' || typeof dbg.buildInfo !== 'string' || node_path_1.default.posix.isAbsolute(dbg.buildInfo) || !build || build.job !== a.job || node_path_1.default.posix.normalize(node_path_1.default.posix.join(node_path_1.default.posix.dirname(a.debugPath), dbg.buildInfo)) !== build.path || !build.path.includes('/build-info/'))
|
|
789
|
+
throw new Error('Persisted artifact debug/build-info relationship mismatch');
|
|
790
|
+
}
|
|
791
|
+
for (const s of e.selections) {
|
|
792
|
+
shape(s, 'fqn job artifactDigest unlinkedBytecode linkedBytecode encodedArgs version layout validation options digest', 'selection');
|
|
793
|
+
const { digest, ...selection } = s, job = jobs.get(s.job);
|
|
794
|
+
const entry = e.artifacts.find(a => a.digest === s.artifactDigest && a.fqn === s.fqn && a.job === s.job);
|
|
795
|
+
if ((0, canonicalData_1.semanticHash)(selection) !== digest || !job || !entry)
|
|
796
|
+
throw new Error('Invalid selected compiler relation');
|
|
797
|
+
assertFullOptions(s.options);
|
|
798
|
+
const identity = selectedIdentity(entry, job, s.linkedBytecode, s.options);
|
|
799
|
+
equal(identity.unlinkedBytecode, s.unlinkedBytecode, 'Persisted selected unlinked bytecode');
|
|
800
|
+
equal(identity.encodedArgs, s.encodedArgs, 'Persisted selected constructor encoding');
|
|
801
|
+
equal(identity.version, s.version, 'Persisted selected bytecode version');
|
|
802
|
+
equal(identity.validation, s.validation, 'Persisted selected validation');
|
|
803
|
+
equal(identity.layout, s.layout, 'Persisted selected effective layout');
|
|
804
|
+
(0, upgrades_core_1.assertUpgradeSafe)(identity.expected, identity.version, (0, data_1.strictData)(s.options));
|
|
805
|
+
}
|
|
806
|
+
for (const b of e.baselines) {
|
|
807
|
+
const common = 'kind target chainId manifestPolicy selection proxy currentImplementation implementationKey oldLayout prior';
|
|
808
|
+
if (b.kind === 'target-manifest') {
|
|
809
|
+
shape(b, common + ' manifestDigest implementationEntry', 'baseline');
|
|
810
|
+
digest(b.manifestDigest);
|
|
811
|
+
}
|
|
812
|
+
else if (b.kind === 'same-fork') {
|
|
813
|
+
shape(b, common + ' sameForkBaselineDigest initial', 'baseline');
|
|
814
|
+
shape(b.initial, 'request plan', 'same-fork initial preparation');
|
|
815
|
+
digest(b.sameForkBaselineDigest);
|
|
816
|
+
}
|
|
817
|
+
else
|
|
818
|
+
throw new Error('Invalid compiler baseline kind');
|
|
819
|
+
const selected = e.selections.find(s => s.digest === b.selection);
|
|
820
|
+
if (!selected)
|
|
821
|
+
throw new Error('Historical baseline replacement selection missing');
|
|
822
|
+
shape(b.prior, 'stableDigest exactDigest selection qualification', 'baseline qualification');
|
|
823
|
+
const prior = parseCompilerEvidence(b.prior.qualification);
|
|
824
|
+
if (prior.baselines.length || prior.selections.length !== 1 || prior.stableDigest !== b.prior.stableDigest || prior.exactDigest !== b.prior.exactDigest || prior.selections[0].digest !== b.prior.selection || prior.selections[0].version.linkedWithoutMetadata !== b.implementationKey)
|
|
825
|
+
throw new Error('Historical compiler baseline relation mismatch');
|
|
826
|
+
equal(b.oldLayout, prior.selections[0].layout, 'Historical qualified layout');
|
|
827
|
+
(0, upgrades_core_1.assertStorageUpgradeSafe)(b.oldLayout, selected.layout, selected.options);
|
|
828
|
+
if (selected.options.kind !== b.proxy.kind || prior.selections[0].options.kind !== b.proxy.kind || !['uups', 'transparent'].includes(b.proxy.kind) || !Number.isSafeInteger(b.chainId) || b.chainId <= 0)
|
|
829
|
+
throw new Error('Historical baseline identity mismatch');
|
|
830
|
+
if (b.kind === 'target-manifest') {
|
|
831
|
+
equal(b.oldLayout, b.implementationEntry.layout, 'Historical manifest layout');
|
|
832
|
+
if (![b.implementationEntry.address, ...(b.implementationEntry.allAddresses ?? [])].some(a => typeof a === 'string' && a.toLowerCase() === b.currentImplementation))
|
|
833
|
+
throw new Error('Historical manifest identity mismatch');
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
const initial = b.initial, selection = prior.selections[0];
|
|
837
|
+
const layoutHash = (0, compiler_files_1.sha256)((0, workflow_1.canonicalPreparationJson)(b.oldLayout));
|
|
838
|
+
if (!(0, same_fork_baseline_1.matchesSameForkInitial)(initial, b.target, String(b.chainId), b.proxy.address, b.currentImplementation, b.proxy.kind)
|
|
839
|
+
|| (0, same_fork_baseline_1.sameForkBaselineDigest)(initial, layoutHash) !== b.sameForkBaselineDigest || (initial.request.kind !== 'uups-placeholder-deploy' && initial.request.kind !== 'transparent-deploy'))
|
|
840
|
+
throw new Error('Same-fork initial preparation relation mismatch');
|
|
841
|
+
const artifact = prior.artifacts.find(a => a.digest === selection.artifactDigest).artifact;
|
|
842
|
+
equal((0, workflow_1.artifactIdentity)(artifact, 'evm'), initial.plan.artifact, 'Same-fork prior artifact');
|
|
843
|
+
const encodedArgs = new ethers_1.ContractFactory(artifact.abi, artifact.bytecode).interface.encodeDeploy(initial.request.constructorArgs);
|
|
844
|
+
if (encodedArgs !== selection.encodedArgs || (0, ethers_1.getCreate2Address)(initial.request.factory, initial.request.implementationSalt, (0, ethers_1.keccak256)((0, ethers_1.concat)([selection.linkedBytecode, encodedArgs]))).toLowerCase() !== b.currentImplementation)
|
|
845
|
+
throw new Error('Same-fork prior constructor/implementation mismatch');
|
|
846
|
+
equal(persistedOZ((0, options_1.withDefaults)({ kind: initial.request.proxyKind, constructorArgs: initial.request.constructorArgs, ...(initial.request.unsafeAllow ? { unsafeAllow: initial.request.unsafeAllow } : {}) })), selection.options, 'Same-fork prior options');
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
return (0, canonicalData_1.deepFreeze)(e);
|
|
850
|
+
}
|
|
851
|
+
//# sourceMappingURL=compiler.js.map
|