Skip to content

Commit

Permalink
don't worldgen unregistered function selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Aug 6, 2024
1 parent b36027c commit afae6d3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/world/ts/node/render-solidity/worldgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ export async function worldgen({

const outputPath = path.join(outDir, config.codegen.worldInterfaceName + ".sol");

const systems = (await resolveSystems({ rootDir, config })).map((system) => {
const interfaceName = `I${system.label}`;
return {
...system,
interfaceName,
interfacePath: path.join(path.dirname(outputPath), `${interfaceName}.sol`),
};
});
const systems = (await resolveSystems({ rootDir, config }))
// TODO: move to codegen option or generate "system manifest" and codegen from that
.filter((system) => system.deploy.registerWorldFunctions)
.map((system) => {
const interfaceName = `I${system.label}`;
return {
...system,
interfaceName,
interfacePath: path.join(path.dirname(outputPath), `${interfaceName}.sol`),
};
});

const worldImports = systems.map(
(system): ImportDatum => ({
Expand Down

0 comments on commit afae6d3

Please sign in to comment.