From 7097958c5138c9ec1441b7508335f90ab293e6e0 Mon Sep 17 00:00:00 2001 From: Jochem Brouwer Date: Wed, 3 Jul 2024 18:31:49 +0200 Subject: [PATCH] fix ethjs mapper --- clients/ethereumjs/mapper.jq | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/ethereumjs/mapper.jq b/clients/ethereumjs/mapper.jq index 3fe8480c98..db790c9cf0 100644 --- a/clients/ethereumjs/mapper.jq +++ b/clients/ethereumjs/mapper.jq @@ -30,8 +30,8 @@ def to_bool: # Pads storage keys to 32 bytes. def pad_storage_keys: - .alloc |= with_entries( - .value.storage |= with_entries( + .alloc |= (if . == null then . else with_entries( + .value.storage |= (if . == null then . else with_entries( .key |= (if . == null then . else if startswith("0x") then "0x" + (.[2:] | if length < 64 then ("0" * (64 - length)) + . else . end) @@ -39,8 +39,8 @@ def pad_storage_keys: "0x" + (if length < 64 then ("0" * (64 - length)) + . else . end) end end) - ) - ) + ) end) + ) end) ; # Replace config in input.