src/spawn.js
/// Export the genesis state aka genesis head.
Export the genesis state aka genesis head.
Export the genesis state aka genesis head .
async function exportGenesisState(bin, id, chain) {
	let args = [
		"export-genesis-state",
	]
	if (id) {
		args.push("--parachain-id=" + id)
	}
	if (chain) {
		args.push("--chain=" + chain)
	}
	let opts = { maxBuffer: 5 * 1024 * 1024 }
	let { stdout, stderr } = await execFile(bin, args, opts)
	if (stderr) {
		console.error(stderr)
	}
	return stdout.trim()
}
async function exportGenesisState ( bin , id , chain ) { let args = [ "export-genesis-state" , ] if ( id ) { args . push ( "--parachain-id=" + id ) } if ( chain ) { args . push ( "--chain=" + chain ) } let opts = { maxBuffer : 5 * 1024 * 1024 } let { stdout , stderr } = await execFile ( bin , args , opts ) if ( stderr ) { console . error ( stderr ) } return stdout . trim ( ) }
Export the genesis state aka genesis head.
Export the genesis state aka genesis head .
// wasm files are typically large and `exec` requires us to supply the maximum buffer size in // advance. Hopefully, this generous limit will be enough.