diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex index ca7af965da..8e1b7519e3 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex @@ -44,6 +44,11 @@ defmodule EthereumJSONRPC do """ @type address :: String.t() + @typedoc """ + A block number as an Elixir `t:non_neg_integer/0` instead of `t:data/0`. + """ + @type block_number :: non_neg_integer() + @typedoc """ Binary data encoded as a single hexadecimal number in a `String.t` """ diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex index 487d8ae5d2..b66cc2ebf6 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex @@ -7,7 +7,6 @@ defmodule EthereumJSONRPC.Receipt do import EthereumJSONRPC, only: [quantity_to_integer: 1] alias EthereumJSONRPC.Logs - alias Explorer.Chain.Transaction.Status @type elixir :: %{String.t() => String.t() | non_neg_integer} @@ -39,6 +38,12 @@ defmodule EthereumJSONRPC.Receipt do | nil } + @typedoc """ + * `:ok` - transaction succeeded + * `:error` - transaction failed + """ + @type status :: :ok | :error + @doc """ Get `t:EthereumJSONRPC.Logs.elixir/0` from `t:elixir/0` """ @@ -110,7 +115,7 @@ defmodule EthereumJSONRPC.Receipt do cumulative_gas_used: non_neg_integer, gas_used: non_neg_integer, created_contract_address_hash: String.t() | nil, - status: Status.t(), + status: status(), transaction_hash: String.t(), transaction_index: non_neg_integer() }