Questions tagged [web3-providers]

The tag has no usage guidance.

52 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
74 views

Invalid JSON RPC response on IOS build with Infura

I am developing a mobile DAPP using ionic frame work, everything was fine when I testing on the browser. However I try to build my app on IOS, and run it on my Iphone7, the web3 doesn't work(did't ...
3
votes
1answer
2k views

Cannot use 'new' with an expression whose type lacks a call or construct signature

A issue in the this.web3 = new Web3(window.web3.currentProvider);the web3.js has output and I type to the code of console.log(window.web3.currentProvider)that window.web3.currentProvider is defined. ...
2
votes
1answer
43 views

Metamas - Infura problem. Cannot read property 'currentProvider' of undefined

I got a problem. I am using code below to connect to the eth from node.js app. Everything works perfect as long as I have installed MetaMask in my browser. I can be logged in, logged out, all good ...
2
votes
0answers
252 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
187 views

Reliable way of listening to events on frontend

I make a web application, that needs the events from my contract to initialize it's state. I was using infura websocket provider, but it seems to lag a lot and close the connections unexpectedly ...
2
votes
0answers
183 views

How to sign transactions using metamask while developing in nodejs?

I am developing an application in nodejs. I need to interact with my smart contract and also want to sign the transaction using metamask as I don't want to manage they keys. I copied the following ...
2
votes
1answer
263 views

subscription not happen on geth+websocketProvider in web3

I have started geth node (connect to ropsten testnet) on my local OSX system. Command: geth --testnet --fast --bootnodes "enode://...
2
votes
2answers
3k views

Error: Max retries exceeded with url appear when using web3.py

Here is my code: from web3 import Web3, HTTPProvider, IPCProvider web3 = Web3(HTTPProvider('http://localhost:8545')) print(web3.eth.blockNumber) Below is the error: requests.exceptions....
2
votes
0answers
609 views

web3 1.0.0-beta example for etherscan websocket?

Does anyone have a working JS example for wss://socket.etherscan.io/wshandler? Or any alternative websocket providers, besides Infura? The reason I'm looking for Infura alternatives is it fails for ...
2
votes
2answers
545 views

Ethereum client supporting websocket for development

Is there any ethereum client for development and testing that supports websocket connection. I want to use the subscribe API in web3. testrpc does not support socket connection.
2
votes
2answers
334 views

How to connect these **Remix - kovan - parity**?

I have been trying to connect deploy a smart contract from remix onto kovan chain via parity but kept on showing even after trying with all the rpc flags. if possible please throughly explain the ...
2
votes
1answer
264 views

Can we call two contracts in web3.eth.filter method?

