From bbf68d92d5771fa9b4b7a49a42a25361eb5c0934 Mon Sep 17 00:00:00 2001 From: perekopskiy Date: Fri, 16 Sep 2022 12:15:56 +0300 Subject: [PATCH] Ignore zksync specific fields --- apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex | 4 ++-- apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex index e3841225fdf5..3957a658a8d2 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex @@ -598,8 +598,8 @@ defmodule EthereumJSONRPC.Block do {key, Transactions.to_elixir(transactions)} end - # Arbitrum fields - defp entry_to_elixir({"l1BlockNumber", _}) do + # Arbitrum/ZkSync fields + defp entry_to_elixir({key, _}) when key in ~w(l1BlockNumber l1BatchNumber l1BatchTxIndex) do {:ignore, :ignore} end end diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex index efb6cb9d9933..50a524692bc1 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex @@ -299,8 +299,8 @@ defmodule EthereumJSONRPC.Receipt do :ignore end - # Arbitrum fields - defp entry_to_elixir({key, _}) when key in ~w(returnData returnCode feeStats l1BlockNumber) do + # Arbitrum/ZkSync fields + defp entry_to_elixir({key, _}) when key in ~w(returnData returnCode feeStats l1BlockNumber l1BatchNumber l1BatchTxIndex) do :ignore end