|
|
@ -374,7 +374,7 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do |
|
|
|
|> with_block(block, status: :ok) |
|
|
|
|> with_block(block, status: :ok) |
|
|
|
|
|
|
|
|
|
|
|
address = insert(:address) |
|
|
|
address = insert(:address) |
|
|
|
insert(:log, address: address, transaction: transaction) |
|
|
|
log = insert(:log, address: address, transaction: transaction) |
|
|
|
|
|
|
|
|
|
|
|
params = %{ |
|
|
|
params = %{ |
|
|
|
"module" => "transaction", |
|
|
|
"module" => "transaction", |
|
|
@ -382,7 +382,7 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do |
|
|
|
"txhash" => "#{transaction.hash}" |
|
|
|
"txhash" => "#{transaction.hash}" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
expected_result = %{ |
|
|
|
expected_result = %{ |
|
|
|
"hash" => "#{transaction.hash}", |
|
|
|
"hash" => "#{transaction.hash}", |
|
|
|
"timeStamp" => "#{DateTime.to_unix(transaction.block.timestamp)}", |
|
|
|
"timeStamp" => "#{DateTime.to_unix(transaction.block.timestamp)}", |
|
|
|
"blockNumber" => "#{transaction.block_number}", |
|
|
|
"blockNumber" => "#{transaction.block_number}", |
|
|
@ -394,11 +394,13 @@ 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}", |
|
|
|
"logs" => [%{ |
|
|
|
"logs" => [ |
|
|
|
"address" => "#{address}", |
|
|
|
%{ |
|
|
|
"data" => "0x00", |
|
|
|
"address" => "#{address}", |
|
|
|
"topics" => [nil, nil, nil, nil] |
|
|
|
"data" => "#{log.data}", |
|
|
|
}] |
|
|
|
"topics" => [nil, nil, nil, nil] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
assert response = |
|
|
|
assert response = |
|
|
|