From eda5bbabdbab3bb34a9479c512c53fec5ff82106 Mon Sep 17 00:00:00 2001 From: JQQQ Date: Tue, 7 Jan 2025 14:18:04 +1300 Subject: [PATCH] fix cli starknet require eth --- packages/cli/src/controller/codegen-controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/controller/codegen-controller.ts b/packages/cli/src/controller/codegen-controller.ts index 5b2ae91f82..0fe7793bd5 100644 --- a/packages/cli/src/controller/codegen-controller.ts +++ b/packages/cli/src/controller/codegen-controller.ts @@ -247,8 +247,11 @@ export async function codegen(projectPath: string, fileNames: string[] = [DEFAUL ); } const ethManifests = plainManifests.filter((m) => m.networkFamily === NETWORK_FAMILY.ethereum); + // Todo, starknet codegen not supported yet + const starknetManifests = plainManifests.filter((m) => m.networkFamily === NETWORK_FAMILY.starknet); + // as we determine it is eth network, ds type should SubqlDatasource - if (ethManifests.length > 0 || !!datasources.find((d) => (d as SubqlDatasource)?.assets)) { + if (ethManifests.length > 0 || (!starknetManifests && !!datasources.find((d) => (d as SubqlDatasource)?.assets))) { const ethModule = loadDependency(NETWORK_FAMILY.ethereum); await ethModule.generateAbis(datasources as EthereumDs[], projectPath, prepareDirPath, upperFirst, renderTemplate);