mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 19:27:57 +00:00
* Add Statemint Genesis Values (#817) * add some docs to genesis scripts * move statemint test chainspec * add initial (draft) version of statemint chain spec * adjust genesis value script * add Statemint genesis Aura keys * add bootnodes to statemint-genesis spec * Add checks, debug and doc (#790) * Add checks, debug and doc * Update scripts/generate_genesis_value.sh Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Update scripts/generate_genesis_value.sh Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * default to official shell rpc endpoint for genesis values * remove statemint test chain spec * add Statemint chain spec and genesis values * sort statemint genesis values * some script docs adjustments Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * cargo fmt Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,10 @@ const fs = require("fs");
|
||||
const { exit } = require("process");
|
||||
const { xxhashAsHex } = require("@polkadot/util-crypto");
|
||||
|
||||
// Utility script scraping a chain spec for the genesis keys and values and writing them out as a
|
||||
// json array of pairs. Filters the keys for anything already present in a shell runtime and sorts
|
||||
// the output for reproducibility.
|
||||
|
||||
if (!process.argv[2] || !process.argv[3]) {
|
||||
console.log("usage: node generate_keys <input chainspec> <output json>");
|
||||
exit();
|
||||
@@ -49,6 +53,7 @@ fs.readFile(input, "utf8", (err, data) => {
|
||||
Object.entries(spec.genesis.raw.top).filter(
|
||||
([key, value]) => !startsWith(key, filter_prefixes)
|
||||
);
|
||||
genesis.sort();
|
||||
|
||||
fs.writeFileSync(output, JSON.stringify(genesis));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user