Skip to content

Commit 8ed9ee5

Browse files
committed
Fix integration tests
1 parent 118f716 commit 8ed9ee5

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

scenarios/test_codegen/test/E2EEthNode_test.res

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("E2E Integration Test", () => {
1010
DbHelpers.runUpDownMigration()
1111
})
1212

13-
Async.it("Complete E2E", async () => {
13+
Async.it_only("Complete E2E", async () => {
1414
This.timeout(5 * 1000)
1515

1616
let contracts = await SetupRpcNode.deployContracts()
@@ -61,6 +61,9 @@ describe("E2E Integration Test", () => {
6161
eventRouter: evmContracts
6262
->Belt.Array.flatMap(contract => contract.events)
6363
->EventRouter.fromEvmEventModsOrThrow(~chain),
64+
allEventSignatures: [],
65+
shouldUseHypersyncClientDecoder: false, // stick to viem.
66+
lowercaseAddresses: false,
6467
}),
6568
],
6669
}

scenarios/test_codegen/test/Integration_ts_helpers.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ let getLocalChainConfig = (nftFactoryContractAddress): chainConfig => {
5050
eventRouter: evmContracts
5151
->Belt.Array.flatMap(contract => contract.events)
5252
->EventRouter.fromEvmEventModsOrThrow(~chain),
53+
allEventSignatures: [], // Not used by viem.
54+
shouldUseHypersyncClientDecoder: false, // stick to viem.
55+
lowercaseAddresses: false,
5356
}),
5457
],
5558
}

scenarios/test_codegen/test/RpcSource_test.res

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ describe("RpcSource - name", () => {
3030
eventRouter: EventRouter.empty(),
3131
sourceFor: Sync,
3232
syncConfig: Config.getSyncConfig({}),
33+
allEventSignatures: [],
34+
shouldUseHypersyncClientDecoder: false,
35+
lowercaseAddresses: false,
3336
})
3437
Assert.equal(source.name, "RPC (eth.rpc.hypersync.xyz)")
3538
})
@@ -44,6 +47,9 @@ describe("RpcSource - getHeightOrThrow", () => {
4447
eventRouter: EventRouter.empty(),
4548
sourceFor: Sync,
4649
syncConfig: Config.getSyncConfig({}),
50+
allEventSignatures: ["a", "b", "c"],
51+
shouldUseHypersyncClientDecoder: true,
52+
lowercaseAddresses: false,
4753
})
4854
let height = await source.getHeightOrThrow()
4955
Assert.equal(height > 21994218, true)
@@ -167,6 +173,7 @@ describe("RpcSource - getEventTransactionOrThrow", () => {
167173
let getTransactionFields = Ethers.JsonRpcProvider.makeGetTransactionFields(
168174
~getTransactionByHash=transactionHash =>
169175
provider->Ethers.JsonRpcProvider.getTransaction(~transactionHash),
176+
~lowercaseAddresses=false,
170177
)
171178

172179
let getEventTransactionOrThrow = RpcSource.makeThrowingGetEventTransaction(

scenarios/test_codegen/test/__mocks__/MockConfig.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ let mockChainConfig: InternalConfig.chain = {
6161
eventRouter: evmContracts
6262
->Belt.Array.flatMap(contract => contract.events)
6363
->EventRouter.fromEvmEventModsOrThrow(~chain=chain1337),
64+
shouldUseHypersyncClientDecoder: false,
65+
lowercaseAddresses: false,
66+
allEventSignatures: [],
6467
}),
6568
],
6669
}

0 commit comments

Comments
 (0)