From 242185a8cfd8241ca11cf5c2e4189797a99e411a Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Thu, 11 Apr 2024 21:40:48 +0100 Subject: [PATCH] problem: eth_getRawTransactionByHash is missing --- .../java/io/emeraldpay/etherjar/rpc/EthCommands.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etherjar-rpc-api/src/main/java/io/emeraldpay/etherjar/rpc/EthCommands.java b/etherjar-rpc-api/src/main/java/io/emeraldpay/etherjar/rpc/EthCommands.java index d9734ae9..864ead09 100644 --- a/etherjar-rpc-api/src/main/java/io/emeraldpay/etherjar/rpc/EthCommands.java +++ b/etherjar-rpc-api/src/main/java/io/emeraldpay/etherjar/rpc/EthCommands.java @@ -141,6 +141,16 @@ public RpcCall getTransaction(long block, long return RpcCall.create("eth_getTransactionByBlockNumberAndIndex", TransactionJson.class, HexQuantity.from(block).toHex(), HexQuantity.from(index).toHex()); } + /** + * + * @param hash transaction hash + * @return raw transaction data + */ + public RpcCall getRawTransaction(TransactionId hash) { + return RpcCall.create("eth_getRawTransactionByHash", String.class, hash.toHex()) + .converted(HexData.class, HexData::from); + } + /** * * @param hash transaction hash