-
Notifications
You must be signed in to change notification settings - Fork 110
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
web3 instantiation #1
Comments
The provider is the RPC service running that you hook into to execute transactions on an Ethereum blockchain. If I run I honestly have no idea what QtSyncProvider is, or does. Google didn't help either. It seems like it's another option provided by Web3 for instantiating a new provider? Are you running something like testrpc by any chance? Or maybe geth? |
Okay, great - that all makes sense to me. Thanks for the explanation! I'd still be curious to know if anyone else could provide some insight on the QtSyncProvider though. |
@phoniks Are you using Parity locally? What line does the error reference? Did you follow all of the dev environment setup instructions? If you would like to change the Web3 provider, please change line 8 of I am not familiar with My reference to "local" in my comment that says "instantiate new web3 local instance" is simply about the fact that the Any provider can be used to interact with a remote or local Ethereum blockchain. Line 8 is connecting to a local Ethereum blockchain and the provider is implicitly a
|
On the first run, I got the following error:
Uncaught TypeError: _web2.default is not a constructor
After digging around a bit I was able to overcome it by replacing this:
web3 = new Web3(window.web3.currentProvider);
on line 15 of /src/web3.jswith this:
web3 = new Web3.providers.QtSyncProvider();
As I'm new to dApps I'm still learning how web3 works, so I can't say I understand the effect of the change or whether it's a valid solution to this problem. Any ideas as to why the error occurs and how to properly fix it?
I suppose, more specifically, the purpose of this code seems to be to "Instantiate new web3 local instance" according to the notation. What is a "local" vs a "remote" instance of web3? I notice that the other provider available is the HttpProvider (as opposed to QtSyncProvider), so am I correct in assuming that Http = remote and QtSync = local?
The text was updated successfully, but these errors were encountered: