-
Notifications
You must be signed in to change notification settings - Fork 74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll do another pass later today.
setup do | ||
mock_balance = 123 | ||
|
||
Code.eval_string(""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this and use only dumb
adapter?
|
||
supervisor = String.to_atom("#{UUID.generate()}") | ||
|
||
{:ok, _} = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might worth switching this to EthBlockchainCase
. Probably make it return supervisor pid as well? (Since we need to perform the which_children
check?)
@@ -0,0 +1,3 @@ | |||
use Mix.Config | |||
|
|||
config :ethereumex, url: "http://localhost:8545", client_type: :http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should ask Mana-Ethereum people to support {:system, ...}
style config 😉
alias Keychain.Repo | ||
|
||
setup tags do | ||
:ok = Sandbox.checkout(Repo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the worker shouldn’t access Keychain
directly. Instead, let the EthBlockchain
pass it to the adapter (so the adapter can be self-contained).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's wait for a few more 👍
2a33613
to
3337d15
Compare
Issue/Task Number: #693
Closes #693
Overview
This PR refactors the
blockchain
andeth_blockchain
sub-apps and adds the support for thegeth
adapter.Changes
blockchain
toeth_blockchain
blockchain_eth
togeth_eth_adapter
eth_blockchain
sub-appethereumex
andabi
dependencies to handle JSON-RPC calls togeth
{:get_balances, address, contract_addresses, block}
that returns a map of contract_address -> balance for the specified wallet addressdefault_adapter
config that is set to:geth
by default except for tests where it's set to:dumb
which is aDumb
adapter that mock responses.Usage
eth_geth_adapter/config/dev.exs
iex -S mix
(replace the first param with your wallet address and the list of addresses with the actual contract addresses).
For future PRs: