@@ -8,35 +8,48 @@ import { World } from "@latticexyz/world";
88import { importContractArtifact } from "../utils/importContractArtifact" ;
99import { resolveWithContext } from "@latticexyz/world/internal" ;
1010import callWithSignatureModule from "@latticexyz/world-module-callwithsignature/out/CallWithSignatureModule.sol/CallWithSignatureModule.json" with { type : "json" } ;
11+ import batchStoreModule from "@latticexyz/world-module-batchstore/out/BatchStoreModule.sol/BatchStoreModule.json" with { type : "json" } ;
1112import { getContractArtifact } from "../utils/getContractArtifact" ;
1213import { excludeCallWithSignatureModule } from "./compat/excludeUnstableCallWithSignatureModule" ;
1314import { moduleArtifactPathFromName } from "./compat/moduleArtifactPathFromName" ;
1415
1516const callWithSignatureModuleArtifact = getContractArtifact ( callWithSignatureModule ) ;
17+ const batchStoreModuleArtifact = getContractArtifact ( batchStoreModule ) ;
18+
19+ // metadata module is installed inside `ensureResourceTags`
20+ const defaultModules : Module [ ] = [
21+ {
22+ // optional for now
23+ // TODO: figure out approach to install on existing worlds where deployer may not own root namespace
24+ optional : true ,
25+ name : "CallWithSignatureModule" ,
26+ installStrategy : "root" ,
27+ installData : "0x" ,
28+ prepareDeploy : createPrepareDeploy (
29+ callWithSignatureModuleArtifact . bytecode ,
30+ callWithSignatureModuleArtifact . placeholders ,
31+ ) ,
32+ deployedBytecodeSize : callWithSignatureModuleArtifact . deployedBytecodeSize ,
33+ abi : callWithSignatureModuleArtifact . abi ,
34+ } ,
35+ {
36+ // optional for now
37+ // TODO: figure out approach to install on existing worlds where deployer may not own root namespace
38+ optional : true ,
39+ name : "BatchStoreModule" ,
40+ installStrategy : "root" ,
41+ installData : "0x" ,
42+ prepareDeploy : createPrepareDeploy ( batchStoreModuleArtifact . bytecode , batchStoreModuleArtifact . placeholders ) ,
43+ deployedBytecodeSize : batchStoreModuleArtifact . deployedBytecodeSize ,
44+ abi : batchStoreModuleArtifact . abi ,
45+ } ,
46+ ] ;
1647
1748export async function configToModules < config extends World > (
1849 config : config ,
1950 // TODO: remove/replace `forgeOutDir`
2051 forgeOutDir : string ,
2152) : Promise < readonly Module [ ] > {
22- // metadata module is installed inside `ensureResourceTags`
23- const defaultModules : Module [ ] = [
24- {
25- // optional for now
26- // TODO: figure out approach to install on existing worlds where deployer may not own root namespace
27- optional : true ,
28- name : "CallWithSignatureModule" ,
29- installStrategy : "root" ,
30- installData : "0x" ,
31- prepareDeploy : createPrepareDeploy (
32- callWithSignatureModuleArtifact . bytecode ,
33- callWithSignatureModuleArtifact . placeholders ,
34- ) ,
35- deployedBytecodeSize : callWithSignatureModuleArtifact . deployedBytecodeSize ,
36- abi : callWithSignatureModuleArtifact . abi ,
37- } ,
38- ] ;
39-
4053 const modules = await Promise . all (
4154 config . modules
4255 . filter ( excludeCallWithSignatureModule )
0 commit comments