Skip to content

Commit

Permalink
refactor(rpc): changes the response based on the usage SecureMerkleTrie
Browse files Browse the repository at this point in the history
  • Loading branch information
allemanfredi committed Oct 29, 2024
1 parent f16c78b commit 0423284
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/rpc/src/methods/get-account-and-storage-proof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ethers } from "ethers"
import { logger } from "@gnosis/hashi-common"
import { BlockHeader, JsonRpcBlock } from "@ethereumjs/block"
import { Common, Hardfork } from "@ethereumjs/common"
import { RLP } from "@ethereumjs/rlp"
import {
bigIntToHex,
bytesToHex,
Expand Down Expand Up @@ -115,12 +114,10 @@ const getAccountAndStorageProof = async ({
ancestralBlockNumber,
ancestralBlockHeaders,
address,
bytesToHex(RLP.encode(proof.accountProof.map((_sibling: string) => RLP.decode(_sibling)))),
proof.accountProof,
proof.storageHash,
proof.storageProof.map(({ key }: any) => key),
proof.storageProof.map(({ proof: storageProof }: any) =>
bytesToHex(RLP.encode(storageProof.map((_sibling: string) => RLP.decode(_sibling)))),
),
proof.storageProof.map(({ proof: storageProof }: any) => storageProof),
],
} as GetAccountAndStorageProofResponse
} catch (_err) {
Expand Down

0 comments on commit 0423284

Please sign in to comment.