From c6086646015eb3282dd7c3d1148a58b2fe6dd62c Mon Sep 17 00:00:00 2001 From: goodsoft Date: Mon, 29 Apr 2019 21:00:52 +0300 Subject: [PATCH] Use from/to fields from transaction instead of receipt Transaction receipt from cpp-ethereum doesn't contain these fields. --- apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/tracer.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/tracer.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/tracer.ex index 98fe2c6719..a47fc22e3a 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/tracer.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/tracer.ex @@ -7,8 +7,8 @@ defmodule EthereumJSONRPC.Geth.Tracer do import EthereumJSONRPC, only: [integer_to_quantity: 1, quantity_to_integer: 1] def replay(%{"structLogs" => logs} = result, receipt, tx) when is_list(logs) do - %{"from" => from, "to" => to, "contractAddress" => contract_address, "gasUsed" => gas_used} = receipt - %{"value" => value, "input" => input, "gas" => gas} = tx + %{"contractAddress" => contract_address, "gasUsed" => gas_used} = receipt + %{"from" => from, "to" => to, "value" => value, "input" => input, "gas" => gas} = tx top = to