Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): integration test #13279

Merged
merged 7 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/protocol/test/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type Block = {
uncles: string[];
baseFeePerGas?: string;
mixHash: string;
withdrawalsRoot: string;
};

type BlockHeader = {
Expand All @@ -56,6 +57,7 @@ type BlockHeader = {
mixHash: string;
nonce: number;
baseFeePerGas: number;
withdrawalsRoot: string;
};

async function getBlockHeader(
Expand Down Expand Up @@ -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 };
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/utils/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }]
);
Expand Down