Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple networks via config file #3

Open
HarryR opened this issue Jun 24, 2018 · 0 comments
Open

Support multiple networks via config file #3

HarryR opened this issue Jun 24, 2018 · 0 comments

Comments

@HarryR
Copy link
Owner

HarryR commented Jun 24, 2018

Currently the proof of concept only uses a single Ethereum JSON-RPC connector, and assumes that either side is operating on the same contract on the same network for testing purposes.

To be useful it needs to support multiple networks on both the client & coordinator server side.

I think this should be done via a config file, e.g.:

networks:
  eth-main:
    type: ethereum
    id: 1
    connector: ethjsonrpc
    url: http://127.0.0.1:8545
  eth-ropsten:
    type: ethereum
    id: 3
    connector: ethjsonrpc
    url: http://127.0.0.1:8546

Other information that could be contained in a config file:

  • Token addresses, which network they're on
  • HTLC and other swap contract addresses
  • Approved contract code hashes

This also opens the possibility of using Infura or Etherscan to submit transactions, instead of a direct EthJsonRpc connection, as long as they both provide the same interface.

Will need to find a clean method for supporting the config file in the client & server, e.g. when creating a connection it will use an object factory from the config class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant