-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b74afbe
commit 39f08f7
Showing
14 changed files
with
100 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './config' | ||
export * from './schema' | ||
export * from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { AddressSchema, UIntSchema } from '@layerzerolabs/devtools' | ||
import { z } from 'zod' | ||
import { Timeout } from './types' | ||
|
||
export const TimeoutSchema = z.object({ | ||
lib: AddressSchema, | ||
expiry: UIntSchema, | ||
}) satisfies z.ZodSchema<Timeout, z.ZodTypeDef, unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './config' | ||
export * from './schema' | ||
export * from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AddressSchema, UIntSchema } from '@layerzerolabs/devtools' | ||
import { z } from 'zod' | ||
import { Uln302ExecutorConfig, Uln302UlnConfig } from './types' | ||
|
||
export const Uln302ExecutorConfigSchema = z.object({ | ||
executor: AddressSchema, | ||
maxMessageSize: UIntSchema, | ||
}) satisfies z.ZodSchema<Uln302ExecutorConfig, z.ZodTypeDef, unknown> | ||
|
||
export const Uln302UlnConfigSchema = z.object({ | ||
confirmations: UIntSchema, | ||
requiredDVNs: z.array(AddressSchema), | ||
optionalDVNs: z.array(AddressSchema), | ||
optionalDVNThreshold: UIntSchema, | ||
}) satisfies z.ZodSchema<Uln302UlnConfig, z.ZodTypeDef, unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { OmniGraphHardhat } from '../../../devtools-evm-hardhat/dist' | ||
import { OmniGraphHardhat } from '@layerzerolabs/devtools-evm-hardhat' | ||
import { OAppEdgeConfig } from '@layerzerolabs/ua-devtools' | ||
|
||
export type OAppOmniGraphHardhat = OmniGraphHardhat<unknown, unknown> | ||
export type OAppOmniGraphHardhat = OmniGraphHardhat<unknown, OAppEdgeConfig | undefined> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './config' | ||
export * from './schema' | ||
export * from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { z } from 'zod' | ||
import { AddressSchema, UIntSchema } from '@layerzerolabs/devtools' | ||
import { Uln302ExecutorConfigSchema, Uln302UlnConfigSchema, TimeoutSchema } from '@layerzerolabs/protocol-devtools' | ||
import type { OAppEdgeConfig, OAppReceiveConfig, OAppReceiveLibraryConfig, OAppSendConfig } from './types' | ||
|
||
export const OAppReceiveLibraryConfigSchema = z.object({ | ||
gracePeriod: UIntSchema, | ||
receiveLibrary: AddressSchema, | ||
}) satisfies z.ZodSchema<OAppReceiveLibraryConfig, z.ZodTypeDef, unknown> | ||
|
||
export const OAppSendConfigSchema = z.object({ | ||
executorConfig: Uln302ExecutorConfigSchema, | ||
ulnConfig: Uln302UlnConfigSchema, | ||
}) satisfies z.ZodSchema<OAppSendConfig, z.ZodTypeDef, unknown> | ||
|
||
export const OAppReceiveConfigSchema = z.object({ | ||
ulnConfig: Uln302UlnConfigSchema, | ||
}) satisfies z.ZodSchema<OAppReceiveConfig, z.ZodTypeDef, unknown> | ||
|
||
export const OAppEdgeConfigSchema = z.object({ | ||
sendLibrary: AddressSchema.optional(), | ||
receiveLibraryConfig: OAppReceiveLibraryConfigSchema.optional(), | ||
receiveLibraryTimeoutConfig: TimeoutSchema.optional(), | ||
sendConfig: OAppSendConfigSchema.optional(), | ||
receiveConfig: OAppReceiveConfigSchema.optional(), | ||
}) satisfies z.ZodSchema<OAppEdgeConfig, z.ZodTypeDef, unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters