@layerzerolabs/dw-model 0.2.13 → 0.2.18

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 (105) hide show
  1. package/.turbo/turbo-build.log +74 -65
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/.turbo/turbo-test.log +2 -2
  4. package/dist/AB7BJRWS.js +63 -0
  5. package/dist/AB7BJRWS.js.map +1 -0
  6. package/dist/{722WUAS6.cjs → EXN4H4R3.cjs} +25 -25
  7. package/dist/EXN4H4R3.cjs.map +1 -0
  8. package/dist/HW27MZCG.js +61 -0
  9. package/dist/HW27MZCG.js.map +1 -0
  10. package/dist/{EQTOSW62.js → I5L5NLZY.js} +3 -3
  11. package/dist/{EQTOSW62.js.map → I5L5NLZY.js.map} +1 -1
  12. package/dist/NLDQ72XO.js +3 -0
  13. package/dist/NLDQ72XO.js.map +1 -0
  14. package/dist/QLEJL4UB.cjs +54 -0
  15. package/dist/QLEJL4UB.cjs.map +1 -0
  16. package/dist/{U463T6CN.js → RDYET6CZ.js} +3 -3
  17. package/dist/RDYET6CZ.js.map +1 -0
  18. package/dist/{UU3GEL4Y.js → RLVC22JB.js} +4 -13
  19. package/dist/RLVC22JB.js.map +1 -0
  20. package/dist/{PP5TDTMN.cjs → SRUGZSZY.cjs} +4 -13
  21. package/dist/SRUGZSZY.cjs.map +1 -0
  22. package/dist/TY2SXEDC.cjs +4 -0
  23. package/dist/TY2SXEDC.cjs.map +1 -0
  24. package/dist/{YAFQX433.js → UE2N6Q3B.js} +3 -3
  25. package/dist/UE2N6Q3B.js.map +1 -0
  26. package/dist/VZP4VEYJ.cjs +73 -0
  27. package/dist/VZP4VEYJ.cjs.map +1 -0
  28. package/dist/WP2E3P7I.cjs +80 -0
  29. package/dist/WP2E3P7I.cjs.map +1 -0
  30. package/dist/{W3NEISER.cjs → WYAGX6NX.cjs} +3 -3
  31. package/dist/WYAGX6NX.cjs.map +1 -0
  32. package/dist/{RMW3UTVK.js → ZQQ6EIFU.js} +12 -44
  33. package/dist/ZQQ6EIFU.js.map +1 -0
  34. package/dist/ZTLVAMWX.cjs +112 -0
  35. package/dist/ZTLVAMWX.cjs.map +1 -0
  36. package/dist/deploy/artifact.cjs +45 -0
  37. package/dist/deploy/artifact.cjs.map +1 -0
  38. package/dist/deploy/artifact.d.ts +86 -0
  39. package/dist/deploy/artifact.d.ts.map +1 -0
  40. package/dist/deploy/artifact.js +4 -0
  41. package/dist/deploy/artifact.js.map +1 -0
  42. package/dist/deploy/index.cjs +81 -64
  43. package/dist/deploy/index.d.ts +1 -0
  44. package/dist/deploy/index.d.ts.map +1 -1
  45. package/dist/deploy/index.js +6 -5
  46. package/dist/deploy/resourceBuilder.cjs +2 -2
  47. package/dist/deploy/resourceBuilder.d.ts +4 -4
  48. package/dist/deploy/resourceBuilder.d.ts.map +1 -1
  49. package/dist/deploy/resourceBuilder.js +1 -1
  50. package/dist/deploy/resources.cjs +26 -26
  51. package/dist/deploy/resources.d.ts +28 -30
  52. package/dist/deploy/resources.d.ts.map +1 -1
  53. package/dist/deploy/resources.js +2 -2
  54. package/dist/deploy/workflow.cjs +17 -36
  55. package/dist/deploy/workflow.d.ts +58 -461
  56. package/dist/deploy/workflow.d.ts.map +1 -1
  57. package/dist/deploy/workflow.js +2 -1
  58. package/dist/index.cjs +110 -93
  59. package/dist/index.js +8 -7
  60. package/dist/role-management/index.cjs +19 -19
  61. package/dist/role-management/index.js +1 -1
  62. package/dist/role-management/schemata.cjs +6 -6
  63. package/dist/role-management/schemata.d.ts +1 -1
  64. package/dist/role-management/schemata.d.ts.map +1 -1
  65. package/dist/role-management/schemata.js +1 -1
  66. package/dist/upgrade/index.cjs +10 -10
  67. package/dist/upgrade/index.js +1 -1
  68. package/dist/upgrade/types.cjs +10 -10
  69. package/dist/upgrade/types.d.ts +2 -2
  70. package/dist/upgrade/types.d.ts.map +1 -1
  71. package/dist/upgrade/types.js +1 -1
  72. package/dist/wire/index.cjs +6 -6
  73. package/dist/wire/index.js +1 -1
  74. package/dist/wire/schemata.cjs +6 -6
  75. package/dist/wire/schemata.d.ts +3 -3
  76. package/dist/wire/schemata.d.ts.map +1 -1
  77. package/dist/wire/schemata.js +1 -1
  78. package/package.json +10 -9
  79. package/src/deploy/artifact.ts +93 -0
  80. package/src/deploy/index.ts +1 -0
  81. package/src/deploy/resourceBuilder.ts +7 -16
  82. package/src/deploy/resources.ts +95 -77
  83. package/src/deploy/workflow.ts +31 -57
  84. package/src/role-management/schemata.ts +1 -1
  85. package/src/upgrade/types.ts +1 -1
  86. package/src/wire/schemata.ts +1 -1
  87. package/dist/5KVLMWQW.cjs +0 -54
  88. package/dist/5KVLMWQW.cjs.map +0 -1
  89. package/dist/722WUAS6.cjs.map +0 -1
  90. package/dist/JEBKWD5F.js +0 -40
  91. package/dist/JEBKWD5F.js.map +0 -1
  92. package/dist/MLHJKQTG.cjs +0 -59
  93. package/dist/MLHJKQTG.cjs.map +0 -1
  94. package/dist/N5NQRAA2.js +0 -3
  95. package/dist/N5NQRAA2.js.map +0 -1
  96. package/dist/OKS5GGII.cjs +0 -149
  97. package/dist/OKS5GGII.cjs.map +0 -1
  98. package/dist/PP5TDTMN.cjs.map +0 -1
  99. package/dist/RMW3UTVK.js.map +0 -1
  100. package/dist/U463T6CN.js.map +0 -1
  101. package/dist/UU3GEL4Y.js.map +0 -1
  102. package/dist/W3NEISER.cjs.map +0 -1
  103. package/dist/YAFQX433.js.map +0 -1
  104. package/dist/ZQEYO4LO.cjs +0 -4
  105. package/dist/ZQEYO4LO.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/wire/schemata.ts"],"names":["wireWorkflowFilterArgsSchema","onlyFrom","z","array","enum","ChainName","optional","describe","onlyTo","excludeFrom","excludeTo","onlyOperations","string","excludeOperations","wireWorkflowChainResultSchema","object","results","union","name","success","literal","error","txHash","wireWorkflowChainStateSchema","extend","srcChain","status","default","wireWorkflowOrchestratorResultSchema","stateByChain","partialRec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,MAAAA,KAAAA,EAAOnB,MAAEU,MAAAA;KACb,CAAA;AACAV,IAAAA,KAAAA,CAAEa,MAAAA,CAAO;AACLG,MAAAA,IAAAA,EAAMhB,MAAEU,MAAAA,EAAM;MACdO,OAAAA,EAASjB,KAAAA,CAAEkB,QAAQ,IAAA,CAAA;AACnBE,MAAAA,MAAAA,EAAQpB,MAAEU,MAAAA;KACd;GACH,CAAA;AAET,CAAA;AAEO,IAAMW,4BAAAA,GAA+BT,8BAA8BU,MAAAA,CAAO;AAC7EC,EAAAA,QAAAA,EAAUvB,KAAAA,CAAEE,IAAAA,CAAKC,8BAAAA,CAAAA,CAAWC,QAAAA,EAAQ;AACpCoB,EAAAA,MAAAA,EAAQxB,MAAEe,KAAAA,CAAM;AAACf,IAAAA,KAAAA,CAAEkB,QAAQ,SAAA,CAAA;AAAYlB,IAAAA,KAAAA,CAAEkB,QAAQ,UAAA;AAAY,GAAA,CAAA,CAAEO,QAAQ,SAAA;AAC3E,CAAA;AAKO,IAAMC,oCAAAA,GAAuC1B,MAAEa,MAAAA,CAAO;EACzDc,YAAAA,EAAc3B,KAAAA,CAAE4B,aAAAA,CAAc5B,KAAAA,CAAEE,IAAAA,CAAKC,8BAAAA,GAAYS,6BAAAA,CAAAA,CAA+Ba,OAAAA,CAAQ,EAAC;AAC7F,CAAA;AAEO,IAAMI,mCAAAA,GAAsCH,qCAAqCJ,MAAAA,CAAO;AAC3FE,EAAAA,MAAAA,EAAQxB,MAAEe,KAAAA,CAAM;AAACf,IAAAA,KAAAA,CAAEkB,QAAQ,SAAA,CAAA;AAAYlB,IAAAA,KAAAA,CAAEkB,QAAQ,UAAA;AAAY,GAAA,CAAA,CAAEO,QAAQ,SAAA;AAC3E,CAAA","file":"QLEJL4UB.cjs","sourcesContent":["import { z } from 'zod';\n\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\n\nexport const wireWorkflowFilterArgsSchema = {\n // chain filters\n onlyFrom: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Only wire pathways originating FROM these chains'),\n onlyTo: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Only wire pathways going TO these chains'),\n excludeFrom: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Exclude wiring pathways originating FROM these chains'),\n excludeTo: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Exclude wiring pathways going TO these chains'),\n\n // operation filters\n onlyOperations: z.array(z.string()).optional().describe('Only perform these operations'),\n excludeOperations: z.array(z.string()).optional().describe('Exclude these operations'),\n};\n\nexport const wireWorkflowChainResultSchema = z.object({\n results: z.array(\n z.union([\n z.object({\n name: z.string(),\n success: z.literal(false),\n error: z.string(),\n }),\n z.object({\n name: z.string(),\n success: z.literal(true),\n txHash: z.string(),\n }),\n ]),\n ),\n});\n\nexport const wireWorkflowChainStateSchema = wireWorkflowChainResultSchema.extend({\n srcChain: z.enum(ChainName).optional(),\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type WireWorkflowChainState = z.infer<typeof wireWorkflowChainStateSchema>;\nexport type WireWorkflowChainResult = z.infer<typeof wireWorkflowChainResultSchema>;\n\nexport const wireWorkflowOrchestratorResultSchema = z.object({\n stateByChain: z.partialRecord(z.enum(ChainName), wireWorkflowChainResultSchema).default({}),\n});\n\nexport const wireWorkflowOrchestratorStateSchema = wireWorkflowOrchestratorResultSchema.extend({\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type WireWorkflowOrchestratorState = z.infer<typeof wireWorkflowOrchestratorStateSchema>;\nexport type WireWorkflowOrchestratorResult = z.infer<typeof wireWorkflowOrchestratorResultSchema>;\n"]}
@@ -1,4 +1,4 @@
1
- import z from 'zod/v4';
1
+ import z from 'zod';
2
2
 
3
3
  // src/upgrade/types.ts
4
4
  var UpgradeType = /* @__PURE__ */ (function(UpgradeType2) {
@@ -34,5 +34,5 @@ var upgradeableConfigSchema = z.discriminatedUnion("upgradeType", [
34
34
  ]);
35
35
 
36
36
  export { EvmProxyType, ProxyType, UpgradeType, codeUpgradeableConfigSchema, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, upgradeTypeSchema, upgradeableConfigSchema };
37
- //# sourceMappingURL=U463T6CN.js.map
38
- //# sourceMappingURL=U463T6CN.js.map
37
+ //# sourceMappingURL=RDYET6CZ.js.map
38
+ //# sourceMappingURL=RDYET6CZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/upgrade/types.ts"],"names":["UpgradeType","EvmProxyType","ProxyType","upgradeTypeSchema","z","enum","proxyTypeSchema","proxyConfigSchema","object","upgradeType","literal","proxyType","notUpgradeableConfigSchema","codeUpgradeableConfigSchema","upgradeableConfigSchema","discriminatedUnion"],"mappings":";;;AAEO,IAAKA,WAAAA,6BAAAA,YAAAA,EAAAA;;;;AAAAA,EAAAA,OAAAA,YAAAA;;AASL,IAAKC,YAAAA,6BAAAA,aAAAA,EAAAA;;;AAAAA,EAAAA,OAAAA,aAAAA;;AAOL,IAAMC,SAAAA,GAAY;EACrB,GAAGD;AACP;AAIO,IAAME,iBAAAA,GAAoBC,CAAAA,CAAEC,IAAAA,CAAKL,WAAAA;AAEjC,IAAMM,eAAAA,GAAkBF,CAAAA,CAAEC,IAAAA,CAAKH,SAAAA;AAC/B,IAAMK,iBAAAA,GAAoBH,EAAEI,MAAAA,CAAO;EACtCC,WAAAA,EAAaL,CAAAA,CAAEM,QAAO,OAAA,CAAA;EACtBC,SAAAA,EAAWL;AACf,CAAA;AAIO,IAAMM,0BAAAA,GAA6BR,EAAEI,MAAAA,CAAO;EAC/CC,WAAAA,EAAaL,CAAAA,CAAEM,QAAO,iBAAA;AAC1B,CAAA;AAIO,IAAMG,2BAAAA,GAA8BT,EAAEI,MAAAA,CAAO;EAChDC,WAAAA,EAAaL,CAAAA,CAAEM,QAAO,cAAA;AAC1B,CAAA;AAIO,IAAMI,uBAAAA,GAA0BV,CAAAA,CAAEW,kBAAAA,CAAmB,aAAA,EAAe;AACvER,EAAAA,iBAAAA;AACAK,EAAAA,0BAAAA;AACAC,EAAAA;AACH,CAAA","file":"RDYET6CZ.js","sourcesContent":["import z from 'zod';\n\nexport enum UpgradeType {\n // This doesn't necessarily prevent the contract from being upgraded\n NOT_UPGRADEABLE = 'NOT_UPGRADEABLE',\n // Deploy a separate 'proxy' contract that will route calls to a swappable implementation\n PROXY = 'PROXY',\n // This doesn't necessarily allow the contract to be upgraded\n CODE_UPGRADE = 'CODE_UPGRADE',\n}\n\nexport enum EvmProxyType {\n // TUP https://docs.openzeppelin.com/contracts/5.x/api/proxy#transparentupgradeableproxy\n TRANSPARENT_UPGRADEABLE = 'TRANSPARENT_UPGRADEABLE',\n // UUPS https://docs.openzeppelin.com/contracts/5.x/api/proxy#uupsupgradeable\n UNIVERSAL_UPGRADEABLE = 'UNIVERSAL_UPGRADEABLE',\n}\n\nexport const ProxyType = {\n ...EvmProxyType,\n};\n\nexport type ProxyType = (typeof ProxyType)[keyof typeof ProxyType];\n\nexport const upgradeTypeSchema = z.enum(UpgradeType);\n\nexport const proxyTypeSchema = z.enum(ProxyType);\nexport const proxyConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.PROXY),\n proxyType: proxyTypeSchema,\n});\n\nexport type ProxyUpgradeableConfig = z.infer<typeof proxyConfigSchema>;\n\nexport const notUpgradeableConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.NOT_UPGRADEABLE),\n});\n\nexport type NotUpgradeableConfig = z.infer<typeof notUpgradeableConfigSchema>;\n\nexport const codeUpgradeableConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.CODE_UPGRADE),\n});\n\nexport type CodeUpgradeableConfig = z.infer<typeof codeUpgradeableConfigSchema>;\n\nexport const upgradeableConfigSchema = z.discriminatedUnion('upgradeType', [\n proxyConfigSchema,\n notUpgradeableConfigSchema,\n codeUpgradeableConfigSchema,\n]);\n\nexport type UpgradeableConfig = z.infer<typeof upgradeableConfigSchema>;\n"]}
@@ -4,11 +4,7 @@ import { __name } from './VUOMXK5T.js';
4
4
  var createResourceBuilder = /* @__PURE__ */ __name((_resourceSchema, { resourceBaseType, type }) => (resource) => {
5
5
  if (resourceBaseType === "CONTRACT") {
6
6
  return {
7
- id: {
8
- __CONTRACT_RESOURCE_DEPENDENCY: true,
9
- __dependencyType: null,
10
- id: resource.id
11
- },
7
+ ref: /* @__PURE__ */ __name(() => `#C_REF:${resource.id}`, "ref"),
12
8
  build: /* @__PURE__ */ __name(() => ({
13
9
  ...resource,
14
10
  type,
@@ -18,12 +14,7 @@ var createResourceBuilder = /* @__PURE__ */ __name((_resourceSchema, { resourceB
18
14
  }
19
15
  if (resourceBaseType === "MESH") {
20
16
  return {
21
- id: {
22
- __MESH_RESOURCE_DEPENDENCY: true,
23
- // this is just a type brand, doesnt need to exist
24
- __dependencyType: null,
25
- id: resource.id
26
- },
17
+ ref: /* @__PURE__ */ __name(() => `#M_REF:${resource.id}`, "ref"),
27
18
  build: /* @__PURE__ */ __name(() => ({
28
19
  ...resource,
29
20
  type,
@@ -35,5 +26,5 @@ var createResourceBuilder = /* @__PURE__ */ __name((_resourceSchema, { resourceB
35
26
  }, "createResourceBuilder");
36
27
 
37
28
  export { createResourceBuilder };
38
- //# sourceMappingURL=UU3GEL4Y.js.map
39
- //# sourceMappingURL=UU3GEL4Y.js.map
29
+ //# sourceMappingURL=RLVC22JB.js.map
30
+ //# sourceMappingURL=RLVC22JB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deploy/resourceBuilder.ts"],"names":["createResourceBuilder","_resourceSchema","resourceBaseType","type","resource","ref","id","build","Error"],"mappings":";;;AAoBO,IAAMA,qBAAAA,2BAELC,eAAAA,EACA,EACIC,kBACAC,IAAAA,EAAI,KAMZ,CACIC,QAAAA,KAAAA;AAMA,EAAA,IAAIF,qBAAqB,UAAA,EAAY;AACjC,IAAA,OAAO;AACHG,MAAAA,GAAAA,kBAAK,MAAA,CAAA,MAAM,CAAA,OAAA,EAAUD,QAAAA,CAASE,EAAE,CAAA,CAAA,EAA3B,KAAA,CAAA;AACLC,MAAAA,KAAAA,kBAAO,MAAA,CAAA,OAAO;QAAE,GAAGH,QAAAA;AAAUD,QAAAA,IAAAA;AAAMD,QAAAA;OAAiB,CAAA,EAA7C,OAAA;AACX,KAAA;AACJ,EAAA;AACA,EAAA,IAAIA,qBAAqB,MAAA,EAAQ;AAC7B,IAAA,OAAO;AACHG,MAAAA,GAAAA,kBAAK,MAAA,CAAA,MAAM,CAAA,OAAA,EAAUD,QAAAA,CAASE,EAAE,CAAA,CAAA,EAA3B,KAAA,CAAA;AACLC,MAAAA,KAAAA,kBAAO,MAAA,CAAA,OAAO;QAAE,GAAGH,QAAAA;AAAUD,QAAAA,IAAAA;AAAMD,QAAAA;OAAiB,CAAA,EAA7C,OAAA;AACX,KAAA;AACJ,EAAA;AAEA,EAAA,MAAM,IAAIM,KAAAA,CAAM,CAAA,8BAAA,EAAiCN,gBAAAA,CAAAA,CAAAA,CAAmB,CAAA;AACxE,CAAA,EA/BA,uBAAA","file":"RLVC22JB.js","sourcesContent":["import type { z } from 'zod';\n\nimport type {\n BaseContractResource,\n BaseMeshResource,\n baseResourceSchema,\n ContractResourceReference,\n MeshResourceReference,\n} from './resources';\n\nexport type ContractResourceBuilderResult<Resource extends BaseContractResource> = {\n ref: () => ContractResourceReference<Resource>;\n build: () => Resource;\n};\n\nexport type MeshResourceBuilderResult<Resource extends BaseMeshResource> = {\n ref: () => MeshResourceReference<Resource>;\n build: () => Resource;\n};\n\nexport const createResourceBuilder =\n <T extends typeof baseResourceSchema, U extends Omit<z.infer<T>, 'type' | 'resourceBaseType'>>(\n _resourceSchema: T,\n {\n resourceBaseType,\n type,\n }: {\n resourceBaseType: 'CONTRACT' | 'MESH';\n type: T['shape'] extends { type: z.ZodType<infer Type> } ? Type : undefined;\n },\n ) =>\n (\n resource: U,\n ): z.infer<T> extends BaseContractResource\n ? ContractResourceBuilderResult<z.infer<T>>\n : z.infer<T> extends BaseMeshResource\n ? MeshResourceBuilderResult<z.infer<T>>\n : never => {\n if (resourceBaseType === 'CONTRACT') {\n return {\n ref: () => `#C_REF:${resource.id}` as any,\n build: () => ({ ...resource, type, resourceBaseType }),\n } satisfies ContractResourceBuilderResult<any> as any;\n }\n if (resourceBaseType === 'MESH') {\n return {\n ref: () => `#M_REF:${resource.id}` as any,\n build: () => ({ ...resource, type, resourceBaseType }),\n } satisfies MeshResourceBuilderResult<any> as any;\n }\n\n throw new Error(`Can't handle resouceBaseType \"${resourceBaseType}\"`);\n };\n"]}
@@ -6,11 +6,7 @@ var YJF4D23A_cjs = require('./YJF4D23A.cjs');
6
6
  var createResourceBuilder = /* @__PURE__ */ YJF4D23A_cjs.__name((_resourceSchema, { resourceBaseType, type }) => (resource) => {
7
7
  if (resourceBaseType === "CONTRACT") {
8
8
  return {
9
- id: {
10
- __CONTRACT_RESOURCE_DEPENDENCY: true,
11
- __dependencyType: null,
12
- id: resource.id
13
- },
9
+ ref: /* @__PURE__ */ YJF4D23A_cjs.__name(() => `#C_REF:${resource.id}`, "ref"),
14
10
  build: /* @__PURE__ */ YJF4D23A_cjs.__name(() => ({
15
11
  ...resource,
16
12
  type,
@@ -20,12 +16,7 @@ var createResourceBuilder = /* @__PURE__ */ YJF4D23A_cjs.__name((_resourceSchema
20
16
  }
21
17
  if (resourceBaseType === "MESH") {
22
18
  return {
23
- id: {
24
- __MESH_RESOURCE_DEPENDENCY: true,
25
- // this is just a type brand, doesnt need to exist
26
- __dependencyType: null,
27
- id: resource.id
28
- },
19
+ ref: /* @__PURE__ */ YJF4D23A_cjs.__name(() => `#M_REF:${resource.id}`, "ref"),
29
20
  build: /* @__PURE__ */ YJF4D23A_cjs.__name(() => ({
30
21
  ...resource,
31
22
  type,
@@ -37,5 +28,5 @@ var createResourceBuilder = /* @__PURE__ */ YJF4D23A_cjs.__name((_resourceSchema
37
28
  }, "createResourceBuilder");
38
29
 
39
30
  exports.createResourceBuilder = createResourceBuilder;
40
- //# sourceMappingURL=PP5TDTMN.cjs.map
41
- //# sourceMappingURL=PP5TDTMN.cjs.map
31
+ //# sourceMappingURL=SRUGZSZY.cjs.map
32
+ //# sourceMappingURL=SRUGZSZY.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deploy/resourceBuilder.ts"],"names":["createResourceBuilder","_resourceSchema","resourceBaseType","type","resource","ref","__name","id","build","Error"],"mappings":";;;;;AAoBO,IAAMA,qBAAAA,wCAELC,eAAAA,EACA,EACIC,kBACAC,IAAAA,EAAI,KAMZ,CACIC,QAAAA,KAAAA;AAMA,EAAA,IAAIF,qBAAqB,UAAA,EAAY;AACjC,IAAA,OAAO;AACHG,MAAAA,GAAAA,kBAAKC,mBAAA,CAAA,MAAM,CAAA,OAAA,EAAUF,QAAAA,CAASG,EAAE,CAAA,CAAA,EAA3B,KAAA,CAAA;AACLC,MAAAA,KAAAA,kBAAOF,mBAAA,CAAA,OAAO;QAAE,GAAGF,QAAAA;AAAUD,QAAAA,IAAAA;AAAMD,QAAAA;OAAiB,CAAA,EAA7C,OAAA;AACX,KAAA;AACJ,EAAA;AACA,EAAA,IAAIA,qBAAqB,MAAA,EAAQ;AAC7B,IAAA,OAAO;AACHG,MAAAA,GAAAA,kBAAKC,mBAAA,CAAA,MAAM,CAAA,OAAA,EAAUF,QAAAA,CAASG,EAAE,CAAA,CAAA,EAA3B,KAAA,CAAA;AACLC,MAAAA,KAAAA,kBAAOF,mBAAA,CAAA,OAAO;QAAE,GAAGF,QAAAA;AAAUD,QAAAA,IAAAA;AAAMD,QAAAA;OAAiB,CAAA,EAA7C,OAAA;AACX,KAAA;AACJ,EAAA;AAEA,EAAA,MAAM,IAAIO,KAAAA,CAAM,CAAA,8BAAA,EAAiCP,gBAAAA,CAAAA,CAAAA,CAAmB,CAAA;AACxE,CAAA,EA/BA,uBAAA","file":"SRUGZSZY.cjs","sourcesContent":["import type { z } from 'zod';\n\nimport type {\n BaseContractResource,\n BaseMeshResource,\n baseResourceSchema,\n ContractResourceReference,\n MeshResourceReference,\n} from './resources';\n\nexport type ContractResourceBuilderResult<Resource extends BaseContractResource> = {\n ref: () => ContractResourceReference<Resource>;\n build: () => Resource;\n};\n\nexport type MeshResourceBuilderResult<Resource extends BaseMeshResource> = {\n ref: () => MeshResourceReference<Resource>;\n build: () => Resource;\n};\n\nexport const createResourceBuilder =\n <T extends typeof baseResourceSchema, U extends Omit<z.infer<T>, 'type' | 'resourceBaseType'>>(\n _resourceSchema: T,\n {\n resourceBaseType,\n type,\n }: {\n resourceBaseType: 'CONTRACT' | 'MESH';\n type: T['shape'] extends { type: z.ZodType<infer Type> } ? Type : undefined;\n },\n ) =>\n (\n resource: U,\n ): z.infer<T> extends BaseContractResource\n ? ContractResourceBuilderResult<z.infer<T>>\n : z.infer<T> extends BaseMeshResource\n ? MeshResourceBuilderResult<z.infer<T>>\n : never => {\n if (resourceBaseType === 'CONTRACT') {\n return {\n ref: () => `#C_REF:${resource.id}` as any,\n build: () => ({ ...resource, type, resourceBaseType }),\n } satisfies ContractResourceBuilderResult<any> as any;\n }\n if (resourceBaseType === 'MESH') {\n return {\n ref: () => `#M_REF:${resource.id}` as any,\n build: () => ({ ...resource, type, resourceBaseType }),\n } satisfies MeshResourceBuilderResult<any> as any;\n }\n\n throw new Error(`Can't handle resouceBaseType \"${resourceBaseType}\"`);\n };\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=TY2SXEDC.cjs.map
4
+ //# sourceMappingURL=TY2SXEDC.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"TY2SXEDC.cjs"}
@@ -1,5 +1,5 @@
1
1
  import { __name } from './VUOMXK5T.js';
2
- import { z } from 'zod/v4';
2
+ import { z } from 'zod';
3
3
  import { transactionSchema, normalizedHexSchema } from '@layerzerolabs/common-chain-model';
4
4
  import { gatedTransactionSchema } from '@layerzerolabs/gated-transaction';
5
5
  import { functionSchema } from '@layerzerolabs/zod-utils';
@@ -60,5 +60,5 @@ var hasRoleWithSpecializedInputSchema = functionSchema({
60
60
  });
61
61
 
62
62
  export { createSetRoleTransactionsWithSpecializedInputSchema, generateCreateSetRoleTransactionsSchema, generateHasRoleSchema, generateRoleManagementSchemas, hasRoleWithSpecializedInputSchema };
63
- //# sourceMappingURL=YAFQX433.js.map
64
- //# sourceMappingURL=YAFQX433.js.map
63
+ //# sourceMappingURL=UE2N6Q3B.js.map
64
+ //# sourceMappingURL=UE2N6Q3B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/role-management/schemata.ts"],"names":["generateCreateSetRoleTransactionsSchema","roles","functionSchema","input","z","tuple","object","role","enum","accountAddress","normalizedHexSchema","shouldGrant","boolean","output","promise","gatedTransactionSchema","name","string","transactionSchema","array","generateHasRoleSchema","generateRoleManagementSchemas","createSetRoleTransactions","hasRole","createSetRoleTransactionsWithSpecializedInputSchema","address","hasRoleWithSpecializedInputSchema"],"mappings":";;;;;;AAMO,IAAMA,uCAAAA,mBAA0C,MAAA,CAAA,CAGnDC,KAAAA,KAEAC,cAAAA,CAAe;AACXC,EAAAA,KAAAA,EAAOC,EAAEC,KAAAA,CAAM;AACXD,IAAAA,CAAAA,CAAEE,MAAAA,CAAO;MACLC,IAAAA,EAAMH,CAAAA,CAAEI,KAAKP,KAAAA,CAAAA;MACbQ,cAAAA,EAAgBC,mBAAAA;AAChBC,MAAAA,WAAAA,EAAaP,EAAEQ,OAAAA;KACnB;AACH,GAAA,CAAA;EACDC,MAAAA,EAAQT,CAAAA,CAAEU,QACNC,sBAAAA,CAAuB;AACnBC,IAAAA,IAAAA,EAAMZ,EAAEa,MAAAA,EAAM;AACdC,IAAAA;GACJ,CAAA,CAAGC,OAAK;AAEhB,CAAA,CAAA,EAnBmD,yCAAA;AAqBhD,IAAMC,qBAAAA,mBAAwB,MAAA,CAAA,CAAiDnB,KAAAA,KAClFC,cAAAA,CAAe;AACXC,EAAAA,KAAAA,EAAOC,EAAEC,KAAAA,CAAM;AAC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,CAAA;AACDG,EAAAA,MAAAA,EAAQT,CAAAA,CAAEU,OAAAA,CAAQV,CAAAA,CAAEQ,OAAAA,EAAO;AAC/B,CAAA","file":"UE2N6Q3B.js","sourcesContent":["import { z } from 'zod';\n\nimport { normalizedHexSchema, transactionSchema } from '@layerzerolabs/common-chain-model';\nimport { gatedTransactionSchema } from '@layerzerolabs/gated-transaction';\nimport { functionSchema } from '@layerzerolabs/zod-utils';\n\nexport const generateCreateSetRoleTransactionsSchema = <\n const T extends readonly [string, ...string[]],\n>(\n roles: T,\n) =>\n functionSchema({\n input: z.tuple([\n z.object({\n role: z.enum(roles),\n accountAddress: normalizedHexSchema,\n shouldGrant: z.boolean(),\n }),\n ]),\n output: z.promise(\n gatedTransactionSchema({\n name: z.string(),\n transactionSchema: transactionSchema,\n }).array(),\n ),\n });\n\nexport const generateHasRoleSchema = <const T extends readonly [string, ...string[]]>(roles: T) =>\n functionSchema({\n input: z.tuple([\n z.object({\n role: z.enum(roles),\n accountAddress: normalizedHexSchema,\n }),\n ]),\n output: z.promise(z.boolean()),\n });\n\nexport const generateRoleManagementSchemas = <const T extends readonly [string, ...string[]]>(\n roles: T,\n) => ({\n createSetRoleTransactions: generateCreateSetRoleTransactionsSchema(roles),\n hasRole: generateHasRoleSchema(roles),\n});\n\nexport const createSetRoleTransactionsWithSpecializedInputSchema = functionSchema({\n input: z.tuple([\n z.object({\n address: normalizedHexSchema,\n }),\n z.object({\n role: z.string(),\n accountAddress: normalizedHexSchema,\n shouldGrant: z.boolean(),\n }),\n ]),\n output: z.promise(\n gatedTransactionSchema({\n name: z.string(),\n transactionSchema: transactionSchema,\n }).array(),\n ),\n});\n\nexport const hasRoleWithSpecializedInputSchema = functionSchema({\n input: z.tuple([\n z.object({\n address: normalizedHexSchema,\n }),\n z.object({\n role: z.string(),\n accountAddress: normalizedHexSchema,\n }),\n ]),\n output: z.promise(z.boolean()),\n});\n\nexport type CreateSetRoleTransactionsWithSpecializedInput = z.infer<\n typeof createSetRoleTransactionsWithSpecializedInputSchema\n>;\nexport type HasRoleWithSpecializedInput = z.infer<typeof hasRoleWithSpecializedInputSchema>;\n"]}
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ var zod = require('zod');
4
+ var commonChainModel = require('@layerzerolabs/common-chain-model');
5
+ var layerzeroDefinitions = require('@layerzerolabs/layerzero-definitions');
6
+
7
+ // src/deploy/artifact.ts
8
+ var ArtifactType = /* @__PURE__ */ (function(ArtifactType2) {
9
+ ArtifactType2["DEPLOYMENT"] = "deployment";
10
+ ArtifactType2["VERIFICATION"] = "verification";
11
+ ArtifactType2["METADATA"] = "metadata";
12
+ return ArtifactType2;
13
+ })({});
14
+ var solanaDeploymentArtifactExtraInfoSchema = zod.z.object({
15
+ accounts: zod.z.record(zod.z.string(), commonChainModel.normalizedHexSchema)
16
+ });
17
+ var suiDeploymentArtifactExtraInfoSchema = zod.z.object({
18
+ digest: zod.z.string(),
19
+ objectChanges: zod.z.array(zod.z.custom())
20
+ });
21
+ var identityOnlyDeploymentArtifactSchema = zod.z.object({
22
+ contractName: zod.z.string(),
23
+ chainName: zod.z.enum(layerzeroDefinitions.ChainName),
24
+ address: commonChainModel.normalizedHexSchema
25
+ });
26
+ var fullDeploymentArtifactSchema = zod.z.object({
27
+ ...identityOnlyDeploymentArtifactSchema.shape,
28
+ contractName: zod.z.string(),
29
+ chainName: zod.z.enum(layerzeroDefinitions.ChainName),
30
+ address: commonChainModel.normalizedHexSchema,
31
+ nativeAddress: zod.z.string(),
32
+ bytecodeHash: zod.z.string().optional(),
33
+ deploymentTimestamp: zod.z.number(),
34
+ deployerAddress: commonChainModel.normalizedHexSchema,
35
+ txHash: zod.z.string(),
36
+ // should probably remove this
37
+ abiEncodedConstructorArguments: commonChainModel.hexSchema.optional(),
38
+ extraDeploymentInfo: zod.z.any().optional()
39
+ });
40
+ var deploymentArtifactSchema = zod.z.union([
41
+ // check this first since it's a superset
42
+ fullDeploymentArtifactSchema,
43
+ identityOnlyDeploymentArtifactSchema
44
+ ]);
45
+ var verificationArtifactSchema = zod.z.any();
46
+ var metadataArtifactSchema = zod.z.void();
47
+ var artifactWithTypeSchema = zod.z.discriminatedUnion("artifactType", [
48
+ zod.z.object({
49
+ artifactType: zod.z.literal("deployment"),
50
+ artifact: deploymentArtifactSchema
51
+ }),
52
+ zod.z.object({
53
+ artifactType: zod.z.literal("verification"),
54
+ artifact: zod.z.any()
55
+ }),
56
+ zod.z.object({
57
+ artifactType: zod.z.literal("metadata"),
58
+ // not implemented yet
59
+ artifact: zod.z.never()
60
+ })
61
+ ]);
62
+
63
+ exports.ArtifactType = ArtifactType;
64
+ exports.artifactWithTypeSchema = artifactWithTypeSchema;
65
+ exports.deploymentArtifactSchema = deploymentArtifactSchema;
66
+ exports.fullDeploymentArtifactSchema = fullDeploymentArtifactSchema;
67
+ exports.identityOnlyDeploymentArtifactSchema = identityOnlyDeploymentArtifactSchema;
68
+ exports.metadataArtifactSchema = metadataArtifactSchema;
69
+ exports.solanaDeploymentArtifactExtraInfoSchema = solanaDeploymentArtifactExtraInfoSchema;
70
+ exports.suiDeploymentArtifactExtraInfoSchema = suiDeploymentArtifactExtraInfoSchema;
71
+ exports.verificationArtifactSchema = verificationArtifactSchema;
72
+ //# sourceMappingURL=VZP4VEYJ.cjs.map
73
+ //# sourceMappingURL=VZP4VEYJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deploy/artifact.ts"],"names":["ArtifactType","solanaDeploymentArtifactExtraInfoSchema","z","object","accounts","record","string","normalizedHexSchema","suiDeploymentArtifactExtraInfoSchema","digest","objectChanges","array","custom","identityOnlyDeploymentArtifactSchema","contractName","chainName","enum","ChainName","address","fullDeploymentArtifactSchema","shape","nativeAddress","bytecodeHash","optional","deploymentTimestamp","number","deployerAddress","txHash","abiEncodedConstructorArguments","hexSchema","extraDeploymentInfo","any","deploymentArtifactSchema","union","verificationArtifactSchema","metadataArtifactSchema","void","artifactWithTypeSchema","discriminatedUnion","artifactType","liter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,CAAE6B,GAAAA,EAAG,CAAGR,QAAAA;AACjC,CAAA;AAGO,IAAMS,wBAAAA,GAA2B9B,MAAE+B,KAAAA,CAAM;;AAE5Cd,EAAAA,4BAAAA;AACAN,EAAAA;AACH,CAAA;AAIM,IAAMqB,0BAAAA,GAA6BhC,MAAE6B,GAAAA;AAIrC,IAAMI,sBAAAA,GAAyBjC,MAAEkC,IAAAA;AAIjC,IAAMC,sBAAAA,GAAyBnC,KAAAA,CAAEoC,kBAAAA,CAAmB,cAAA,EAAgB;AACvEpC,EAAAA,KAAAA,CAAEC,MAAAA,CAAO;IACLoC,YAAAA,EAAcrC,KAAAA,CAAEsC,QAAO,YAAA,CAAA;IACvBC,QAAAA,EAAUT;GACd,CAAA;AACA9B,EAAAA,KAAAA,CAAEC,MAAAA,CAAO;IACLoC,YAAAA,EAAcrC,KAAAA,CAAEsC,QAAO,cAAA,CAAA;AACvBC,IAAAA,QAAAA,EAAUvC,MAAE6B,GAAAA;GAChB,CAAA;AACA7B,EAAAA,KAAAA,CAAEC,MAAAA,CAAO;IACLoC,YAAAA,EAAcrC,KAAAA,CAAEsC,QAAO,UAAA,CAAA;;AAEvBC,IAAAA,QAAAA,EAAUvC,MAAEwC,KAAAA;GAChB;AACH,CAAA","file":"VZP4VEYJ.cjs","sourcesContent":["import type { SuiObjectChange } from '@mysten/sui/client';\nimport { z } from 'zod';\n\nimport { hexSchema, normalizedHexSchema } from '@layerzerolabs/common-chain-model';\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\nexport type { ChainName };\n\nexport type { SuiObjectChange };\n\nexport enum ArtifactType {\n // should merge deployment, verification artifacts\n\n // full record from deployment on-chain\n DEPLOYMENT = 'deployment',\n // information to verify contracts\n VERIFICATION = 'verification',\n // record of a successful push to lz metadata\n METADATA = 'metadata',\n}\n\n// Chain-specific extra deployment info schemas\nexport const solanaDeploymentArtifactExtraInfoSchema = z.object({\n accounts: z.record(z.string(), normalizedHexSchema),\n});\n\nexport type SolanaDeploymentArtifactExtraInfo = z.infer<\n typeof solanaDeploymentArtifactExtraInfoSchema\n>;\n\nexport const suiDeploymentArtifactExtraInfoSchema = z.object({\n digest: z.string(),\n objectChanges: z.array(z.custom<SuiObjectChange>()),\n});\n\nexport type SuiDeploymentArtifactExtraInfo = z.infer<typeof suiDeploymentArtifactExtraInfoSchema>;\n\nexport const identityOnlyDeploymentArtifactSchema = z.object({\n contractName: z.string(),\n chainName: z.enum(ChainName),\n address: normalizedHexSchema,\n});\nexport type IdentityOnlyDeploymentArtifact = z.infer<typeof identityOnlyDeploymentArtifactSchema>;\n\n// FIXME also include verification info in this\nexport const fullDeploymentArtifactSchema = z.object({\n ...identityOnlyDeploymentArtifactSchema.shape,\n contractName: z.string(),\n chainName: z.enum(ChainName),\n address: normalizedHexSchema,\n nativeAddress: z.string(),\n bytecodeHash: z.string().optional(),\n deploymentTimestamp: z.number(),\n deployerAddress: normalizedHexSchema,\n txHash: z.string(),\n // should probably remove this\n abiEncodedConstructorArguments: hexSchema.optional(),\n extraDeploymentInfo: z.any().optional(),\n});\nexport type FullDeploymentArtifact = z.infer<typeof fullDeploymentArtifactSchema>;\n\nexport const deploymentArtifactSchema = z.union([\n // check this first since it's a superset\n fullDeploymentArtifactSchema,\n identityOnlyDeploymentArtifactSchema,\n]);\n\nexport type DeploymentArtifact = z.infer<typeof deploymentArtifactSchema>;\n\nexport const verificationArtifactSchema = z.any();\n\nexport type VerificationArtifact = z.infer<typeof verificationArtifactSchema>;\n\nexport const metadataArtifactSchema = z.void();\n\nexport type MetadataArtifact = z.infer<typeof metadataArtifactSchema>;\n\nexport const artifactWithTypeSchema = z.discriminatedUnion('artifactType', [\n z.object({\n artifactType: z.literal(ArtifactType.DEPLOYMENT),\n artifact: deploymentArtifactSchema,\n }),\n z.object({\n artifactType: z.literal(ArtifactType.VERIFICATION),\n artifact: z.any(),\n }),\n z.object({\n artifactType: z.literal(ArtifactType.METADATA),\n // not implemented yet\n artifact: z.never(),\n }),\n]);\n\nexport type ArtifactWithType = z.infer<typeof artifactWithTypeSchema>;\n"]}
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var WYAGX6NX_cjs = require('./WYAGX6NX.cjs');
4
+ var YJF4D23A_cjs = require('./YJF4D23A.cjs');
5
+ var z = require('zod');
6
+ var commonErrorUtils = require('@layerzerolabs/common-error-utils');
7
+ var layerzeroDefinitions = require('@layerzerolabs/layerzero-definitions');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var z__default = /*#__PURE__*/_interopDefault(z);
12
+
13
+ var baseResourceSchema = z__default.default.object({
14
+ id: z__default.default.string(),
15
+ name: z__default.default.string().optional(),
16
+ resourceBaseType: z__default.default.string()
17
+ });
18
+ var baseMeshResourceSchema = z__default.default.object({
19
+ ...baseResourceSchema.shape,
20
+ resourceBaseType: z__default.default.literal("MESH")
21
+ });
22
+ var baseContractResourceSchema = z__default.default.object({
23
+ ...baseResourceSchema.shape,
24
+ resourceBaseType: z__default.default.literal("CONTRACT"),
25
+ chainName: z__default.default.enum(layerzeroDefinitions.ChainName),
26
+ upgradeConfig: WYAGX6NX_cjs.upgradeableConfigSchema.optional(),
27
+ verifyContract: z__default.default.boolean().optional(),
28
+ chainConfig: z__default.default.any().optional()
29
+ });
30
+ var extractIdFromContractResourceReference = /* @__PURE__ */ YJF4D23A_cjs.__name((ref) => ref.startsWith("#C_REF:") && ref.slice("#C_REF:".length) || commonErrorUtils.throwError(`Ref ${JSON.stringify(ref)} is not a contract resource ref`), "extractIdFromContractResourceReference");
31
+ var contractResourceReferenceSchema = z__default.default.string().meta({
32
+ id: "contract-resource-dependency",
33
+ title: "Contract dependency to any",
34
+ description: "A reference to another contract resource (any)"
35
+ });
36
+ var contractResourceDependencyForSchemaZodMetaIdIdx = 0;
37
+ var contractResourceReferenceSchemaFor = /* @__PURE__ */ YJF4D23A_cjs.__name((_resource) => z__default.default.string().meta({
38
+ id: `contract-resource-dependency-for-${++contractResourceDependencyForSchemaZodMetaIdIdx}`,
39
+ // we can't generate this properly yet because this function needs more information
40
+ // will be fixed when we clean up the runtime of dependencies id
41
+ title: "Contract dependency to (unknown)",
42
+ description: "A reference to another contract resource (unknown)"
43
+ }), "contractResourceReferenceSchemaFor");
44
+ var resolvedContractResourceReferenceSchema = (
45
+ // FIXME could be a real schema
46
+ z__default.default.custom()
47
+ );
48
+ var meshResourceReferenceSchema = z__default.default.string().meta({
49
+ id: "mesh-resource-dependency",
50
+ title: "Mesh dependency to any",
51
+ description: "A reference to another mesh resource (any)"
52
+ });
53
+ var meshResourceDependencyForSchemaZodMetaIdIdx = 0;
54
+ var meshResourceReferenceSchemaFor = /* @__PURE__ */ YJF4D23A_cjs.__name((_resource) => z__default.default.string().meta({
55
+ id: `mesh-resource-dependency-for-${++meshResourceDependencyForSchemaZodMetaIdIdx}`,
56
+ title: "Mesh dependency to (unknown)",
57
+ description: "A reference to another mesh resource (unknown)"
58
+ }), "meshResourceReferenceSchemaFor");
59
+ var extractIdFromMeshResourceReference = /* @__PURE__ */ YJF4D23A_cjs.__name((ref) => ref.startsWith("#M_REF:") && ref.slice("#M_REF:".length) || commonErrorUtils.throwError(`Ref ${JSON.stringify(ref)} is not a mesh resource ref`), "extractIdFromMeshResourceReference");
60
+ var resolvedMeshResourceReferenceSchema = z__default.default.custom();
61
+ var extractContractResourceReferences = /* @__PURE__ */ YJF4D23A_cjs.__name((resource) => Object.entries(resource).filter(([, id]) => typeof id === "string" && id.startsWith("#C_REF:")), "extractContractResourceReferences");
62
+ var extractMeshResourceReferences = /* @__PURE__ */ YJF4D23A_cjs.__name((resource) => Object.entries(resource).filter(([, id]) => typeof id === "string" && id.startsWith("#M_REF:")), "extractMeshResourceReferences");
63
+ var createResolvedResourceSchema = /* @__PURE__ */ YJF4D23A_cjs.__name((resource) => resource, "createResolvedResourceSchema");
64
+
65
+ exports.baseContractResourceSchema = baseContractResourceSchema;
66
+ exports.baseMeshResourceSchema = baseMeshResourceSchema;
67
+ exports.baseResourceSchema = baseResourceSchema;
68
+ exports.contractResourceReferenceSchema = contractResourceReferenceSchema;
69
+ exports.contractResourceReferenceSchemaFor = contractResourceReferenceSchemaFor;
70
+ exports.createResolvedResourceSchema = createResolvedResourceSchema;
71
+ exports.extractContractResourceReferences = extractContractResourceReferences;
72
+ exports.extractIdFromContractResourceReference = extractIdFromContractResourceReference;
73
+ exports.extractIdFromMeshResourceReference = extractIdFromMeshResourceReference;
74
+ exports.extractMeshResourceReferences = extractMeshResourceReferences;
75
+ exports.meshResourceReferenceSchema = meshResourceReferenceSchema;
76
+ exports.meshResourceReferenceSchemaFor = meshResourceReferenceSchemaFor;
77
+ exports.resolvedContractResourceReferenceSchema = resolvedContractResourceReferenceSchema;
78
+ exports.resolvedMeshResourceReferenceSchema = resolvedMeshResourceReferenceSchema;
79
+ //# sourceMappingURL=WP2E3P7I.cjs.map
80
+ //# sourceMappingURL=WP2E3P7I.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deploy/resources.ts"],"names":["baseResourceSchema","z","object","id","string","name","optional","resourceBaseType","baseMeshResourceSchema","shape","literal","baseContractResourceSchema","chainName","enum","ChainName","upgradeConfig","upgradeableConfigSchema","verifyContract","boolean","chainConfig","any","extractIdFromContractResourceReference","__name","ref","startsWith","slice","length","throwError","JSON","stringify","contractResourceReferenceSchema","meta","title","description","contractResourceDependencyForSchemaZodMetaIdIdx","contractResourceReferenceSchemaFor","_resource","resolvedContractResourceReferenceSchema","custom","meshResourceReferenceSchema","meshResourceDependencyForSchemaZodMetaIdIdx","meshResourceReferenceSchemaFor","extractIdFromMeshResourceReference","resolvedMeshResourceReferenceSchema","extractContractResourceReferences","resource","Object","entries","filter","extractMeshResourceReferences","createResolvedResourceSchema"],"mappings":";;;;;;;;;;;;AASO,IAAMA,kBAAAA,GAAqBC,mBAAEC,MAAAA,CAAO;AACvCC,EAAAA,EAAAA,EAAIF,mBAAEG,MAAAA,EAAM;EACZC,IAAAA,EAAMJ,kBAAAA,CAAEG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AAA,KACzEC,MAAAA,CAAOC,QAAQF,QAAAA,CAAAA,CAAUG,OACrB,CAAC,GAAG7C,EAAAA,CAAAA,KAAQ,OAAOA,EAAAA,KAAO,QAAA,IAAYA,GAAGqB,UAAAA,CAAW,SAAA,CAAA,CAAA,EAFf,+BAAA;AAMtC,IAAM0B,4BAAAA,mBAA+B5B,mBAAA,CAAA,CACxCuB,QAAAA,KACCA,QAAAA,EAFuC,8BAAA","file":"WP2E3P7I.cjs","sourcesContent":["import z from 'zod';\n\nimport type { NormalizedHexString } from '@layerzerolabs/common-chain-model';\nimport { throwError } from '@layerzerolabs/common-error-utils';\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\nimport type { IsAny } from '@layerzerolabs/typescript-utils';\n\nimport { upgradeableConfigSchema } from '../upgrade';\n\nexport const baseResourceSchema = z.object({\n id: z.string(), // account-unique ID for this resource\n name: z.string().optional(), // display name for this resource\n resourceBaseType: z.string() as z.ZodString | z.ZodLiteral,\n});\n\nexport const baseMeshResourceSchema = z.object({\n ...baseResourceSchema.shape,\n resourceBaseType: z.literal('MESH'),\n});\n\nexport const baseContractResourceSchema = z.object({\n ...baseResourceSchema.shape,\n resourceBaseType: z.literal('CONTRACT'),\n chainName: z.enum(ChainName),\n upgradeConfig: upgradeableConfigSchema.optional(),\n verifyContract: z.boolean().optional(),\n\n chainConfig: z.any().optional(),\n});\n\nexport type BaseResource = z.infer<typeof baseResourceSchema>;\nexport type BaseMeshResource = z.infer<typeof baseMeshResourceSchema>;\nexport type BaseContractResource = z.infer<typeof baseContractResourceSchema>;\n\n// the actual expected runtime value for this type is #C_REF:${id}\nexport type ContractResourceReference<T extends BaseContractResource = BaseContractResource> = {\n /** WARNING: these fields are not present at runtime */\n __resourceReferenceType: T;\n ['__CONTRACT_RESOURCE_REFERENCE']: true;\n};\n\nexport const extractIdFromContractResourceReference = (ref: ContractResourceReference) =>\n ((ref as unknown as string).startsWith('#C_REF:') &&\n (ref as unknown as string).slice('#C_REF:'.length)) ||\n throwError(`Ref ${JSON.stringify(ref)} is not a contract resource ref`);\n\nexport type ContractResourceReferenceSchema<T extends typeof baseContractResourceSchema> =\n z.ZodType<ContractResourceReference<z.infer<T>>>;\n\nexport const contractResourceReferenceSchema: ContractResourceReferenceSchema<\n typeof baseContractResourceSchema\n // at runtime, we expect a string\n> = z.string().meta({\n id: 'contract-resource-dependency',\n title: 'Contract dependency to any',\n description: 'A reference to another contract resource (any)',\n}) as unknown as z.ZodType<ContractResourceReference>;\n\nlet contractResourceDependencyForSchemaZodMetaIdIdx = 0;\nexport const contractResourceReferenceSchemaFor = <T extends typeof baseContractResourceSchema>(\n // FIXME use this to generate a real schema\n _resource: T,\n): ContractResourceReferenceSchema<T> =>\n z.string().meta({\n id: `contract-resource-dependency-for-${++contractResourceDependencyForSchemaZodMetaIdIdx}`,\n // we can't generate this properly yet because this function needs more information\n // will be fixed when we clean up the runtime of dependencies id\n title: 'Contract dependency to (unknown)',\n description: 'A reference to another contract resource (unknown)',\n }) as unknown as z.ZodType<ContractResourceReference<z.infer<T>>>;\n\nexport type ResolvedContractResourceReference<T extends BaseContractResource> = {\n id: string;\n resource: T;\n address: NormalizedHexString;\n};\n\nexport type ResolvedContractResourceReferenceSchema<T extends typeof baseContractResourceSchema> =\n z.ZodType<ResolvedContractResourceReference<z.infer<T>>>;\n\nexport const resolvedContractResourceReferenceSchema: ResolvedContractResourceReferenceSchema<any> =\n // FIXME could be a real schema\n z.custom<ResolvedContractResourceReference<any>>();\n\n// the actual expected runtime value for this type is #M_REF:${id}\nexport type MeshResourceReference<T extends BaseMeshResource = BaseMeshResource> = {\n /** WARNING: these fields are not present at runtime */\n __resourceReferenceType: T;\n ['__MESH_RESOURCE_REFERENCE']: true;\n};\n\nexport type MeshResourceReferenceSchema<T extends typeof baseMeshResourceSchema> = z.ZodType<\n MeshResourceReference<z.infer<T>>\n>;\n\nexport const meshResourceReferenceSchema: MeshResourceReferenceSchema<\n typeof baseMeshResourceSchema\n> = z.string().meta({\n id: 'mesh-resource-dependency',\n title: 'Mesh dependency to any',\n description: 'A reference to another mesh resource (any)',\n}) as unknown as z.ZodType<MeshResourceReference>;\n\nlet meshResourceDependencyForSchemaZodMetaIdIdx = 0;\nexport const meshResourceReferenceSchemaFor = <T extends typeof baseMeshResourceSchema>(\n // FIXME use this to generate a real schema\n _resource: T,\n): MeshResourceReferenceSchema<T> =>\n z.string().meta({\n id: `mesh-resource-dependency-for-${++meshResourceDependencyForSchemaZodMetaIdIdx}`,\n title: 'Mesh dependency to (unknown)',\n description: 'A reference to another mesh resource (unknown)',\n }) as unknown as z.ZodType<MeshResourceReference<z.infer<T>>>;\n\nexport type ResolvedMeshResourceReference<T extends BaseMeshResource> = {\n id: string;\n resource: T;\n // TODO: is there any other resolved information we want to inject here?\n};\n\nexport const extractIdFromMeshResourceReference = (ref: MeshResourceReference) =>\n ((ref as unknown as string).startsWith('#M_REF:') &&\n (ref as unknown as string).slice('#M_REF:'.length)) ||\n throwError(`Ref ${JSON.stringify(ref)} is not a mesh resource ref`);\n\nexport type ResolvedMeshResourceReferenceSchema<T extends typeof baseMeshResourceSchema> =\n // FIXME could be a real schema\n z.ZodType<ResolvedMeshResourceReference<z.infer<T>>>;\n\nexport const resolvedMeshResourceReferenceSchema: ResolvedMeshResourceReferenceSchema<any> =\n z.custom<ResolvedMeshResourceReference<any>>();\n\nexport type ResolvedResourceSchema<Resource extends typeof baseResourceSchema> = z.ZodObject<\n {\n [K in keyof Resource['shape']]: Resource['shape'][K] extends infer R extends z.ZodType\n ? R extends z.ZodAny\n ? R\n : R extends z.ZodOptional<z.ZodAny>\n ? R\n : R extends ContractResourceReferenceSchema<infer I>\n ? ResolvedContractResourceReferenceSchema<I>\n : R extends z.ZodOptional<ContractResourceReferenceSchema<infer I>>\n ? z.ZodOptional<ResolvedContractResourceReferenceSchema<I>>\n : R extends MeshResourceReferenceSchema<infer I>\n ? ResolvedMeshResourceReferenceSchema<I>\n : R extends z.ZodOptional<MeshResourceReferenceSchema<infer I>>\n ? z.ZodOptional<ResolvedMeshResourceReferenceSchema<I>>\n : R\n : never;\n },\n z.core.$strip\n>;\n\nexport type ResolvedResource<Resource extends BaseResource> = {\n [K in keyof Resource]: Resource[K] extends infer R\n ? R extends undefined\n ? R\n : IsAny<R> extends true\n ? R\n : IsAny<Exclude<R, undefined>> extends true\n ? R\n : R extends ContractResourceReference<infer I>\n ? ResolvedContractResourceReference<I>\n : R extends ContractResourceReference<infer I> | undefined\n ? ResolvedContractResourceReference<I> | undefined\n : R extends MeshResourceReference<infer I>\n ? ResolvedMeshResourceReference<I>\n : R extends MeshResourceReference<infer I> | undefined\n ? ResolvedMeshResourceReference<I> | undefined\n : R\n : never;\n};\n\nexport const extractContractResourceReferences = <Resource extends BaseResource>(\n resource: Resource,\n) =>\n Object.entries(resource).filter(\n ([, id]) => typeof id === 'string' && id.startsWith('#C_REF:'),\n ) as unknown as [prop: string, id: ContractResourceReference][];\n\nexport const extractMeshResourceReferences = <Resource extends BaseResource>(resource: Resource) =>\n Object.entries(resource).filter(\n ([, id]) => typeof id === 'string' && id.startsWith('#M_REF:'),\n ) as unknown as [prop: string, id: MeshResourceReference][];\n\n// FIXME implement runtime\nexport const createResolvedResourceSchema = <Resource extends typeof baseResourceSchema>(\n resource: Resource,\n) => resource as ResolvedResourceSchema<Resource>;\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var z = require('zod/v4');
3
+ var z = require('zod');
4
4
 
5
5
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
6
 
@@ -48,5 +48,5 @@ exports.proxyConfigSchema = proxyConfigSchema;
48
48
  exports.proxyTypeSchema = proxyTypeSchema;
49
49
  exports.upgradeTypeSchema = upgradeTypeSchema;
50
50
  exports.upgradeableConfigSchema = upgradeableConfigSchema;
51
- //# sourceMappingURL=W3NEISER.cjs.map
52
- //# sourceMappingURL=W3NEISER.cjs.map
51
+ //# sourceMappingURL=WYAGX6NX.cjs.map
52
+ //# sourceMappingURL=WYAGX6NX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/upgrade/types.ts"],"names":["UpgradeType","EvmProxyType","ProxyType","upgradeTypeSchema","z","enum","proxyTypeSchema","proxyConfigSchema","object","upgradeType","literal","proxyType","notUpgradeableConfigSchema","codeUpgradeableConfigSchema","upgradeableConfigSchema","discriminatedUnion"],"mappings":";;;;;;;;;AAEO,IAAKA,WAAAA,6BAAAA,YAAAA,EAAAA;;;;AAAAA,EAAAA,OAAAA,YAAAA;;AASL,IAAKC,YAAAA,6BAAAA,aAAAA,EAAAA;;;AAAAA,EAAAA,OAAAA,aAAAA;;AAOL,IAAMC,SAAAA,GAAY;EACrB,GAAGD;AACP;AAIO,IAAME,iBAAAA,GAAoBC,kBAAAA,CAAEC,IAAAA,CAAKL,WAAAA;AAEjC,IAAMM,eAAAA,GAAkBF,kBAAAA,CAAEC,IAAAA,CAAKH,SAAAA;AAC/B,IAAMK,iBAAAA,GAAoBH,mBAAEI,MAAAA,CAAO;EACtCC,WAAAA,EAAaL,kBAAAA,CAAEM,QAAO,OAAA,CAAA;EACtBC,SAAAA,EAAWL;AACf,CAAA;AAIO,IAAMM,0BAAAA,GAA6BR,mBAAEI,MAAAA,CAAO;EAC/CC,WAAAA,EAAaL,kBAAAA,CAAEM,QAAO,iBAAA;AAC1B,CAAA;AAIO,IAAMG,2BAAAA,GAA8BT,mBAAEI,MAAAA,CAAO;EAChDC,WAAAA,EAAaL,kBAAAA,CAAEM,QAAO,cAAA;AAC1B,CAAA;AAIO,IAAMI,uBAAAA,GAA0BV,kBAAAA,CAAEW,kBAAAA,CAAmB,aAAA,EAAe;AACvER,EAAAA,iBAAAA;AACAK,EAAAA,0BAAAA;AACAC,EAAAA;AACH,CAAA","file":"WYAGX6NX.cjs","sourcesContent":["import z from 'zod';\n\nexport enum UpgradeType {\n // This doesn't necessarily prevent the contract from being upgraded\n NOT_UPGRADEABLE = 'NOT_UPGRADEABLE',\n // Deploy a separate 'proxy' contract that will route calls to a swappable implementation\n PROXY = 'PROXY',\n // This doesn't necessarily allow the contract to be upgraded\n CODE_UPGRADE = 'CODE_UPGRADE',\n}\n\nexport enum EvmProxyType {\n // TUP https://docs.openzeppelin.com/contracts/5.x/api/proxy#transparentupgradeableproxy\n TRANSPARENT_UPGRADEABLE = 'TRANSPARENT_UPGRADEABLE',\n // UUPS https://docs.openzeppelin.com/contracts/5.x/api/proxy#uupsupgradeable\n UNIVERSAL_UPGRADEABLE = 'UNIVERSAL_UPGRADEABLE',\n}\n\nexport const ProxyType = {\n ...EvmProxyType,\n};\n\nexport type ProxyType = (typeof ProxyType)[keyof typeof ProxyType];\n\nexport const upgradeTypeSchema = z.enum(UpgradeType);\n\nexport const proxyTypeSchema = z.enum(ProxyType);\nexport const proxyConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.PROXY),\n proxyType: proxyTypeSchema,\n});\n\nexport type ProxyUpgradeableConfig = z.infer<typeof proxyConfigSchema>;\n\nexport const notUpgradeableConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.NOT_UPGRADEABLE),\n});\n\nexport type NotUpgradeableConfig = z.infer<typeof notUpgradeableConfigSchema>;\n\nexport const codeUpgradeableConfigSchema = z.object({\n upgradeType: z.literal(UpgradeType.CODE_UPGRADE),\n});\n\nexport type CodeUpgradeableConfig = z.infer<typeof codeUpgradeableConfigSchema>;\n\nexport const upgradeableConfigSchema = z.discriminatedUnion('upgradeType', [\n proxyConfigSchema,\n notUpgradeableConfigSchema,\n codeUpgradeableConfigSchema,\n]);\n\nexport type UpgradeableConfig = z.infer<typeof upgradeableConfigSchema>;\n"]}
@@ -1,39 +1,14 @@
1
- import { __name } from './VUOMXK5T.js';
2
- import { z } from 'zod/v4';
1
+ import { deploymentArtifactSchema, identityOnlyDeploymentArtifactSchema, fullDeploymentArtifactSchema } from './AB7BJRWS.js';
2
+ import { z } from 'zod';
3
3
  import { normalizedHexSchema, hexSchema } from '@layerzerolabs/common-chain-model';
4
4
  import { ChainName } from '@layerzerolabs/layerzero-definitions';
5
5
  import { functionSchema } from '@layerzerolabs/zod-utils';
6
6
 
7
- var SolanaExtraSchema = z.object({
8
- accounts: z.record(z.string(), z.string())
9
- });
10
- var SuiExtraSchema = z.object({
11
- digest: z.string(),
12
- objectChanges: z.array(z.custom())
13
- });
14
- var createDeploymentInfoSchema = /* @__PURE__ */ __name((extraSchema) => z.object({
15
- contractName: z.string(),
16
- chainName: z.string(),
7
+ var BaseDeploymentSchema = deploymentArtifactSchema;
8
+ var DeploymentInfoSchema = BaseDeploymentSchema;
9
+ var VerificationInfoSchema = z.object({
10
+ contractName: z.enum(ChainName),
17
11
  address: normalizedHexSchema,
18
- nativeAddress: z.string(),
19
- bytecodeHash: z.string().optional(),
20
- deploymentTimestamp: z.number(),
21
- deployerAddress: normalizedHexSchema,
22
- txHash: z.string(),
23
- abiEncodedConstructorArguments: hexSchema.optional(),
24
- extraDeploymentInfo: extraSchema?.optional() ?? z.any().optional()
25
- }), "createDeploymentInfoSchema");
26
- var BaseDeploymentSchema = createDeploymentInfoSchema();
27
- var SolanaDeploymentSchema = createDeploymentInfoSchema(SolanaExtraSchema);
28
- var SuiDeploymentSchema = createDeploymentInfoSchema(SuiExtraSchema);
29
- var DeploymentInfoSchema = z.union([
30
- BaseDeploymentSchema,
31
- SolanaDeploymentSchema,
32
- SuiDeploymentSchema
33
- ]);
34
- var VerificationInfoSchema = BaseDeploymentSchema.pick({
35
- contractName: true,
36
- address: true,
37
12
  abiEncodedConstructorArguments: true
38
13
  });
39
14
  var failedDeployment = z.object({
@@ -50,13 +25,6 @@ var deployWorkflowChainResultItemSchema = z.union([
50
25
  failedDeployment,
51
26
  successfulDeployment
52
27
  ]);
53
- var verificationArgumentsSchema = z.union([
54
- failedDeployment,
55
- z.object({
56
- ...successfulDeployment.shape,
57
- deploymentInfo: VerificationInfoSchema
58
- })
59
- ]);
60
28
  var deployWorkflowChainResultSchema = z.object({
61
29
  results: z.array(deployWorkflowChainResultItemSchema).default([])
62
30
  });
@@ -81,7 +49,7 @@ var getDeploymentBaseArgs = z.object({
81
49
  });
82
50
  var saveDeploymentBaseArgs = z.object({
83
51
  contractName: z.string(),
84
- deploymentInfo: DeploymentInfoSchema
52
+ deploymentInfo: identityOnlyDeploymentArtifactSchema
85
53
  });
86
54
  var getVerificationInfoBaseArgs = z.object({
87
55
  contractName: z.string()
@@ -92,7 +60,7 @@ var verificationDataFromDeploymentTransaction = z.object({
92
60
  });
93
61
  var createVerificationInfoBaseArgs = z.object({
94
62
  deployedBytecode: hexSchema.optional(),
95
- deploymentInfo: DeploymentInfoSchema,
63
+ deploymentInfo: fullDeploymentArtifactSchema,
96
64
  nonVerifyable: z.boolean().optional()
97
65
  });
98
66
  var saveVerificationInfoBaseArgs = createVerificationInfoBaseArgs;
@@ -101,7 +69,7 @@ var BaseDeploymentSavingArtifactsSchema = z.object({
101
69
  input: z.tuple([
102
70
  getDeploymentBaseArgs
103
71
  ]),
104
- output: z.promise(DeploymentInfoSchema.optional())
72
+ output: z.promise(deploymentArtifactSchema.optional())
105
73
  }),
106
74
  saveDeployment: functionSchema({
107
75
  input: z.tuple([
@@ -123,6 +91,6 @@ var BaseDeploymentSavingArtifactsSchema = z.object({
123
91
  })
124
92
  });
125
93
 
126
- export { BaseDeploymentSavingArtifactsSchema, BaseDeploymentSchema, DeploymentInfoSchema, SolanaDeploymentSchema, SolanaExtraSchema, SuiDeploymentSchema, SuiExtraSchema, VerificationInfoSchema, createVerificationInfoBaseArgs, deployWorkflowChainResultItemSchema, deployWorkflowChainResultSchema, deployWorkflowChainStateSchema, deployWorkflowOrchestratorResultSchema, deployWorkflowOrchestratorStateSchema, getDeploymentBaseArgs, getVerificationInfoBaseArgs, saveDeploymentBaseArgs, saveVerificationInfoBaseArgs, verificationArgumentsSchema, verificationDataFromDeploymentTransaction };
127
- //# sourceMappingURL=RMW3UTVK.js.map
128
- //# sourceMappingURL=RMW3UTVK.js.map
94
+ export { BaseDeploymentSavingArtifactsSchema, BaseDeploymentSchema, DeploymentInfoSchema, VerificationInfoSchema, createVerificationInfoBaseArgs, deployWorkflowChainResultItemSchema, deployWorkflowChainResultSchema, deployWorkflowChainStateSchema, deployWorkflowOrchestratorResultSchema, deployWorkflowOrchestratorStateSchema, getDeploymentBaseArgs, getVerificationInfoBaseArgs, saveDeploymentBaseArgs, saveVerificationInfoBaseArgs, verificationDataFromDeploymentTransaction };
95
+ //# sourceMappingURL=ZQQ6EIFU.js.map
96
+ //# sourceMappingURL=ZQQ6EIFU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deploy/workflow.ts"],"names":["BaseDeploymentSchema","deploymentArtifactSchema","DeploymentInfoSchema","VerificationInfoSchema","z","object","contractName","enum","ChainName","address","normalizedHexSchema","abiEncodedConstructorArguments","failedDeployment","name","string","success","literal","error","successfulDeployment","deploymentInfo","deployWorkflowChainResultItemSchema","union","deployWorkflowChainResultSchema","results","array","default","deployWorkflowChainStateSchema","extend","srcChain","optional","status","deployWorkflowOrchestratorResultSchema","stateByChain","partialRecord","deployWorkflowOrchestratorStateSchema","getDeploymentBaseArgs","saveDeploymentBaseArgs","identityOnlyDeploymentArtifactSchema","getVerificationInfoBaseArgs","verificationDataFromDeploymentTransaction","deployedBytecode","hexSchema","deployerWallet","createVerificationInfoBaseArgs","fullDeploymentArtifactSchema","nonVerifyable","boolean","saveVerificationInfoBaseArgs","BaseDeploymentSavingArtifactsSchema","getDeployment","functionSchema","input","tuple","output","promise","saveDeployment","void","getVerificationInfo","any","saveVerificationInfo"],"mappings":";;;;;;AAkBO,IAAMA,oBAAAA,GAAuBC;AAU7B,IAAMC,oBAAAA,GAAuBF;AAG7B,IAAMG,sBAAAA,GAAyBC,EAAEC,MAAAA,CAAO;EAC3CC,YAAAA,EAAcF,CAAAA,CAAEG,KAAKC,SAAAA,CAAAA;EACrBC,OAAAA,EAASC,mBAAAA;EACTC,8BAAAA,EAAgC;AACpC,CAAA;AAEA,IAAMC,gBAAAA,GAAmBR,EAAEC,M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AAA,CAAyB4B,QAAAA,EAAQ;GACvD,CAAA;AACA0B,EAAAA,cAAAA,EAAgBL,cAAAA,CAAe;AAC3BC,IAAAA,KAAAA,EAAO/C,EAAEgD,KAAAA,CAAM;AAAChB,MAAAA;AAAuB,KAAA,CAAA;AACvCiB,IAAAA,MAAAA,EAAQjD,CAAAA,CAAEkD,OAAAA,CAAQlD,CAAAA,CAAEoD,IAAAA,EAAI;GAC5B,CAAA;AACAC,EAAAA,mBAAAA,EAAqBP,cAAAA,CAAe;AAChCC,IAAAA,KAAAA,EAAO/C,EAAEgD,KAAAA,CAAM;AAACd,MAAAA;AAA4B,KAAA,CAAA;AAC5Ce,IAAAA,MAAAA,EAAQjD,CAAAA,CAAEkD,OAAAA,CAAQlD,CAAAA,CAAEsD,GAAAA,EAAG;GAC3B,CAAA;AACAC,EAAAA,oBAAAA,EAAsBT,cAAAA,CAAe;AACjCC,IAAAA,KAAAA,EAAO/C,EAAEgD,KAAAA,CAAM;AAACL,MAAAA;AAA6B,KAAA,CAAA;AAC7CM,IAAAA,MAAAA,EAAQjD,CAAAA,CAAEkD,OAAAA,CAAQlD,CAAAA,CAAEoD,IAAAA,EAAI;GAC5B;AACJ,CAAA","file":"ZQQ6EIFU.js","sourcesContent":["import type { SuiObjectChange } from '@mysten/sui/client';\nimport { z } from 'zod';\n\nimport { hexSchema, normalizedHexSchema } from '@layerzerolabs/common-chain-model';\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\nimport { functionSchema } from '@layerzerolabs/zod-utils';\n\nimport type { DeploymentArtifact, SolanaDeploymentArtifactExtraInfo } from './artifact';\nimport {\n deploymentArtifactSchema,\n fullDeploymentArtifactSchema,\n identityOnlyDeploymentArtifactSchema,\n} from './artifact';\n\nexport type { SuiObjectChange };\n\n// exported for backwards compatibility, should use the new schemas\n/** @deprecated use deploymentArtifactSchema */\nexport const BaseDeploymentSchema = deploymentArtifactSchema;\n\n/** @deprecated use DeploymentArtifact */\nexport type DeploymentInfo = DeploymentArtifact;\n/** @deprecated */\nexport type SolanaDeploymentInfo = Omit<DeploymentArtifact, 'extraDeploymentInfo'> & {\n extraDeploymentInfo: SolanaDeploymentArtifactExtraInfo;\n};\n\n/** @deprecated use deploymentArtifactSchema */\nexport const DeploymentInfoSchema = BaseDeploymentSchema;\n\n// FIXME clean this up to use the new artifact schema\nexport const VerificationInfoSchema = z.object({\n contractName: z.enum(ChainName),\n address: normalizedHexSchema,\n abiEncodedConstructorArguments: true,\n});\n\nconst failedDeployment = z.object({\n name: z.string(),\n success: z.literal(false),\n error: z.string(),\n});\n\nconst successfulDeployment = z.object({\n name: z.string(),\n success: z.literal(true),\n deploymentInfo: DeploymentInfoSchema,\n});\n\nexport const deployWorkflowChainResultItemSchema = z.union([\n failedDeployment,\n successfulDeployment,\n]);\n\nexport const deployWorkflowChainResultSchema = z.object({\n results: z.array(deployWorkflowChainResultItemSchema).default([]),\n});\n\nexport const deployWorkflowChainStateSchema = deployWorkflowChainResultSchema.extend({\n srcChain: z.enum(ChainName).optional(),\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type DeployWorkflowChainState = z.infer<typeof deployWorkflowChainStateSchema>;\nexport type DeployWorkflowChainResult = z.infer<typeof deployWorkflowChainResultSchema>;\nexport type DeployWorkflowChainResultItem = z.infer<typeof deployWorkflowChainResultItemSchema>;\n\nexport const deployWorkflowOrchestratorResultSchema = z.object({\n stateByChain: z.partialRecord(z.enum(ChainName), deployWorkflowChainResultSchema).default({}),\n});\n\nexport const deployWorkflowOrchestratorStateSchema = deployWorkflowOrchestratorResultSchema.extend({\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type DeployWorkflowOrchestratorState = z.infer<typeof deployWorkflowOrchestratorStateSchema>;\nexport type DeployWorkflowOrchestratorResult = z.infer<\n typeof deployWorkflowOrchestratorResultSchema\n>;\n\nexport const getDeploymentBaseArgs = z.object({ contractName: z.string() });\nexport type GetDeploymentBaseArgs = z.infer<typeof getDeploymentBaseArgs>;\n\nexport const saveDeploymentBaseArgs = z.object({\n contractName: z.string(),\n deploymentInfo: identityOnlyDeploymentArtifactSchema,\n});\nexport type SaveDeploymentBaseArgs = z.infer<typeof saveDeploymentBaseArgs>;\n\nexport const getVerificationInfoBaseArgs = z.object({\n contractName: z.string(),\n});\nexport type GetVerificationInfoBaseArgs = z.infer<typeof getVerificationInfoBaseArgs>;\n\nexport const verificationDataFromDeploymentTransaction = z.object({\n deployedBytecode: hexSchema.optional(),\n deployerWallet: normalizedHexSchema.optional(),\n});\nexport type VerificationDataFromDeploymentTransaction = z.infer<\n typeof verificationDataFromDeploymentTransaction\n>;\n\nexport const createVerificationInfoBaseArgs = z.object({\n deployedBytecode: hexSchema.optional(),\n deploymentInfo: fullDeploymentArtifactSchema,\n nonVerifyable: z.boolean().optional(),\n});\nexport type CreateVerificationInfoBaseArgs = z.infer<typeof createVerificationInfoBaseArgs>;\n\nexport const saveVerificationInfoBaseArgs = createVerificationInfoBaseArgs;\n\nexport type SaveVerificationInfoBaseArgs = z.infer<typeof saveVerificationInfoBaseArgs>;\n\nexport const BaseDeploymentSavingArtifactsSchema = z.object({\n getDeployment: functionSchema({\n input: z.tuple([getDeploymentBaseArgs]),\n output: z.promise(deploymentArtifactSchema.optional()),\n }),\n saveDeployment: functionSchema({\n input: z.tuple([saveDeploymentBaseArgs]),\n output: z.promise(z.void()),\n }),\n getVerificationInfo: functionSchema({\n input: z.tuple([getVerificationInfoBaseArgs]),\n output: z.promise(z.any()),\n }),\n saveVerificationInfo: functionSchema({\n input: z.tuple([saveVerificationInfoBaseArgs]),\n output: z.promise(z.void()),\n }),\n});\n"]}
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+
3
+ var VZP4VEYJ_cjs = require('./VZP4VEYJ.cjs');
4
+ var zod = require('zod');
5
+ var commonChainModel = require('@layerzerolabs/common-chain-model');
6
+ var layerzeroDefinitions = require('@layerzerolabs/layerzero-definitions');
7
+ var zodUtils = require('@layerzerolabs/zod-utils');
8
+
9
+ var BaseDeploymentSchema = VZP4VEYJ_cjs.deploymentArtifactSchema;
10
+ var DeploymentInfoSchema = BaseDeploymentSchema;
11
+ var VerificationInfoSchema = zod.z.object({
12
+ contractName: zod.z.enum(layerzeroDefinitions.ChainName),
13
+ address: commonChainModel.normalizedHexSchema,
14
+ abiEncodedConstructorArguments: true
15
+ });
16
+ var failedDeployment = zod.z.object({
17
+ name: zod.z.string(),
18
+ success: zod.z.literal(false),
19
+ error: zod.z.string()
20
+ });
21
+ var successfulDeployment = zod.z.object({
22
+ name: zod.z.string(),
23
+ success: zod.z.literal(true),
24
+ deploymentInfo: DeploymentInfoSchema
25
+ });
26
+ var deployWorkflowChainResultItemSchema = zod.z.union([
27
+ failedDeployment,
28
+ successfulDeployment
29
+ ]);
30
+ var deployWorkflowChainResultSchema = zod.z.object({
31
+ results: zod.z.array(deployWorkflowChainResultItemSchema).default([])
32
+ });
33
+ var deployWorkflowChainStateSchema = deployWorkflowChainResultSchema.extend({
34
+ srcChain: zod.z.enum(layerzeroDefinitions.ChainName).optional(),
35
+ status: zod.z.union([
36
+ zod.z.literal("RUNNING"),
37
+ zod.z.literal("COMPLETE")
38
+ ]).default("RUNNING")
39
+ });
40
+ var deployWorkflowOrchestratorResultSchema = zod.z.object({
41
+ stateByChain: zod.z.partialRecord(zod.z.enum(layerzeroDefinitions.ChainName), deployWorkflowChainResultSchema).default({})
42
+ });
43
+ var deployWorkflowOrchestratorStateSchema = deployWorkflowOrchestratorResultSchema.extend({
44
+ status: zod.z.union([
45
+ zod.z.literal("RUNNING"),
46
+ zod.z.literal("COMPLETE")
47
+ ]).default("RUNNING")
48
+ });
49
+ var getDeploymentBaseArgs = zod.z.object({
50
+ contractName: zod.z.string()
51
+ });
52
+ var saveDeploymentBaseArgs = zod.z.object({
53
+ contractName: zod.z.string(),
54
+ deploymentInfo: VZP4VEYJ_cjs.identityOnlyDeploymentArtifactSchema
55
+ });
56
+ var getVerificationInfoBaseArgs = zod.z.object({
57
+ contractName: zod.z.string()
58
+ });
59
+ var verificationDataFromDeploymentTransaction = zod.z.object({
60
+ deployedBytecode: commonChainModel.hexSchema.optional(),
61
+ deployerWallet: commonChainModel.normalizedHexSchema.optional()
62
+ });
63
+ var createVerificationInfoBaseArgs = zod.z.object({
64
+ deployedBytecode: commonChainModel.hexSchema.optional(),
65
+ deploymentInfo: VZP4VEYJ_cjs.fullDeploymentArtifactSchema,
66
+ nonVerifyable: zod.z.boolean().optional()
67
+ });
68
+ var saveVerificationInfoBaseArgs = createVerificationInfoBaseArgs;
69
+ var BaseDeploymentSavingArtifactsSchema = zod.z.object({
70
+ getDeployment: zodUtils.functionSchema({
71
+ input: zod.z.tuple([
72
+ getDeploymentBaseArgs
73
+ ]),
74
+ output: zod.z.promise(VZP4VEYJ_cjs.deploymentArtifactSchema.optional())
75
+ }),
76
+ saveDeployment: zodUtils.functionSchema({
77
+ input: zod.z.tuple([
78
+ saveDeploymentBaseArgs
79
+ ]),
80
+ output: zod.z.promise(zod.z.void())
81
+ }),
82
+ getVerificationInfo: zodUtils.functionSchema({
83
+ input: zod.z.tuple([
84
+ getVerificationInfoBaseArgs
85
+ ]),
86
+ output: zod.z.promise(zod.z.any())
87
+ }),
88
+ saveVerificationInfo: zodUtils.functionSchema({
89
+ input: zod.z.tuple([
90
+ saveVerificationInfoBaseArgs
91
+ ]),
92
+ output: zod.z.promise(zod.z.void())
93
+ })
94
+ });
95
+
96
+ exports.BaseDeploymentSavingArtifactsSchema = BaseDeploymentSavingArtifactsSchema;
97
+ exports.BaseDeploymentSchema = BaseDeploymentSchema;
98
+ exports.DeploymentInfoSchema = DeploymentInfoSchema;
99
+ exports.VerificationInfoSchema = VerificationInfoSchema;
100
+ exports.createVerificationInfoBaseArgs = createVerificationInfoBaseArgs;
101
+ exports.deployWorkflowChainResultItemSchema = deployWorkflowChainResultItemSchema;
102
+ exports.deployWorkflowChainResultSchema = deployWorkflowChainResultSchema;
103
+ exports.deployWorkflowChainStateSchema = deployWorkflowChainStateSchema;
104
+ exports.deployWorkflowOrchestratorResultSchema = deployWorkflowOrchestratorResultSchema;
105
+ exports.deployWorkflowOrchestratorStateSchema = deployWorkflowOrchestratorStateSchema;
106
+ exports.getDeploymentBaseArgs = getDeploymentBaseArgs;
107
+ exports.getVerificationInfoBaseArgs = getVerificationInfoBaseArgs;
108
+ exports.saveDeploymentBaseArgs = saveDeploymentBaseArgs;
109
+ exports.saveVerificationInfoBaseArgs = saveVerificationInfoBaseArgs;
110
+ exports.verificationDataFromDeploymentTransaction = verificationDataFromDeploymentTransaction;
111
+ //# sourceMappingURL=ZTLVAMWX.cjs.map
112
+ //# sourceMappingURL=ZTLVAMWX.cjs.map