diff --git a/src/tools/run-moonbeam-fork.ts b/src/tools/run-moonbeam-fork.ts index 2dea117..900dd2e 100644 --- a/src/tools/run-moonbeam-fork.ts +++ b/src/tools/run-moonbeam-fork.ts @@ -444,10 +444,15 @@ const main = async () => { ], ], ]; - if ("runtime_genesis_config" in relayChainSpec.genesis.runtime) { + if ("patch" in relayChainSpec.genesis?.runtimeGenesis) { + relayChainSpec.genesis.runtimeGenesis.patch.paras = paras; + } else if ("runtime_genesis_config" in relayChainSpec.genesis?.runtime) { relayChainSpec.genesis.runtime.runtime_genesis_config.paras = paras; - } else { + } else if ("paras" in relayChainSpec.genesis?.runtime) { relayChainSpec.genesis.runtime.paras = paras; + } else { + process.stdout.write(` X - Could not find parachain format in relay genesis file.\n`); + process.exit(1); } await fs.writeFile(relayPlainSpecFile, JSON.stringify(relayChainSpec, null, 2)); process.stdout.write(` ✓\n`);