update tests

pull/998/head
Gustavo Santos Ferreira 6 years ago
parent e2b20f95bb
commit 1b239dadcc
  1. 2
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex
  2. 1
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipts.ex
  3. 4
      apps/ethereum_jsonrpc/test/ethereum_jsonrpc/receipts_test.exs

@ -65,6 +65,7 @@ defmodule EthereumJSONRPC.Receipt do
...> }
...> )
%{
created_contract_address_hash: "0xffc87239eb0267bc3ca2cd51d12fbf278e02ccb4",
cumulative_gas_used: 269607,
gas_used: 269607,
status: :ok,
@ -97,6 +98,7 @@ defmodule EthereumJSONRPC.Receipt do
...> }
...> )
%{
created_contract_address_hash: nil,
cumulative_gas_used: 21001,
gas_used: 21001,
status: nil,

@ -97,6 +97,7 @@ defmodule EthereumJSONRPC.Receipts do
...> ])
[
%{
created_contract_address_hash: nil,
cumulative_gas_used: 50450,
gas_used: 50450,
status: :ok,

@ -14,6 +14,7 @@ defmodule EthereumJSONRPC.ReceiptsTest do
describe "fetch/2" do
test "with receipts and logs", %{json_rpc_named_arguments: json_rpc_named_arguments} do
%{
created_contract_address_hash: nil,
cumulative_gas_used: cumulative_gas_used,
gas_used: gas_used,
address_hash: address_hash,
@ -29,6 +30,7 @@ defmodule EthereumJSONRPC.ReceiptsTest do
case Keyword.fetch!(json_rpc_named_arguments, :variant) do
EthereumJSONRPC.Geth ->
%{
created_contract_address_hash: nil,
cumulative_gas_used: 884_322,
address_hash: "0x1e2fbe6be9eb39fc894d38be976111f332172d83",
block_number: 3_560_000,
@ -45,6 +47,7 @@ defmodule EthereumJSONRPC.ReceiptsTest do
EthereumJSONRPC.Parity ->
%{
created_contract_address_hash: nil,
cumulative_gas_used: 50450,
gas_used: 50450,
address_hash: "0x8bf38d4764929064f2d4d3a56520a76ab3df415b",
@ -73,6 +76,7 @@ defmodule EthereumJSONRPC.ReceiptsTest do
%{
id: 0,
result: %{
"contractAddress" => nil,
"cumulativeGasUsed" => integer_to_quantity(cumulative_gas_used),
"gasUsed" => integer_to_quantity(gas_used),
"logs" => [

Loading…
Cancel
Save