I have two contract address and I want to check events on both in one call. I mean, can we pass two contract address in one option param like i do below? let web3 = new Web3(); web3.setProvider(...
2
votes
0answers
291 views

TypeError: filterCreationErrorCallback is not a function

trying to deploy contract to Ropsten network-
2
votes
0answers
336 views

Different uPort provider

I'm trying to integrate uPort in one of my project and, the first thing that I noticed are the different ways to give a provider: from the official repository uPort-lib let web3 = uport.getWeb3() ...
1
vote
0answers
20 views

How does getDefaultProvider work in ethers.js?

From the docs: This creates a FallbackProvider backed by multiple backends (INFURA and Etherscan). This is the recommended method of connecting to the Ethereum network if you are not running ...
1
vote
0answers
34 views

how can i translate the ethers.js “getSigner” utility to web3?

I have a web3 object but I'm working off an example that uses ethersProvider.getSigner(). Is there an equivalent (or mostly equivalent) in the web3 library? For reference, the ethersProvider is ...
1
vote
1answer
251 views

Error when deploying with infura ropsten, rinkeby and kovan

when deploying to infura ropsten i get error Running migration: 1_initial_migration.js Deploying Migrations... ... 0x0ed88dd40f380a805ed0ba1b5b0a9d8178321ab6da9e5c0cb247f5700337b173 Migrations: ...
1
vote
0answers
38 views

Web3JS throws InvalidResponse without Ganache core ever receiving a request?

Versions: Ubuntu 18.04 LTS Node.JS: 8.3.0 WebJS: web3: ^1.0.0-beta.37 web3-utils: ^1.0.0-beta.36 npm: 5.6.0 Truffle version 5.x (latest) I have traced through the HttpProvider code in the Web3 ...
1
vote
0answers
390 views

How to fix a web3.py HTTPConnectionPool read timeout error

I have a web3.py program running and everything was seemingly working. I was connecting to my local server via the automatic connection offered in web3.py. I am now getting the following error: ...
1
vote
0answers
190 views

Using web3.py, I get a key error when connecting to a remote server with 3 nodes running (autoconnect works fine)

I have a web3.py project that is successfully performing basic tasks (read from blockchain, send tx, process data, etc.). It is connected to a remote server that is running an ETH node, a Rinkeby node,...
1
vote
0answers
513 views

Metamask create transaction with popup prompt

Im trying to create a basic static html page to send a transaction using metamask. It looks like web3 is not being injected into the page at all even though i have metamask installed. I would have ...
1
vote
1answer
261 views

Why no dapps in the Google Play Store? Why Ethereum not accessible by default in smartphone?

Before I create a decentralized application, I want to know whether it already exists. I thought the first step would be to search the Google Play Store, but it appears dapps are not available on the ...
1
vote
1answer
81 views

How does web3.auto choose a provider node?

I'm having this other issue which has forced me to rely on either infura or web3.auto in order to make the getTransactionReceipt call. I've noticed that when I create a w3 instance from web3.auto it ...
1
vote
0answers
106 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
0answers
288 views

event not emitting at all in solidity

i have function which needs to transfer some funds and then emit an event. Here is the code pragma solidity ^0.4.8; contract Rental { struct PaidRent { uint id; uint value; } ...
1
vote
0answers
40 views

Error received saying Provider is not set, when trying to call a function, after deploying a contract

Should we set provider for contract instances separately or am I missing something. Is there any problem setting it to current provider instance? I am using the "1.0.0-beta.26" web3. The error is ...
1
vote
0answers
261 views

Geth Node as Web3 Provider: Impact of Multiple Client Connections

Related to this question (restricting access to Geth node), if I have a remote geth node and several clients connecting to it as a web3 provider const web3 = new Web3(new Web3.providers.HttpProvider('...
1
vote
1answer
946 views

truffle migrate hanging on Deploying Migrations

I am deploying a contract on Ropsten Network,These are my settings 2_deploy_contracts.js var SafeMath = artifacts.require("./SafeMath.sol"); var TahaCoin = artifacts.require("./TahaCoin.sol"); var ...
1
vote
1answer
1k views

Getting “Error: unknown account at Object.InvalidResponse” when appication is connected to private network using metamask

My Contract is: pragma solidity ^0.4.8; contract Awards { address public owner; string  public name1; string  public name2; string  public name3; function Awards() {   owner = msg....
0
votes
0answers
8 views

Terminate WebsocketProvider

I have web-socket running properly as expected. Unfortunately, the termination of the websocket does not happen. The program I used is import Web3 from 'web3'; const eventProvider = new ...
0
votes
0answers
22 views

How do i connect geth to web3.py using IPC on Windows?

I'll briefly explain my setup before describing the problem in detail. I am on Windows 10 and using the geth client in Light Sync Mode, along with web3.py on Jupyter Notebook and Metamask as a wallet....
0
votes
0answers
17 views

Ethers.js [4.x]: How to estimate gas limit of contract factory deployment?

In ethers.js 4.x there is the ability to estimate the needed gas limit for calling contract functions. E.g.: const estimatedLimit = await contract.estimate.function(parameter) overrides = { ...
0
votes
0answers
14 views

subscriptions in Geth or Parity

I am trying to get the way to register subscriptions to events, with the services of QuikNode I can do it without problem and it is working perfect, but I am trying to raise a node --light with geth ...
0
votes
0answers
29 views

web3 update monitoring

Inside a DAPP, I have been using web3.currentProvider.publicConfigStore.on('update',... to monitoring Metamask activity. But in the new metamask-mobile such method does not exists. There is a ...
0
votes
1answer
72 views

Filters object not working for web3.eth.contract getPastEvents() method

I have referred, Web3 Events, but filters object is not working for me, I've got the same result for events before and after applying filter object. Here's the code: instance.getPastEvents( "...
0
votes
1answer
59 views

Is there any working provider for Ethereum Classic APIs?

Provider used for Ethereum is Infura, but there is no any provider for Ethereum Classic. Previously tested Ethercluster endpoint to access APIs for Ethereum Classic, not able to connect with Kotti ...
0
votes
0answers
46 views

Ether.js - Sending transaction with metamask

Problem: Cannot send transaction to contract with metamask when using Ether.js I can get a result when calling a public view function as shown below. However, when calling a normal function, ...
0
votes
1answer
21 views

Gas estimation failed when using web3 provider testrpc

Gas estimation failed error while invoking a simple function pragma solidity ^0.5.9; contract sample{ uint number; function setNumber(uint _number) public{ number = _number; } ...
0
votes
1answer
48 views

signing transactions with web3.js

Im trying to create a node.js based dapp that interacts with ropsten ethereum network via infura node.here we need sign transaction with web3.js. but the code showing error from the contract side. ...
0
votes
0answers
97 views

how to inject web3 in drizzle based DApp from Trust Wallet web3 provider?

My DApp is using drizzle alongwith DrizzleContext provider which takes care of checking for web3 provider, and is successfully getting web3 provider from MetaMask. The same is not working for trust ...
0
votes
0answers
235 views

Get RPC URL / IP of Metamask's current provider

Suppose I have multiple copies of the same dapp running on different servers which do not directly communicate with each other, for testing purposes, and can manually interact with different dapp ...
0
votes
0answers
39 views

Manage accounts in Remix Web3 Provider env connected to a TestRPC client node

When I run the TestRPC client (ganache-cli), it provides me with 10 different accounts and private keys along with a local server at localhost:8545 Available Accounts (0) ...
0
votes
0answers
32 views

webPackage issue

i am using angular 7 and web3 version 1.0.0-beta.37 for develop a blockChain application.After run this program i have an issue in terminal . Module not found: Error: Can't resolve 'crypto' in '/home/...
0
votes
1answer
79 views

Unable to connect to 'Web3 Provider' on Remix using http connection

I am using an http connection to connect to the Web3 Provider using Remix. The port 8454 is listening as expected. I am getting the following error: Not possible to connect to the Web3 provider. ...
0
votes
0answers
54 views

source.setEngine is not a function

So everything worked fine in truffle 4.1.14, but when I upgraded to 5.0.0 I got this error: TypeError: source.setEngine is not a function at Web3ProviderEngine.addProvider (node_modules/web3-...
0
votes
1answer
561 views

Command line tool to interact with smart contract

I want to be able to interact with functions on a smart contract. I do not want to setup my own node using geth, and would like to use something like Infura as a remote node. Based on what I have ...
0
votes
0answers
44 views

How to detect if the node is down?

Is there any function inside MetaMask or Web3JS to detect if the node is down? For example, let say the private node that the user is connected to is down, how my app can know about it? Steps to ...
0
votes
0answers
892 views

Warning! Error encountered during contract execution [Reverted]

i have contract which looks like following pragma solidity ^0.4.8; contract Rental { struct PaidRent { uint id; uint value; } PaidRent[] public paidrents; event ...
0
votes
1answer
85 views

How to connect to a peer in ethereum and then run contract on ethereum?

I have developed a smart contract and run it with remix in cases of javascript vm and web3 provider. Now, I want to run it such that my computer to be connected to real ethereum network. I think in ...
0
votes
1answer
109 views

Cannot connect to private testnet with web3.js

I have setup a local private test net and now I want to connect from Node.js to a node in the testned using IPC. I started a node with this command: ./geth --identity "5" --datadir /home/davide/...