We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [web3-providers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15
votes
4answers
7k views

Infura web3 provider for Events (.get & .watch)

I am using infura for connecting to testnet/mainnet as my server side web3 provider. This works for most requests and operations, but it does not seem to work for Events. const allEvents = (event, ...
12
votes
6answers
19k views

Better pattern to detect web3 default account when using metamask

Context: I want to use blockies to render an identicon on the page, i get the defaultAccount from web3, for this, the user has to be logged on to metamask with a selected address from his wallet. The ...
16
votes
2answers
9k views

Connecting to hosted web3 provider from NodeJS backend

I'm using these instructions from etherchain. Here's a similar question(seems like duplicate, but it's not). The solution provided there doesn't work for me, because I don't have a local ethereum ...
2
votes
0answers
263 views

How to Catch Connection Issues to Web3 Provider using Web3.js

My node.js script is able to successfully connect to the Web3 provider when both the private key (using truffle-privatekey-provider) and the provider host URL are correct. let privateKey = ..., ...
2
votes
1answer
2k views

get address of new contract from contract factory

i need to deploy a rental contract at runtime whenever user want's to start the contract. for this purpose i have acontract factory. here is the actual code for facotry pragma solidity ^0.4.8; import ...
2
votes
1answer
1k views

possible reason for insufficient funds for gas * price + value

I have been researching this whole day, but I have a web3 instance, (the Web3 is version 1.0.0) const web3 = new Web3(new Web3.providers.HttpProvider('https://ropsten.infura.io/<myKey>')); ...
1
vote
0answers
109 views

Can't call another contract constant function in Remix in Web3 provider mode, but it works in Javascript VM

Remix behaves differently when running Javascript VM and web3 provider mode. I have two contracts: contract ERC20Basic { function totalSupply() public view returns (uint256){} function ...
1
vote
1answer
849 views

web3.js error: Cannot read property 'providers' of undefined

What is problem of this simple html / JavaScript / ethreumjs / web3.js code? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title&...
0
votes
1answer
478 views

JSON RPC + web3: Subscribe to Solidity events

When using web3 and the JSON RPC, is there a way to subscribe to Solidity events? For instance, I want to subscribe to every event Transfer(address indexed from, address indexed to, uint256 value); ...