diff --git a/.github/workflows/build_and_verify.yml b/.github/workflows/build_and_verify.yml index e1065f52e..a4fbad0a9 100644 --- a/.github/workflows/build_and_verify.yml +++ b/.github/workflows/build_and_verify.yml @@ -223,6 +223,10 @@ jobs: echo "Hasura is up"; exit 0; fi; sleep 1; done echo "Hasura did not become ready"; exit 1 + - name: envio-tests + working-directory: packages/envio-tests + run: pnpm test + - name: test_codegen working-directory: scenarios/test_codegen run: | diff --git a/package.json b/package.json index dd4a44b6d..fcfd9415a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "test:templates": "pnpm --filter e2e-tests test:templates", "test:e2e": "pnpm --filter e2e-tests test:e2e", - "test": "for d in test_codegen fuel_test svm_test e2e_test; do echo \"=== scenarios/$d ===\" && (cd \"scenarios/$d\" && pnpm exec envio codegen && pnpm test) || exit 1; done" + "test": "(cd packages/envio-tests && pnpm test) && for d in test_codegen fuel_test svm_test e2e_test; do echo \"=== scenarios/$d ===\" && (cd \"scenarios/$d\" && pnpm exec envio codegen && pnpm test) || exit 1; done" }, "devDependencies": {}, "pnpm": { diff --git a/packages/envio-tests/.gitignore b/packages/envio-tests/.gitignore new file mode 100644 index 000000000..c523baac7 --- /dev/null +++ b/packages/envio-tests/.gitignore @@ -0,0 +1,6 @@ +node_modules/ + +# ReScript artifacts +lib +*.res.js +*.res.mjs diff --git a/packages/envio-tests/package.json b/packages/envio-tests/package.json new file mode 100644 index 000000000..932233d87 --- /dev/null +++ b/packages/envio-tests/package.json @@ -0,0 +1,24 @@ +{ + "name": "envio-tests", + "version": "0.0.1-dev", + "private": true, + "type": "module", + "scripts": { + "build": "rescript", + "watch": "rescript watch", + "test": "rescript && vitest run" + }, + "devDependencies": { + "@rescript/runtime": "12.2.0", + "rescript": "12.2.0", + "rescript-schema": "9.5.1", + "vitest": "4.1.0" + }, + "dependencies": { + "bignumber.js": "9.3.1", + "envio": "file:../envio" + }, + "engines": { + "node": ">=22.0.0" + } +} diff --git a/packages/envio-tests/rescript.json b/packages/envio-tests/rescript.json new file mode 100644 index 000000000..cea7a0e52 --- /dev/null +++ b/packages/envio-tests/rescript.json @@ -0,0 +1,23 @@ +{ + "name": "envio-tests", + "namespace": false, + "sources": [ + { + "dir": "test", + "subdirs": true + } + ], + "suffix": ".res.mjs", + "package-specs": { + "module": "esmodule", + "in-source": true + }, + "jsx": { + "version": 4 + }, + "dependencies": ["rescript-schema", "envio"], + "compiler-flags": ["-open RescriptSchema"], + "warnings": { + "error": "+a" + } +} diff --git a/scenarios/test_codegen/test/AddressLowercase_test.res b/packages/envio-tests/test/AddressLowercase_test.res similarity index 100% rename from scenarios/test_codegen/test/AddressLowercase_test.res rename to packages/envio-tests/test/AddressLowercase_test.res diff --git a/scenarios/test_codegen/test/BlockStore_test.res b/packages/envio-tests/test/BlockStore_test.res similarity index 100% rename from scenarios/test_codegen/test/BlockStore_test.res rename to packages/envio-tests/test/BlockStore_test.res diff --git a/scenarios/test_codegen/test/ClientAddressFilter_test.res b/packages/envio-tests/test/ClientAddressFilter_test.res similarity index 100% rename from scenarios/test_codegen/test/ClientAddressFilter_test.res rename to packages/envio-tests/test/ClientAddressFilter_test.res diff --git a/scenarios/test_codegen/test/ConfigYaml_test.res b/packages/envio-tests/test/ConfigYaml_test.res similarity index 100% rename from scenarios/test_codegen/test/ConfigYaml_test.res rename to packages/envio-tests/test/ConfigYaml_test.res diff --git a/scenarios/test_codegen/test/Config_test.res b/packages/envio-tests/test/Config_test.res similarity index 100% rename from scenarios/test_codegen/test/Config_test.res rename to packages/envio-tests/test/Config_test.res diff --git a/scenarios/test_codegen/test/Encoders_schema_test.res b/packages/envio-tests/test/Encoders_schema_test.res similarity index 100% rename from scenarios/test_codegen/test/Encoders_schema_test.res rename to packages/envio-tests/test/Encoders_schema_test.res diff --git a/scenarios/test_codegen/test/EntityFilter_test.res b/packages/envio-tests/test/EntityFilter_test.res similarity index 100% rename from scenarios/test_codegen/test/EntityFilter_test.res rename to packages/envio-tests/test/EntityFilter_test.res diff --git a/scenarios/test_codegen/test/EventRouter_svm_test.res b/packages/envio-tests/test/EventRouter_svm_test.res similarity index 100% rename from scenarios/test_codegen/test/EventRouter_svm_test.res rename to packages/envio-tests/test/EventRouter_svm_test.res diff --git a/scenarios/test_codegen/test/HyperSyncClient_test.res b/packages/envio-tests/test/HyperSyncClient_test.res similarity index 100% rename from scenarios/test_codegen/test/HyperSyncClient_test.res rename to packages/envio-tests/test/HyperSyncClient_test.res diff --git a/scenarios/test_codegen/test/HyperSync_test.res b/packages/envio-tests/test/HyperSync_test.res similarity index 100% rename from scenarios/test_codegen/test/HyperSync_test.res rename to packages/envio-tests/test/HyperSync_test.res diff --git a/scenarios/test_codegen/test/OnBlockSchema_test.res b/packages/envio-tests/test/OnBlockSchema_test.res similarity index 100% rename from scenarios/test_codegen/test/OnBlockSchema_test.res rename to packages/envio-tests/test/OnBlockSchema_test.res diff --git a/scenarios/test_codegen/test/RateLimit_test.res b/packages/envio-tests/test/RateLimit_test.res similarity index 100% rename from scenarios/test_codegen/test/RateLimit_test.res rename to packages/envio-tests/test/RateLimit_test.res diff --git a/scenarios/test_codegen/test/ReorgDetection_test.res b/packages/envio-tests/test/ReorgDetection_test.res similarity index 100% rename from scenarios/test_codegen/test/ReorgDetection_test.res rename to packages/envio-tests/test/ReorgDetection_test.res diff --git a/scenarios/test_codegen/test/SvmHyperSyncClient_test.res b/packages/envio-tests/test/SvmHyperSyncClient_test.res similarity index 100% rename from scenarios/test_codegen/test/SvmHyperSyncClient_test.res rename to packages/envio-tests/test/SvmHyperSyncClient_test.res diff --git a/scenarios/test_codegen/test/SvmHyperSyncSource_test.res b/packages/envio-tests/test/SvmHyperSyncSource_test.res similarity index 100% rename from scenarios/test_codegen/test/SvmHyperSyncSource_test.res rename to packages/envio-tests/test/SvmHyperSyncSource_test.res diff --git a/scenarios/test_codegen/test/TransactionStore_test.res b/packages/envio-tests/test/TransactionStore_test.res similarity index 100% rename from scenarios/test_codegen/test/TransactionStore_test.res rename to packages/envio-tests/test/TransactionStore_test.res diff --git a/scenarios/test_codegen/test/Utils_test.res b/packages/envio-tests/test/Utils_test.res similarity index 100% rename from scenarios/test_codegen/test/Utils_test.res rename to packages/envio-tests/test/Utils_test.res diff --git a/scenarios/test_codegen/test/helpers/MockIndexerConfig.res b/packages/envio-tests/test/helpers/MockIndexerConfig.res similarity index 100% rename from scenarios/test_codegen/test/helpers/MockIndexerConfig.res rename to packages/envio-tests/test/helpers/MockIndexerConfig.res diff --git a/scenarios/test_codegen/test/lib_tests/ChainState_materialize_test.res b/packages/envio-tests/test/lib_tests/ChainState_materialize_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/ChainState_materialize_test.res rename to packages/envio-tests/test/lib_tests/ChainState_materialize_test.res diff --git a/scenarios/test_codegen/test/lib_tests/ColumnNameFormat_test.res b/packages/envio-tests/test/lib_tests/ColumnNameFormat_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/ColumnNameFormat_test.res rename to packages/envio-tests/test/lib_tests/ColumnNameFormat_test.res diff --git a/scenarios/test_codegen/test/lib_tests/ConfigEnvioInfo_test.res b/packages/envio-tests/test/lib_tests/ConfigEnvioInfo_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/ConfigEnvioInfo_test.res rename to packages/envio-tests/test/lib_tests/ConfigEnvioInfo_test.res diff --git a/scenarios/test_codegen/test/lib_tests/EffectCache_test.res b/packages/envio-tests/test/lib_tests/EffectCache_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/EffectCache_test.res rename to packages/envio-tests/test/lib_tests/EffectCache_test.res diff --git a/scenarios/test_codegen/test/lib_tests/Metrics_test.res b/packages/envio-tests/test/lib_tests/Metrics_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/Metrics_test.res rename to packages/envio-tests/test/lib_tests/Metrics_test.res diff --git a/scenarios/test_codegen/test/lib_tests/PackageJson_test.res b/packages/envio-tests/test/lib_tests/PackageJson_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/PackageJson_test.res rename to packages/envio-tests/test/lib_tests/PackageJson_test.res diff --git a/scenarios/test_codegen/test/lib_tests/Rpc_Test.res b/packages/envio-tests/test/lib_tests/Rpc_Test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/Rpc_Test.res rename to packages/envio-tests/test/lib_tests/Rpc_Test.res diff --git a/scenarios/test_codegen/test/lib_tests/Throttler_test.res b/packages/envio-tests/test/lib_tests/Throttler_test.res similarity index 100% rename from scenarios/test_codegen/test/lib_tests/Throttler_test.res rename to packages/envio-tests/test/lib_tests/Throttler_test.res diff --git a/packages/envio-tests/test/setup.ts b/packages/envio-tests/test/setup.ts new file mode 100644 index 000000000..2a48c4f5c --- /dev/null +++ b/packages/envio-tests/test/setup.ts @@ -0,0 +1,3 @@ +// Importing Env triggers Logging.setLogger as a side effect, +// ensuring the logger is available for all tests. +import "envio/src/Env.res.mjs"; diff --git a/packages/envio-tests/vitest.config.ts b/packages/envio-tests/vitest.config.ts new file mode 100644 index 000000000..e4d703851 --- /dev/null +++ b/packages/envio-tests/vitest.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["test/**/*_test.res.mjs", "test/**/*.test.ts"], + exclude: ["test/helpers/**"], + // No shared database or other cross-file state, so files can run in + // parallel (each fork gets its own process-level globals). + pool: "forks", + testTimeout: 30_000, + hookTimeout: 30_000, + setupFiles: ["test/setup.ts"], + passWithNoTests: true, + server: { + deps: { + // Externalize non-test files so they load via native Node.js ESM, + // preventing dual module cache between vite and native import() + external: [/^(?!.*\.test\.)(?!.*_test\.)(?!.*\/test\/).*$/i], + }, + }, + }, +}); diff --git a/packages/envio/package.json b/packages/envio/package.json index ff572db4b..0c6edb1e9 100644 --- a/packages/envio/package.json +++ b/packages/envio/package.json @@ -74,7 +74,6 @@ "tsx": "4.21.0" }, "devDependencies": { - "rescript": "12.2.0", - "vitest": "4.1.0" + "rescript": "12.2.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 565fb2864..82f61f231 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,6 +124,25 @@ importers: rescript: specifier: 12.2.0 version: 12.2.0 + + packages/envio-tests: + dependencies: + bignumber.js: + specifier: 9.3.1 + version: 9.3.1 + envio: + specifier: file:../envio + version: link:../envio + devDependencies: + '@rescript/runtime': + specifier: 12.2.0 + version: 12.2.0 + rescript: + specifier: 12.2.0 + version: 12.2.0 + rescript-schema: + specifier: 9.5.1 + version: 9.5.1(rescript@12.2.0) vitest: specifier: 4.1.0 version: 4.1.0(@opentelemetry/api@1.9.0)(@types/node@24.12.2)(jsdom@16.7.0)(vite@7.3.1(@types/node@24.12.2)(tsx@4.21.0)) @@ -228,6 +247,9 @@ importers: envio: specifier: file:../../packages/envio version: link:../../packages/envio + envio-tests: + specifier: file:../../packages/envio-tests + version: link:../../packages/envio-tests ts-expect: specifier: 1.3.0 version: 1.3.0 diff --git a/scenarios/test_codegen/package.json b/scenarios/test_codegen/package.json index 874a2750e..6ecbc12f1 100644 --- a/scenarios/test_codegen/package.json +++ b/scenarios/test_codegen/package.json @@ -32,7 +32,8 @@ "typescript": "6.0.3", "ts-expect": "1.3.0", "viem": "2.54.0", - "envio": "file:../../packages/envio" + "envio": "file:../../packages/envio", + "envio-tests": "file:../../packages/envio-tests" }, "engines": { "node": ">=22.0.0" diff --git a/scenarios/test_codegen/rescript.json b/scenarios/test_codegen/rescript.json index e31d181f4..1559cf514 100644 --- a/scenarios/test_codegen/rescript.json +++ b/scenarios/test_codegen/rescript.json @@ -20,7 +20,8 @@ }, "dependencies": [ "rescript-schema", - "envio" + "envio", + "envio-tests" ], "compiler-flags": ["-open RescriptSchema"], "warnings": { diff --git a/scenarios/test_codegen/test/IndexerState_test.res b/scenarios/test_codegen/test/IndexerState_test.res index fc6ef2956..631c04359 100644 --- a/scenarios/test_codegen/test/IndexerState_test.res +++ b/scenarios/test_codegen/test/IndexerState_test.res @@ -145,7 +145,7 @@ let populateChainQueuesWithRandomEvents = (~runTime=1000, ~maxBlockTime=15, ()) let state = IndexerState.make( ~config, - ~persistence=MockIndexer.defaultPersistence, + ~persistence=MockIndexer.defaultPersistence(), ~chainStates, ~isInReorgThreshold=false, ~isRealtime=false, @@ -336,7 +336,7 @@ describe("IndexerState", () => { ) IndexerState.make( ~config, - ~persistence=MockIndexer.defaultPersistence, + ~persistence=MockIndexer.defaultPersistence(), ~chainStates, ~isInReorgThreshold=false, ~isRealtime=false, diff --git a/scenarios/test_codegen/test/YamlConfigIndexer_test.res b/scenarios/test_codegen/test/YamlConfigIndexer_test.res new file mode 100644 index 000000000..979ec92cb --- /dev/null +++ b/scenarios/test_codegen/test/YamlConfigIndexer_test.res @@ -0,0 +1,71 @@ +open Vitest + +// The user-facing entity shape declared in the schema string below — +// intentionally absent from the generated project schema. +type yamlToken = { + id: string, + owner: string, +} + +type yamlTokenOps = {set: yamlToken => unit} +type yamlHandlerContext = {@as("YamlToken") yamlToken: yamlTokenOps} + +describe("YAML-driven MockIndexer", () => { + Async.it( + "runs the indexer loop with a config parsed from user YAML instead of the generated one", + async t => { + let {config} = MockIndexerConfig.parseYaml( + ~schema=` +type YamlToken { + id: ID! + owner: String! +} +`, + ` +name: yaml-driven +chains: + - id: 1337 + rpc: + url: https://rpc.example.test + for: sync + start_block: 1 + contracts: + - name: Token + address: "0x0000000000000000000000000000000000000001" + events: + - event: Transfer() +`, + ) + + let source = MockIndexer.Source.make([#getHeightOrThrow, #getItemsOrThrow], ~chain=#1337) + let indexerMock = await MockIndexer.Indexer.make( + ~config, + ~chains=[{chain: #1337, sourceConfig: Config.CustomSources([source.source])}], + ~shouldRollbackOnReorg=false, + ) + await Utils.delay(0) + + source.resolveGetHeightOrThrow(300) + await Utils.delay(0) + await Utils.delay(0) + + source.resolveGetItemsOrThrow([ + { + blockNumber: 5, + logIndex: 0, + handler: async args => { + let context = + args.context->(Utils.magic: MockIndexer.handlerContext => yamlHandlerContext) + context.yamlToken.set({id: "token-1", owner: "0xabc"}) + }, + }, + ], ~latestFetchedBlockNumber=300) + await indexerMock.getBatchWritePromise() + + let tokens: array = await indexerMock.queryRaw( + config.userEntitiesByName->Dict.getUnsafe("YamlToken"), + ) + t.expect(tokens).toEqual([{id: "token-1", owner: "0xabc"}]) + }, + ) +}) diff --git a/scenarios/test_codegen/test/helpers/MockIndexer.res b/scenarios/test_codegen/test/helpers/MockIndexer.res index c5062f47b..11072bd82 100644 --- a/scenarios/test_codegen/test/helpers/MockIndexer.res +++ b/scenarios/test_codegen/test/helpers/MockIndexer.res @@ -1,22 +1,34 @@ type chainId = Indexer.chainId +// The generated project config. Cheap: Config.load() memoizes the pure parse. let config = Config.load() +let entityConfigByName = (config: Config.t, name): Internal.entityConfig => + config.userEntitiesByName->Dict.get(name)->Option.getOrThrow + let entityConfig = (name: Indexer.Entities.name<_>): Internal.entityConfig => - config.userEntitiesByName - ->Dict.get(name->(Utils.magic: Indexer.Entities.name<_> => string)) - ->Option.getOrThrow + config->entityConfigByName(name->(Utils.magic: Indexer.Entities.name<_> => string)) // The store requires a persistence/config even when the cycle never runs; reuse one. -let defaultPersistence = PgStorage.makePersistenceFromConfig( - ~config, - ~storage=PgStorage.makeStorageFromEnv( - ~config, - ~sql=PgStorage.makeClient(), - ~pgSchema=Env.Db.publicSchema, - ~isHasuraEnabled=false, - ), -) +// Lazy so importing the helper doesn't open a pg client for tests that never use it. +let defaultPersistenceRef = ref(None) +let defaultPersistence = () => + switch defaultPersistenceRef.contents { + | Some(persistence) => persistence + | None => + let config = Config.load() + let persistence = PgStorage.makePersistenceFromConfig( + ~config, + ~storage=PgStorage.makeStorageFromEnv( + ~config, + ~sql=PgStorage.makeClient(), + ~pgSchema=Env.Db.publicSchema, + ~isHasuraEnabled=false, + ), + ) + defaultPersistenceRef := Some(persistence) + persistence + } module InMemoryStore = { let setEntity = (indexerState, ~entityConfig: Internal.entityConfig, entity) => { @@ -32,10 +44,14 @@ module InMemoryStore = { ) } - let make = (~entities=[]) => { + let make = (~config=?, ~entities=[]) => { + let config = switch config { + | Some(config) => config + | None => Config.load() + } let indexerState = IndexerState.make( ~config, - ~persistence=defaultPersistence, + ~persistence=defaultPersistence(), // A trivial chain state map for store-only tests that never run the loop. ~chainStates=Dict.make(), ~isInReorgThreshold=false, @@ -207,12 +223,13 @@ module Storage = { } } - let toPersistence = (storageMock: t) => { + let toPersistence = (storageMock: t, ~config=?) => { + let config = switch config { + | Some(config) => config + | None => Config.load() + } { - ...PgStorage.makePersistenceFromConfig( - ~config=Config.load(), - ~storage=storageMock.storage, - ), + ...PgStorage.makePersistenceFromConfig(~config, ~storage=storageMock.storage), storageStatus: Ready({ cleanRun: false, cache: Dict.make(), @@ -249,7 +266,7 @@ type mockSourceEvent = { // MockSource items choose their callback at response time, after ChainState has // already been created. Install one stable registration up front and dispatch // through callback metadata carried only by the test payload. -let makeMockSourceRegistration = (~index): Internal.onEventRegistration => { +let makeMockSourceRegistration = (~index, ~contractName): Internal.onEventRegistration => { let handler: Internal.handler = args => { let args = args->( Utils.magic: Internal.handlerArgs => Internal.genericHandlerArgs< @@ -285,9 +302,9 @@ let makeMockSourceRegistration = (~index): Internal.onEventRegistration => { eventConfig: ({ id: "MockEvent", // Keep the synthetic registration in the same address-dependent fetch - // partition as the generated test registrations. MockSource ignores the + // partition as the config's registrations. MockSource ignores the // query selection, while ChainState still owns and resolves this slot. - contractName: "Gravatar", + contractName, name: "MockEvent", paramsRawEventSchema: EventConfigBuilder.buildParamsSchema([]), simulateParamsSchema: EventConfigBuilder.buildSimulateParamsSchema([]), @@ -344,6 +361,12 @@ let installMockSourceRegistrations = ( } let mockRegistration = makeMockSourceRegistration( ~index=registrations.onEventRegistrations->Array.length, + // Any contract from the chain keeps the synthetic registration in the + // address-dependent partition of a real contract. + ~contractName=switch chainConfig.contracts->Array.get(0) { + | Some(contract) => contract.name + | None => "MockContract" + }, ) registrations.onEventRegistrations->Array.push(mockRegistration)->ignore sourceStates->Array.forEach(state => @@ -384,6 +407,9 @@ module Indexer = { let rec make = async ( ~chains: array, + // A config parsed through the user-facing pipeline (MockIndexerConfig.parseYaml). + // Defaults to the generated project config. + ~config as customConfig: option=?, ~saveFullHistory=false, // Reinit storage without Hasura // makes tests ~1.9 seconds faster @@ -412,7 +438,10 @@ module Indexer = { // from the config it's given, so registration must see the resolved // config rather than the raw generated one. let config = { - let config = Config.load() + let config = switch customConfig { + | Some(config) => config + | None => Config.load() + } let chainMap = chains @@ -444,7 +473,14 @@ module Indexer = { } } - let registrationsByChainId = await HandlerLoader.registerAllHandlers(~config) + let registrationsByChainId = switch customConfig { + | None => await HandlerLoader.registerAllHandlers(~config) + | Some(_) => + // A supplied config has no handler files on disk; register inline + // handlers (if any) through the same public registry lifecycle. + HandlerRegister.startRegistration(~config) + HandlerRegister.finishRegistration(~config) + } installMockSourceRegistrations(~config, ~registrationsByChainId) let sql = PgStorage.makeClient() @@ -544,7 +580,8 @@ module Indexer = { }) }, query: (type entity, name: Indexer.Entities.name) => { - let ec = entityConfig(name) + let ec = + config->entityConfigByName(name->(Utils.magic: Indexer.Entities.name => string)) sql ->Postgres.unsafe(PgStorage.makeLoadAllQuery(~pgSchema, ~tableName=ec.table.tableName)) ->Promise.thenResolve(items => { @@ -553,7 +590,8 @@ module Indexer = { ->(Utils.magic: promise> => promise>) }, queryHistory: (type entity, name: Indexer.Entities.name) => { - let ec = entityConfig(name) + let ec = + config->entityConfigByName(name->(Utils.magic: Indexer.Entities.name => string)) sql ->Postgres.unsafe( PgStorage.makeLoadAllQuery( @@ -685,6 +723,7 @@ module Indexer = { } await make( ~chains, + ~config=?customConfig, ~enableHasura, ~enableRawEvents, ~saveFullHistory, @@ -970,8 +1009,8 @@ module Source = { ~message="MockSource on-event registration was not installed before resolving items", ) let payload: Evm.payload = { - contractName: "Gravatar", - eventName: "MockEvent", + contractName: onEventRegistration.eventConfig.contractName, + eventName: onEventRegistration.eventConfig.name, params: %raw(`{}`), chainId: chain->ChainMap.Chain.toChainId, srcAddress: "0x0000000000000000000000000000000000000000"->Address.unsafeFromString, diff --git a/scenarios/test_codegen/test/lib_tests/IndexerLoop_test.res b/scenarios/test_codegen/test/lib_tests/IndexerLoop_test.res index 8e77d1021..096897ade 100644 --- a/scenarios/test_codegen/test/lib_tests/IndexerLoop_test.res +++ b/scenarios/test_codegen/test/lib_tests/IndexerLoop_test.res @@ -50,7 +50,7 @@ let makeState = (~onError=errHandler => errHandler->ErrorHandling.raiseExn, ()) IndexerState.make( ~config, - ~persistence=MockIndexer.defaultPersistence, + ~persistence=MockIndexer.defaultPersistence(), ~chainStates, // isInReorgThreshold avoids triggering a fetch on the mock source (which // implements no methods) when the processing loop runs to its empty exit.