Questions tagged [web3-providers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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://...
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/...
0
votes
1answer
75 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( "...
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....
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 ...
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 ...
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 ...
1
vote
2answers
593 views

How to expose the underlying web socket connection from the WebSocketProvider?

Using web3.js version 1(beta) and using the WebsocketProvider to make a connection via const Web3 = require('web3') const web3 = new Web3('ws://localhost:8546') const provider = web3.providers....
0
votes
1answer
150 views

Metmask injection local client standalone

It is too confusing for me. I tried everything. If I run the code in node.js with browserfy.. everything works fine. No I want to run it on my webserver. As MetaMask states it will not inject the ...
0
votes
1answer
16 views

How to use shh.subscribe

I want to use the web3-shh functionality. I used the example from readthedocs(web3-shh). Everything works except for the subscribe operation. It raises following error: ...
0
votes
1answer
60 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 ...
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(...
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....
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.
0
votes
1answer
15 views

Why does webjs 1.0.0 cdn show api 0.20.7?

I have a project where rather than installing modules I have to import web3.js cdn. It's possible to find it here: https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.34/dist/ In the project ...
0
votes
1answer
39 views

How to connect project without web3 js npm package

I'm working with ASP.NET Core project and wanted to connect Blockchain with it. But the problem is, we don't want to use Web3 npm packages. Hence, I have added web3 js as follows <script src="...
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....
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 ...
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
15 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 ...
3
votes
2answers
939 views

How to connect truffle using HDWallet provider to Websocket-powered node?

I am using truffle-hdwallet-provider to connect to the node that operates over https and it works perfectly. Now I want to connect to websocket-powered node but keep my HD Wallet provider. I cannot ...
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 ...
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
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 ...
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 ...
0
votes
0answers
47 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
562 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
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
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. ...
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 ...
0
votes
1answer
49 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. ...
1
vote
3answers
795 views

web3.eth.personal : “Method not found”

When I invoke a method of web3.eth.personal I receive an error as follows: > web3.eth.personal.getAccounts().then(console.log); Promise { <pending>, domain: Domain { domain: ...
1
vote
1answer
253 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: ...
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 ...
0
votes
1answer
28 views

Do smart-contracts work as APIs?

Is it possible to put a smart contract "behind" a restful API, i.e. expose my contract functions and properties through restuful API where I can make RPC to it? Or does it work as an API already, but ...
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 ...
0
votes
1answer
190 views

TypeError: this.provider.sendAsync is not a function

First I connected web3 with Infura. Then reading an ethereum account. I receive the following error while fetching account balance through node.js console. > web3.eth.getBalance(address, (err, ...
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
73 views

Meteor's EthBlocks.latest.number not updating

Created a very simple Meteor app to display the current block number using ethereum:block. Problem: Even though the current block number is displayed when the page loads, it does not update both on ...
0
votes
1answer
382 views

inject web3 in electron-ethereum-react desktop application

I am trying to make ethereum-electron-react application. when I try to inject web3 it does not get detected. import Web3 from 'web3'; console.log (Web3); this shows an empty object even though ...
0
votes
1answer
57 views

Code not returning when using websocket provider in web3

Below are two code snippets. I have created a 'ganache-testing.js' file and running it using node ganache-testing.js command Web3 = require("web3"); provider = new Web3.providers.HttpProvider("http:/...
2
votes
1answer
67 views

When do you use ganache-cli and when do you use ganache-core?

I have seen two usages over the internet 1. const ganache = require("ganache-cli"); web3.setProvider(ganache.provider()); 2. const ganache = require("ganache-core"); web3.setProvider(ganache....
2
votes
2answers
476 views

How to connect with public Ethereum Blockchain on a backend/web server?

In the backend of a Web application I have to communicate with the public Ethereum Blockchain. On local development machine, I run ganache as testrpc and connect with such a line of code: web3 = new ...
0
votes
1answer
190 views

Infura Web Sockets doesn't work on Infura

I have a problem with connecting via Websockets to Infura. I am listening on some events from my smart contract, so when some event is dispatched by calling some method from smart contract, I should ...
11
votes
6answers
18k 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 ...
0
votes
1answer
350 views

Deploying a smart contract by using a javascript file

I want to deploy a contract using following javascript file, but I receive following error: TypeError: web3.eth.Contract is not a constructor at Object.<anonymous> (C:\Users\KX5710\...
0
votes
1answer
23 views

How do providers work?

Provider creates a link between me and a node in the mainnet/testnet, right? What will happen if say, one or more nodes of infura for example goes down. My app would still like to use that node but it ...
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
237 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) ...