Merge pull request #5184 from blockscout/vb-eth-call-nill-from-fix

eth_call method: remove from param from the request, if it is null
pull/5169/head
Victor Baranov 3 years ago committed by GitHub
commit 261bc79818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 6
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/contract.ex

@ -5,6 +5,7 @@
- [#4690](https://github.com/blockscout/blockscout/pull/4690) - Improve pagination: introduce pagination with random access to pages; Integrate it to the Transactions List page
### Fixes
- [#5184](https://github.com/blockscout/blockscout/pull/5184) - eth_call method: remove from param from the request, if it is null
- [#5172](https://github.com/blockscout/blockscout/pull/5172), [#5182](https://github.com/blockscout/blockscout/pull/5182) - Reduced the size of js bundles
- [#5160](https://github.com/blockscout/blockscout/pull/5160) - Fix blocks validated hint
- [#5155](https://github.com/blockscout/blockscout/pull/5155) - Fix get_implementation_abi_from_proxy/2 implementation

@ -188,10 +188,14 @@ defmodule EthereumJSONRPC.Contract do
block_number -> integer_to_quantity(block_number)
end
params =
%{to: contract_address, data: data}
|> (&if(is_nil(from), do: &1, else: Map.put(&1, :from, from))).()
full_params = %{
id: id,
method: "eth_call",
params: [%{to: contract_address, data: data, from: from}, block]
params: [params, block]
}
request(full_params)

Loading…
Cancel
Save