@layerzerolabs/dw-model 1.2.29 → 1.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TMJQ6B76.js → 7NU2Y5ZK.js} +4 -4
- package/dist/7NU2Y5ZK.js.map +1 -0
- package/dist/{KNOKDTK3.js → 7QV722N2.js} +3 -3
- package/dist/{KNOKDTK3.js.map → 7QV722N2.js.map} +1 -1
- package/dist/{YAEJZ74R.js → I2SFLHPT.js} +4 -2
- package/dist/I2SFLHPT.js.map +1 -0
- package/dist/deploy/index.js +2 -2
- package/dist/deploy/resources.d.ts +1 -0
- package/dist/deploy/resources.d.ts.map +1 -1
- package/dist/deploy/resources.js +2 -2
- package/dist/index.js +3 -3
- package/dist/upgrade/index.js +1 -1
- package/dist/upgrade/types.d.ts +5 -0
- package/dist/upgrade/types.d.ts.map +1 -1
- package/dist/upgrade/types.js +1 -1
- package/dist/wire/index.js +1 -1
- package/dist/wire/planner.d.ts +1 -1
- package/dist/wire/planner.js +1 -1
- package/package.json +10 -10
- package/dist/TMJQ6B76.js.map +0 -1
- package/dist/YAEJZ74R.js.map +0 -1
|
@@ -17,8 +17,8 @@ var commonArgsSchema = z.object({
|
|
|
17
17
|
onlyOperations: z.array(z.string()).optional(),
|
|
18
18
|
excludeOperations: z.array(z.string()).optional(),
|
|
19
19
|
allowSelfWiring: z.boolean().optional(),
|
|
20
|
-
//
|
|
21
|
-
|
|
20
|
+
// ordered sender preference list
|
|
21
|
+
senderEntityNames: z.array(z.string()).min(1),
|
|
22
22
|
forceSend: z.boolean().optional()
|
|
23
23
|
});
|
|
24
24
|
var createWiringPlannerActivityFactorySchema = /* @__PURE__ */ __name((customArgs) => {
|
|
@@ -48,5 +48,5 @@ var createWiringPlannerActivityFactorySchema = /* @__PURE__ */ __name((customArg
|
|
|
48
48
|
}, "createWiringPlannerActivityFactorySchema");
|
|
49
49
|
|
|
50
50
|
export { createWiringPlannerActivityFactorySchema };
|
|
51
|
-
//# sourceMappingURL=
|
|
52
|
-
//# sourceMappingURL=
|
|
51
|
+
//# sourceMappingURL=7NU2Y5ZK.js.map
|
|
52
|
+
//# sourceMappingURL=7NU2Y5ZK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/wire/planner.ts"],"names":["commonArgsSchema","z","object","callerWorkflowId","string","callerRunId","planId","batchSize","number","chainNames","array","chainNameSchema","onlyFrom","optional","onlyTo","excludeFrom","excludeTo","onlyOperations","excludeOperations","allowSelfWiring","boolean","senderEntityNames","min","forceSend","createWiringPlannerActivityFactorySchema","customArgs","createPlan","functionSchema","input","tuple","output","promise","void","enactPlan","assertPlan"],"mappings":";;;;;AAKA,IAAMA,gBAAAA,GAAmBC,EAAEC,MAAAA,CAAO;AAC9BC,EAAAA,gBAAAA,EAAkBF,EAAEG,MAAAA,EAAM;AAC1BC,EAAAA,WAAAA,EAAaJ,EAAEG,MAAAA,EAAM;AACrBE,EAAAA,MAAAA,EAAQL,EAAEG,MAAAA,EAAM;AAChBG,EAAAA,SAAAA,EAAWN,EAAEO,MAAAA,EAAM;EACnBC,UAAAA,EAAYR,CAAAA,CAAES,MAAMC,eAAAA,CAAAA;;AAEpBC,EAAAA,QAAAA,EAAUX,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC3CC,EAAAA,MAAAA,EAAQb,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AACzCE,EAAAA,WAAAA,EAAad,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC9CG,EAAAA,SAAAA,EAAWf,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC5CI,EAAAA,cAAAA,EAAgBhB,EAAES,KAAAA,CAAMT,CAAAA,CAAEG,MAAAA,EAAM,EAAIS,QAAAA,EAAQ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,CAAA;AACJ,CAAA,EAjBwD,0CAAA","file":"7NU2Y5ZK.js","sourcesContent":["import z from 'zod';\n\nimport { chainNameSchema } from '@layerzerolabs/layerzero-definitions';\nimport { functionSchema } from '@layerzerolabs/zod-utils';\n\nconst commonArgsSchema = z.object({\n callerWorkflowId: z.string(),\n callerRunId: z.string(),\n planId: z.string(),\n batchSize: z.number(),\n chainNames: z.array(chainNameSchema),\n // filters\n onlyFrom: z.array(chainNameSchema).optional(),\n onlyTo: z.array(chainNameSchema).optional(),\n excludeFrom: z.array(chainNameSchema).optional(),\n excludeTo: z.array(chainNameSchema).optional(),\n onlyOperations: z.array(z.string()).optional(),\n excludeOperations: z.array(z.string()).optional(),\n allowSelfWiring: z.boolean().optional(),\n // ordered sender preference list\n senderEntityNames: z.array(z.string()).min(1),\n forceSend: z.boolean().optional(),\n});\n\nexport type CommonArgs = z.infer<typeof commonArgsSchema>;\n\nexport interface WiringPlannerActivityFactoryImpl<T> {\n createPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n enactPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n assertPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n}\n\nexport const createWiringPlannerActivityFactorySchema = <T extends z.ZodType>(\n customArgs: T,\n): z.ZodType<WiringPlannerActivityFactoryImpl<z.infer<T>>> => {\n return z.object({\n createPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n enactPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n assertPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n });\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { upgradeableConfigSchema } from './
|
|
1
|
+
import { upgradeableConfigSchema } from './I2SFLHPT.js';
|
|
2
2
|
import { __name } from './VUOMXK5T.js';
|
|
3
3
|
import z from 'zod';
|
|
4
4
|
import { normalizedHexSchema } from '@layerzerolabs/common-chain-model';
|
|
@@ -61,5 +61,5 @@ var extractMeshResourceReferences = /* @__PURE__ */ __name((resource) => Object.
|
|
|
61
61
|
var createResolvedResourceSchema = /* @__PURE__ */ __name((resource) => resource, "createResolvedResourceSchema");
|
|
62
62
|
|
|
63
63
|
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress };
|
|
64
|
-
//# sourceMappingURL=
|
|
65
|
-
//# sourceMappingURL=
|
|
64
|
+
//# sourceMappingURL=7QV722N2.js.map
|
|
65
|
+
//# sourceMappingURL=7QV722N2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/deploy/resources.ts"],"names":["baseResourceSchema","z","object","id","string","resourceBaseType","baseMeshResourceSchema","shape","literal","baseContractResourceSchema","chainName","chainNameSchema","upgradeConfig","upgradeableConfigSchema","optional","verifyContract","boolean","chainConfig","any","withIntrinsicAddress","resourceSchema","_INTRINSIC_normalizedAddress","normalizedHexSchema","extractIdFromContractResourceReference","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,EAAEC,MAAAA,CAAO;AACvCC,EAAAA,EAAAA,EAA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AA,KAAO,QAAA,IAAYA,GAAGsB,UAAAA,CAAW,SAAA,CAAA,CAAA,EAJX,mCAAA;AAO1C,IAAMyB,6BAAAA,2BAAgEJ,QAAAA,KACzEC,MAAAA,CAAOC,QAAQF,QAAAA,CAAAA,CAAUG,OACrB,CAAC,GAAG9C,EAAAA,CAAAA,KAAQ,OAAOA,EAAAA,KAAO,QAAA,IAAYA,GAAGsB,UAAAA,CAAW,SAAA,CAAA,CAAA,EAFf,+BAAA;AAMtC,IAAM0B,4BAAAA,mBAA+B,MAAA,CAAA,CACxCL,QAAAA,KACCA,QAAAA,EAFuC,8BAAA","file":"KNOKDTK3.js","sourcesContent":["import z from 'zod';\n\nimport { normalizedHexSchema, type NormalizedHexString } from '@layerzerolabs/common-chain-model';\nimport { throwError } from '@layerzerolabs/common-error-utils';\nimport { chainNameSchema } 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 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: chainNameSchema,\n upgradeConfig: upgradeableConfigSchema.optional(),\n verifyContract: z.boolean().optional(),\n\n chainConfig: z.any().optional(),\n});\n\nexport const withIntrinsicAddress = <T extends typeof baseContractResourceSchema>(\n resourceSchema: T,\n) =>\n z.object({\n ...resourceSchema.shape,\n _INTRINSIC_normalizedAddress: normalizedHexSchema,\n }) as unknown as T['shape'] extends infer Shape extends Readonly<Record<string, z.ZodType>>\n ? z.ZodObject<\n {\n [K in\n | keyof Shape\n | '_INTRINSIC_normalizedAddress']: K extends '_INTRINSIC_normalizedAddress'\n ? typeof normalizedHexSchema\n : K extends keyof Shape\n ? Shape[K]\n : never;\n },\n z.core.$strip\n >\n : never;\n\nexport type BaseResource = z.infer<typeof baseResourceSchema>;\nexport type BaseMeshResource = z.infer<typeof baseMeshResourceSchema>;\nexport type BaseContractResource = z.infer<typeof baseContractResourceSchema>;\nexport type BaseIntrinsicAddressContractResource = z.infer<ReturnType<typeof withIntrinsicAddress>>;\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\n// Use z.ZodType<BaseContractResource> because we want to allow unions\nexport type ContractResourceReferenceSchema<T extends z.ZodType<BaseContractResource>> = z.ZodType<\n ContractResourceReference<z.infer<T>>\n>;\n\nexport const contractResourceReferenceSchema: ContractResourceReferenceSchema<\n z.ZodType<BaseContractResource>\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 z.ZodType<BaseContractResource>>(\n // TODO: use resource parameter to generate a concrete 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 dependency ID resolution\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 z.ZodType<BaseContractResource>> =\n z.ZodType<ResolvedContractResourceReference<z.infer<T>>>;\n\nexport const resolvedContractResourceReferenceSchema: ResolvedContractResourceReferenceSchema<any> =\n // TODO: replace with a concrete zod 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 // TODO: use resource parameter to generate a concrete 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 // TODO: replace with a concrete zod 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 Exclude<\n keyof Resource['shape'],\n '_INTRINSIC_normalizedAddress'\n >]: 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 Exclude<keyof Resource, '_INTRINSIC_normalizedAddress'>]: 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// TODO: implement runtime resolution — currently returns input schema as-is\nexport const createResolvedResourceSchema = <Resource extends typeof baseResourceSchema>(\n resource: Resource,\n) => resource as ResolvedResourceSchema<Resource>;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/deploy/resources.ts"],"names":["baseResourceSchema","z","object","id","string","resourceBaseType","baseMeshResourceSchema","shape","literal","baseContractResourceSchema","chainName","chainNameSchema","upgradeConfig","upgradeableConfigSchema","optional","verifyContract","boolean","chainConfig","any","withIntrinsicAddress","resourceSchema","_INTRINSIC_normalizedAddress","normalizedHexSchema","extractIdFromContractResourceReference","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,EAAEC,MAAAA,CAAO;AACvCC,EAAAA,EAAAA,EAAIF,EAAEG,MAAAA,EAAM;AACZC,EAAAA,gBAAAA,EAAkBJ,EAAEG,MAAAA;AACxB,CAAA;AAEO,IAAME,sBAAAA,GAAyBL,EAAEC,MAAAA,CAAO;AAC3C,EAAA,GAAGF,kBAAAA,CAAmBO,KAAAA;EACtBF,gBAAAA,EAAkBJ,CAAAA,CAAEO,QAAQ,MAAA;AAChC,CAAA;AAEO,IAAMC,0BAAAA,GAA6BR,EAAEC,MAAAA,CAAO;AAC/C,EAAA,GAAGF,kBAAAA,CAAmBO,KAAAA;EACtBF,gBAAAA,EAAkBJ,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,QAAAA,EAFuC,8BAAA","file":"7QV722N2.js","sourcesContent":["import z from 'zod';\n\nimport { normalizedHexSchema, type NormalizedHexString } from '@layerzerolabs/common-chain-model';\nimport { throwError } from '@layerzerolabs/common-error-utils';\nimport { chainNameSchema } 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 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: chainNameSchema,\n upgradeConfig: upgradeableConfigSchema.optional(),\n verifyContract: z.boolean().optional(),\n\n chainConfig: z.any().optional(),\n});\n\nexport const withIntrinsicAddress = <T extends typeof baseContractResourceSchema>(\n resourceSchema: T,\n) =>\n z.object({\n ...resourceSchema.shape,\n _INTRINSIC_normalizedAddress: normalizedHexSchema,\n }) as unknown as T['shape'] extends infer Shape extends Readonly<Record<string, z.ZodType>>\n ? z.ZodObject<\n {\n [K in\n | keyof Shape\n | '_INTRINSIC_normalizedAddress']: K extends '_INTRINSIC_normalizedAddress'\n ? typeof normalizedHexSchema\n : K extends keyof Shape\n ? Shape[K]\n : never;\n },\n z.core.$strip\n >\n : never;\n\nexport type BaseResource = z.infer<typeof baseResourceSchema>;\nexport type BaseMeshResource = z.infer<typeof baseMeshResourceSchema>;\nexport type BaseContractResource = z.infer<typeof baseContractResourceSchema>;\nexport type BaseIntrinsicAddressContractResource = z.infer<ReturnType<typeof withIntrinsicAddress>>;\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\n// Use z.ZodType<BaseContractResource> because we want to allow unions\nexport type ContractResourceReferenceSchema<T extends z.ZodType<BaseContractResource>> = z.ZodType<\n ContractResourceReference<z.infer<T>>\n>;\n\nexport const contractResourceReferenceSchema: ContractResourceReferenceSchema<\n z.ZodType<BaseContractResource>\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 z.ZodType<BaseContractResource>>(\n // TODO: use resource parameter to generate a concrete 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 dependency ID resolution\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 z.ZodType<BaseContractResource>> =\n z.ZodType<ResolvedContractResourceReference<z.infer<T>>>;\n\nexport const resolvedContractResourceReferenceSchema: ResolvedContractResourceReferenceSchema<any> =\n // TODO: replace with a concrete zod 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 // TODO: use resource parameter to generate a concrete 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 // TODO: replace with a concrete zod 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 Exclude<\n keyof Resource['shape'],\n '_INTRINSIC_normalizedAddress'\n >]: 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 Exclude<keyof Resource, '_INTRINSIC_normalizedAddress'>]: 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// TODO: implement runtime resolution — currently returns input schema as-is\nexport const createResolvedResourceSchema = <Resource extends typeof baseResourceSchema>(\n resource: Resource,\n) => resource as ResolvedResourceSchema<Resource>;\n"]}
|
|
@@ -17,6 +17,7 @@ var UpgradeType = /* @__PURE__ */ (function(UpgradeType2) {
|
|
|
17
17
|
})({});
|
|
18
18
|
var EvmProxyType = /* @__PURE__ */ (function(EvmProxyType2) {
|
|
19
19
|
EvmProxyType2["TRANSPARENT_UPGRADEABLE_V5"] = "TRANSPARENT_UPGRADEABLE_V5";
|
|
20
|
+
EvmProxyType2["TRANSPARENT_UPGRADEABLE_V5_2STEP"] = "TRANSPARENT_UPGRADEABLE_V5_2STEP";
|
|
20
21
|
EvmProxyType2["UNIVERSAL_UPGRADEABLE_V5"] = "UNIVERSAL_UPGRADEABLE_V5";
|
|
21
22
|
EvmProxyType2["OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4"] = "OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4";
|
|
22
23
|
EvmProxyType2["TRANSPARENT_UPGRADEABLE_V4"] = "TRANSPARENT_UPGRADEABLE_V4";
|
|
@@ -30,6 +31,7 @@ var UUPS_PROXY_TYPES = /* @__PURE__ */ new Set([
|
|
|
30
31
|
var TUP_PROXY_TYPES = /* @__PURE__ */ new Set([
|
|
31
32
|
"TRANSPARENT_UPGRADEABLE_V4",
|
|
32
33
|
"TRANSPARENT_UPGRADEABLE_V5",
|
|
34
|
+
"TRANSPARENT_UPGRADEABLE_V5_2STEP",
|
|
33
35
|
"OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4"
|
|
34
36
|
]);
|
|
35
37
|
var SEPARATE_PROXY_ADMIN_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -90,5 +92,5 @@ var assertUpgradability = /* @__PURE__ */ __name((allowedUpgradeConfigs, upgrade
|
|
|
90
92
|
}, "assertUpgradability");
|
|
91
93
|
|
|
92
94
|
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability };
|
|
93
|
-
//# sourceMappingURL=
|
|
94
|
-
//# sourceMappingURL=
|
|
95
|
+
//# sourceMappingURL=I2SFLHPT.js.map
|
|
96
|
+
//# sourceMappingURL=I2SFLHPT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/upgrade/types.ts"],"names":["initializeDataResultSchema","z","object","data","hexSchema","gasLimit","decimalStringSchema","optional","UpgradeType","EvmProxyType","UUPS_PROXY_TYPES","Set","TUP_PROXY_TYPES","SEPARATE_PROXY_ADMIN_TYPES","isUupsProxy","proxyType","has","isTupProxy","requiresSeparateProxyAdminDeploy","ProxyType","upgradeTypeSchema","enum","proxyTypeSchema","proxyConfigSchema","upgradeType","literal","notUpgradeableConfigSchema","codeUpgradeableConfigSchema","upgradeableConfigSchema","discriminatedUnion","weakAssertUpgradability","allowedUpgradeConfigs","upgradeableConfig","some","allowedConfig","assertUnreachable","NonRetryableError","JSON","stringify","assertUpgradability"],"mappings":";;;;;AASO,IAAMA,0BAAAA,GAA6BC,EAAEC,MAAAA,CAAO;;EAE/CC,IAAAA,EAAMC,SAAAA;;AAENC,EAAAA,QAAAA,EAAUC,oBAAoBC,QAAAA;AAClC,CAAA;AAKO,IAAKC,WAAAA,6BAAAA,YAAAA,EAAAA;;;;AAAAA,EAAAA,OAAAA,YAAAA;;AASL,IAAKC,YAAAA,6BAAAA,aAAAA,EAAAA;;;;;;;AAAAA,EAAAA,OAAAA,aAAAA;;AAgBL,IAAMC,gBAAAA,uBAAkDC,GAAAA,CAAI;;;AAGlE,CAAA;AAGM,IAAMC,eAAAA,uBAAiDD,GAAAA,CAAI;;;;;AAKjE,CAAA;AAGM,IAAME,0BAAAA,uBAA4DF,GAAAA,CAAI;;;AAG5E,CAAA;AAGM,IAAMG,8BAAc,MAAA,CAAA,CAACC,SAAAA,KAAqCL,gBAAAA,CAAiBM,GAAAA,CAAID,SAAAA,CAAAA,EAA3D,aAAA;AAGpB,IAAME,6BAAa,MAAA,CAAA,CAACF,SAAAA,KAAqCH,eAAAA,CAAgB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EAAkC;AAC3D,MAAA,OAAO,IAAA;AACX,IAAA;AAEA,IAAA,IAAIU,aAAAA,CAAcV,gBAAW,cAAA,EAA+B;AACxD,MAAA,OAAO,IAAA;AACX,IAAA;AAEA,IAAA,IAAIU,aAAAA,CAAcV,gBAAW,OAAA,EAAwB;AACjD,MAAA,OACIU,aAAAA,CAAcnB,cACbiB,iBAAAA,CAA6CjB,SAAAA;AAEtD,IAAA;AAEAoB,IAAAA,iBAAAA,CAAkBD,aAAAA,CAAAA;AACtB,EAAA,CAAA,CAAA,EACF;AAEE,IAAA;AACJ,EAAA;AAEA,EAAA,MAAM,IAAIE,iBAAAA,CACN,CAAA,eAAA,EAAkBC,IAAAA,CAAKC,SAAAA,CAAUN,iBAAAA,CAAAA,CAAAA,2DAAAA,EAAgFK,IAAAA,CAAKC,SAAAA,CAAUP,qBAAAA,CAAAA,CAAAA,CAAwB,CAAA;AAEhK,CAAA,EAvCuC,yBAAA;AAyChC,IAAMQ,mBAAAA,mBAAsB,MAAA,CAAA,CAC/BR,qBAAAA,EAEAC,iBAAAA,KAAAA;AAEA,EAAA,IAAI,CAACA,iBAAAA,EAAmB;AACpB,IAAA,MAAM,IAAII,kBAAkB,0CAAA,CAAA;AAChC,EAAA;AAEA,EAAA,OAAON,uBAAAA,CAAwBC,uBAAuBC,iBAAAA,CAAAA;AAC1D,CAAA,EAVmC,qBAAA","file":"I2SFLHPT.js","sourcesContent":["import z from 'zod';\n\nimport { decimalStringSchema, hexSchema } from '@layerzerolabs/common-chain-model';\nimport { assertUnreachable, NonRetryableError } from '@layerzerolabs/common-error-utils';\nimport type { Identity } from '@layerzerolabs/typescript-utils';\n\n/**\n * `InitializeDataResult` schema.\n */\nexport const initializeDataResultSchema = z.object({\n /** Encoded initialization data (e.g., encodeFunctionData for initialize(...)) */\n data: hexSchema,\n /** Optional gas limit override for the initialization transaction */\n gasLimit: decimalStringSchema.optional(),\n});\n\nexport interface InitializeDataResult\n extends Identity<z.infer<typeof initializeDataResultSchema>> {}\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 v5 https://docs.openzeppelin.com/contracts/5.x/api/proxy#transparentupgradeableproxy\n TRANSPARENT_UPGRADEABLE_V5 = 'TRANSPARENT_UPGRADEABLE_V5',\n // TUP v5 with `ProxyAdmin2Step` (`Ownable2Step`, no renounce)\n TRANSPARENT_UPGRADEABLE_V5_2STEP = 'TRANSPARENT_UPGRADEABLE_V5_2STEP',\n // UUPS v5 https://docs.openzeppelin.com/contracts/5.x/api/proxy#uupsupgradeable\n UNIVERSAL_UPGRADEABLE_V5 = 'UNIVERSAL_UPGRADEABLE_V5',\n // OTUP v4 https://github.com/wighawag/hardhat-deploy/blob/v0.12.1/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\n OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4 = 'OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4',\n // TUP v4 https://docs.openzeppelin.com/contracts/4.x/api/proxy#TransparentUpgradeableProxy\n TRANSPARENT_UPGRADEABLE_V4 = 'TRANSPARENT_UPGRADEABLE_V4',\n // UUPS v4 https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable\n UNIVERSAL_UPGRADEABLE_V4 = 'UNIVERSAL_UPGRADEABLE_V4',\n}\n\n/** UUPS-based proxy types (no separate `ProxyAdmin`). */\nexport const UUPS_PROXY_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.UNIVERSAL_UPGRADEABLE_V4,\n EvmProxyType.UNIVERSAL_UPGRADEABLE_V5,\n]);\n\n/** TUP-based proxy types (have a `ProxyAdmin` with `getOwner`/`setOwner`). */\nexport const TUP_PROXY_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V4,\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V5,\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP,\n EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4,\n]);\n\n/** Proxy types that deploy a separate `ProxyAdmin` contract (v4 variants only). */\nexport const SEPARATE_PROXY_ADMIN_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V4,\n EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4,\n]);\n\n/** Whether the proxy type is UUPS (Universal Upgradeable Proxy Standard). */\nexport const isUupsProxy = (proxyType: EvmProxyType): boolean => UUPS_PROXY_TYPES.has(proxyType);\n\n/** Whether the proxy type is TUP (Transparent Upgradeable Proxy). */\nexport const isTupProxy = (proxyType: EvmProxyType): boolean => TUP_PROXY_TYPES.has(proxyType);\n\n/** Whether the proxy type requires a separate `ProxyAdmin` deployment (v4 variants). */\nexport const requiresSeparateProxyAdminDeploy = (proxyType: EvmProxyType): boolean =>\n SEPARATE_PROXY_ADMIN_TYPES.has(proxyType);\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\n/** @deprecated use assertUpgradability, ensure your config is nonoptional */\nexport const weakAssertUpgradability = <AllowedUpgradeConfigs extends UpgradeableConfig[]>(\n allowedUpgradeConfigs: AllowedUpgradeConfigs,\n upgradeableConfig?: UpgradeableConfig,\n): asserts upgradeableConfig is AllowedUpgradeConfigs[number] => {\n if (!upgradeableConfig) {\n return;\n }\n\n if (\n allowedUpgradeConfigs.some((allowedConfig) => {\n if (allowedConfig.upgradeType !== upgradeableConfig.upgradeType) {\n return false;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.NOT_UPGRADEABLE) {\n return true;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.CODE_UPGRADE) {\n return true;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.PROXY) {\n return (\n allowedConfig.proxyType ===\n (upgradeableConfig as ProxyUpgradeableConfig).proxyType\n );\n }\n\n assertUnreachable(allowedConfig);\n })\n ) {\n // included in allowed array\n return;\n }\n\n throw new NonRetryableError(\n `Upgrade config ${JSON.stringify(upgradeableConfig)} is not compatible with any of the allowed upgrade configs ${JSON.stringify(allowedUpgradeConfigs)}`,\n );\n};\n\nexport const assertUpgradability = <AllowedUpgradeConfigs extends UpgradeableConfig[]>(\n allowedUpgradeConfigs: AllowedUpgradeConfigs,\n // Eventually make this nonoptional once callers are upgraded\n upgradeableConfig?: UpgradeableConfig,\n): asserts upgradeableConfig is AllowedUpgradeConfigs[number] => {\n if (!upgradeableConfig) {\n throw new NonRetryableError('Will not handle undefined upgrade config');\n }\n\n return weakAssertUpgradability(allowedUpgradeConfigs, upgradeableConfig);\n};\n"]}
|
package/dist/deploy/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import '../CA6UC3D3.js';
|
|
|
2
2
|
export { artifactRegistryActivityFactorySchema, createMockArtifactRegistry, realIdSchema, resourceRefSchema, resourceRegistryActivityFactorySchema, upsertResourceRealIdArgsSchema } from '../VJE5VDUA.js';
|
|
3
3
|
export { ArtifactType, artifactTypeSchema, artifactWithTypeSchema, deploymentArtifactSchema, fullDeploymentArtifactSchema, identityOnlyDeploymentArtifactSchema, metadataArtifactSchema, solanaDeploymentArtifactExtraInfoSchema, suiDeploymentArtifactExtraInfoSchema, verificationArtifactSchema } from '../OAY3VYYR.js';
|
|
4
4
|
export { createResourceBuilder } from '../BHJ6M5FG.js';
|
|
5
|
-
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from '../
|
|
5
|
+
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from '../7QV722N2.js';
|
|
6
6
|
import '../ZCFXJFGI.js';
|
|
7
|
-
import '../
|
|
7
|
+
import '../I2SFLHPT.js';
|
|
8
8
|
export { deployWorkflowChainStateSchema, deployWorkflowOrchestratorStateSchema, extractVerificationArtifactBaseArgsSchema } from '../GLPJHNSD.js';
|
|
9
9
|
import '../VUOMXK5T.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -16,6 +16,7 @@ export declare const baseContractResourceSchema: z.ZodObject<{
|
|
|
16
16
|
upgradeType: z.ZodLiteral<import("..").UpgradeType.PROXY>;
|
|
17
17
|
proxyType: z.ZodEnum<{
|
|
18
18
|
TRANSPARENT_UPGRADEABLE_V5: import("..").EvmProxyType.TRANSPARENT_UPGRADEABLE_V5;
|
|
19
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP: import("..").EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP;
|
|
19
20
|
UNIVERSAL_UPGRADEABLE_V5: import("..").EvmProxyType.UNIVERSAL_UPGRADEABLE_V5;
|
|
20
21
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4: import("..").EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4;
|
|
21
22
|
TRANSPARENT_UPGRADEABLE_V4: import("..").EvmProxyType.TRANSPARENT_UPGRADEABLE_V4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/deploy/resources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGlG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAI7D,eAAO,MAAM,kBAAkB;;sBAEK,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,UAAU;iBAC5D,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AAEH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/deploy/resources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGlG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAI7D,eAAO,MAAM,kBAAkB;;sBAEK,CAAC,CAAC,SAAS,GAA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AC,EAAE,CAAC;AAGhE,eAAO,MAAM,4BAA4B,GAAI,QAAQ,SAAS,OAAO,kBAAkB,EACnF,UAAU,QAAQ,KACL,sBAAsB,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/deploy/resources.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from '../
|
|
1
|
+
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from '../7QV722N2.js';
|
|
2
2
|
import '../ZCFXJFGI.js';
|
|
3
|
-
import '../
|
|
3
|
+
import '../I2SFLHPT.js';
|
|
4
4
|
import '../VUOMXK5T.js';
|
|
5
5
|
//# sourceMappingURL=resources.js.map
|
|
6
6
|
//# sourceMappingURL=resources.js.map
|
package/dist/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import './SBZPLPCB.js';
|
|
|
2
2
|
export { createAcceptAdminTransferTransactionsSchema, createAcceptAdminTransferTransactionsWithSpecializedInputSchema, createBeginAdminTransferTransactionsSchema, createBeginAdminTransferTransactionsWithSpecializedInputSchema, createSetRoleTransactionsWithSpecializedInputSchema, generateAdmin2StepSchemas, generateCreateSetRoleTransactionsSchema, generateEnumerableRoleManagementSchemas, generateGetRoleMembersSchema, generateHasRoleSchema, generateRoleManagementSchemas, getPendingAdminSchema, getPendingAdminWithSpecializedInputSchema, getRoleMembersWithSpecializedInputSchema, hasRoleWithSpecializedInputSchema } from './JBKF52KU.js';
|
|
3
3
|
export { BaseContractRole } from './JSK5QSWJ.js';
|
|
4
4
|
import './MBNY6BTS.js';
|
|
5
|
-
export { createWiringPlannerActivityFactorySchema } from './
|
|
5
|
+
export { createWiringPlannerActivityFactorySchema } from './7NU2Y5ZK.js';
|
|
6
6
|
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from './JRKJED2G.js';
|
|
7
7
|
import './CA6UC3D3.js';
|
|
8
8
|
export { artifactRegistryActivityFactorySchema, createMockArtifactRegistry, realIdSchema, resourceRefSchema, resourceRegistryActivityFactorySchema, upsertResourceRealIdArgsSchema } from './VJE5VDUA.js';
|
|
9
9
|
export { ArtifactType, artifactTypeSchema, artifactWithTypeSchema, deploymentArtifactSchema, fullDeploymentArtifactSchema, identityOnlyDeploymentArtifactSchema, metadataArtifactSchema, solanaDeploymentArtifactExtraInfoSchema, suiDeploymentArtifactExtraInfoSchema, verificationArtifactSchema } from './OAY3VYYR.js';
|
|
10
10
|
export { createResourceBuilder } from './BHJ6M5FG.js';
|
|
11
|
-
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from './
|
|
11
|
+
export { baseContractResourceSchema, baseMeshResourceSchema, baseResourceSchema, contractResourceReferenceSchema, contractResourceReferenceSchemaFor, createResolvedResourceSchema, extractContractResourceReferences, extractIdFromContractResourceReference, extractIdFromMeshResourceReference, extractMeshResourceReferences, meshResourceReferenceSchema, meshResourceReferenceSchemaFor, resolvedContractResourceReferenceSchema, resolvedMeshResourceReferenceSchema, withIntrinsicAddress } from './7QV722N2.js';
|
|
12
12
|
import './ZCFXJFGI.js';
|
|
13
|
-
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from './
|
|
13
|
+
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from './I2SFLHPT.js';
|
|
14
14
|
export { deployWorkflowChainStateSchema, deployWorkflowOrchestratorStateSchema, extractVerificationArtifactBaseArgsSchema } from './GLPJHNSD.js';
|
|
15
15
|
export { generateThrowCreateSetRoleTransactions, generateThrowHasRole, generateThrowRoleManagement } from './45LWGDPP.js';
|
|
16
16
|
import './VUOMXK5T.js';
|
package/dist/upgrade/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../ZCFXJFGI.js';
|
|
2
|
-
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from '../
|
|
2
|
+
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from '../I2SFLHPT.js';
|
|
3
3
|
import '../VUOMXK5T.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/upgrade/types.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare enum UpgradeType {
|
|
|
16
16
|
}
|
|
17
17
|
export declare enum EvmProxyType {
|
|
18
18
|
TRANSPARENT_UPGRADEABLE_V5 = "TRANSPARENT_UPGRADEABLE_V5",
|
|
19
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP = "TRANSPARENT_UPGRADEABLE_V5_2STEP",
|
|
19
20
|
UNIVERSAL_UPGRADEABLE_V5 = "UNIVERSAL_UPGRADEABLE_V5",
|
|
20
21
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4 = "OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4",
|
|
21
22
|
TRANSPARENT_UPGRADEABLE_V4 = "TRANSPARENT_UPGRADEABLE_V4",
|
|
@@ -35,6 +36,7 @@ export declare const isTupProxy: (proxyType: EvmProxyType) => boolean;
|
|
|
35
36
|
export declare const requiresSeparateProxyAdminDeploy: (proxyType: EvmProxyType) => boolean;
|
|
36
37
|
export declare const ProxyType: {
|
|
37
38
|
TRANSPARENT_UPGRADEABLE_V5: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5;
|
|
39
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP;
|
|
38
40
|
UNIVERSAL_UPGRADEABLE_V5: EvmProxyType.UNIVERSAL_UPGRADEABLE_V5;
|
|
39
41
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4;
|
|
40
42
|
TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.TRANSPARENT_UPGRADEABLE_V4;
|
|
@@ -44,6 +46,7 @@ export type ProxyType = (typeof ProxyType)[keyof typeof ProxyType];
|
|
|
44
46
|
export declare const upgradeTypeSchema: z.ZodEnum<typeof UpgradeType>;
|
|
45
47
|
export declare const proxyTypeSchema: z.ZodEnum<{
|
|
46
48
|
TRANSPARENT_UPGRADEABLE_V5: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5;
|
|
49
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP;
|
|
47
50
|
UNIVERSAL_UPGRADEABLE_V5: EvmProxyType.UNIVERSAL_UPGRADEABLE_V5;
|
|
48
51
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4;
|
|
49
52
|
TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.TRANSPARENT_UPGRADEABLE_V4;
|
|
@@ -53,6 +56,7 @@ export declare const proxyConfigSchema: z.ZodObject<{
|
|
|
53
56
|
upgradeType: z.ZodLiteral<UpgradeType.PROXY>;
|
|
54
57
|
proxyType: z.ZodEnum<{
|
|
55
58
|
TRANSPARENT_UPGRADEABLE_V5: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5;
|
|
59
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP;
|
|
56
60
|
UNIVERSAL_UPGRADEABLE_V5: EvmProxyType.UNIVERSAL_UPGRADEABLE_V5;
|
|
57
61
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4;
|
|
58
62
|
TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.TRANSPARENT_UPGRADEABLE_V4;
|
|
@@ -72,6 +76,7 @@ export declare const upgradeableConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
72
76
|
upgradeType: z.ZodLiteral<UpgradeType.PROXY>;
|
|
73
77
|
proxyType: z.ZodEnum<{
|
|
74
78
|
TRANSPARENT_UPGRADEABLE_V5: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5;
|
|
79
|
+
TRANSPARENT_UPGRADEABLE_V5_2STEP: EvmProxyType.TRANSPARENT_UPGRADEABLE_V5_2STEP;
|
|
75
80
|
UNIVERSAL_UPGRADEABLE_V5: EvmProxyType.UNIVERSAL_UPGRADEABLE_V5;
|
|
76
81
|
OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4;
|
|
77
82
|
TRANSPARENT_UPGRADEABLE_V4: EvmProxyType.TRANSPARENT_UPGRADEABLE_V4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upgrade/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;iBAKrC,CAAC;AAEH,MAAM,WAAW,oBACb,SAAQ,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;CAAG;AAEnE,oBAAY,WAAW;IAEnB,eAAe,oBAAoB;IAEnC,KAAK,UAAU;IAEf,YAAY,iBAAiB;CAChC;AAED,oBAAY,YAAY;IAEpB,0BAA0B,+BAA+B;IAEzD,wBAAwB,6BAA6B;IAErD,oCAAoC,yCAAyC;IAE7E,0BAA0B,+BAA+B;IAEzD,wBAAwB,6BAA6B;CACxD;AAED,y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eableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from '../
|
|
1
|
+
export { EvmProxyType, ProxyType, SEPARATE_PROXY_ADMIN_TYPES, TUP_PROXY_TYPES, UUPS_PROXY_TYPES, UpgradeType, assertUpgradability, codeUpgradeableConfigSchema, initializeDataResultSchema, isTupProxy, isUupsProxy, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, requiresSeparateProxyAdminDeploy, upgradeTypeSchema, upgradeableConfigSchema, weakAssertUpgradability } from '../I2SFLHPT.js';
|
|
2
2
|
import '../VUOMXK5T.js';
|
|
3
3
|
//# sourceMappingURL=types.js.map
|
|
4
4
|
//# sourceMappingURL=types.js.map
|
package/dist/wire/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../MBNY6BTS.js';
|
|
2
|
-
export { createWiringPlannerActivityFactorySchema } from '../
|
|
2
|
+
export { createWiringPlannerActivityFactorySchema } from '../7NU2Y5ZK.js';
|
|
3
3
|
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from '../JRKJED2G.js';
|
|
4
4
|
import '../VUOMXK5T.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/wire/planner.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare const commonArgsSchema: z.ZodObject<{
|
|
|
12
12
|
onlyOperations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
13
|
excludeOperations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
14
|
allowSelfWiring: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
-
|
|
15
|
+
senderEntityNames: z.ZodArray<z.ZodString>;
|
|
16
16
|
forceSend: z.ZodOptional<z.ZodBoolean>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export type CommonArgs = z.infer<typeof commonArgsSchema>;
|
package/dist/wire/planner.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/dw-model",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"zod": "4.3.5",
|
|
20
|
-
"@layerzerolabs/common-chain-model": "1.2.
|
|
21
|
-
"@layerzerolabs/gated-transaction": "1.2.
|
|
22
|
-
"@layerzerolabs/common-error-utils": "1.2.
|
|
23
|
-
"@layerzerolabs/layerzero-definitions": "1.2.
|
|
24
|
-
"@layerzerolabs/
|
|
25
|
-
"@layerzerolabs/
|
|
20
|
+
"@layerzerolabs/common-chain-model": "1.2.31",
|
|
21
|
+
"@layerzerolabs/gated-transaction": "1.2.31",
|
|
22
|
+
"@layerzerolabs/common-error-utils": "1.2.31",
|
|
23
|
+
"@layerzerolabs/layerzero-definitions": "1.2.31",
|
|
24
|
+
"@layerzerolabs/zod-utils": "1.2.31",
|
|
25
|
+
"@layerzerolabs/typescript-utils": "1.2.31"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@mysten/sui": "^1.45.1",
|
|
29
29
|
"tsup": "^8.4.0",
|
|
30
|
-
"vitest": "^
|
|
31
|
-
"@layerzerolabs/tsup-configuration": "1.2.
|
|
32
|
-
"@layerzerolabs/typescript-configuration": "1.2.
|
|
30
|
+
"vitest": "^4.1.10",
|
|
31
|
+
"@layerzerolabs/tsup-configuration": "1.2.31",
|
|
32
|
+
"@layerzerolabs/typescript-configuration": "1.2.31"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public",
|
package/dist/TMJQ6B76.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/wire/planner.ts"],"names":["commonArgsSchema","z","object","callerWorkflowId","string","callerRunId","planId","batchSize","number","chainNames","array","chainNameSchema","onlyFrom","optional","onlyTo","excludeFrom","excludeTo","onlyOperations","excludeOperations","allowSelfWiring","boolean","senderEntityName","forceSend","createWiringPlannerActivityFactorySchema","customArgs","createPlan","functionSchema","input","tuple","output","promise","void","enactPlan","assertPlan"],"mappings":";;;;;AAKA,IAAMA,gBAAAA,GAAmBC,EAAEC,MAAAA,CAAO;AAC9BC,EAAAA,gBAAAA,EAAkBF,EAAEG,MAAAA,EAAM;AAC1BC,EAAAA,WAAAA,EAAaJ,EAAEG,MAAAA,EAAM;AACrBE,EAAAA,MAAAA,EAAQL,EAAEG,MAAAA,EAAM;AAChBG,EAAAA,SAAAA,EAAWN,EAAEO,MAAAA,EAAM;EACnBC,UAAAA,EAAYR,CAAAA,CAAES,MAAMC,eAAAA,CAAAA;;AAEpBC,EAAAA,QAAAA,EAAUX,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC3CC,EAAAA,MAAAA,EAAQb,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AACzCE,EAAAA,WAAAA,EAAad,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC9CG,EAAAA,SAAAA,EAAWf,CAAAA,CAAES,KAAAA,CAAMC,eAAAA,CAAAA,CAAiBE,QAAAA,EAAQ;AAC5CI,EAAAA,cAAAA,EAAgBhB,EAAES,KAAAA,CAAMT,CAAAA,CAAEG,MAAAA,EAAM,EAAIS,QAAAA,EAAQ;AAC5CK,EAAAA,iBAAAA,EAAmBjB,EAAES,KAAAA,CAAMT,CAAAA,CAAEG,MAAAA,EAAM,EAAIS,QAAAA,EAAQ;EAC/CM,eAAAA,EAAiBlB,CAAAA,CAAEmB,OAAAA,EAAO,CAAGP,QAAAA,EAAQ;;AAErCQ,EAAAA,gBAAAA,EAAkBpB,EAAEG,MAAAA,EAAM;EAC1BkB,SAAAA,EAAWrB,CAAAA,CAAEmB,OAAAA,EAAO,CAAGP,QAAAA;AAC3B,CAAA,CAAA;AAUO,IAAMU,wCAAAA,2BACTC,UAAAA,KAAAA;AAEA,EAAA,OAAOvB,EAAEC,MAAAA,CAAO;AACZuB,IAAAA,UAAAA,EAAYC,cAAAA,CAAe;AACvBC,MAAAA,KAAAA,EAAO1B,EAAE2B,KAAAA,CAAM;AAACJ,QAAAA,UAAAA;AAAYxB,QAAAA;AAAiB,OAAA,CAAA;AAC7C6B,MAAAA,MAAAA,EAAQ5B,CAAAA,CAAE6B,OAAAA,CAAQ7B,CAAAA,CAAE8B,IAAAA,EAAI;KAC5B,CAAA;AACAC,IAAAA,SAAAA,EAAWN,cAAAA,CAAe;AACtBC,MAAAA,KAAAA,EAAO1B,EAAE2B,KAAAA,CAAM;AAACJ,QAAAA,UAAAA;AAAYxB,QAAAA;AAAiB,OAAA,CAAA;AAC7C6B,MAAAA,MAAAA,EAAQ5B,CAAAA,CAAE6B,OAAAA,CAAQ7B,CAAAA,CAAE8B,IAAAA,EAAI;KAC5B,CAAA;AACAE,IAAAA,UAAAA,EAAYP,cAAAA,CAAe;AACvBC,MAAAA,KAAAA,EAAO1B,EAAE2B,KAAAA,CAAM;AAACJ,QAAAA,UAAAA;AAAYxB,QAAAA;AAAiB,OAAA,CAAA;AAC7C6B,MAAAA,MAAAA,EAAQ5B,CAAAA,CAAE6B,OAAAA,CAAQ7B,CAAAA,CAAE8B,IAAAA,EAAI;KAC5B;GACJ,CAAA;AACJ,CAAA,EAjBwD,0CAAA","file":"TMJQ6B76.js","sourcesContent":["import z from 'zod';\n\nimport { chainNameSchema } from '@layerzerolabs/layerzero-definitions';\nimport { functionSchema } from '@layerzerolabs/zod-utils';\n\nconst commonArgsSchema = z.object({\n callerWorkflowId: z.string(),\n callerRunId: z.string(),\n planId: z.string(),\n batchSize: z.number(),\n chainNames: z.array(chainNameSchema),\n // filters\n onlyFrom: z.array(chainNameSchema).optional(),\n onlyTo: z.array(chainNameSchema).optional(),\n excludeFrom: z.array(chainNameSchema).optional(),\n excludeTo: z.array(chainNameSchema).optional(),\n onlyOperations: z.array(z.string()).optional(),\n excludeOperations: z.array(z.string()).optional(),\n allowSelfWiring: z.boolean().optional(),\n // TODO make this a preference list\n senderEntityName: z.string(),\n forceSend: z.boolean().optional(),\n});\n\nexport type CommonArgs = z.infer<typeof commonArgsSchema>;\n\nexport interface WiringPlannerActivityFactoryImpl<T> {\n createPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n enactPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n assertPlan: (customArgs: T, commonArgs: CommonArgs) => Promise<void>;\n}\n\nexport const createWiringPlannerActivityFactorySchema = <T extends z.ZodType>(\n customArgs: T,\n): z.ZodType<WiringPlannerActivityFactoryImpl<z.infer<T>>> => {\n return z.object({\n createPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n enactPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n assertPlan: functionSchema({\n input: z.tuple([customArgs, commonArgsSchema]),\n output: z.promise(z.void()),\n }),\n });\n};\n"]}
|
package/dist/YAEJZ74R.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/upgrade/types.ts"],"names":["initializeDataResultSchema","z","object","data","hexSchema","gasLimit","decimalStringSchema","optional","UpgradeType","EvmProxyType","UUPS_PROXY_TYPES","Set","TUP_PROXY_TYPES","SEPARATE_PROXY_ADMIN_TYPES","isUupsProxy","proxyType","has","isTupProxy","requiresSeparateProxyAdminDeploy","ProxyType","upgradeTypeSchema","enum","proxyTypeSchema","proxyConfigSchema","upgradeType","literal","notUpgradeableConfigSchema","codeUpgradeableConfigSchema","upgradeableConfigSchema","discriminatedUnion","weakAssertUpgradability","allowedUpgradeConfigs","upgradeableConfig","some","allowedConfig","assertUnreachable","NonRetryableError","JSON","stringify","assertUpgradability"],"mappings":";;;;;AASO,IAAMA,0BAAAA,GAA6BC,EAAEC,MAAAA,CAAO;;EAE/CC,IAAAA,EAAMC,SAAAA;;AAENC,EAAAA,QAAAA,EAAUC,oBAAoBC,QAAAA;AAClC,CAAA;AAKO,IAAKC,WAAAA,6BAAAA,YAAAA,EAAAA;;;;AAAAA,EAAAA,OAAAA,YAAAA;;AASL,IAAKC,YAAAA,6BAAAA,aAAAA,EAAAA;;;;;;AAAAA,EAAAA,OAAAA,aAAAA;;AAcL,IAAMC,gBAAAA,uBAAkDC,GAAAA,CAAI;;;AAGlE,CAAA;AAGM,IAAMC,eAAAA,uBAAiDD,GAAAA,CAAI;;;;AAIjE,CAAA;AAGM,IAAME,0BAAAA,uBAA4DF,GAAAA,CAAI;;;AAG5E,CAAA;AAGM,IAAMG,8BAAc,MAAA,CAAA,CAACC,SAAAA,KAAqCL,gBAAAA,CAAiBM,GAAAA,CAAID,SAAAA,CAAAA,EAA3D,aAAA;AAGpB,IAAME,6BAAa,MAAA,CAAA,CAACF,SAAAA,KAAqCH,eAAAA,CAAgBI,GAAAA,CAAID,SAAAA,CAAAA,EAA1D,YAAA;AAGnB,IAAMG,mDAAmC,MAAA,CAAA,CAACH,SAAAA,KAC7CF,0BAAAA,CAA2BG,GAAAA,CAAID,SAAAA,CAAAA,EADa,kCAAA;AAGzC,IAAMI,SAAAA,GAAY;EACrB,GAAGV;AACP;AAIO,IAAMW,iBAAAA,GAAoBnB,CAAAA,CAAEoB,IAAAA,CAAKb,WAAAA;AAEjC,IAAMc,eAAAA,GAAkBrB,CAAAA,CAAEoB,IAAAA,CAAKF,SAAAA;AAC/B,IAAMI,iBAAAA,GAAoBtB,EAAEC,MAAAA,CAAO;EACtCsB,WAAAA,EAAavB,CAAAA,CAAEwB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A,CAAKC,SAAAA,CAAUN,iBAAAA,CAAAA,CAAAA,2DAAAA,EAAgFK,IAAAA,CAAKC,SAAAA,CAAUP,qBAAAA,CAAAA,CAAAA,CAAwB,CAAA;AAEhK,CAAA,EAvCuC,yBAAA;AAyChC,IAAMQ,mBAAAA,mBAAsB,MAAA,CAAA,CAC/BR,qBAAAA,EAEAC,iBAAAA,KAAAA;AAEA,EAAA,IAAI,CAACA,iBAAAA,EAAmB;AACpB,IAAA,MAAM,IAAII,kBAAkB,0CAAA,CAAA;AAChC,EAAA;AAEA,EAAA,OAAON,uBAAAA,CAAwBC,uBAAuBC,iBAAAA,CAAAA;AAC1D,CAAA,EAVmC,qBAAA","file":"YAEJZ74R.js","sourcesContent":["import z from 'zod';\n\nimport { decimalStringSchema, hexSchema } from '@layerzerolabs/common-chain-model';\nimport { assertUnreachable, NonRetryableError } from '@layerzerolabs/common-error-utils';\nimport type { Identity } from '@layerzerolabs/typescript-utils';\n\n/**\n * `InitializeDataResult` schema.\n */\nexport const initializeDataResultSchema = z.object({\n /** Encoded initialization data (e.g., encodeFunctionData for initialize(...)) */\n data: hexSchema,\n /** Optional gas limit override for the initialization transaction */\n gasLimit: decimalStringSchema.optional(),\n});\n\nexport interface InitializeDataResult\n extends Identity<z.infer<typeof initializeDataResultSchema>> {}\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 v5 https://docs.openzeppelin.com/contracts/5.x/api/proxy#transparentupgradeableproxy\n TRANSPARENT_UPGRADEABLE_V5 = 'TRANSPARENT_UPGRADEABLE_V5',\n // UUPS v5 https://docs.openzeppelin.com/contracts/5.x/api/proxy#uupsupgradeable\n UNIVERSAL_UPGRADEABLE_V5 = 'UNIVERSAL_UPGRADEABLE_V5',\n // OTUP v4 https://github.com/wighawag/hardhat-deploy/blob/v0.12.1/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\n OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4 = 'OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4',\n // TUP v4 https://docs.openzeppelin.com/contracts/4.x/api/proxy#TransparentUpgradeableProxy\n TRANSPARENT_UPGRADEABLE_V4 = 'TRANSPARENT_UPGRADEABLE_V4',\n // UUPS v4 https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable\n UNIVERSAL_UPGRADEABLE_V4 = 'UNIVERSAL_UPGRADEABLE_V4',\n}\n\n/** UUPS-based proxy types (no separate `ProxyAdmin`). */\nexport const UUPS_PROXY_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.UNIVERSAL_UPGRADEABLE_V4,\n EvmProxyType.UNIVERSAL_UPGRADEABLE_V5,\n]);\n\n/** TUP-based proxy types (have a `ProxyAdmin` with `getOwner`/`setOwner`). */\nexport const TUP_PROXY_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V4,\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V5,\n EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4,\n]);\n\n/** Proxy types that deploy a separate `ProxyAdmin` contract (v4 variants only). */\nexport const SEPARATE_PROXY_ADMIN_TYPES: ReadonlySet<EvmProxyType> = new Set([\n EvmProxyType.TRANSPARENT_UPGRADEABLE_V4,\n EvmProxyType.OPTIMIZED_TRANSPARENT_UPGRADEABLE_V4,\n]);\n\n/** Whether the proxy type is UUPS (Universal Upgradeable Proxy Standard). */\nexport const isUupsProxy = (proxyType: EvmProxyType): boolean => UUPS_PROXY_TYPES.has(proxyType);\n\n/** Whether the proxy type is TUP (Transparent Upgradeable Proxy). */\nexport const isTupProxy = (proxyType: EvmProxyType): boolean => TUP_PROXY_TYPES.has(proxyType);\n\n/** Whether the proxy type requires a separate `ProxyAdmin` deployment (v4 variants). */\nexport const requiresSeparateProxyAdminDeploy = (proxyType: EvmProxyType): boolean =>\n SEPARATE_PROXY_ADMIN_TYPES.has(proxyType);\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\n/** @deprecated use assertUpgradability, ensure your config is nonoptional */\nexport const weakAssertUpgradability = <AllowedUpgradeConfigs extends UpgradeableConfig[]>(\n allowedUpgradeConfigs: AllowedUpgradeConfigs,\n upgradeableConfig?: UpgradeableConfig,\n): asserts upgradeableConfig is AllowedUpgradeConfigs[number] => {\n if (!upgradeableConfig) {\n return;\n }\n\n if (\n allowedUpgradeConfigs.some((allowedConfig) => {\n if (allowedConfig.upgradeType !== upgradeableConfig.upgradeType) {\n return false;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.NOT_UPGRADEABLE) {\n return true;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.CODE_UPGRADE) {\n return true;\n }\n\n if (allowedConfig.upgradeType === UpgradeType.PROXY) {\n return (\n allowedConfig.proxyType ===\n (upgradeableConfig as ProxyUpgradeableConfig).proxyType\n );\n }\n\n assertUnreachable(allowedConfig);\n })\n ) {\n // included in allowed array\n return;\n }\n\n throw new NonRetryableError(\n `Upgrade config ${JSON.stringify(upgradeableConfig)} is not compatible with any of the allowed upgrade configs ${JSON.stringify(allowedUpgradeConfigs)}`,\n );\n};\n\nexport const assertUpgradability = <AllowedUpgradeConfigs extends UpgradeableConfig[]>(\n allowedUpgradeConfigs: AllowedUpgradeConfigs,\n // Eventually make this nonoptional once callers are upgraded\n upgradeableConfig?: UpgradeableConfig,\n): asserts upgradeableConfig is AllowedUpgradeConfigs[number] => {\n if (!upgradeableConfig) {\n throw new NonRetryableError('Will not handle undefined upgrade config');\n }\n\n return weakAssertUpgradability(allowedUpgradeConfigs, upgradeableConfig);\n};\n"]}
|