From 0c871f9ebbee5b3f0c155bc36abad010d64338b6 Mon Sep 17 00:00:00 2001 From: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Thu, 9 Mar 2023 03:43:48 -0500 Subject: [PATCH] fix(protocol): integration test (#13279) --- packages/protocol/test/utils/rpc.ts | 4 ++++ packages/protocol/test/utils/signal.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/protocol/test/utils/rpc.ts b/packages/protocol/test/utils/rpc.ts index a72ee514925..cdac87a5e6c 100644 --- a/packages/protocol/test/utils/rpc.ts +++ b/packages/protocol/test/utils/rpc.ts @@ -37,6 +37,7 @@ type Block = { uncles: string[]; baseFeePerGas?: string; mixHash: string; + withdrawalsRoot: string; }; type BlockHeader = { @@ -56,6 +57,7 @@ type BlockHeader = { mixHash: string; nonce: number; baseFeePerGas: number; + withdrawalsRoot: string; }; async function getBlockHeader( @@ -90,6 +92,8 @@ async function getBlockHeader( mixHash: block.mixHash, nonce: block.nonce, baseFeePerGas: block.baseFeePerGas ? parseInt(block.baseFeePerGas) : 0, + // set to zero for pre-shanghai L1 blocks used in the integration test node + withdrawalsRoot: ethers.constants.HashZero, }; return { block, blockHeader }; diff --git a/packages/protocol/test/utils/signal.ts b/packages/protocol/test/utils/signal.ts index b535ee1b2c8..e6ce33179ad 100644 --- a/packages/protocol/test/utils/signal.ts +++ b/packages/protocol/test/utils/signal.ts @@ -61,7 +61,7 @@ async function getSignalProof( // encode the SignalProof struct from LibBridgeSignal const signalProof = ethers.utils.defaultAbiCoder.encode( [ - "tuple(tuple(bytes32 parentHash, bytes32 ommersHash, address beneficiary, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, bytes32[8] logsBloom, uint256 difficulty, uint128 height, uint64 gasLimit, uint64 gasUsed, uint64 timestamp, bytes extraData, bytes32 mixHash, uint64 nonce, uint256 baseFeePerGas) header, bytes proof)", + "tuple(tuple(bytes32 parentHash, bytes32 ommersHash, address beneficiary, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, bytes32[8] logsBloom, uint256 difficulty, uint128 height, uint64 gasLimit, uint64 gasUsed, uint64 timestamp, bytes extraData, bytes32 mixHash, uint64 nonce, uint256 baseFeePerGas, bytes32 withdrawalsRoot) header, bytes proof)", ], [{ header: blockHeader, proof: encodedProof }] );