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.
Files changed (338) hide show
  1. package/README.md +14 -0
  2. package/bin/workflow.cjs +19 -0
  3. package/dist/core/BytecodeChecker.d.ts.map +1 -1
  4. package/dist/core/BytecodeChecker.js +16 -1
  5. package/dist/core/BytecodeChecker.js.map +1 -1
  6. package/dist/core/legacyProxyArtifact.d.ts +6 -0
  7. package/dist/core/legacyProxyArtifact.d.ts.map +1 -0
  8. package/dist/core/legacyProxyArtifact.js +36 -0
  9. package/dist/core/legacyProxyArtifact.js.map +1 -0
  10. package/dist-runtime/config/hardhatAdapters.d.ts +7 -0
  11. package/dist-runtime/config/hardhatAdapters.js +61 -0
  12. package/dist-runtime/config/hardhatAdapters.js.map +1 -0
  13. package/dist-runtime/config/networks.d.ts +32 -0
  14. package/dist-runtime/config/networks.js +275 -0
  15. package/dist-runtime/config/networks.js.map +1 -0
  16. package/dist-runtime/config/openzeppelin.d.ts +28 -0
  17. package/dist-runtime/config/openzeppelin.js +144 -0
  18. package/dist-runtime/config/openzeppelin.js.map +1 -0
  19. package/dist-runtime/config/rpc.d.ts +7 -0
  20. package/dist-runtime/config/rpc.js +19 -0
  21. package/dist-runtime/config/rpc.js.map +1 -0
  22. package/dist-runtime/config/zksyncSolcPath.d.ts +1 -0
  23. package/dist-runtime/config/zksyncSolcPath.js +61 -0
  24. package/dist-runtime/config/zksyncSolcPath.js.map +1 -0
  25. package/dist-runtime/migrate.d.ts +13 -0
  26. package/dist-runtime/migrate.js +208 -0
  27. package/dist-runtime/migrate.js.map +1 -0
  28. package/dist-runtime/package.json +1 -0
  29. package/dist-runtime/projectHardhat.d.ts +4 -0
  30. package/dist-runtime/projectHardhat.js +16 -0
  31. package/dist-runtime/projectHardhat.js.map +1 -0
  32. package/dist-runtime/runtime-identity.json +4 -0
  33. package/dist-runtime/template-migration.json +293 -0
  34. package/dist-runtime/workflow/checkCode.d.ts +1 -0
  35. package/dist-runtime/workflow/checkCode.js +16 -0
  36. package/dist-runtime/workflow/checkCode.js.map +1 -0
  37. package/dist-runtime/workflow/checkCodeFinalize.d.ts +1 -0
  38. package/dist-runtime/workflow/checkCodeFinalize.js +11 -0
  39. package/dist-runtime/workflow/checkCodeFinalize.js.map +1 -0
  40. package/dist-runtime/workflow/checkCodePlan.d.ts +1 -0
  41. package/dist-runtime/workflow/checkCodePlan.js +11 -0
  42. package/dist-runtime/workflow/checkCodePlan.js.map +1 -0
  43. package/dist-runtime/workflow/cli.d.ts +1 -0
  44. package/dist-runtime/workflow/cli.js +302 -0
  45. package/dist-runtime/workflow/cli.js.map +1 -0
  46. package/dist-runtime/workflow/commitContractInfo.d.ts +1 -0
  47. package/dist-runtime/workflow/commitContractInfo.js +64 -0
  48. package/dist-runtime/workflow/commitContractInfo.js.map +1 -0
  49. package/dist-runtime/workflow/create2Hashes.d.ts +1 -0
  50. package/dist-runtime/workflow/create2Hashes.js +76 -0
  51. package/dist-runtime/workflow/create2Hashes.js.map +1 -0
  52. package/dist-runtime/workflow/forkSourceProxy.d.ts +1 -0
  53. package/dist-runtime/workflow/forkSourceProxy.js +151 -0
  54. package/dist-runtime/workflow/forkSourceProxy.js.map +1 -0
  55. package/dist-runtime/workflow/importState.d.ts +1 -0
  56. package/dist-runtime/workflow/importState.js +193 -0
  57. package/dist-runtime/workflow/importState.js.map +1 -0
  58. package/dist-runtime/workflow/lib/authority.d.ts +28 -0
  59. package/dist-runtime/workflow/lib/authority.js +122 -0
  60. package/dist-runtime/workflow/lib/authority.js.map +1 -0
  61. package/dist-runtime/workflow/lib/calldata.d.ts +2 -0
  62. package/dist-runtime/workflow/lib/calldata.js +8 -0
  63. package/dist-runtime/workflow/lib/calldata.js.map +1 -0
  64. package/dist-runtime/workflow/lib/calls.d.ts +23 -0
  65. package/dist-runtime/workflow/lib/calls.js +316 -0
  66. package/dist-runtime/workflow/lib/calls.js.map +1 -0
  67. package/dist-runtime/workflow/lib/checkCode/args.d.ts +2 -0
  68. package/dist-runtime/workflow/lib/checkCode/args.js +68 -0
  69. package/dist-runtime/workflow/lib/checkCode/args.js.map +1 -0
  70. package/dist-runtime/workflow/lib/checkCode/command.d.ts +5 -0
  71. package/dist-runtime/workflow/lib/checkCode/command.js +35 -0
  72. package/dist-runtime/workflow/lib/checkCode/command.js.map +1 -0
  73. package/dist-runtime/workflow/lib/checkCode/dependencies.d.ts +6 -0
  74. package/dist-runtime/workflow/lib/checkCode/dependencies.js +125 -0
  75. package/dist-runtime/workflow/lib/checkCode/dependencies.js.map +1 -0
  76. package/dist-runtime/workflow/lib/checkCode/finalize.d.ts +17 -0
  77. package/dist-runtime/workflow/lib/checkCode/finalize.js +174 -0
  78. package/dist-runtime/workflow/lib/checkCode/finalize.js.map +1 -0
  79. package/dist-runtime/workflow/lib/checkCode/index.d.ts +3 -0
  80. package/dist-runtime/workflow/lib/checkCode/index.js +20 -0
  81. package/dist-runtime/workflow/lib/checkCode/index.js.map +1 -0
  82. package/dist-runtime/workflow/lib/checkCode/plan.d.ts +22 -0
  83. package/dist-runtime/workflow/lib/checkCode/plan.js +145 -0
  84. package/dist-runtime/workflow/lib/checkCode/plan.js.map +1 -0
  85. package/dist-runtime/workflow/lib/checkCodeReport.d.ts +25 -0
  86. package/dist-runtime/workflow/lib/checkCodeReport.js +102 -0
  87. package/dist-runtime/workflow/lib/checkCodeReport.js.map +1 -0
  88. package/dist-runtime/workflow/lib/checkCodeRunner.d.ts +87 -0
  89. package/dist-runtime/workflow/lib/checkCodeRunner.js +964 -0
  90. package/dist-runtime/workflow/lib/checkCodeRunner.js.map +1 -0
  91. package/dist-runtime/workflow/lib/cliTool.d.ts +10 -0
  92. package/dist-runtime/workflow/lib/cliTool.js +25 -0
  93. package/dist-runtime/workflow/lib/cliTool.js.map +1 -0
  94. package/dist-runtime/workflow/lib/config.d.ts +33 -0
  95. package/dist-runtime/workflow/lib/config.js +100 -0
  96. package/dist-runtime/workflow/lib/config.js.map +1 -0
  97. package/dist-runtime/workflow/lib/contractInfoCandidates.d.ts +82 -0
  98. package/dist-runtime/workflow/lib/contractInfoCandidates.js +441 -0
  99. package/dist-runtime/workflow/lib/contractInfoCandidates.js.map +1 -0
  100. package/dist-runtime/workflow/lib/controlledMulticallAbi.d.ts +2 -0
  101. package/dist-runtime/workflow/lib/controlledMulticallAbi.js +10 -0
  102. package/dist-runtime/workflow/lib/controlledMulticallAbi.js.map +1 -0
  103. package/dist-runtime/workflow/lib/create2.d.ts +49 -0
  104. package/dist-runtime/workflow/lib/create2.js +194 -0
  105. package/dist-runtime/workflow/lib/create2.js.map +1 -0
  106. package/dist-runtime/workflow/lib/create2Hashes.d.ts +22 -0
  107. package/dist-runtime/workflow/lib/create2Hashes.js +57 -0
  108. package/dist-runtime/workflow/lib/create2Hashes.js.map +1 -0
  109. package/dist-runtime/workflow/lib/deploymentInfo.d.ts +40 -0
  110. package/dist-runtime/workflow/lib/deploymentInfo.js +240 -0
  111. package/dist-runtime/workflow/lib/deploymentInfo.js.map +1 -0
  112. package/dist-runtime/workflow/lib/deploymentRecords.d.ts +137 -0
  113. package/dist-runtime/workflow/lib/deploymentRecords.js +374 -0
  114. package/dist-runtime/workflow/lib/deploymentRecords.js.map +1 -0
  115. package/dist-runtime/workflow/lib/deployments.d.ts +21 -0
  116. package/dist-runtime/workflow/lib/deployments.js +240 -0
  117. package/dist-runtime/workflow/lib/deployments.js.map +1 -0
  118. package/dist-runtime/workflow/lib/erc1967.d.ts +5 -0
  119. package/dist-runtime/workflow/lib/erc1967.js +29 -0
  120. package/dist-runtime/workflow/lib/erc1967.js.map +1 -0
  121. package/dist-runtime/workflow/lib/errors.d.ts +6 -0
  122. package/dist-runtime/workflow/lib/errors.js +77 -0
  123. package/dist-runtime/workflow/lib/errors.js.map +1 -0
  124. package/dist-runtime/workflow/lib/executionId.d.ts +7 -0
  125. package/dist-runtime/workflow/lib/executionId.js +26 -0
  126. package/dist-runtime/workflow/lib/executionId.js.map +1 -0
  127. package/dist-runtime/workflow/lib/executionPlan.d.ts +85 -0
  128. package/dist-runtime/workflow/lib/executionPlan.js +450 -0
  129. package/dist-runtime/workflow/lib/executionPlan.js.map +1 -0
  130. package/dist-runtime/workflow/lib/executionProgress.d.ts +5 -0
  131. package/dist-runtime/workflow/lib/executionProgress.js +100 -0
  132. package/dist-runtime/workflow/lib/executionProgress.js.map +1 -0
  133. package/dist-runtime/workflow/lib/external.d.ts +62 -0
  134. package/dist-runtime/workflow/lib/external.js +282 -0
  135. package/dist-runtime/workflow/lib/external.js.map +1 -0
  136. package/dist-runtime/workflow/lib/externalExecutionScanner.d.ts +64 -0
  137. package/dist-runtime/workflow/lib/externalExecutionScanner.js +638 -0
  138. package/dist-runtime/workflow/lib/externalExecutionScanner.js.map +1 -0
  139. package/dist-runtime/workflow/lib/forkSnapshot.d.ts +34 -0
  140. package/dist-runtime/workflow/lib/forkSnapshot.js +167 -0
  141. package/dist-runtime/workflow/lib/forkSnapshot.js.map +1 -0
  142. package/dist-runtime/workflow/lib/gateTool.d.ts +16 -0
  143. package/dist-runtime/workflow/lib/gateTool.js +177 -0
  144. package/dist-runtime/workflow/lib/gateTool.js.map +1 -0
  145. package/dist-runtime/workflow/lib/gateToolSync.d.ts +22 -0
  146. package/dist-runtime/workflow/lib/gateToolSync.js +253 -0
  147. package/dist-runtime/workflow/lib/gateToolSync.js.map +1 -0
  148. package/dist-runtime/workflow/lib/lock.d.ts +52 -0
  149. package/dist-runtime/workflow/lib/lock.js +269 -0
  150. package/dist-runtime/workflow/lib/lock.js.map +1 -0
  151. package/dist-runtime/workflow/lib/migrationState.d.ts +103 -0
  152. package/dist-runtime/workflow/lib/migrationState.js +920 -0
  153. package/dist-runtime/workflow/lib/migrationState.js.map +1 -0
  154. package/dist-runtime/workflow/lib/operatorExecution.d.ts +28 -0
  155. package/dist-runtime/workflow/lib/operatorExecution.js +134 -0
  156. package/dist-runtime/workflow/lib/operatorExecution.js.map +1 -0
  157. package/dist-runtime/workflow/lib/parameters.d.ts +58 -0
  158. package/dist-runtime/workflow/lib/parameters.js +323 -0
  159. package/dist-runtime/workflow/lib/parameters.js.map +1 -0
  160. package/dist-runtime/workflow/lib/pendingDeploymentReuse.d.ts +29 -0
  161. package/dist-runtime/workflow/lib/pendingDeploymentReuse.js +277 -0
  162. package/dist-runtime/workflow/lib/pendingDeploymentReuse.js.map +1 -0
  163. package/dist-runtime/workflow/lib/proxy.d.ts +18 -0
  164. package/dist-runtime/workflow/lib/proxy.js +19 -0
  165. package/dist-runtime/workflow/lib/proxy.js.map +1 -0
  166. package/dist-runtime/workflow/lib/registryCommit.d.ts +33 -0
  167. package/dist-runtime/workflow/lib/registryCommit.js +319 -0
  168. package/dist-runtime/workflow/lib/registryCommit.js.map +1 -0
  169. package/dist-runtime/workflow/lib/release.d.ts +57 -0
  170. package/dist-runtime/workflow/lib/release.js +256 -0
  171. package/dist-runtime/workflow/lib/release.js.map +1 -0
  172. package/dist-runtime/workflow/lib/releaseFinalize.d.ts +14 -0
  173. package/dist-runtime/workflow/lib/releaseFinalize.js +571 -0
  174. package/dist-runtime/workflow/lib/releaseFinalize.js.map +1 -0
  175. package/dist-runtime/workflow/lib/releaseParameters.d.ts +43 -0
  176. package/dist-runtime/workflow/lib/releaseParameters.js +184 -0
  177. package/dist-runtime/workflow/lib/releaseParameters.js.map +1 -0
  178. package/dist-runtime/workflow/lib/reporter.d.ts +39 -0
  179. package/dist-runtime/workflow/lib/reporter.js +452 -0
  180. package/dist-runtime/workflow/lib/reporter.js.map +1 -0
  181. package/dist-runtime/workflow/lib/resultPaths.d.ts +17 -0
  182. package/dist-runtime/workflow/lib/resultPaths.js +29 -0
  183. package/dist-runtime/workflow/lib/resultPaths.js.map +1 -0
  184. package/dist-runtime/workflow/lib/runtimeVersion.d.ts +10 -0
  185. package/dist-runtime/workflow/lib/runtimeVersion.js +46 -0
  186. package/dist-runtime/workflow/lib/runtimeVersion.js.map +1 -0
  187. package/dist-runtime/workflow/lib/signer.d.ts +10 -0
  188. package/dist-runtime/workflow/lib/signer.js +105 -0
  189. package/dist-runtime/workflow/lib/signer.js.map +1 -0
  190. package/dist-runtime/workflow/lib/signerIdentity.d.ts +1 -0
  191. package/dist-runtime/workflow/lib/signerIdentity.js +23 -0
  192. package/dist-runtime/workflow/lib/signerIdentity.js.map +1 -0
  193. package/dist-runtime/workflow/lib/simulation.d.ts +35 -0
  194. package/dist-runtime/workflow/lib/simulation.js +282 -0
  195. package/dist-runtime/workflow/lib/simulation.js.map +1 -0
  196. package/dist-runtime/workflow/lib/simulationCallers.d.ts +44 -0
  197. package/dist-runtime/workflow/lib/simulationCallers.js +260 -0
  198. package/dist-runtime/workflow/lib/simulationCallers.js.map +1 -0
  199. package/dist-runtime/workflow/lib/sourceRpcPolicy.d.ts +1 -0
  200. package/dist-runtime/workflow/lib/sourceRpcPolicy.js +43 -0
  201. package/dist-runtime/workflow/lib/sourceRpcPolicy.js.map +1 -0
  202. package/dist-runtime/workflow/lib/state.d.ts +6 -0
  203. package/dist-runtime/workflow/lib/state.js +25 -0
  204. package/dist-runtime/workflow/lib/state.js.map +1 -0
  205. package/dist-runtime/workflow/lib/staticValidation.d.ts +22 -0
  206. package/dist-runtime/workflow/lib/staticValidation.js +124 -0
  207. package/dist-runtime/workflow/lib/staticValidation.js.map +1 -0
  208. package/dist-runtime/workflow/lib/zksyncForkCapability.d.ts +27 -0
  209. package/dist-runtime/workflow/lib/zksyncForkCapability.js +52 -0
  210. package/dist-runtime/workflow/lib/zksyncForkCapability.js.map +1 -0
  211. package/dist-runtime/workflow/lib/zksyncForkRunner.d.ts +57 -0
  212. package/dist-runtime/workflow/lib/zksyncForkRunner.js +344 -0
  213. package/dist-runtime/workflow/lib/zksyncForkRunner.js.map +1 -0
  214. package/dist-runtime/workflow/reconcileExternal.d.ts +1 -0
  215. package/dist-runtime/workflow/reconcileExternal.js +87 -0
  216. package/dist-runtime/workflow/reconcileExternal.js.map +1 -0
  217. package/dist-runtime/workflow/reconcileExternalRun.d.ts +1 -0
  218. package/dist-runtime/workflow/reconcileExternalRun.js +77 -0
  219. package/dist-runtime/workflow/reconcileExternalRun.js.map +1 -0
  220. package/dist-runtime/workflow/releaseFinalize.d.ts +1 -0
  221. package/dist-runtime/workflow/releaseFinalize.js +11 -0
  222. package/dist-runtime/workflow/releaseFinalize.js.map +1 -0
  223. package/dist-runtime/workflow/run.d.ts +40 -0
  224. package/dist-runtime/workflow/run.js +858 -0
  225. package/dist-runtime/workflow/run.js.map +1 -0
  226. package/dist-runtime/workflow/staticValidate.d.ts +1 -0
  227. package/dist-runtime/workflow/staticValidate.js +26 -0
  228. package/dist-runtime/workflow/staticValidate.js.map +1 -0
  229. package/dist-runtime/workflow/steps/call.d.ts +3 -0
  230. package/dist-runtime/workflow/steps/call.js +9 -0
  231. package/dist-runtime/workflow/steps/call.js.map +1 -0
  232. package/dist-runtime/workflow/steps/check.d.ts +3 -0
  233. package/dist-runtime/workflow/steps/check.js +9 -0
  234. package/dist-runtime/workflow/steps/check.js.map +1 -0
  235. package/dist-runtime/workflow/steps/custom.d.ts +3 -0
  236. package/dist-runtime/workflow/steps/custom.js +33 -0
  237. package/dist-runtime/workflow/steps/custom.js.map +1 -0
  238. package/dist-runtime/workflow/steps/deploy.d.ts +3 -0
  239. package/dist-runtime/workflow/steps/deploy.js +596 -0
  240. package/dist-runtime/workflow/steps/deploy.js.map +1 -0
  241. package/dist-runtime/workflow/steps/upgrade.d.ts +3 -0
  242. package/dist-runtime/workflow/steps/upgrade.js +466 -0
  243. package/dist-runtime/workflow/steps/upgrade.js.map +1 -0
  244. package/dist-runtime/workflow/steps/view.d.ts +3 -0
  245. package/dist-runtime/workflow/steps/view.js +9 -0
  246. package/dist-runtime/workflow/steps/view.js.map +1 -0
  247. package/docs/direct-package-acceptance.md +20 -0
  248. package/docs/external-infrastructure-acceptance.md +33 -0
  249. package/docs/network-runtime-acceptance.md +18 -0
  250. package/docs/plans/2026-09-09-workflow-extraction.md +16 -0
  251. package/docs/superpowers/plans/2026-07-22-manifest-bootstrap-transaction.md +50 -0
  252. package/docs/superpowers/plans/2026-07-22-manifest-review-remediation.md +49 -0
  253. package/docs/superpowers/plans/2026-08-17-custody-hardhat-signers.md +227 -0
  254. package/docs/superpowers/plans/2026-09-09-remove-template-infrastructure-contracts.md +11 -0
  255. package/docs/workflow-reference.md +1181 -0
  256. package/docs/workflow-runtime-acceptance.md +17 -0
  257. package/docs/workflow-runtime.md +56 -0
  258. package/package.json +26 -5
  259. package/runtime/config/hardhatAdapters.ts +58 -0
  260. package/runtime/config/networks.ts +305 -0
  261. package/runtime/config/openzeppelin.ts +173 -0
  262. package/runtime/config/rpc.ts +27 -0
  263. package/runtime/config/zksyncSolcPath.ts +59 -0
  264. package/runtime/hardhat-types.d.ts +2 -0
  265. package/runtime/migrate.ts +154 -0
  266. package/runtime/projectHardhat.ts +10 -0
  267. package/runtime/template-migration.json +293 -0
  268. package/runtime/workflow/checkCode.ts +13 -0
  269. package/runtime/workflow/checkCodeFinalize.ts +8 -0
  270. package/runtime/workflow/checkCodePlan.ts +8 -0
  271. package/runtime/workflow/cli.ts +356 -0
  272. package/runtime/workflow/commitContractInfo.ts +63 -0
  273. package/runtime/workflow/create2Hashes.ts +79 -0
  274. package/runtime/workflow/forkSourceProxy.ts +193 -0
  275. package/runtime/workflow/importState.ts +190 -0
  276. package/runtime/workflow/lib/authority.ts +170 -0
  277. package/runtime/workflow/lib/calldata.ts +9 -0
  278. package/runtime/workflow/lib/calls.ts +407 -0
  279. package/runtime/workflow/lib/checkCode/args.ts +76 -0
  280. package/runtime/workflow/lib/checkCode/command.ts +36 -0
  281. package/runtime/workflow/lib/checkCode/dependencies.ts +112 -0
  282. package/runtime/workflow/lib/checkCode/finalize.ts +198 -0
  283. package/runtime/workflow/lib/checkCode/index.ts +18 -0
  284. package/runtime/workflow/lib/checkCode/plan.ts +163 -0
  285. package/runtime/workflow/lib/checkCodeReport.ts +133 -0
  286. package/runtime/workflow/lib/checkCodeRunner.ts +1225 -0
  287. package/runtime/workflow/lib/cliTool.ts +31 -0
  288. package/runtime/workflow/lib/config.ts +130 -0
  289. package/runtime/workflow/lib/contractInfoCandidates.ts +690 -0
  290. package/runtime/workflow/lib/controlledMulticallAbi.ts +6 -0
  291. package/runtime/workflow/lib/create2.ts +278 -0
  292. package/runtime/workflow/lib/create2Hashes.ts +83 -0
  293. package/runtime/workflow/lib/deploymentInfo.ts +286 -0
  294. package/runtime/workflow/lib/deploymentRecords.ts +576 -0
  295. package/runtime/workflow/lib/deployments.ts +276 -0
  296. package/runtime/workflow/lib/erc1967.ts +57 -0
  297. package/runtime/workflow/lib/errors.ts +95 -0
  298. package/runtime/workflow/lib/executionId.ts +35 -0
  299. package/runtime/workflow/lib/executionPlan.ts +550 -0
  300. package/runtime/workflow/lib/executionProgress.ts +127 -0
  301. package/runtime/workflow/lib/external.ts +372 -0
  302. package/runtime/workflow/lib/externalExecutionScanner.ts +892 -0
  303. package/runtime/workflow/lib/forkSnapshot.ts +231 -0
  304. package/runtime/workflow/lib/gateTool.ts +261 -0
  305. package/runtime/workflow/lib/gateToolSync.ts +398 -0
  306. package/runtime/workflow/lib/lock.ts +388 -0
  307. package/runtime/workflow/lib/migrationState.ts +1246 -0
  308. package/runtime/workflow/lib/operatorExecution.ts +174 -0
  309. package/runtime/workflow/lib/parameters.ts +438 -0
  310. package/runtime/workflow/lib/pendingDeploymentReuse.ts +428 -0
  311. package/runtime/workflow/lib/proxy.ts +45 -0
  312. package/runtime/workflow/lib/registryCommit.ts +455 -0
  313. package/runtime/workflow/lib/release.ts +329 -0
  314. package/runtime/workflow/lib/releaseFinalize.ts +711 -0
  315. package/runtime/workflow/lib/releaseParameters.ts +248 -0
  316. package/runtime/workflow/lib/reporter.ts +502 -0
  317. package/runtime/workflow/lib/resultPaths.ts +49 -0
  318. package/runtime/workflow/lib/runtimeVersion.ts +28 -0
  319. package/runtime/workflow/lib/signer.ts +124 -0
  320. package/runtime/workflow/lib/signerIdentity.ts +22 -0
  321. package/runtime/workflow/lib/simulation.ts +415 -0
  322. package/runtime/workflow/lib/simulationCallers.ts +335 -0
  323. package/runtime/workflow/lib/sourceRpcPolicy.ts +41 -0
  324. package/runtime/workflow/lib/state.ts +25 -0
  325. package/runtime/workflow/lib/staticValidation.ts +142 -0
  326. package/runtime/workflow/lib/zksyncForkCapability.ts +80 -0
  327. package/runtime/workflow/lib/zksyncForkRunner.ts +505 -0
  328. package/runtime/workflow/reconcileExternal.ts +86 -0
  329. package/runtime/workflow/reconcileExternalRun.ts +88 -0
  330. package/runtime/workflow/releaseFinalize.ts +8 -0
  331. package/runtime/workflow/run.ts +1072 -0
  332. package/runtime/workflow/staticValidate.ts +23 -0
  333. package/runtime/workflow/steps/call.ts +10 -0
  334. package/runtime/workflow/steps/check.ts +10 -0
  335. package/runtime/workflow/steps/custom.ts +43 -0
  336. package/runtime/workflow/steps/deploy.ts +772 -0
  337. package/runtime/workflow/steps/upgrade.ts +599 -0
  338. package/runtime/workflow/steps/view.ts +10 -0
