@@ -247,38 +247,38 @@ contract ForkTest is Test {
247247 bytes extraData;
248248 bytes gasLimit;
249249 bytes gasUsed;
250- bytes hash;
250+ bytes32 hash;
251251 bytes logsBloom;
252- bytes miner;
253- bytes mixHash;
252+ address miner;
253+ bytes32 mixHash;
254254 bytes nonce;
255255 bytes number;
256- bytes parentBeaconBlockRoot;
257- bytes parentHash;
258- bytes receiptsRoot;
259- bytes sha3Uncles;
256+ bytes32 parentBeaconBlockRoot;
257+ bytes32 parentHash;
258+ bytes32 receiptsRoot;
259+ bytes32 sha3Uncles;
260260 bytes size;
261- bytes stateRoot;
261+ bytes32 stateRoot;
262262 bytes timestamp;
263263 bytes32 [] transactions;
264- bytes transactionsRoot;
265- bytes [] uncles;
264+ bytes32 transactionsRoot;
265+ bytes32 [] uncles;
266266 Withdrawal[] withdrawals;
267- bytes withdrawalsRoot;
267+ bytes32 withdrawalsRoot;
268268 }
269269
270270 function testRpcBlockByNumberFullReturndata () public {
271271 bytes memory data = vm.rpc ("sepolia " , "eth_getBlockByNumber " , '["0x588b24", false] ' );
272272 BlockResult memory blockResult = abi.decode (data, (BlockResult));
273273 // Verify block hash
274274 assertEq (
275- bytes32 ( blockResult.hash) ,
275+ blockResult.hash,
276276 bytes32 (hex "50b08560cfeef4a4005333a78bef1190f3d8708a074c549e0e5d834c6d7eab3f " ),
277277 "hash mismatch "
278278 );
279279 // Verify parent hash
280280 assertEq (
281- bytes32 ( blockResult.parentHash) ,
281+ blockResult.parentHash,
282282 bytes32 (hex "ee012f100cea384420e993e4eab8c3cf0ed35a49f75769eb8a37c9e0c93ea235 " ),
283283 "parentHash mismatch "
284284 );
@@ -323,18 +323,18 @@ contract ForkTest is Test {
323323
324324 // Struct matching a legacy (type 0) transaction fields sorted alphabetically.
325325 struct LegacyTransactionResult {
326- bytes blockHash;
326+ bytes32 blockHash;
327327 bytes blockNumber;
328328 bytes chainId;
329- bytes from;
329+ address from;
330330 bytes gas;
331331 bytes gasPrice;
332- bytes hash;
332+ bytes32 hash;
333333 bytes input;
334334 bytes nonce;
335- bytes r;
336- bytes s;
337- bytes to;
335+ bytes32 r;
336+ bytes32 s;
337+ address to;
338338 bytes transactionIndex;
339339 bytes type_;
340340 bytes v;
@@ -353,12 +353,10 @@ contract ForkTest is Test {
353353 );
354354 LegacyTransactionResult memory txn = abi.decode (data, (LegacyTransactionResult));
355355 assertEq (
356- bytes32 (txn.hash),
357- bytes32 (hex "e1a0fba63292976050b2fbf4379a1901691355ed138784b4e0d1854b4cf9193e " ),
358- "tx hash mismatch "
356+ txn.hash, bytes32 (hex "e1a0fba63292976050b2fbf4379a1901691355ed138784b4e0d1854b4cf9193e " ), "tx hash mismatch "
359357 );
360- assertEq (address ( bytes20 ( txn.from)) , 0x8Be6209bC9BD1a8e6e015ADe090F6BE7BE6f032A , "tx from mismatch " );
361- assertEq (address ( bytes20 ( txn.to)) , 0xF04fd9a66DE511BC389D3b830C1F850a4A4A8c61 , "tx to mismatch " );
358+ assertEq (txn.from, 0x8Be6209bC9BD1a8e6e015ADe090F6BE7BE6f032A , "tx from mismatch " );
359+ assertEq (txn.to, 0xF04fd9a66DE511BC389D3b830C1F850a4A4A8c61 , "tx to mismatch " );
362360 assertEq (txn.blockNumber, hex "588b24 " , "tx blockNumber mismatch " );
363361 }
364362}
0 commit comments