Return gasPrice at gettxinfo API's method

pull/2403/head
saneery 5 years ago
parent 485b51f9b5
commit c7e8351781
  1. 2
      apps/block_scout_web/lib/block_scout_web/etherscan.ex
  2. 1
      apps/block_scout_web/lib/block_scout_web/views/api/rpc/transaction_view.ex
  3. 1
      apps/block_scout_web/test/block_scout_web/controllers/api/rpc/transaction_controller_test.exs

@ -440,6 +440,7 @@ defmodule BlockScoutWeb.Etherscan do
"from" => "0x000000000000000000000000000000000000000c", "from" => "0x000000000000000000000000000000000000000c",
"gasLimit" => "91966", "gasLimit" => "91966",
"gasUsed" => "95123", "gasUsed" => "95123",
"gasPrice" => "100000",
"hash" => "0x0000000000000000000000000000000000000000000000000000000000000004", "hash" => "0x0000000000000000000000000000000000000000000000000000000000000004",
"input" => "0x04", "input" => "0x04",
"logs" => [ "logs" => [
@ -986,6 +987,7 @@ defmodule BlockScoutWeb.Etherscan do
input: @input_type, input: @input_type,
gasLimit: @wei_type, gasLimit: @wei_type,
gasUsed: @gas_type, gasUsed: @gas_type,
gasPrice: @wei_type,
logs: %{ logs: %{
type: "array", type: "array",
array_type: @logs_details array_type: @logs_details

@ -68,6 +68,7 @@ defmodule BlockScoutWeb.API.RPC.TransactionView do
"input" => "#{transaction.input}", "input" => "#{transaction.input}",
"gasLimit" => "#{transaction.gas}", "gasLimit" => "#{transaction.gas}",
"gasUsed" => "#{transaction.gas_used}", "gasUsed" => "#{transaction.gas_used}",
"gasPrice" => "#{transaction.gas_price.value}",
"logs" => Enum.map(logs, &prepare_log/1), "logs" => Enum.map(logs, &prepare_log/1),
"next_page_params" => next_page_params "next_page_params" => next_page_params
} }

@ -456,6 +456,7 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do
"input" => "#{transaction.input}", "input" => "#{transaction.input}",
"gasLimit" => "#{transaction.gas}", "gasLimit" => "#{transaction.gas}",
"gasUsed" => "#{transaction.gas_used}", "gasUsed" => "#{transaction.gas_used}",
"gasPrice" => "#{transaction.gas_price.value}",
"logs" => [ "logs" => [
%{ %{
"address" => "#{address.hash}", "address" => "#{address.hash}",

Loading…
Cancel
Save