Skip to content

Commit

Permalink
add parachainId to script that modifies the chain spec
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Feb 7, 2025
1 parent 52536ff commit 74e6124
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 50 deletions.
11 changes: 1 addition & 10 deletions test/configs/zombieAlphanet.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
"id": 1000,
"chain": "moonbase-local",
"chain_spec_path": "tmp/moonbase-modified-raw-spec.json",
"genesis": {
"runtimeGenesis": {
"patch": {
"parachainInfo": {
"parachainId": 1000
}
}
}
},
"collator": {
"name": "alith",
"ws_port": 33345,
Expand All @@ -66,7 +57,7 @@
"--database=paritydb"
]
}
},
}
],
"types": {
"Header": {
Expand Down
9 changes: 0 additions & 9 deletions test/configs/zombieAlphanetRpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
"id": 1000,
"chain": "moonbase-local",
"chain_spec_path": "tmp/moonbase-modified-raw-spec.json",
"genesis": {
"runtimeGenesis": {
"patch": {
"parachainInfo": {
"parachainId": 1000
}
}
}
},
"collators": [
{
"name": "alith",
Expand Down
9 changes: 0 additions & 9 deletions test/configs/zombieMoonbeam.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@
"id": 1000,
"chain": "moonbeam-local",
"chain_spec_path": "tmp/moonbeam-modified-raw-spec.json",
"genesis": {
"runtimeGenesis": {
"patch": {
"parachainInfo": {
"parachainId": 1000
}
}
}
},
"collator": {
"name": "alith",
"command": "../target/release/moonbeam",
Expand Down
9 changes: 0 additions & 9 deletions test/configs/zombieMoonbeamRpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
"id": 1000,
"chain": "moonbeam-local",
"chain_spec_path": "tmp/moonbeam-modified-raw-spec.json",
"genesis": {
"runtimeGenesis": {
"patch": {
"parachainInfo": {
"parachainId": 1000
}
}
}
},
"collators": [
{
"name": "alith",
Expand Down
22 changes: 9 additions & 13 deletions test/scripts/modify-plain-specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,16 @@ yargs(hideBin(process.argv))
process.stdout.write("Done ✅\n");

plainSpec.bootNodes = [];
if ("runtimeGenesis" in plainSpec.genesis) {
plainSpec.genesis.runtimeGenesis.patch.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];
// TODO: remove once client 0.44.0 is released
plainSpec.genesis.runtimeGenesis.patch.parachainInfo.parachainId = 1000;

plainSpec.genesis.runtimeGenesis.patch.openTechCommitteeCollective.members = [
ALITH_ADDRESS,
];
} else {
plainSpec.genesis.runtime.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];
plainSpec.genesis.runtime.openTechCommitteeCollective.members = [ALITH_ADDRESS];
}
plainSpec.genesis.runtimeGenesis.patch.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];

plainSpec.genesis.runtimeGenesis.patch.openTechCommitteeCollective.members = [
ALITH_ADDRESS,
];

process.stdout.write(`Writing to: ${argv.outputPath} ...`);
await fs.writeFile(
Expand Down

0 comments on commit 74e6124

Please sign in to comment.