@@ -0,0 +1,596 @@
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.runDeployStep = void 0;
7
+ const controlledMulticallAbi_1 = require("../lib/controlledMulticallAbi");
8
+ const path_1 = __importDefault(require("path"));
9
+ const projectHardhat_1 = require("../../projectHardhat");
10
+ const parameters_1 = require("../lib/parameters");
11
+ const deployments_1 = require("../lib/deployments");
12
+ const create2_1 = require("../lib/create2");
13
+ const checkCodeReport_1 = require("../lib/checkCodeReport");
14
+ const erc1967_1 = require("../lib/erc1967");
15
+ const lock_1 = require("../lib/lock");
16
+ const proxy_1 = require("../lib/proxy");
17
+ const authority_1 = require("../lib/authority");
18
+ const signer_1 = require("../lib/signer");
19
+ const gateTool_1 = require("../lib/gateTool");
20
+ const gateToolSync_1 = require("../lib/gateToolSync");
21
+ const pendingDeploymentReuse_1 = require("../lib/pendingDeploymentReuse");
22
+ const resolveInContext = (context, value) => (0, parameters_1.resolveValue)(value, {
23
+ targetId: context.targetId,
24
+ target: context.target,
25
+ params: context.targetParams,
26
+ state: context.state,
27
+ });
28
+ const resolveArray = (context, value, label) => {
29
+ const resolved = resolveInContext(context, value || []);
30
+ if (!Array.isArray(resolved))
31
+ throw new Error(`${label} must resolve to an array`);
32
+ return resolved;
33
+ };
34
+ const resolveObject = (context, value) => {
35
+ const resolved = resolveInContext(context, value || {});
36
+ if (!resolved || typeof resolved !== "object" || Array.isArray(resolved))
37
+ return {};
38
+ return resolved;
39
+ };
40
+ const resolveProxyOptions = (context, step) => {
41
+ if (step.proxy === undefined)
42
+ return undefined;
43
+ const proxy = resolveObject(context, step.proxy);
44
+ const initializer = proxy.initializer === false
45
+ ? false
46
+ : typeof proxy.initializer === "string"
47
+ ? proxy.initializer
48
+ : undefined;
49
+ return {
50
+ options: {
51
+ kind: typeof proxy.kind === "string" ? proxy.kind : undefined,
52
+ initializer,
53
+ unsafeAllow: Array.isArray(proxy.unsafeAllow)
54
+ ? proxy.unsafeAllow.map((item) => String(item))
55
+ : undefined,
56
+ constructorArgs: proxy.constructorArgs === undefined
57
+ ? undefined
58
+ : resolveArray(context, proxy.constructorArgs, `Step ${step.id} proxy.constructorArgs`),
59
+ },
60
+ };
61
+ };
62
+ const assertCreate2Options = (step, options) => {
63
+ if (!options)
64
+ throw new Error(`Deploy step ${step.id} requires strategy: create2`);
65
+ return options;
66
+ };
67
+ const setDeploymentState = (context, names, value) => {
68
+ for (const name of new Set(names))
69
+ context.state.set(name, value);
70
+ };
71
+ const stringObjectField = (source, key) => {
72
+ const value = source[key];
73
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
74
+ };
75
+ const resolveFirstUpgradeOptions = (context, step) => {
76
+ if (step.firstUpgrade === undefined)
77
+ return undefined;
78
+ const firstUpgrade = resolveObject(context, step.firstUpgrade);
79
+ const contractName = stringObjectField(firstUpgrade, "contract");
80
+ if (!contractName)
81
+ throw new Error(`Deploy step ${step.id} firstUpgrade requires contract`);
82
+ const callObject = resolveObject(context, firstUpgrade.call);
83
+ const fn = stringObjectField(callObject, "fn") || stringObjectField(callObject, "method");
84
+ return {
85
+ contractName,
86
+ call: fn
87
+ ? {
88
+ fn,
89
+ args: resolveArray(context, callObject.args || [], `Step ${step.id} firstUpgrade.call.args`),
90
+ }
91
+ : undefined,
92
+ constructorArgs: resolveArray(context, firstUpgrade.constructorArgs || [], `Step ${step.id} firstUpgrade.constructorArgs`),
93
+ unsafeAllow: Array.isArray(firstUpgrade.unsafeAllow)
94
+ ? firstUpgrade.unsafeAllow.map((item) => String(item))
95
+ : undefined,
96
+ };
97
+ };
98
+ const applyExistingDeploymentPolicy = async (context, step, saveAs, preparedChange, create2Options, declaredUpgradeable) => {
99
+ const existing = (0, deployments_1.findDeploymentAddress)(context.root, context.config, context.targetId, saveAs);
100
+ if (!existing)
101
+ return { completed: false, create2Options };
102
+ const policy = (0, parameters_1.requireExistingDeploymentPolicy)(context.existingDeploymentPolicies, saveAs);
103
+ const implementationAddress = await (0, erc1967_1.getERC1967Implementation)(projectHardhat_1.ethers.provider, existing);
104
+ const action = (0, parameters_1.resolveExistingDeploymentPolicyAction)(policy, {
105
+ instanceId: saveAs,
106
+ existingAddress: existing,
107
+ currentSalt: create2Options.salt,
108
+ upgradeable: declaredUpgradeable || implementationAddress !== undefined,
109
+ });
110
+ if (action.mode === "reuse") {
111
+ if (!context.releaseArtifactHash) {
112
+ throw new Error(`Deploy step ${step.id} cannot reuse ${context.targetId}.${saveAs} without an execution artifactHash`);
113
+ }
114
+ const evidence = (0, checkCodeReport_1.assertReusableDeployment)(context.root, {
115
+ network: context.targetId,
116
+ scheme: create2Options.scheme,
117
+ instanceId: saveAs,
118
+ address: existing,
119
+ artifactHash: context.releaseArtifactHash,
120
+ });
121
+ context.deploymentRecorder?.prepare(preparedChange);
122
+ context.deploymentRecorder?.apply({
123
+ ...preparedChange,
124
+ address: existing,
125
+ proxyAddress: implementationAddress ? existing : undefined,
126
+ implementationAddress,
127
+ reused: true,
128
+ alreadyDeployed: true,
129
+ gateTool: {
130
+ outputPath: "scripts/checkcode/index.json",
131
+ data: { runId: evidence.runId, artifactHash: evidence.artifactHash },
132
+ },
133
+ });
134
+ setDeploymentState(context, [saveAs], {
135
+ address: existing,
136
+ implementationAddress,
137
+ reused: true,
138
+ alreadyDeployed: true,
139
+ });
140
+ context.reporter.result("execution", {
141
+ stepId: step.id,
142
+ kind: step.kind,
143
+ contract: preparedChange.actualContract,
144
+ saveAs,
145
+ strategy: "reuse",
146
+ address: existing,
147
+ implementationAddress,
148
+ checkCodeRunId: evidence.runId,
149
+ reused: true,
150
+ alreadyDeployed: true,
151
+ });
152
+ return { completed: true, create2Options, existingAddress: existing };
153
+ }
154
+ return {
155
+ completed: false,
156
+ existingAddress: existing,
157
+ redeployReason: action.reason,
158
+ create2Options: {
159
+ ...create2Options,
160
+ salt: action.salt,
161
+ expectedAddress: action.expectedAddress,
162
+ },
163
+ };
164
+ };
165
+ const deploymentForRole = (plan, role) => {
166
+ const deployment = plan.deployments.find((entry) => entry.role === role);
167
+ if (!deployment)
168
+ throw new Error(`GateTool plan is missing ${role} deployment evidence`);
169
+ return deployment;
170
+ };
171
+ const assertDeployedCode = async (label, address) => {
172
+ const code = await projectHardhat_1.ethers.provider.getCode(address);
173
+ if (!code || code === "0x") {
174
+ throw new Error(`${label} is missing deployed code at ${address}`);
175
+ }
176
+ };
177
+ const gateToolEvidenceDir = (context) => path_1.default.join(context.taskDir, "results", context.targetId, context.executionId, "gate-tool", context.mode);
178
+ const runGateToolControlledMulticall = async (context, step, create2, transactions) => {
179
+ if (transactions.length === 0)
180
+ return { external: false };
181
+ if (!create2.controlledMulticall) {
182
+ throw new Error(`Deploy step ${step.id} requires controlledMulticall`);
183
+ }
184
+ if (!context.signer || !context.signerAddress) {
185
+ throw new Error(`Deploy step ${step.id} requires a signer`);
186
+ }
187
+ const prepared = (0, create2_1.prepareControlledMulticallTransaction)(create2.controlledMulticall, transactions.map((transaction) => ({
188
+ target: transaction.to,
189
+ value: transaction.value,
190
+ data: transaction.data,
191
+ ...(transaction.factoryDeps === undefined
192
+ ? {}
193
+ : { factoryDeps: transaction.factoryDeps }),
194
+ })), create2.scheme);
195
+ const multicall = await projectHardhat_1.ethers.getContractAt(controlledMulticallAbi_1.CONTROLLED_MULTICALL_AUTHORITY_ABI, create2.controlledMulticall, context.signer);
196
+ const authority = await (0, authority_1.decideControlledMulticallAuthority)(multicall, create2.factory, context.target, context.signerAddress);
197
+ const executor = authority.mode === "execute" ? context.signerAddress : authority.executor;
198
+ if (!executor)
199
+ throw new Error(`Deploy step ${step.id} cannot resolve its required executor`);
200
+ if (create2.scheme === "zksync-eravm" && authority.mode !== "execute") {
201
+ throw new Error(`Deploy step ${step.id} requires unsupported zkSync external Admin execution`);
202
+ }
203
+ if (!context.executionPlanner) {
204
+ if (authority.mode !== "execute") {
205
+ throw new Error(`Deploy step ${step.id} requires a locked mixed-authority execution plan`);
206
+ }
207
+ const transaction = await (0, create2_1.sendPreparedControlledMulticallTransaction)(prepared, context.signer);
208
+ return { external: false, txHash: transaction.hash };
209
+ }
210
+ const planned = context.executionPlanner.add({
211
+ stepId: step.id,
212
+ executor,
213
+ to: prepared.target,
214
+ value: prepared.value,
215
+ data: prepared.data,
216
+ operation: 0,
217
+ ...(prepared.scheme === undefined ? {} : { scheme: prepared.scheme }),
218
+ ...(prepared.factoryDeps === undefined ? {} : { factoryDeps: prepared.factoryDeps }),
219
+ });
220
+ if (planned.executionAction === "replay") {
221
+ return {
222
+ external: planned.route === "external",
223
+ transactionId: planned.transactionId,
224
+ txHash: planned.transactionHash,
225
+ };
226
+ }
227
+ if (planned.route === "external" && context.mode !== "simulate") {
228
+ context.externalCalls.push({
229
+ transactionId: planned.transactionId,
230
+ stepId: planned.stepId,
231
+ to: planned.to,
232
+ value: planned.value,
233
+ data: planned.data,
234
+ operation: planned.operation,
235
+ method: prepared.method,
236
+ args: prepared.calls,
237
+ executor: planned.executor,
238
+ reason: authority.reason,
239
+ });
240
+ return { external: true, transactionId: planned.transactionId };
241
+ }
242
+ const selectedSigner = planned.route === "external"
243
+ ? await (0, signer_1.impersonateWorkflowSimulationSigner)(planned.executor)
244
+ : context.signer;
245
+ const transaction = await (0, create2_1.sendPreparedControlledMulticallTransaction)(prepared, selectedSigner);
246
+ if (context.mode === "execute" && planned.route === "operator") {
247
+ context.operatorReceipts.push({
248
+ transactionId: planned.transactionId,
249
+ transactionHash: transaction.hash,
250
+ });
251
+ }
252
+ return {
253
+ external: false,
254
+ transactionId: planned.transactionId,
255
+ txHash: transaction.hash,
256
+ };
257
+ };
258
+ const addressPolicy = (options) => (options.expectedAddress === undefined && options.leadingZeroBytes === undefined
259
+ ? undefined
260
+ : {
261
+ ...(options.expectedAddress === undefined
262
+ ? {}
263
+ : { expectedAddress: options.expectedAddress }),
264
+ ...(options.leadingZeroBytes === undefined
265
+ ? {}
266
+ : { leadingZeroBytes: options.leadingZeroBytes }),
267
+ });
268
+ const gateToolChange = (context, planPath, plan) => ({
269
+ outputPath: path_1.default.relative(context.root, planPath).split(path_1.default.sep).join("/"),
270
+ data: plan,
271
+ });
272
+ const runDeployStep = async (context, step) => {
273
+ const contractName = String(step.contract);
274
+ const saveAs = typeof step.saveAs === "string" ? step.saveAs.trim() : "";
275
+ if (!saveAs)
276
+ throw new Error(`Deploy step ${step.id} requires saveAs`);
277
+ const create2Options = assertCreate2Options(step, (0, create2_1.resolveCreate2Options)(context, step));
278
+ const proxy = resolveProxyOptions(context, step);
279
+ const recorder = context.mode === "execute" ? context.deploymentRecorder : undefined;
280
+ if (context.mode === "execute" && !recorder) {
281
+ throw new Error(`Deploy step ${step.id} requires an execution deployment recorder`);
282
+ }
283
+ if (proxy) {
284
+ const firstUpgrade = resolveFirstUpgradeOptions(context, step);
285
+ if (step.upgradeableStrategy !== "uups-placeholder-proxy" || !firstUpgrade) {
286
+ throw new Error(`Deploy step ${step.id} requires firstUpgrade for uups-placeholder-proxy`);
287
+ }
288
+ if ((proxy.options.kind || "uups") !== "uups") {
289
+ throw new Error(`Deploy step ${step.id} only supports UUPS placeholder proxies`);
290
+ }
291
+ if (proxy.options.initializer !== false) {
292
+ throw new Error(`Deploy step ${step.id} must use proxy.initializer: false for uups-placeholder-proxy`);
293
+ }
294
+ if (!create2Options.controlledMulticall) {
295
+ throw new Error(`Deploy step ${step.id} requires controlledMulticall for atomic firstUpgrade`);
296
+ }
297
+ if (!create2Options.uupsPlaceholderImplementation) {
298
+ throw new Error(`Deploy step ${step.id} requires target.uups.placeholderImplementation`);
299
+ }
300
+ const actualContract = (0, deployments_1.actualContractName)(firstUpgrade.contractName);
301
+ const registryKey = (0, deployments_1.contractInfoKey)(saveAs, firstUpgrade.contractName);
302
+ const preparedChange = {
303
+ stepId: step.id,
304
+ kind: "deploy",
305
+ instanceId: saveAs,
306
+ actualContract,
307
+ contractInfoKey: registryKey,
308
+ strategy: "create2",
309
+ proxyKind: "uups",
310
+ factory: create2Options.factory,
311
+ multicall: create2Options.controlledMulticall,
312
+ salt: create2Options.salt,
313
+ expectedAddress: create2Options.expectedAddress,
314
+ leadingZeroBytes: create2Options.leadingZeroBytes,
315
+ placeholderImplementationAddress: create2Options.uupsPlaceholderImplementation,
316
+ };
317
+ const existingResolution = await applyExistingDeploymentPolicy(context, step, saveAs, preparedChange, create2Options, true);
318
+ if (existingResolution.completed)
319
+ return;
320
+ const effectiveCreate2 = existingResolution.create2Options;
321
+ const pendingReuse = context.parameterLockExecutionId
322
+ ? await (0, pendingDeploymentReuse_1.resolvePendingUupsReuse)({
323
+ root: context.root,
324
+ taskDir: context.taskDir,
325
+ taskId: context.taskId,
326
+ currentExecutionId: context.parameterLockExecutionId,
327
+ network: context.targetId,
328
+ stepId: step.id,
329
+ instanceId: saveAs,
330
+ actualContract,
331
+ contractInfoKey: registryKey,
332
+ scheme: effectiveCreate2.scheme,
333
+ factory: effectiveCreate2.factory,
334
+ multicall: effectiveCreate2.controlledMulticall,
335
+ proxySalt: effectiveCreate2.salt,
336
+ expectedAddress: effectiveCreate2.expectedAddress,
337
+ placeholderImplementationAddress: effectiveCreate2.uupsPlaceholderImplementation,
338
+ provider: projectHardhat_1.ethers.provider,
339
+ blockTag: context.mode === "simulate"
340
+ ? context.simulation.snapshot?.blockNumber
341
+ : undefined,
342
+ })
343
+ : undefined;
344
+ const implementationSalt = pendingReuse?.implementationSalt ?? (0, proxy_1.deriveImplementationSalt)(context.executionId, firstUpgrade.contractName, effectiveCreate2.salt);
345
+ const request = {
346
+ version: 1,
347
+ kind: "uups-placeholder-deploy",
348
+ scheme: effectiveCreate2.scheme,
349
+ network: projectHardhat_1.network.name,
350
+ target: context.targetId,
351
+ contract: firstUpgrade.contractName,
352
+ constructorArgs: firstUpgrade.constructorArgs || [],
353
+ factory: effectiveCreate2.factory,
354
+ proxyKind: "uups",
355
+ implementationSalt,
356
+ proxySalt: effectiveCreate2.salt,
357
+ placeholderImplementation: effectiveCreate2.uupsPlaceholderImplementation,
358
+ ...(firstUpgrade.unsafeAllow || proxy.options.unsafeAllow
359
+ ? { unsafeAllow: firstUpgrade.unsafeAllow || proxy.options.unsafeAllow }
360
+ : {}),
361
+ ...(addressPolicy(effectiveCreate2)
362
+ ? { proxyAddressPolicy: addressPolicy(effectiveCreate2) }
363
+ : {}),
364
+ ...(firstUpgrade.call
365
+ ? { call: { method: firstUpgrade.call.fn, args: firstUpgrade.call.args } }
366
+ : {}),
367
+ };
368
+ const prepared = await (0, gateTool_1.prepareGateToolWorkflow)({
369
+ root: context.root,
370
+ evidenceDir: gateToolEvidenceDir(context),
371
+ evidenceName: step.id,
372
+ request,
373
+ readBlockTag: context.mode === "simulate"
374
+ ? context.simulation.snapshot?.blockNumber
375
+ : undefined,
376
+ });
377
+ const implementation = deploymentForRole(prepared.plan, "implementation");
378
+ const proxyDeployment = deploymentForRole(prepared.plan, "proxy");
379
+ if (pendingReuse && (prepared.plan.transactions.length !== 0
380
+ || prepared.plan.artifact.digest !== pendingReuse.evidence.artifactDigest
381
+ || implementation.address.toLowerCase() !== pendingReuse.implementationAddress.toLowerCase()
382
+ || proxyDeployment.address.toLowerCase() !== pendingReuse.proxyAddress.toLowerCase())) {
383
+ throw new Error(`Deploy step ${step.id} current GateTool plan does not match trusted pending reuse evidence`);
384
+ }
385
+ (0, create2_1.assertCreate2AddressPolicy)(`${firstUpgrade.contractName} proxy`, proxyDeployment.address, effectiveCreate2);
386
+ if (existingResolution.existingAddress
387
+ && proxyDeployment.address.toLowerCase() === existingResolution.existingAddress.toLowerCase()) {
388
+ throw new Error(`Deploy step ${step.id} redeploy predicted the existing address`);
389
+ }
390
+ const gateTool = gateToolChange(context, prepared.planPath, prepared.plan);
391
+ const plannedChange = {
392
+ ...preparedChange,
393
+ salt: effectiveCreate2.salt,
394
+ previousAddress: existingResolution.existingAddress,
395
+ redeployReason: existingResolution.redeployReason,
396
+ implementationAddress: implementation.address,
397
+ implementationSalt,
398
+ constructorArgs: firstUpgrade.constructorArgs || [],
399
+ predictedAddress: proxyDeployment.address,
400
+ gateTool,
401
+ ...(pendingReuse ? { pendingReuse: pendingReuse.evidence } : {}),
402
+ };
403
+ if (context.parameterLockExecutionId) {
404
+ (0, lock_1.recordParameterLockImplementationSalts)(context.taskDir, context.parameterLockExecutionId, { [`${step.id}.implementation`]: implementationSalt });
405
+ }
406
+ recorder?.prepare(plannedChange);
407
+ if (context.mode === "execute") {
408
+ recorder?.stageAddressCandidate(plannedChange, proxyDeployment.address);
409
+ }
410
+ const execution = await runGateToolControlledMulticall(context, step, effectiveCreate2, prepared.plan.transactions);
411
+ if (context.mode === "execute" && execution.transactionId) {
412
+ recorder?.bindProxyTransaction(step.id, execution.transactionId);
413
+ }
414
+ if (!execution.external) {
415
+ await assertDeployedCode(`${firstUpgrade.contractName} implementation`, implementation.address);
416
+ await assertDeployedCode("ERC1967Proxy", proxyDeployment.address);
417
+ const currentImplementation = await (0, erc1967_1.getERC1967Implementation)(projectHardhat_1.ethers.provider, proxyDeployment.address);
418
+ if (!currentImplementation
419
+ || currentImplementation.toLowerCase() !== implementation.address.toLowerCase()) {
420
+ throw new Error(`ERC1967Proxy ${proxyDeployment.address} does not point to GateTool implementation ${implementation.address}`);
421
+ }
422
+ }
423
+ const gateToolSync = context.mode === "execute"
424
+ && !execution.external
425
+ && proxyDeployment.status !== "reused"
426
+ ? await (0, gateToolSync_1.syncGateToolUups)({
427
+ root: context.root,
428
+ evidenceDir: gateToolEvidenceDir(context),
429
+ evidenceName: step.id,
430
+ scheme: prepared.plan.scheme,
431
+ network: projectHardhat_1.network.name,
432
+ target: context.targetId,
433
+ manifestDir: context.target.openzeppelin.manifestDir,
434
+ proxy: proxyDeployment.address,
435
+ implementation: implementation.address,
436
+ contract: actualContract,
437
+ constructorArgs: firstUpgrade.constructorArgs || [],
438
+ transactionHash: execution.txHash || "",
439
+ })
440
+ : undefined;
441
+ if (context.mode === "execute" && !execution.external) {
442
+ recorder?.applyAddress({
443
+ ...plannedChange,
444
+ address: proxyDeployment.address,
445
+ proxyAddress: proxyDeployment.address,
446
+ txHash: execution.txHash,
447
+ gateToolSync,
448
+ reused: proxyDeployment.status === "reused",
449
+ alreadyDeployed: proxyDeployment.status === "reused",
450
+ }, proxyDeployment.address);
451
+ }
452
+ setDeploymentState(context, [saveAs], {
453
+ address: proxyDeployment.address,
454
+ proxyAddress: proxyDeployment.address,
455
+ implementationAddress: implementation.address,
456
+ implementationSalt,
457
+ placeholderImplementationAddress: effectiveCreate2.uupsPlaceholderImplementation,
458
+ txHash: execution.txHash,
459
+ external: execution.external,
460
+ });
461
+ context.reporter.result("execution", {
462
+ stepId: step.id,
463
+ kind: step.kind,
464
+ mode: execution.external ? "external" : context.mode,
465
+ transactionId: execution.transactionId,
466
+ contract: contractName,
467
+ actualContract,
468
+ saveAs,
469
+ contractInfoKey: registryKey,
470
+ strategy: "create2",
471
+ scheme: prepared.plan.scheme,
472
+ proxy: "uups",
473
+ address: proxyDeployment.address,
474
+ implementationAddress: implementation.address,
475
+ firstUpgradeImplementationAddress: implementation.address,
476
+ placeholderImplementationAddress: effectiveCreate2.uupsPlaceholderImplementation,
477
+ predictedAddress: proxyDeployment.address,
478
+ reused: proxyDeployment.status === "reused",
479
+ alreadyDeployed: proxyDeployment.status === "reused",
480
+ txHash: execution.txHash,
481
+ gateToolPlan: gateTool.outputPath,
482
+ gateToolSync: gateToolSync?.outputPath,
483
+ pendingReuse: pendingReuse?.evidence,
484
+ });
485
+ return;
486
+ }
487
+ const args = resolveArray(context, step.args || [], `Step ${step.id} args`);
488
+ const actualContract = (0, deployments_1.actualContractName)(contractName);
489
+ const registryKey = (0, deployments_1.contractInfoKey)(saveAs, contractName);
490
+ let preparedChange = {
491
+ stepId: step.id,
492
+ kind: "deploy",
493
+ instanceId: saveAs,
494
+ actualContract,
495
+ contractInfoKey: registryKey,
496
+ strategy: "create2",
497
+ factory: create2Options.factory,
498
+ multicall: create2Options.controlledMulticall,
499
+ salt: create2Options.salt,
500
+ expectedAddress: create2Options.expectedAddress,
501
+ leadingZeroBytes: create2Options.leadingZeroBytes,
502
+ };
503
+ const existingResolution = await applyExistingDeploymentPolicy(context, step, saveAs, preparedChange, create2Options, false);
504
+ if (existingResolution.completed)
505
+ return;
506
+ const effectiveCreate2 = existingResolution.create2Options;
507
+ const request = {
508
+ version: 1,
509
+ kind: "create2-deploy",
510
+ scheme: effectiveCreate2.scheme,
511
+ network: projectHardhat_1.network.name,
512
+ target: context.targetId,
513
+ contract: contractName,
514
+ constructorArgs: args,
515
+ factory: effectiveCreate2.factory,
516
+ salt: effectiveCreate2.salt,
517
+ ...(effectiveCreate2.create2ForwardValue === undefined
518
+ ? {}
519
+ : { create2ForwardValue: effectiveCreate2.create2ForwardValue }),
520
+ ...(effectiveCreate2.callForwardValue === undefined
521
+ ? {}
522
+ : { callForwardValue: effectiveCreate2.callForwardValue }),
523
+ ...(addressPolicy(effectiveCreate2)
524
+ ? { addressPolicy: addressPolicy(effectiveCreate2) }
525
+ : {}),
526
+ };
527
+ const prepared = await (0, gateTool_1.prepareGateToolWorkflow)({
528
+ root: context.root,
529
+ evidenceDir: gateToolEvidenceDir(context),
530
+ evidenceName: step.id,
531
+ request,
532
+ readBlockTag: context.mode === "simulate"
533
+ ? context.simulation.snapshot?.blockNumber
534
+ : undefined,
535
+ });
536
+ const deployment = deploymentForRole(prepared.plan, "contract");
537
+ (0, create2_1.assertCreate2AddressPolicy)(contractName, deployment.address, effectiveCreate2);
538
+ if (existingResolution.existingAddress
539
+ && deployment.address.toLowerCase() === existingResolution.existingAddress.toLowerCase()) {
540
+ throw new Error(`Deploy step ${step.id} redeploy predicted the existing address`);
541
+ }
542
+ const gateTool = gateToolChange(context, prepared.planPath, prepared.plan);
543
+ preparedChange = {
544
+ ...preparedChange,
545
+ salt: effectiveCreate2.salt,
546
+ expectedAddress: effectiveCreate2.expectedAddress,
547
+ previousAddress: existingResolution.existingAddress,
548
+ redeployReason: existingResolution.redeployReason,
549
+ predictedAddress: deployment.address,
550
+ gateTool,
551
+ };
552
+ recorder?.prepare(preparedChange);
553
+ if (context.mode === "execute") {
554
+ recorder?.stageAddressCandidate(preparedChange, deployment.address);
555
+ }
556
+ const execution = await runGateToolControlledMulticall(context, step, effectiveCreate2, prepared.plan.transactions);
557
+ if (!execution.external) {
558
+ await assertDeployedCode(contractName, deployment.address);
559
+ }
560
+ if (context.mode === "execute" && !execution.external) {
561
+ recorder?.applyAddress({
562
+ ...preparedChange,
563
+ address: deployment.address,
564
+ txHash: execution.txHash,
565
+ reused: deployment.status === "reused",
566
+ alreadyDeployed: deployment.status === "reused",
567
+ }, deployment.address);
568
+ }
569
+ context.state.set(saveAs, {
570
+ address: deployment.address,
571
+ predictedAddress: deployment.address,
572
+ txHash: execution.txHash,
573
+ external: execution.external,
574
+ alreadyDeployed: deployment.status === "reused",
575
+ });
576
+ context.reporter.result("execution", {
577
+ stepId: step.id,
578
+ kind: step.kind,
579
+ mode: execution.external ? "external" : context.mode,
580
+ transactionId: execution.transactionId,
581
+ contract: contractName,
582
+ actualContract,
583
+ saveAs,
584
+ contractInfoKey: registryKey,
585
+ strategy: "create2",
586
+ scheme: prepared.plan.scheme,
587
+ address: deployment.address,
588
+ predictedAddress: deployment.address,
589
+ reused: deployment.status === "reused",
590
+ alreadyDeployed: deployment.status === "reused",
591
+ txHash: execution.txHash,
592
+ gateToolPlan: gateTool.outputPath,
593
+ });
594
+ };
595
+ exports.runDeployStep = runDeployStep;
596
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../runtime/workflow/steps/deploy.ts"],"names":[],"mappings":";;;;;;AAAA,0EAAmF;AACnF,gDAAwB;AACxB,yDAAuD;AAQvD,kDAK2B;AAC3B,oDAI4B;AAE5B,4CAMwB;AACxB,4DAAkE;AAClE,4CAA0D;AAC1D,sCAAqE;AACrE,wCAIsB;AACtB,gDAAsE;AACtE,0CAAoE;AACpE,8CAA0D;AAC1D,sDAAuD;AACvD,0EAAwE;AAExE,MAAM,gBAAgB,GAAG,CACvB,OAAwB,EACxB,KAAc,EACL,EAAE,CAAC,IAAA,yBAAY,EAAC,KAAK,EAAE;IAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,MAAM,EAAE,OAAO,CAAC,YAAY;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;CACrB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CACnB,OAAwB,EACxB,KAAc,EACd,KAAa,EACF,EAAE;IACb,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,2BAA2B,CAAC,CAAC;IACnF,OAAO,QAAQ,CAAC;AAClB,CAAC,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CAAC,MAAM,KAAK,QAAQ;YACtC,eAAe,EAAE,UAAU,CAAC,MAAM,KAAK,QAAQ;SAChD,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE;QACxB,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,gBAAgB,EAAE,UAAU,CAAC,OAAO;QACpC,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,eAAe,EAAE,UAAU,CAAC,MAAM,KAAK,QAAQ;KAChD,CAAC,CAAC;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;QACnC,MAAM,EAAE,IAAI,CAAC,EAAE;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;QACpD,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,QAAQ,EAAE,YAAY;QACtB,cAAc;QACd,MAAM;QACN,eAAe,EAAE,WAAW;QAC5B,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,gBAAgB,EAAE,UAAU,CAAC,OAAO;QACpC,MAAM,EAAE,UAAU,CAAC,MAAM,KAAK,QAAQ;QACtC,eAAe,EAAE,UAAU,CAAC,MAAM,KAAK,QAAQ;QAC/C,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,YAAY,EAAE,QAAQ,CAAC,UAAU;KAClC,CAAC,CAAC;AACL,CAAC,CAAC;AA7XW,QAAA,aAAa,iBA6XxB"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowStep } from "../lib/parameters";
2
+ import type { WorkflowContext } from "../run";
3
+ export declare const runUpgradeStep: (context: WorkflowContext, step: WorkflowStep) => Promise<void>;