Skip to content

Commit

Permalink
fix cli starknet require eth (#2640)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiqiang90 authored Jan 7, 2025
1 parent da9adc6 commit aef536c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cli/src/controller/codegen-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aef536c

Please sign in to comment.