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 for TestRPC.provider() #12

Open
IstoraMandiri opened this issue Oct 17, 2016 · 1 comment
Open

Support for TestRPC.provider() #12

IstoraMandiri opened this issue Oct 17, 2016 · 1 comment

Comments

@IstoraMandiri
Copy link

I'd like to run my tests using an eth-lightwallet keystore and hooked-web3-provider.

This is working great with TestRPC if the transactions are sent over HTTP, but using TestRPC.provider() fails if I try to implement HookedWeb3provider (which seems to assume a HTTP host).

I was hoping to do something generic like this, that supports both HTTP hosts and TestRPC.provider()

  // create the provider for web3 transactions using ks
  const hookedProvider = new HookedWeb3Provider({
    ...web3.currentProvider,
    transaction_signer: keystore,
  });
  // update the web3 instance to use our new provider
  web3.setProvider(hookedProvider);

However, it fails with:

Error: Invalid JSON RPC response: Error: connect ECONNREFUSED 127.0.0.1:8545

Happy to help with a PR this is within the scope of hooked-web3-provider. Is it?

@danfinlay
Copy link

This project was basically abandoned in favor of provider-engine, which can be used to easily configure something like hooked-web3-provider, or something more advanced!

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

2 participants