gate-evm-tools 1.0.26 → 1.0.27

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