Skip to content

Commit

Permalink
use the new chainspec format post polkadot-sdk-v1.4.0 (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: crystalin <[email protected]>
  • Loading branch information
noandrea and crystalin authored Jan 25, 2024
1 parent c7e12ff commit 7cf5a90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tools/run-moonbeam-fork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit 7cf5a90

Please sign in to comment.