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

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

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

Loading…
Cancel
Save