Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
networkId,
name: networkName,
genesis: {
timestamp: `0x${getCurrentTimestamp().toString(16)}`,
hash: "0x",
gasLimit: blockGasLimit,
difficulty: 1,
nonce: "0x42",
extraData: "0x1234",
stateRoot: bufferToHex(stateTrie.root)
}
},
hardfork
);
const stateManager = new StateManager({
common: common as any, // TS error because of a version mismatch
trie: stateTrie
});
const blockchain = new Blockchain();
const vm = new VM({
common: common as any, // TS error because of a version mismatch
activatePrecompiles: true,
stateManager,
blockchain: blockchain as any
});
const genesisBlock = new Block(null, { common });
genesisBlock.setGenesisParams();