gate-evm-tools 1.0.26 → 1.0.28
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 +14 -0
- package/bin/workflow.cjs +19 -0
- package/dist/core/BytecodeChecker.d.ts.map +1 -1
- package/dist/core/BytecodeChecker.js +16 -1
- package/dist/core/BytecodeChecker.js.map +1 -1
- package/dist/core/legacyProxyArtifact.d.ts +6 -0
- package/dist/core/legacyProxyArtifact.d.ts.map +1 -0
- package/dist/core/legacyProxyArtifact.js +36 -0
- package/dist/core/legacyProxyArtifact.js.map +1 -0
- package/dist-runtime/config/hardhatAdapters.d.ts +7 -0
- package/dist-runtime/config/hardhatAdapters.js +61 -0
- package/dist-runtime/config/hardhatAdapters.js.map +1 -0
- package/dist-runtime/config/networks.d.ts +32 -0
- package/dist-runtime/config/networks.js +275 -0
- package/dist-runtime/config/networks.js.map +1 -0
- package/dist-runtime/config/openzeppelin.d.ts +28 -0
- package/dist-runtime/config/openzeppelin.js +144 -0
- package/dist-runtime/config/openzeppelin.js.map +1 -0
- package/dist-runtime/config/rpc.d.ts +7 -0
- package/dist-runtime/config/rpc.js +19 -0
- package/dist-runtime/config/rpc.js.map +1 -0
- package/dist-runtime/config/zksyncSolcPath.d.ts +1 -0
- package/dist-runtime/config/zksyncSolcPath.js +61 -0
- package/dist-runtime/config/zksyncSolcPath.js.map +1 -0
- package/dist-runtime/migrate.d.ts +13 -0
- package/dist-runtime/migrate.js +208 -0
- package/dist-runtime/migrate.js.map +1 -0
- package/dist-runtime/package.json +1 -0
- package/dist-runtime/projectHardhat.d.ts +4 -0
- package/dist-runtime/projectHardhat.js +16 -0
- package/dist-runtime/projectHardhat.js.map +1 -0
- package/dist-runtime/runtime-identity.json +4 -0
- package/dist-runtime/template-migration.json +293 -0
- package/dist-runtime/workflow/checkCode.d.ts +1 -0
- package/dist-runtime/workflow/checkCode.js +16 -0
- package/dist-runtime/workflow/checkCode.js.map +1 -0
- package/dist-runtime/workflow/checkCodeFinalize.d.ts +1 -0
- package/dist-runtime/workflow/checkCodeFinalize.js +11 -0
- package/dist-runtime/workflow/checkCodeFinalize.js.map +1 -0
- package/dist-runtime/workflow/checkCodePlan.d.ts +1 -0
- package/dist-runtime/workflow/checkCodePlan.js +11 -0
- package/dist-runtime/workflow/checkCodePlan.js.map +1 -0
- package/dist-runtime/workflow/cli.d.ts +1 -0
- package/dist-runtime/workflow/cli.js +302 -0
- package/dist-runtime/workflow/cli.js.map +1 -0
- package/dist-runtime/workflow/commitContractInfo.d.ts +1 -0
- package/dist-runtime/workflow/commitContractInfo.js +64 -0
- package/dist-runtime/workflow/commitContractInfo.js.map +1 -0
- package/dist-runtime/workflow/create2Hashes.d.ts +1 -0
- package/dist-runtime/workflow/create2Hashes.js +76 -0
- package/dist-runtime/workflow/create2Hashes.js.map +1 -0
- package/dist-runtime/workflow/forkSourceProxy.d.ts +1 -0
- package/dist-runtime/workflow/forkSourceProxy.js +151 -0
- package/dist-runtime/workflow/forkSourceProxy.js.map +1 -0
- package/dist-runtime/workflow/importState.d.ts +1 -0
- package/dist-runtime/workflow/importState.js +193 -0
- package/dist-runtime/workflow/importState.js.map +1 -0
- package/dist-runtime/workflow/lib/authority.d.ts +28 -0
- package/dist-runtime/workflow/lib/authority.js +122 -0
- package/dist-runtime/workflow/lib/authority.js.map +1 -0
- package/dist-runtime/workflow/lib/calldata.d.ts +2 -0
- package/dist-runtime/workflow/lib/calldata.js +8 -0
- package/dist-runtime/workflow/lib/calldata.js.map +1 -0
- package/dist-runtime/workflow/lib/calls.d.ts +23 -0
- package/dist-runtime/workflow/lib/calls.js +316 -0
- package/dist-runtime/workflow/lib/calls.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/args.d.ts +2 -0
- package/dist-runtime/workflow/lib/checkCode/args.js +68 -0
- package/dist-runtime/workflow/lib/checkCode/args.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/command.d.ts +5 -0
- package/dist-runtime/workflow/lib/checkCode/command.js +35 -0
- package/dist-runtime/workflow/lib/checkCode/command.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/dependencies.d.ts +6 -0
- package/dist-runtime/workflow/lib/checkCode/dependencies.js +125 -0
- package/dist-runtime/workflow/lib/checkCode/dependencies.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/finalize.d.ts +17 -0
- package/dist-runtime/workflow/lib/checkCode/finalize.js +174 -0
- package/dist-runtime/workflow/lib/checkCode/finalize.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/index.d.ts +3 -0
- package/dist-runtime/workflow/lib/checkCode/index.js +20 -0
- package/dist-runtime/workflow/lib/checkCode/index.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCode/plan.d.ts +22 -0
- package/dist-runtime/workflow/lib/checkCode/plan.js +145 -0
- package/dist-runtime/workflow/lib/checkCode/plan.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCodeReport.d.ts +25 -0
- package/dist-runtime/workflow/lib/checkCodeReport.js +102 -0
- package/dist-runtime/workflow/lib/checkCodeReport.js.map +1 -0
- package/dist-runtime/workflow/lib/checkCodeRunner.d.ts +87 -0
- package/dist-runtime/workflow/lib/checkCodeRunner.js +964 -0
- package/dist-runtime/workflow/lib/checkCodeRunner.js.map +1 -0
- package/dist-runtime/workflow/lib/cliTool.d.ts +10 -0
- package/dist-runtime/workflow/lib/cliTool.js +25 -0
- package/dist-runtime/workflow/lib/cliTool.js.map +1 -0
- package/dist-runtime/workflow/lib/config.d.ts +33 -0
- package/dist-runtime/workflow/lib/config.js +100 -0
- package/dist-runtime/workflow/lib/config.js.map +1 -0
- package/dist-runtime/workflow/lib/contractInfoCandidates.d.ts +82 -0
- package/dist-runtime/workflow/lib/contractInfoCandidates.js +441 -0
- package/dist-runtime/workflow/lib/contractInfoCandidates.js.map +1 -0
- package/dist-runtime/workflow/lib/controlledMulticallAbi.d.ts +2 -0
- package/dist-runtime/workflow/lib/controlledMulticallAbi.js +10 -0
- package/dist-runtime/workflow/lib/controlledMulticallAbi.js.map +1 -0
- package/dist-runtime/workflow/lib/create2.d.ts +49 -0
- package/dist-runtime/workflow/lib/create2.js +194 -0
- package/dist-runtime/workflow/lib/create2.js.map +1 -0
- package/dist-runtime/workflow/lib/create2Hashes.d.ts +22 -0
- package/dist-runtime/workflow/lib/create2Hashes.js +57 -0
- package/dist-runtime/workflow/lib/create2Hashes.js.map +1 -0
- package/dist-runtime/workflow/lib/deploymentInfo.d.ts +40 -0
- package/dist-runtime/workflow/lib/deploymentInfo.js +240 -0
- package/dist-runtime/workflow/lib/deploymentInfo.js.map +1 -0
- package/dist-runtime/workflow/lib/deploymentRecords.d.ts +137 -0
- package/dist-runtime/workflow/lib/deploymentRecords.js +374 -0
- package/dist-runtime/workflow/lib/deploymentRecords.js.map +1 -0
- package/dist-runtime/workflow/lib/deployments.d.ts +21 -0
- package/dist-runtime/workflow/lib/deployments.js +240 -0
- package/dist-runtime/workflow/lib/deployments.js.map +1 -0
- package/dist-runtime/workflow/lib/erc1967.d.ts +5 -0
- package/dist-runtime/workflow/lib/erc1967.js +29 -0
- package/dist-runtime/workflow/lib/erc1967.js.map +1 -0
- package/dist-runtime/workflow/lib/errors.d.ts +6 -0
- package/dist-runtime/workflow/lib/errors.js +77 -0
- package/dist-runtime/workflow/lib/errors.js.map +1 -0
- package/dist-runtime/workflow/lib/executionId.d.ts +7 -0
- package/dist-runtime/workflow/lib/executionId.js +26 -0
- package/dist-runtime/workflow/lib/executionId.js.map +1 -0
- package/dist-runtime/workflow/lib/executionPlan.d.ts +85 -0
- package/dist-runtime/workflow/lib/executionPlan.js +450 -0
- package/dist-runtime/workflow/lib/executionPlan.js.map +1 -0
- package/dist-runtime/workflow/lib/executionProgress.d.ts +5 -0
- package/dist-runtime/workflow/lib/executionProgress.js +100 -0
- package/dist-runtime/workflow/lib/executionProgress.js.map +1 -0
- package/dist-runtime/workflow/lib/external.d.ts +62 -0
- package/dist-runtime/workflow/lib/external.js +282 -0
- package/dist-runtime/workflow/lib/external.js.map +1 -0
- package/dist-runtime/workflow/lib/externalExecutionScanner.d.ts +64 -0
- package/dist-runtime/workflow/lib/externalExecutionScanner.js +638 -0
- package/dist-runtime/workflow/lib/externalExecutionScanner.js.map +1 -0
- package/dist-runtime/workflow/lib/forkSnapshot.d.ts +34 -0
- package/dist-runtime/workflow/lib/forkSnapshot.js +167 -0
- package/dist-runtime/workflow/lib/forkSnapshot.js.map +1 -0
- package/dist-runtime/workflow/lib/gateTool.d.ts +16 -0
- package/dist-runtime/workflow/lib/gateTool.js +177 -0
- package/dist-runtime/workflow/lib/gateTool.js.map +1 -0
- package/dist-runtime/workflow/lib/gateToolSync.d.ts +22 -0
- package/dist-runtime/workflow/lib/gateToolSync.js +253 -0
- package/dist-runtime/workflow/lib/gateToolSync.js.map +1 -0
- package/dist-runtime/workflow/lib/lock.d.ts +52 -0
- package/dist-runtime/workflow/lib/lock.js +269 -0
- package/dist-runtime/workflow/lib/lock.js.map +1 -0
- package/dist-runtime/workflow/lib/migrationState.d.ts +103 -0
- package/dist-runtime/workflow/lib/migrationState.js +920 -0
- package/dist-runtime/workflow/lib/migrationState.js.map +1 -0
- package/dist-runtime/workflow/lib/operatorExecution.d.ts +28 -0
- package/dist-runtime/workflow/lib/operatorExecution.js +134 -0
- package/dist-runtime/workflow/lib/operatorExecution.js.map +1 -0
- package/dist-runtime/workflow/lib/parameters.d.ts +58 -0
- package/dist-runtime/workflow/lib/parameters.js +323 -0
- package/dist-runtime/workflow/lib/parameters.js.map +1 -0
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.d.ts +29 -0
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js +277 -0
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js.map +1 -0
- package/dist-runtime/workflow/lib/proxy.d.ts +18 -0
- package/dist-runtime/workflow/lib/proxy.js +19 -0
- package/dist-runtime/workflow/lib/proxy.js.map +1 -0
- package/dist-runtime/workflow/lib/registryCommit.d.ts +33 -0
- package/dist-runtime/workflow/lib/registryCommit.js +319 -0
- package/dist-runtime/workflow/lib/registryCommit.js.map +1 -0
- package/dist-runtime/workflow/lib/release.d.ts +57 -0
- package/dist-runtime/workflow/lib/release.js +256 -0
- package/dist-runtime/workflow/lib/release.js.map +1 -0
- package/dist-runtime/workflow/lib/releaseFinalize.d.ts +14 -0
- package/dist-runtime/workflow/lib/releaseFinalize.js +571 -0
- package/dist-runtime/workflow/lib/releaseFinalize.js.map +1 -0
- package/dist-runtime/workflow/lib/releaseParameters.d.ts +43 -0
- package/dist-runtime/workflow/lib/releaseParameters.js +184 -0
- package/dist-runtime/workflow/lib/releaseParameters.js.map +1 -0
- package/dist-runtime/workflow/lib/reporter.d.ts +39 -0
- package/dist-runtime/workflow/lib/reporter.js +452 -0
- package/dist-runtime/workflow/lib/reporter.js.map +1 -0
- package/dist-runtime/workflow/lib/resultPaths.d.ts +17 -0
- package/dist-runtime/workflow/lib/resultPaths.js +29 -0
- package/dist-runtime/workflow/lib/resultPaths.js.map +1 -0
- package/dist-runtime/workflow/lib/runtimeVersion.d.ts +10 -0
- package/dist-runtime/workflow/lib/runtimeVersion.js +46 -0
- package/dist-runtime/workflow/lib/runtimeVersion.js.map +1 -0
- package/dist-runtime/workflow/lib/signer.d.ts +10 -0
- package/dist-runtime/workflow/lib/signer.js +105 -0
- package/dist-runtime/workflow/lib/signer.js.map +1 -0
- package/dist-runtime/workflow/lib/signerIdentity.d.ts +1 -0
- package/dist-runtime/workflow/lib/signerIdentity.js +23 -0
- package/dist-runtime/workflow/lib/signerIdentity.js.map +1 -0
- package/dist-runtime/workflow/lib/simulation.d.ts +35 -0
- package/dist-runtime/workflow/lib/simulation.js +282 -0
- package/dist-runtime/workflow/lib/simulation.js.map +1 -0
- package/dist-runtime/workflow/lib/simulationCallers.d.ts +44 -0
- package/dist-runtime/workflow/lib/simulationCallers.js +260 -0
- package/dist-runtime/workflow/lib/simulationCallers.js.map +1 -0
- package/dist-runtime/workflow/lib/sourceRpcPolicy.d.ts +1 -0
- package/dist-runtime/workflow/lib/sourceRpcPolicy.js +43 -0
- package/dist-runtime/workflow/lib/sourceRpcPolicy.js.map +1 -0
- package/dist-runtime/workflow/lib/state.d.ts +6 -0
- package/dist-runtime/workflow/lib/state.js +25 -0
- package/dist-runtime/workflow/lib/state.js.map +1 -0
- package/dist-runtime/workflow/lib/staticValidation.d.ts +22 -0
- package/dist-runtime/workflow/lib/staticValidation.js +124 -0
- package/dist-runtime/workflow/lib/staticValidation.js.map +1 -0
- package/dist-runtime/workflow/lib/zksyncForkCapability.d.ts +27 -0
- package/dist-runtime/workflow/lib/zksyncForkCapability.js +52 -0
- package/dist-runtime/workflow/lib/zksyncForkCapability.js.map +1 -0
- package/dist-runtime/workflow/lib/zksyncForkRunner.d.ts +57 -0
- package/dist-runtime/workflow/lib/zksyncForkRunner.js +344 -0
- package/dist-runtime/workflow/lib/zksyncForkRunner.js.map +1 -0
- package/dist-runtime/workflow/reconcileExternal.d.ts +1 -0
- package/dist-runtime/workflow/reconcileExternal.js +87 -0
- package/dist-runtime/workflow/reconcileExternal.js.map +1 -0
- package/dist-runtime/workflow/reconcileExternalRun.d.ts +1 -0
- package/dist-runtime/workflow/reconcileExternalRun.js +77 -0
- package/dist-runtime/workflow/reconcileExternalRun.js.map +1 -0
- package/dist-runtime/workflow/releaseFinalize.d.ts +1 -0
- package/dist-runtime/workflow/releaseFinalize.js +11 -0
- package/dist-runtime/workflow/releaseFinalize.js.map +1 -0
- package/dist-runtime/workflow/run.d.ts +40 -0
- package/dist-runtime/workflow/run.js +858 -0
- package/dist-runtime/workflow/run.js.map +1 -0
- package/dist-runtime/workflow/staticValidate.d.ts +1 -0
- package/dist-runtime/workflow/staticValidate.js +26 -0
- package/dist-runtime/workflow/staticValidate.js.map +1 -0
- package/dist-runtime/workflow/steps/call.d.ts +3 -0
- package/dist-runtime/workflow/steps/call.js +9 -0
- package/dist-runtime/workflow/steps/call.js.map +1 -0
- package/dist-runtime/workflow/steps/check.d.ts +3 -0
- package/dist-runtime/workflow/steps/check.js +9 -0
- package/dist-runtime/workflow/steps/check.js.map +1 -0
- package/dist-runtime/workflow/steps/custom.d.ts +3 -0
- package/dist-runtime/workflow/steps/custom.js +33 -0
- package/dist-runtime/workflow/steps/custom.js.map +1 -0
- package/dist-runtime/workflow/steps/deploy.d.ts +3 -0
- package/dist-runtime/workflow/steps/deploy.js +596 -0
- package/dist-runtime/workflow/steps/deploy.js.map +1 -0
- package/dist-runtime/workflow/steps/upgrade.d.ts +3 -0
- package/dist-runtime/workflow/steps/upgrade.js +466 -0
- package/dist-runtime/workflow/steps/upgrade.js.map +1 -0
- package/dist-runtime/workflow/steps/view.d.ts +3 -0
- package/dist-runtime/workflow/steps/view.js +9 -0
- package/dist-runtime/workflow/steps/view.js.map +1 -0
- package/docs/direct-package-acceptance.md +20 -0
- package/docs/external-infrastructure-acceptance.md +33 -0
- package/docs/network-runtime-acceptance.md +18 -0
- package/docs/plans/2026-09-09-workflow-extraction.md +16 -0
- package/docs/superpowers/plans/2026-07-22-manifest-bootstrap-transaction.md +50 -0
- package/docs/superpowers/plans/2026-07-22-manifest-review-remediation.md +49 -0
- package/docs/superpowers/plans/2026-08-17-custody-hardhat-signers.md +227 -0
- package/docs/superpowers/plans/2026-09-09-remove-template-infrastructure-contracts.md +11 -0
- package/docs/workflow-reference.md +1181 -0
- package/docs/workflow-runtime-acceptance.md +17 -0
- package/docs/workflow-runtime.md +56 -0
- package/package.json +26 -5
- package/runtime/config/hardhatAdapters.ts +58 -0
- package/runtime/config/networks.ts +305 -0
- package/runtime/config/openzeppelin.ts +173 -0
- package/runtime/config/rpc.ts +27 -0
- package/runtime/config/zksyncSolcPath.ts +59 -0
- package/runtime/hardhat-types.d.ts +2 -0
- package/runtime/migrate.ts +154 -0
- package/runtime/projectHardhat.ts +10 -0
- package/runtime/template-migration.json +293 -0
- package/runtime/workflow/checkCode.ts +13 -0
- package/runtime/workflow/checkCodeFinalize.ts +8 -0
- package/runtime/workflow/checkCodePlan.ts +8 -0
- package/runtime/workflow/cli.ts +356 -0
- package/runtime/workflow/commitContractInfo.ts +63 -0
- package/runtime/workflow/create2Hashes.ts +79 -0
- package/runtime/workflow/forkSourceProxy.ts +193 -0
- package/runtime/workflow/importState.ts +190 -0
- package/runtime/workflow/lib/authority.ts +170 -0
- package/runtime/workflow/lib/calldata.ts +9 -0
- package/runtime/workflow/lib/calls.ts +407 -0
- package/runtime/workflow/lib/checkCode/args.ts +76 -0
- package/runtime/workflow/lib/checkCode/command.ts +36 -0
- package/runtime/workflow/lib/checkCode/dependencies.ts +112 -0
- package/runtime/workflow/lib/checkCode/finalize.ts +198 -0
- package/runtime/workflow/lib/checkCode/index.ts +18 -0
- package/runtime/workflow/lib/checkCode/plan.ts +163 -0
- package/runtime/workflow/lib/checkCodeReport.ts +133 -0
- package/runtime/workflow/lib/checkCodeRunner.ts +1225 -0
- package/runtime/workflow/lib/cliTool.ts +31 -0
- package/runtime/workflow/lib/config.ts +130 -0
- package/runtime/workflow/lib/contractInfoCandidates.ts +690 -0
- package/runtime/workflow/lib/controlledMulticallAbi.ts +6 -0
- package/runtime/workflow/lib/create2.ts +278 -0
- package/runtime/workflow/lib/create2Hashes.ts +83 -0
- package/runtime/workflow/lib/deploymentInfo.ts +286 -0
- package/runtime/workflow/lib/deploymentRecords.ts +576 -0
- package/runtime/workflow/lib/deployments.ts +276 -0
- package/runtime/workflow/lib/erc1967.ts +57 -0
- package/runtime/workflow/lib/errors.ts +95 -0
- package/runtime/workflow/lib/executionId.ts +35 -0
- package/runtime/workflow/lib/executionPlan.ts +550 -0
- package/runtime/workflow/lib/executionProgress.ts +127 -0
- package/runtime/workflow/lib/external.ts +372 -0
- package/runtime/workflow/lib/externalExecutionScanner.ts +892 -0
- package/runtime/workflow/lib/forkSnapshot.ts +231 -0
- package/runtime/workflow/lib/gateTool.ts +261 -0
- package/runtime/workflow/lib/gateToolSync.ts +398 -0
- package/runtime/workflow/lib/lock.ts +388 -0
- package/runtime/workflow/lib/migrationState.ts +1246 -0
- package/runtime/workflow/lib/operatorExecution.ts +174 -0
- package/runtime/workflow/lib/parameters.ts +438 -0
- package/runtime/workflow/lib/pendingDeploymentReuse.ts +428 -0
- package/runtime/workflow/lib/proxy.ts +45 -0
- package/runtime/workflow/lib/registryCommit.ts +455 -0
- package/runtime/workflow/lib/release.ts +329 -0
- package/runtime/workflow/lib/releaseFinalize.ts +711 -0
- package/runtime/workflow/lib/releaseParameters.ts +248 -0
- package/runtime/workflow/lib/reporter.ts +502 -0
- package/runtime/workflow/lib/resultPaths.ts +49 -0
- package/runtime/workflow/lib/runtimeVersion.ts +28 -0
- package/runtime/workflow/lib/signer.ts +124 -0
- package/runtime/workflow/lib/signerIdentity.ts +22 -0
- package/runtime/workflow/lib/simulation.ts +415 -0
- package/runtime/workflow/lib/simulationCallers.ts +335 -0
- package/runtime/workflow/lib/sourceRpcPolicy.ts +41 -0
- package/runtime/workflow/lib/state.ts +25 -0
- package/runtime/workflow/lib/staticValidation.ts +142 -0
- package/runtime/workflow/lib/zksyncForkCapability.ts +80 -0
- package/runtime/workflow/lib/zksyncForkRunner.ts +505 -0
- package/runtime/workflow/reconcileExternal.ts +86 -0
- package/runtime/workflow/reconcileExternalRun.ts +88 -0
- package/runtime/workflow/releaseFinalize.ts +8 -0
- package/runtime/workflow/run.ts +1072 -0
- package/runtime/workflow/staticValidate.ts +23 -0
- package/runtime/workflow/steps/call.ts +10 -0
- package/runtime/workflow/steps/check.ts +10 -0
- package/runtime/workflow/steps/custom.ts +43 -0
- package/runtime/workflow/steps/deploy.ts +772 -0
- package/runtime/workflow/steps/upgrade.ts +599 -0
- package/runtime/workflow/steps/view.ts +10 -0
|
@@ -0,0 +1,441 @@
|
|
|
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.promoteContractInfoCandidates = exports.previewContractInfoCandidates = exports.stageContractInfoCandidate = exports.findExecutionCandidateAddress = exports.validateContractInfoCandidate = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const config_1 = require("./config");
|
|
10
|
+
const deployments_1 = require("./deployments");
|
|
11
|
+
const executionId_1 = require("./executionId");
|
|
12
|
+
const deploymentInfo_1 = require("./deploymentInfo");
|
|
13
|
+
const release_1 = require("./release");
|
|
14
|
+
const isRecord = (value) => {
|
|
15
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
16
|
+
};
|
|
17
|
+
const safeNetworkFileId = (value) => {
|
|
18
|
+
const normalized = value.trim();
|
|
19
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(normalized)) {
|
|
20
|
+
throw new Error("network must contain only letters, numbers, underscores, or hyphens");
|
|
21
|
+
}
|
|
22
|
+
return normalized;
|
|
23
|
+
};
|
|
24
|
+
const relativeProjectPath = (root, absolutePath) => {
|
|
25
|
+
const relative = path_1.default.relative(root, absolutePath);
|
|
26
|
+
if (!relative || relative.startsWith("..") || path_1.default.isAbsolute(relative)) {
|
|
27
|
+
throw new Error("Candidate path must stay inside the project root: " + absolutePath);
|
|
28
|
+
}
|
|
29
|
+
return relative.split(path_1.default.sep).join("/");
|
|
30
|
+
};
|
|
31
|
+
const resolveProjectPath = (root, filePath) => {
|
|
32
|
+
const absolute = path_1.default.isAbsolute(filePath) ? path_1.default.resolve(filePath) : path_1.default.resolve(root, filePath);
|
|
33
|
+
const relative = path_1.default.relative(path_1.default.resolve(root), absolute);
|
|
34
|
+
if (!relative || relative.startsWith("..") || path_1.default.isAbsolute(relative)) {
|
|
35
|
+
throw new Error("Candidate path must stay inside the project root: " + filePath);
|
|
36
|
+
}
|
|
37
|
+
return absolute;
|
|
38
|
+
};
|
|
39
|
+
const writeExclusiveJson = (filePath, value) => {
|
|
40
|
+
fs_1.default.mkdirSync(path_1.default.dirname(filePath), { recursive: true });
|
|
41
|
+
let file;
|
|
42
|
+
try {
|
|
43
|
+
file = fs_1.default.openSync(filePath, "wx");
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (isRecord(error) && String(error.code) === "EEXIST") {
|
|
47
|
+
throw new Error("Refusing to overwrite existing contractInfo backup: " + filePath);
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
fs_1.default.writeFileSync(file, JSON.stringify(value, null, 2) + "\n");
|
|
53
|
+
fs_1.default.fsyncSync(file);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
fs_1.default.closeSync(file);
|
|
57
|
+
fs_1.default.unlinkSync(filePath);
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
fs_1.default.closeSync(file);
|
|
61
|
+
};
|
|
62
|
+
const validateReplacement = (value, label) => {
|
|
63
|
+
if (!isRecord(value))
|
|
64
|
+
throw new Error(label + " must be an object");
|
|
65
|
+
for (const key of ["network", "instanceId", "candidateKey", "candidateAddress"]) {
|
|
66
|
+
if (typeof value[key] !== "string" || !String(value[key]).trim()) {
|
|
67
|
+
throw new Error(label + "." + key + " must be a non-empty string");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
};
|
|
72
|
+
const validateContractInfoCandidate = (value) => {
|
|
73
|
+
if (!isRecord(value))
|
|
74
|
+
throw new Error("contractInfo candidate must be an object");
|
|
75
|
+
if (value.version !== 1)
|
|
76
|
+
throw new Error("contractInfo candidate version must be 1");
|
|
77
|
+
if (value.status !== "pending" && value.status !== "promoted") {
|
|
78
|
+
throw new Error("contractInfo candidate status must be pending or promoted");
|
|
79
|
+
}
|
|
80
|
+
for (const key of [
|
|
81
|
+
"deploymentId",
|
|
82
|
+
"network",
|
|
83
|
+
"baseContractInfoHash",
|
|
84
|
+
"backupPath",
|
|
85
|
+
"createdAt",
|
|
86
|
+
"updatedAt",
|
|
87
|
+
]) {
|
|
88
|
+
if (typeof value[key] !== "string" || !String(value[key]).trim()) {
|
|
89
|
+
throw new Error("contractInfo candidate " + key + " must be a non-empty string");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
(0, executionId_1.validateExecutionId)(value.executionId, "contractInfo candidate executionId");
|
|
93
|
+
if (!Array.isArray(value.replacements)) {
|
|
94
|
+
throw new Error("contractInfo candidate replacements must be an array");
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...value,
|
|
98
|
+
replacements: value.replacements.map((item, index) => (validateReplacement(item, "contractInfo candidate replacements[" + index + "]"))),
|
|
99
|
+
contractInfo: (0, deployments_1.validateContractInfo)(value.contractInfo),
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
exports.validateContractInfoCandidate = validateContractInfoCandidate;
|
|
103
|
+
const candidateRelativePath = (executionId) => {
|
|
104
|
+
return "contractInfo.pending." + (0, executionId_1.validateExecutionId)(executionId) + ".json";
|
|
105
|
+
};
|
|
106
|
+
const backupAbsolutePath = (options) => {
|
|
107
|
+
const network = safeNetworkFileId(options.network);
|
|
108
|
+
const executionId = (0, executionId_1.validateExecutionId)(options.executionId);
|
|
109
|
+
return path_1.default.join(options.taskDir, "results", network + "." + executionId + ".contractInfo.before.json");
|
|
110
|
+
};
|
|
111
|
+
const readCandidate = (filePath) => {
|
|
112
|
+
return (0, exports.validateContractInfoCandidate)((0, config_1.readJsonFile)(filePath));
|
|
113
|
+
};
|
|
114
|
+
const findExecutionCandidateAddress = (options) => {
|
|
115
|
+
const executionId = (0, executionId_1.validateExecutionId)(options.executionId);
|
|
116
|
+
const filePath = path_1.default.join(options.root, candidateRelativePath(executionId));
|
|
117
|
+
if (!fs_1.default.existsSync(filePath))
|
|
118
|
+
return undefined;
|
|
119
|
+
const candidate = readCandidate(filePath);
|
|
120
|
+
if (candidate.deploymentId !== options.deploymentId
|
|
121
|
+
|| candidate.executionId !== executionId
|
|
122
|
+
|| candidate.network !== options.network) {
|
|
123
|
+
throw new Error("contractInfo candidate does not match this verification execution");
|
|
124
|
+
}
|
|
125
|
+
const deployment = (0, deployments_1.resolveDeployment)(candidate.contractInfo, options.network, options.name);
|
|
126
|
+
if (!deployment)
|
|
127
|
+
return undefined;
|
|
128
|
+
const replacements = candidate.replacements.filter((replacement) => (replacement.network === options.network
|
|
129
|
+
&& replacement.candidateKey === deployment.key
|
|
130
|
+
&& replacement.candidateAddress.toLowerCase() === deployment.address.toLowerCase()));
|
|
131
|
+
if (replacements.length > 1) {
|
|
132
|
+
throw new Error("contractInfo candidate contains duplicate replacements for "
|
|
133
|
+
+ options.network + "." + options.name);
|
|
134
|
+
}
|
|
135
|
+
return replacements.length === 1 ? deployment.address : undefined;
|
|
136
|
+
};
|
|
137
|
+
exports.findExecutionCandidateAddress = findExecutionCandidateAddress;
|
|
138
|
+
const pendingCandidateFiles = (root) => {
|
|
139
|
+
if (!fs_1.default.existsSync(root))
|
|
140
|
+
return [];
|
|
141
|
+
return fs_1.default.readdirSync(root)
|
|
142
|
+
.filter((name) => {
|
|
143
|
+
const prefix = "contractInfo.pending.";
|
|
144
|
+
const suffix = ".json";
|
|
145
|
+
if (!name.startsWith(prefix) || !name.endsWith(suffix))
|
|
146
|
+
return false;
|
|
147
|
+
try {
|
|
148
|
+
(0, executionId_1.validateExecutionId)(name.slice(prefix.length, -suffix.length));
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
.map((name) => path_1.default.join(root, name));
|
|
156
|
+
};
|
|
157
|
+
const assertNoPendingConflict = (root, candidatePath, network, instanceId, supersedeCandidatePath) => {
|
|
158
|
+
for (const filePath of pendingCandidateFiles(root)) {
|
|
159
|
+
if (path_1.default.resolve(filePath) === path_1.default.resolve(candidatePath)
|
|
160
|
+
|| (supersedeCandidatePath && path_1.default.resolve(filePath) === path_1.default.resolve(supersedeCandidatePath)))
|
|
161
|
+
continue;
|
|
162
|
+
const candidate = readCandidate(filePath);
|
|
163
|
+
if (candidate.status !== "pending")
|
|
164
|
+
continue;
|
|
165
|
+
const conflict = candidate.replacements.some((replacement) => (replacement.network === network && replacement.instanceId === instanceId));
|
|
166
|
+
if (conflict) {
|
|
167
|
+
throw new Error("pending candidate conflict for " + network + "." + instanceId
|
|
168
|
+
+ " in " + path_1.default.basename(filePath));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const archiveSupersededCandidate = (options, replacement) => {
|
|
173
|
+
if (!options.supersedeCandidatePath)
|
|
174
|
+
return undefined;
|
|
175
|
+
const source = resolveProjectPath(options.root, options.supersedeCandidatePath);
|
|
176
|
+
const archive = path_1.default.join(options.taskDir, "results", "archived-pending-candidates", path_1.default.basename(source));
|
|
177
|
+
const validateSuperseded = (filePath) => {
|
|
178
|
+
const candidate = readCandidate(filePath);
|
|
179
|
+
const matches = candidate.status === "pending"
|
|
180
|
+
&& candidate.deploymentId === options.deploymentId
|
|
181
|
+
&& candidate.network === options.network
|
|
182
|
+
&& candidate.replacements.some((entry) => (entry.network === options.network
|
|
183
|
+
&& entry.instanceId === replacement.instanceId
|
|
184
|
+
&& entry.candidateAddress.toLowerCase() === replacement.address.toLowerCase()));
|
|
185
|
+
if (!matches)
|
|
186
|
+
throw new Error("Superseded pending candidate identity does not match");
|
|
187
|
+
};
|
|
188
|
+
if (!fs_1.default.existsSync(source)) {
|
|
189
|
+
if (!fs_1.default.existsSync(archive)) {
|
|
190
|
+
throw new Error("Trusted pending candidate disappeared before it could be superseded");
|
|
191
|
+
}
|
|
192
|
+
validateSuperseded(archive);
|
|
193
|
+
return relativeProjectPath(options.root, archive);
|
|
194
|
+
}
|
|
195
|
+
validateSuperseded(source);
|
|
196
|
+
if (fs_1.default.existsSync(archive)) {
|
|
197
|
+
throw new Error("Archived pending candidate already exists: " + archive);
|
|
198
|
+
}
|
|
199
|
+
fs_1.default.mkdirSync(path_1.default.dirname(archive), { recursive: true });
|
|
200
|
+
fs_1.default.renameSync(source, archive);
|
|
201
|
+
return relativeProjectPath(options.root, archive);
|
|
202
|
+
};
|
|
203
|
+
const replacementFor = (contractInfo, network, replacement) => {
|
|
204
|
+
const previous = (0, deployments_1.resolveDeployment)(contractInfo, network, replacement.instanceId);
|
|
205
|
+
const planned = (0, deployments_1.planDeploymentAddress)(contractInfo, network, replacement.instanceId, replacement.contractName, replacement.address);
|
|
206
|
+
return {
|
|
207
|
+
replacement: {
|
|
208
|
+
network,
|
|
209
|
+
instanceId: replacement.instanceId,
|
|
210
|
+
previousKey: previous?.key,
|
|
211
|
+
previousAddress: previous?.address,
|
|
212
|
+
candidateKey: planned.key,
|
|
213
|
+
candidateAddress: replacement.address,
|
|
214
|
+
},
|
|
215
|
+
contractInfo: planned.contractInfo,
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
const stageContractInfoCandidate = (options, replacementInput) => {
|
|
219
|
+
(0, executionId_1.validateExecutionId)(options.executionId);
|
|
220
|
+
return (0, deployments_1.withContractInfoLock)(options.root, () => {
|
|
221
|
+
const candidatePath = candidateRelativePath(options.executionId);
|
|
222
|
+
const candidateAbsolute = path_1.default.join(options.root, candidatePath);
|
|
223
|
+
const backupAbsolute = backupAbsolutePath(options);
|
|
224
|
+
const backupPath = relativeProjectPath(options.root, backupAbsolute);
|
|
225
|
+
assertNoPendingConflict(options.root, candidateAbsolute, options.network, replacementInput.instanceId, options.supersedeCandidatePath
|
|
226
|
+
? resolveProjectPath(options.root, options.supersedeCandidatePath)
|
|
227
|
+
: undefined);
|
|
228
|
+
if (fs_1.default.existsSync(candidateAbsolute)) {
|
|
229
|
+
const existing = readCandidate(candidateAbsolute);
|
|
230
|
+
if (existing.status !== "pending"
|
|
231
|
+
|| existing.deploymentId !== options.deploymentId
|
|
232
|
+
|| existing.executionId !== options.executionId
|
|
233
|
+
|| existing.network !== options.network
|
|
234
|
+
|| existing.backupPath !== backupPath) {
|
|
235
|
+
throw new Error("Existing contractInfo candidate does not match this execution");
|
|
236
|
+
}
|
|
237
|
+
const duplicate = existing.replacements.find((item) => (item.network === options.network && item.instanceId === replacementInput.instanceId));
|
|
238
|
+
if (duplicate) {
|
|
239
|
+
if (duplicate.candidateAddress.toLowerCase() !== replacementInput.address.toLowerCase()
|
|
240
|
+
|| duplicate.candidateKey !== (0, deployments_1.planDeploymentAddress)(existing.contractInfo, options.network, replacementInput.instanceId, replacementInput.contractName, replacementInput.address).key) {
|
|
241
|
+
throw new Error("Execution candidate already defines a different replacement for "
|
|
242
|
+
+ options.network + "." + replacementInput.instanceId);
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
candidate: existing,
|
|
246
|
+
candidatePath,
|
|
247
|
+
backupPath,
|
|
248
|
+
replacement: duplicate,
|
|
249
|
+
archivedCandidatePath: archiveSupersededCandidate(options, replacementInput),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const next = replacementFor(existing.contractInfo, options.network, replacementInput);
|
|
253
|
+
const updated = {
|
|
254
|
+
...existing,
|
|
255
|
+
replacements: [...existing.replacements, next.replacement],
|
|
256
|
+
contractInfo: next.contractInfo,
|
|
257
|
+
updatedAt: new Date().toISOString(),
|
|
258
|
+
};
|
|
259
|
+
(0, config_1.writeJsonFile)(candidateAbsolute, updated);
|
|
260
|
+
return {
|
|
261
|
+
candidate: updated,
|
|
262
|
+
candidatePath,
|
|
263
|
+
backupPath,
|
|
264
|
+
replacement: next.replacement,
|
|
265
|
+
archivedCandidatePath: archiveSupersededCandidate(options, replacementInput),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
const archivedCandidatePath = archiveSupersededCandidate(options, replacementInput);
|
|
269
|
+
const current = (0, deployments_1.cloneContractInfo)((0, deployments_1.loadContractInfo)(options.root, options.config));
|
|
270
|
+
const next = replacementFor(current, options.network, replacementInput);
|
|
271
|
+
writeExclusiveJson(backupAbsolute, current);
|
|
272
|
+
const now = new Date().toISOString();
|
|
273
|
+
const candidate = {
|
|
274
|
+
version: 1,
|
|
275
|
+
status: "pending",
|
|
276
|
+
deploymentId: options.deploymentId,
|
|
277
|
+
executionId: options.executionId,
|
|
278
|
+
network: options.network,
|
|
279
|
+
baseContractInfoHash: (0, release_1.hashValue)(current),
|
|
280
|
+
backupPath,
|
|
281
|
+
replacements: [next.replacement],
|
|
282
|
+
contractInfo: next.contractInfo,
|
|
283
|
+
createdAt: now,
|
|
284
|
+
updatedAt: now,
|
|
285
|
+
};
|
|
286
|
+
(0, config_1.writeJsonFile)(candidateAbsolute, candidate);
|
|
287
|
+
return {
|
|
288
|
+
candidate,
|
|
289
|
+
candidatePath,
|
|
290
|
+
backupPath,
|
|
291
|
+
replacement: next.replacement,
|
|
292
|
+
archivedCandidatePath,
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
exports.stageContractInfoCandidate = stageContractInfoCandidate;
|
|
297
|
+
const sameDeployment = (left, rightKey, rightAddress) => {
|
|
298
|
+
if (!left || !rightKey || !rightAddress) {
|
|
299
|
+
return left === undefined && rightKey === undefined && rightAddress === undefined;
|
|
300
|
+
}
|
|
301
|
+
return left.key === rightKey && left.address.toLowerCase() === rightAddress.toLowerCase();
|
|
302
|
+
};
|
|
303
|
+
const updateDeploymentRecordAfterPromotion = (root, candidate, contractInfo) => {
|
|
304
|
+
const resultDir = path_1.default.dirname(resolveProjectPath(root, candidate.backupPath));
|
|
305
|
+
const recordPath = path_1.default.join(resultDir, candidate.network + "." + candidate.executionId + ".deployment.json");
|
|
306
|
+
if (!fs_1.default.existsSync(recordPath))
|
|
307
|
+
return;
|
|
308
|
+
const record = (0, config_1.readJsonFile)(recordPath);
|
|
309
|
+
const changes = Array.isArray(record.changes)
|
|
310
|
+
? record.changes.map((change) => {
|
|
311
|
+
if (!isRecord(change))
|
|
312
|
+
return change;
|
|
313
|
+
const promoted = candidate.replacements.some((replacement) => (replacement.instanceId === change.instanceId
|
|
314
|
+
&& replacement.candidateAddress.toLowerCase() === String(change.candidateAddress || change.address).toLowerCase()));
|
|
315
|
+
return promoted ? { ...change, status: "applied" } : change;
|
|
316
|
+
})
|
|
317
|
+
: [];
|
|
318
|
+
const allApplied = changes.every((change) => isRecord(change) && change.status === "applied");
|
|
319
|
+
(0, config_1.writeJsonFile)(recordPath, {
|
|
320
|
+
...record,
|
|
321
|
+
status: allApplied ? "applied" : record.status,
|
|
322
|
+
candidateStatus: "promoted",
|
|
323
|
+
promotedAt: new Date().toISOString(),
|
|
324
|
+
contractInfo: {
|
|
325
|
+
...(isRecord(record.contractInfo) ? record.contractInfo : {}),
|
|
326
|
+
after: contractInfo,
|
|
327
|
+
},
|
|
328
|
+
changes,
|
|
329
|
+
updatedAt: new Date().toISOString(),
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
const promotionRecord = (root, candidate) => {
|
|
333
|
+
const resultDir = path_1.default.dirname(resolveProjectPath(root, candidate.backupPath));
|
|
334
|
+
const absolutePath = path_1.default.join(resultDir, `${candidate.network}.${candidate.executionId}.deployment.json`);
|
|
335
|
+
return { recordPath: relativeProjectPath(root, absolutePath) };
|
|
336
|
+
};
|
|
337
|
+
const prepareCandidatePromotion = (options) => {
|
|
338
|
+
const uniquePaths = [...new Set(options.candidatePaths)];
|
|
339
|
+
if (uniquePaths.length !== options.candidatePaths.length) {
|
|
340
|
+
throw new Error("Duplicate contractInfo candidate path in promotion request");
|
|
341
|
+
}
|
|
342
|
+
const current = (0, deployments_1.cloneContractInfo)((0, deployments_1.loadContractInfo)(options.root, options.config));
|
|
343
|
+
const currentHash = (0, release_1.hashValue)(current);
|
|
344
|
+
const selected = uniquePaths.map((candidatePath) => {
|
|
345
|
+
const absolutePath = resolveProjectPath(options.root, candidatePath);
|
|
346
|
+
const candidate = readCandidate(absolutePath);
|
|
347
|
+
if (candidate.status === "promoted"
|
|
348
|
+
&& candidate.promotedContractInfoHash !== currentHash) {
|
|
349
|
+
throw new Error("promoted contractInfo candidate hash is invalid: " + candidatePath);
|
|
350
|
+
}
|
|
351
|
+
const backup = (0, deployments_1.validateContractInfo)((0, config_1.readJsonFile)(resolveProjectPath(options.root, candidate.backupPath)));
|
|
352
|
+
if ((0, release_1.hashValue)(backup) !== candidate.baseContractInfoHash) {
|
|
353
|
+
throw new Error("contractInfo candidate backup hash changed: " + candidatePath);
|
|
354
|
+
}
|
|
355
|
+
return { candidatePath, absolutePath, candidate, backup };
|
|
356
|
+
});
|
|
357
|
+
let merged = (0, deployments_1.cloneContractInfo)(current);
|
|
358
|
+
const selectedInstances = new Set();
|
|
359
|
+
for (const item of selected) {
|
|
360
|
+
for (const replacement of item.candidate.replacements) {
|
|
361
|
+
const instanceKey = replacement.network + "." + replacement.instanceId;
|
|
362
|
+
if (selectedInstances.has(instanceKey)) {
|
|
363
|
+
throw new Error("Multiple selected candidates replace " + instanceKey);
|
|
364
|
+
}
|
|
365
|
+
selectedInstances.add(instanceKey);
|
|
366
|
+
const backupDeployment = (0, deployments_1.resolveDeployment)(item.backup, replacement.network, replacement.instanceId);
|
|
367
|
+
if (!sameDeployment(backupDeployment, replacement.previousKey, replacement.previousAddress)) {
|
|
368
|
+
throw new Error("candidate backup does not match replacement metadata for " + instanceKey);
|
|
369
|
+
}
|
|
370
|
+
const candidateDeployment = (0, deployments_1.resolveDeployment)(item.candidate.contractInfo, replacement.network, replacement.instanceId);
|
|
371
|
+
if (!sameDeployment(candidateDeployment, replacement.candidateKey, replacement.candidateAddress)) {
|
|
372
|
+
throw new Error("candidate registry does not match replacement metadata for " + instanceKey);
|
|
373
|
+
}
|
|
374
|
+
const currentDeployment = (0, deployments_1.resolveDeployment)(current, replacement.network, replacement.instanceId);
|
|
375
|
+
const currentMatchesBase = sameDeployment(currentDeployment, replacement.previousKey, replacement.previousAddress);
|
|
376
|
+
const currentMatchesCandidate = sameDeployment(currentDeployment, replacement.candidateKey, replacement.candidateAddress);
|
|
377
|
+
if (!currentMatchesBase && !currentMatchesCandidate) {
|
|
378
|
+
throw new Error("candidate base conflict for " + instanceKey);
|
|
379
|
+
}
|
|
380
|
+
merged = (0, deployments_1.planDeploymentAddress)(merged, replacement.network, replacement.instanceId, replacement.candidateKey.split(":").at(-1) || replacement.candidateKey, replacement.candidateAddress).contractInfo;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return { contractInfo: merged, selected };
|
|
384
|
+
};
|
|
385
|
+
const previewContractInfoCandidates = (options) => {
|
|
386
|
+
return (0, deployments_1.withContractInfoLock)(options.root, () => {
|
|
387
|
+
const prepared = prepareCandidatePromotion(options);
|
|
388
|
+
return {
|
|
389
|
+
contractInfo: prepared.contractInfo,
|
|
390
|
+
candidates: prepared.selected.map((item) => ({
|
|
391
|
+
candidatePath: item.candidatePath,
|
|
392
|
+
candidate: item.candidate,
|
|
393
|
+
})),
|
|
394
|
+
};
|
|
395
|
+
});
|
|
396
|
+
};
|
|
397
|
+
exports.previewContractInfoCandidates = previewContractInfoCandidates;
|
|
398
|
+
const promoteContractInfoCandidates = (options) => {
|
|
399
|
+
if (options.candidatePaths.length === 0) {
|
|
400
|
+
throw new Error("At least one contractInfo candidate is required for promotion");
|
|
401
|
+
}
|
|
402
|
+
return (0, deployments_1.withContractInfoLock)(options.root, () => {
|
|
403
|
+
const prepared = prepareCandidatePromotion(options);
|
|
404
|
+
const merged = prepared.contractInfo;
|
|
405
|
+
const selected = prepared.selected;
|
|
406
|
+
const beforeHash = (0, release_1.hashValue)((0, deployments_1.loadContractInfo)(options.root, options.config));
|
|
407
|
+
const records = selected.map((item) => promotionRecord(options.root, item.candidate));
|
|
408
|
+
const deploymentInfo = (0, deploymentInfo_1.prepareDeploymentInfoFromRecords)({
|
|
409
|
+
root: options.root,
|
|
410
|
+
records,
|
|
411
|
+
expectedContractInfo: merged,
|
|
412
|
+
});
|
|
413
|
+
(0, deployments_1.saveContractInfo)(options.root, merged);
|
|
414
|
+
(0, deploymentInfo_1.saveDeploymentInfo)(options.root, deploymentInfo);
|
|
415
|
+
const promotedAt = new Date().toISOString();
|
|
416
|
+
const promotedHash = (0, release_1.hashValue)(merged);
|
|
417
|
+
const promoted = selected.map((item) => {
|
|
418
|
+
const candidate = {
|
|
419
|
+
...item.candidate,
|
|
420
|
+
status: "promoted",
|
|
421
|
+
promotedAt,
|
|
422
|
+
promotedContractInfoHash: promotedHash,
|
|
423
|
+
updatedAt: promotedAt,
|
|
424
|
+
};
|
|
425
|
+
(0, config_1.writeJsonFile)(item.absolutePath, candidate);
|
|
426
|
+
updateDeploymentRecordAfterPromotion(options.root, candidate, merged);
|
|
427
|
+
return { candidatePath: item.candidatePath, candidate };
|
|
428
|
+
});
|
|
429
|
+
return {
|
|
430
|
+
contractInfo: merged,
|
|
431
|
+
beforeHash,
|
|
432
|
+
afterHash: promotedHash,
|
|
433
|
+
deploymentInfoPath: "deploymentInfo.json",
|
|
434
|
+
deploymentInfoHash: (0, release_1.hashValue)(deploymentInfo),
|
|
435
|
+
changedEntries: selected.flatMap((item) => item.candidate.replacements),
|
|
436
|
+
promoted,
|
|
437
|
+
};
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
exports.promoteContractInfoCandidates = promoteContractInfoCandidates;
|
|
441
|
+
//# sourceMappingURL=contractInfoCandidates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractInfoCandidates.js","sourceRoot":"","sources":["../../../runtime/workflow/lib/contractInfoCandidates.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,qCAAuD;AACvD,+CASuB;AACvB,+CAAoD;AACpD,qDAI0B;AAC1B,uCAAsC;AAsFtC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE;IACpE,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU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,EAAE,MAAM,CAAC,CAAC;QACvC,IAAA,mCAAkB,EAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,YAAY,GAAG,IAAA,mBAAS,EAAC,MAAM,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACrC,MAAM,SAAS,GAA0B;gBACvC,GAAG,IAAI,CAAC,SAAS;gBACjB,MAAM,EAAE,UAAU;gBAClB,UAAU;gBACV,wBAAwB,EAAE,YAAY;gBACtC,SAAS,EAAE,UAAU;aACtB,CAAC;YACF,IAAA,sBAAa,EAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;YAC5C,oCAAoC,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;YACtE,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,EAAE,CAAC;QAC1D,CAAC,CAAC,CAAC;QACH,OAAO;YACL,YAAY,EAAE,MAAM;YACpB,UAAU;YACV,SAAS,EAAE,YAAY;YACvB,kBAAkB,EAAE,qBAAqB;YACzC,kBAAkB,EAAE,IAAA,mBAAS,EAAC,cAAc,CAAC;YAC7C,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;YACvE,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA3CW,QAAA,6BAA6B,iCA2CxC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTROLLED_MULTICALL_AUTHORITY_ABI = void 0;
|
|
4
|
+
/** ABI for querying deployed controlled Multicall authority; no project artifact required. */
|
|
5
|
+
exports.CONTROLLED_MULTICALL_AUTHORITY_ABI = [
|
|
6
|
+
"function callers(address caller) view returns (bool)",
|
|
7
|
+
"function factoryCallers(address factory, address caller) view returns (bool)",
|
|
8
|
+
"function owner() view returns (address)",
|
|
9
|
+
];
|
|
10
|
+
//# sourceMappingURL=controlledMulticallAbi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlledMulticallAbi.js","sourceRoot":"","sources":["../../../runtime/workflow/lib/controlledMulticallAbi.ts"],"names":[],"mappings":";;;AAAA,8FAA8F;AACjF,QAAA,kCAAkC,GAAG;IAChD,sDAAsD;IACtD,8EAA8E;IAC9E,yCAAyC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Signer } from "ethers";
|
|
2
|
+
import { WorkflowStep } from "./parameters";
|
|
3
|
+
import type { WorkflowContext } from "../run";
|
|
4
|
+
export type Create2Scheme = "evm" | "zksync-eravm";
|
|
5
|
+
export interface Create2Options {
|
|
6
|
+
scheme: Create2Scheme;
|
|
7
|
+
factory: string;
|
|
8
|
+
salt: string;
|
|
9
|
+
controlledMulticall?: string;
|
|
10
|
+
create2ForwardValue?: string;
|
|
11
|
+
callForwardValue?: string;
|
|
12
|
+
expectedAddress?: string;
|
|
13
|
+
leadingZeroBytes?: number;
|
|
14
|
+
uupsPlaceholderImplementation?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PreparedWorkflowTransaction {
|
|
17
|
+
target: string;
|
|
18
|
+
value: string;
|
|
19
|
+
data: string;
|
|
20
|
+
operation: 0;
|
|
21
|
+
scheme?: "zksync-eravm";
|
|
22
|
+
factoryDeps?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface ControlledMulticallInnerCall {
|
|
25
|
+
target: string;
|
|
26
|
+
value: string;
|
|
27
|
+
data: string;
|
|
28
|
+
factoryDeps?: string[];
|
|
29
|
+
}
|
|
30
|
+
export interface PreparedControlledMulticallTransaction extends PreparedWorkflowTransaction {
|
|
31
|
+
method: "aggregate3" | "aggregate3Value";
|
|
32
|
+
calls: Array<{
|
|
33
|
+
target: string;
|
|
34
|
+
allowFailure: false;
|
|
35
|
+
value: string;
|
|
36
|
+
callData: string;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
interface SentTransaction {
|
|
40
|
+
hash: string;
|
|
41
|
+
wait: () => Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
export declare const prepareControlledMulticallTransaction: (controlledMulticall: string, inputCalls: ControlledMulticallInnerCall[], scheme?: Create2Scheme) => PreparedControlledMulticallTransaction;
|
|
44
|
+
export declare const sendPreparedWorkflowTransaction: (prepared: PreparedWorkflowTransaction, signer: Signer) => Promise<SentTransaction>;
|
|
45
|
+
export declare const sendPreparedControlledMulticallTransaction: (prepared: PreparedControlledMulticallTransaction, signer: Signer) => Promise<SentTransaction>;
|
|
46
|
+
export declare const resolveCreate2Options: (context: WorkflowContext, step: WorkflowStep) => Create2Options | undefined;
|
|
47
|
+
export declare const hasLeadingZeroBytes: (address: string, leadingZeroBytes: number) => boolean;
|
|
48
|
+
export declare const assertCreate2AddressPolicy: (label: string, predictedAddress: string, options: Pick<Create2Options, "expectedAddress" | "leadingZeroBytes">) => void;
|
|
49
|
+
export {};
|