|
|
@ -321,6 +321,30 @@ defmodule BlockScoutWeb.Etherscan do |
|
|
|
"result" => nil |
|
|
|
"result" => nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@transaction_gettxinfo_example_value %{ |
|
|
|
|
|
|
|
"status" => "1", |
|
|
|
|
|
|
|
"result" => %{ |
|
|
|
|
|
|
|
"blockNumber" => "3", |
|
|
|
|
|
|
|
"confirmations" => "0", |
|
|
|
|
|
|
|
"from" => "0x000000000000000000000000000000000000000c", |
|
|
|
|
|
|
|
"gasLimit" => "91966", |
|
|
|
|
|
|
|
"gasUsed" => "95123", |
|
|
|
|
|
|
|
"hash" => "0x0000000000000000000000000000000000000000000000000000000000000004", |
|
|
|
|
|
|
|
"input" => "0x04", |
|
|
|
|
|
|
|
"logs" => [ |
|
|
|
|
|
|
|
%{ |
|
|
|
|
|
|
|
"address" => "0x000000000000000000000000000000000000000e", |
|
|
|
|
|
|
|
"data" => "0x00", |
|
|
|
|
|
|
|
"topics" => ["First Topic", "Second Topic", "Third Topic", "Fourth Topic"] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
"success" => true, |
|
|
|
|
|
|
|
"timeStamp" => "1541018182", |
|
|
|
|
|
|
|
"to" => "0x000000000000000000000000000000000000000d", |
|
|
|
|
|
|
|
"value" => "67612" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@transaction_gettxreceiptstatus_example_value %{ |
|
|
|
@transaction_gettxreceiptstatus_example_value %{ |
|
|
|
"status" => "1", |
|
|
|
"status" => "1", |
|
|
|
"message" => "OK", |
|
|
|
"message" => "OK", |
|
|
@ -428,6 +452,28 @@ defmodule BlockScoutWeb.Etherscan do |
|
|
|
example: ~s("18") |
|
|
|
example: ~s("18") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@logs_details %{ |
|
|
|
|
|
|
|
name: "Log Detail", |
|
|
|
|
|
|
|
fields: %{ |
|
|
|
|
|
|
|
address: @address_hash_type, |
|
|
|
|
|
|
|
topics: %{ |
|
|
|
|
|
|
|
type: "topics", |
|
|
|
|
|
|
|
definition: "An array including the topics for the log.", |
|
|
|
|
|
|
|
example: ~s(["0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545"]) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
data: %{ |
|
|
|
|
|
|
|
type: "data", |
|
|
|
|
|
|
|
definition: "Non-indexed log parameters.", |
|
|
|
|
|
|
|
example: ~s("0x") |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
blockNumber: %{ |
|
|
|
|
|
|
|
type: "block number", |
|
|
|
|
|
|
|
definition: "A nonnegative number used to identify blocks.", |
|
|
|
|
|
|
|
example: ~s("0x5c958") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@address_balance %{ |
|
|
|
@address_balance %{ |
|
|
|
name: "AddressBalance", |
|
|
|
name: "AddressBalance", |
|
|
|
fields: %{ |
|
|
|
fields: %{ |
|
|
@ -735,6 +781,35 @@ defmodule BlockScoutWeb.Etherscan do |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@transaction_info_model %{ |
|
|
|
|
|
|
|
name: "TransactionInfo", |
|
|
|
|
|
|
|
fields: %{ |
|
|
|
|
|
|
|
hash: @transaction_hash_type, |
|
|
|
|
|
|
|
timeStamp: %{ |
|
|
|
|
|
|
|
type: "timestamp", |
|
|
|
|
|
|
|
definition: "The transaction's block-timestamp.", |
|
|
|
|
|
|
|
example: ~s("1439232889") |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
blockNumber: @block_number_type, |
|
|
|
|
|
|
|
confirmations: @confirmation_type, |
|
|
|
|
|
|
|
success: %{ |
|
|
|
|
|
|
|
type: "boolean", |
|
|
|
|
|
|
|
definition: "Flag for success during tx execution", |
|
|
|
|
|
|
|
example: ~s(true) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
from: @address_hash_type, |
|
|
|
|
|
|
|
to: @address_hash_type, |
|
|
|
|
|
|
|
value: @wei_type, |
|
|
|
|
|
|
|
input: @input_type, |
|
|
|
|
|
|
|
gasLimit: @wei_type, |
|
|
|
|
|
|
|
gasUsed: @gas_type, |
|
|
|
|
|
|
|
logs: %{ |
|
|
|
|
|
|
|
type: "array", |
|
|
|
|
|
|
|
array_type: @logs_details |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@transaction_status_model %{ |
|
|
|
@transaction_status_model %{ |
|
|
|
name: "TransactionStatus", |
|
|
|
name: "TransactionStatus", |
|
|
|
fields: %{ |
|
|
|
fields: %{ |
|
|
@ -1569,6 +1644,43 @@ defmodule BlockScoutWeb.Etherscan do |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@transaction_gettxinfo_action %{ |
|
|
|
|
|
|
|
name: "gettxinfo", |
|
|
|
|
|
|
|
description: "Get transaction info.", |
|
|
|
|
|
|
|
required_params: [ |
|
|
|
|
|
|
|
%{ |
|
|
|
|
|
|
|
key: "txhash", |
|
|
|
|
|
|
|
placeholder: "transactionHash", |
|
|
|
|
|
|
|
type: "string", |
|
|
|
|
|
|
|
description: "Transaction hash. Hash of contents of the transaction." |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
optional_params: [], |
|
|
|
|
|
|
|
responses: [ |
|
|
|
|
|
|
|
%{ |
|
|
|
|
|
|
|
code: "200", |
|
|
|
|
|
|
|
description: "successful operation", |
|
|
|
|
|
|
|
example_value: Jason.encode!(@transaction_gettxinfo_example_value), |
|
|
|
|
|
|
|
model: %{ |
|
|
|
|
|
|
|
name: "Result", |
|
|
|
|
|
|
|
fields: %{ |
|
|
|
|
|
|
|
status: @status_type, |
|
|
|
|
|
|
|
message: @message_type, |
|
|
|
|
|
|
|
result: %{ |
|
|
|
|
|
|
|
type: "model", |
|
|
|
|
|
|
|
model: @transaction_info_model |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
%{ |
|
|
|
|
|
|
|
code: "200", |
|
|
|
|
|
|
|
description: "error", |
|
|
|
|
|
|
|
example_value: Jason.encode!(@transaction_gettxreceiptstatus_example_value_error) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@transaction_gettxreceiptstatus_action %{ |
|
|
|
@transaction_gettxreceiptstatus_action %{ |
|
|
|
name: "gettxreceiptstatus", |
|
|
|
name: "gettxreceiptstatus", |
|
|
|
description: "Get transaction receipt status.", |
|
|
|
description: "Get transaction receipt status.", |
|
|
@ -1692,6 +1804,7 @@ defmodule BlockScoutWeb.Etherscan do |
|
|
|
@transaction_module %{ |
|
|
|
@transaction_module %{ |
|
|
|
name: "transaction", |
|
|
|
name: "transaction", |
|
|
|
actions: [ |
|
|
|
actions: [ |
|
|
|
|
|
|
|
@transaction_gettxinfo_action, |
|
|
|
@transaction_gettxreceiptstatus_action, |
|
|
|
@transaction_gettxreceiptstatus_action, |
|
|
|
@transaction_getstatus_action |
|
|
|
@transaction_getstatus_action |
|
|
|
] |
|
|
|
] |
|
|
|