Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 OAppTestConfig typing number -> bigint where appropriate #368

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions tests/ua-devtools-evm-hardhat-test/test/__utils__/oapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export type OAppTestConfig = {
executorLibrary: string
executorMaxMessageSize: number
receiveTimeoutConfigLibrary: string
receiveLibraryGracePeriod: number
receiveLibraryTimeoutExpiry: number
sendUlnConfirmations: number
receiveLibraryGracePeriod: bigint
receiveLibraryTimeoutExpiry: bigint
sendUlnConfirmations: bigint
sendUlnRequiredDVNs: string[]
sendUlnOptionalDVNs: string[]
sendUlnOptionalDVNThreshold: number
receiveUlnConfirmations: number
receiveUlnConfirmations: bigint
receiveUlnRequiredDVNs: string[]
receiveUlnOptionalDVNs: string[]
receiveUlnOptionalDVNThreshold: number
Expand Down Expand Up @@ -73,19 +73,15 @@ export const setUpConfig = async (testConfig: OAppTestConfig): Promise<OAppEdgeC
confirmations: testConfig.sendUlnConfirmations,
optionalDVNThreshold: testConfig.sendUlnOptionalDVNThreshold,
requiredDVNs: testConfig.sendUlnRequiredDVNs,
requiredDVNCount: testConfig.sendUlnOptionalDVNs.length,
optionalDVNs: testConfig.sendUlnOptionalDVNs,
optionalDVNCount: testConfig.sendUlnOptionalDVNs.length,
},
},
receiveConfig: {
ulnConfig: {
confirmations: testConfig.receiveUlnConfirmations,
optionalDVNThreshold: testConfig.receiveUlnOptionalDVNThreshold,
requiredDVNs: testConfig.receiveUlnRequiredDVNs,
requiredDVNCount: testConfig.receiveUlnRequiredDVNs.length,
optionalDVNs: testConfig.receiveUlnOptionalDVNs,
optionalDVNCount: testConfig.receiveUlnOptionalDVNs.length,
},
},
}
Expand Down Expand Up @@ -135,13 +131,13 @@ export const getDefaultEthConfig = async (): Promise<OAppTestConfig> => {
executorLibrary: await getLibraryAddress(avaxExecutor),
executorMaxMessageSize: 100,
receiveTimeoutConfigLibrary: await getLibraryAddress(ethReceiveUln2_Opt2),
receiveLibraryGracePeriod: 0,
receiveLibraryTimeoutExpiry: 0,
receiveUlnConfirmations: 24,
receiveLibraryGracePeriod: BigInt(0),
receiveLibraryTimeoutExpiry: BigInt(0),
receiveUlnConfirmations: BigInt(24),
receiveUlnOptionalDVNs: ethReceiveUlnOptionalDVNs,
receiveUlnOptionalDVNThreshold: 0,
receiveUlnRequiredDVNs: ethReceiveUlnRequiredDVNs,
sendUlnConfirmations: 42,
sendUlnConfirmations: BigInt(42),
sendUlnOptionalDVNs: ethSendUlnOptionalDVNs,
sendUlnOptionalDVNThreshold: 0,
sendUlnRequiredDVNs: ethSendUlnRequiredDVNs,
Expand All @@ -162,13 +158,13 @@ export const getDefaultAvaxConfig = async (): Promise<OAppTestConfig> => {
executorLibrary: await getLibraryAddress(ethExecutor),
executorMaxMessageSize: 999,
receiveTimeoutConfigLibrary: await getLibraryAddress(avaxReceiveUln2_Opt2),
receiveLibraryGracePeriod: 0,
receiveLibraryTimeoutExpiry: 0,
receiveUlnConfirmations: 96,
receiveLibraryGracePeriod: BigInt(0),
receiveLibraryTimeoutExpiry: BigInt(0),
receiveUlnConfirmations: BigInt(96),
receiveUlnOptionalDVNs: avaxReceiveUlnOptionalDVNs,
receiveUlnOptionalDVNThreshold: 0,
receiveUlnRequiredDVNs: avaxSendUlnRequiredDVNs,
sendUlnConfirmations: 69,
sendUlnConfirmations: BigInt(69),
sendUlnOptionalDVNs: avaxSendUlnOptionalDVNs,
sendUlnOptionalDVNThreshold: 0,
sendUlnRequiredDVNs: avaxReceiveUlnRequiredDVNs,
Expand Down
Loading