From b91fac6e9e32444dd6d1d86b5d5b7547567f565a Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Thu, 14 Nov 2024 09:47:58 -1000 Subject: [PATCH] Check blockhash is non-zero (#20) --- src/DeployChain.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DeployChain.sol b/src/DeployChain.sol index 1c78d12..16fd7bd 100644 --- a/src/DeployChain.sol +++ b/src/DeployChain.sol @@ -167,6 +167,8 @@ contract DeployChain { DeployAddresses memory addresses ) internal view returns (Hashes memory) { bytes32 genesisL1Hash = blockhash(uint256(genesisConfig.l1Number)); + require(genesisL1Hash != bytes32(0), "DeployChain: genesis blockhash not available"); + bytes32 scalar = bytes32((uint256(0x01) << 248) | (uint256(gasConfig.blobbasefeeScalar) << 32) | gasConfig.basefeeScalar);