diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/contract.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/contract.ex index 34e20b7209..8bd0401eea 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/contract.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/contract.ex @@ -40,12 +40,12 @@ defmodule EthereumJSONRPC.Contract do requests_with_index |> Enum.map(fn {%{contract_address: contract_address, method_id: target_method_id, args: args} = request, index} -> function = - functions - |> define_function(target_method_id) - |> Map.drop([:method_id]) - + functions + |> define_function(target_method_id) + |> Map.drop([:method_id]) + formatted_args = format_args(function, args) - + function |> Encoder.encode_function_call(formatted_args) |> eth_call_request(contract_address, index, Map.get(request, :block_number), Map.get(request, :from))