hooked-web3-provider
hooked-web3-provider copied to clipboard
Support for TestRPC.provider()
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?
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!