Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [web3-providers]

The tag has no usage guidance.

0
votes
1answer
17 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
16 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:/...
1
vote
1answer
18 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....
0
votes
1answer
24 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. ...
2
votes
2answers
327 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
21 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 ...
2
votes
1answer
26 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
0answers
50 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
75 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
25 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) ...
1
vote
1answer
32 views

web3.isConnected returns False web3.py

Here is the code I have: from web3 import Web3 infura_url = 'https://infura.io/project/MyProjectID' web3 = Web3(Web3.HTTPProvider(infura_url)) print(web3.isConnected()) The problem is that it ...
0
votes
1answer
78 views

Can't even create a smart contract: Sender doesn't have enough funds to send tx

I wrote and deployed a basic smart contract on Remix Javascript VM Environment. It worked fine. Then I installed and started TestRPC (now ganachi-cli). Then, upon changing the environment to Web3 ...
3
votes
0answers
45 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 ...
0
votes
1answer
56 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 ...
0
votes
0answers
23 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
38 views

Private chain, metamask, accounts

I am wondering how a private chain can communicate through Metamask. My biggest concern is the HttpProvider and accounts. Aren't accounts accessed through the web3 instance? Since accounts aren't ...
0
votes
1answer
58 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
1answer
20 views

Access to providers in a cluster with web3 does not work

I have a blockchain deployed in a cluster. I have a geth instance running in a cluster-node and another one in another cluster-node, making a blockchain. I want to run an script which needs to access ...
1
vote
1answer
168 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: ...
0
votes
0answers
34 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-...
2
votes
1answer
31 views

Check if the web3 provider supports certain rpc call

For example, when I am using: web3.currentProvider.sendAsync({ method: "eth_signTypedData_v3", params: [customerAddress, data], from: customerAddress, ...
1
vote
0answers
31 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 ...
2
votes
1answer
132 views

How to configure truffle network with IPC provider?

How can I define in truffle the ipc connection to the node? Currently I am using in truffle.js host/port fields, which are used to create a HttpProvider. module.exports = { networks: { dev: { ...
1
vote
0answers
300 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
145 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,...
0
votes
1answer
66 views

Problem with running web3.py code

I am trying to run this code from web3 import Web3, HTTPProvider import json import pprint import requests from random import randint # Debug flags debug_transaction = False debug_CALL_transactions ...
1
vote
0answers
190 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 = ..., ...
1
vote
1answer
67 views

How can I increase EVM time in web3.py?

When working with web3.js, Truffle and Ganache, I can do this: web3.currentProvider.send({method: "evm_increaseTime", params: [numOfSeconds]}); How can I do the equivalent in web3.py? When I do: ...
1
vote
1answer
191 views

How to integrate rinkeby test network with centralised server?

I am new to ethereum blockchain. I want to create ICO platform based website. I have created smart contract and deployed on rinkeby test network. I used python web3.py library to integrate python with ...
1
vote
0answers
403 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
209 views

Having issue with Infura mainnet web3 connection and getting info

I have been looking at a tutorial from DappUniversity about Web3... on the introductory video, I have completed all stages fine, but when getting to retriving account balance information from the ...
1
vote
1answer
167 views

Getting all ERC721 transactions by an account

My approach here was to listen for Transfer event for a contract (e.g. Cryptokitties) filtered by the indexed from account. var contract = new web3.eth.Contract(kittyABI, kittyContractAddress, {from:...
1
vote
3answers
383 views

Remix is not connecting to my private network

I have initialized the genesis file then run that command in the console- geth --rpc --rpcaddr 0.0.0.0 --rpcport 8549 --rpccorsdomain "*" --rpcvhosts "*" --rpcapi "network,admin,personal" --...
1
vote
1answer
207 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 ...
4
votes
1answer
219 views

Can I use web3js without setting the provider?

So I have two NodeJS applications, both implementing web3js. The first node is used for creating and signing transactions, then it sends raw signed transaction to the second node. Finally, the second ...
1
vote
3answers
289 views

What is a replacement for Metamask in React App?

I have an app on react that works great with Metamask but in the real world nobody has to install Metamask and I don't know how to create transaction without Metamask. is there any way to create a ...
1
vote
1answer
67 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 ...
2
votes
1answer
165 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
1answer
34 views

Is it safe to have a locally running Ethereum node exposing personal RPC API? [duplicate]

I am developing a REST API currently running off a node.js server. The API allows ethereum account creation, making a transaction etc. The API interacts with a locally running ethereum node to ...
0
votes
1answer
207 views

How to use web3 function (ecRecover) that shouldn't require a provider?

I want to use web3's ecRecover functionality and nothing else. Unless I misunderstand its requirements - a signature, the signed data, some cryptomagic and poof you have recovered the signer - why do ...
2
votes
0answers
165 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
43 views

Is there dumpprivkey analogue in geth?

I'm creating new address with web3.py with this code: from web3 import Web3 w3 = Web3(Web3.HTTPProvider('http://localhost:8545')) w3.personal.newAccount('the-passphrase') And have few questions: ...
0
votes
1answer
433 views

web3 and web3 provider engine

Scenario: Import json file and decrypt it Use account to sign the messsage I can do this with web3(Web3.providers.HttpProvider) or with web3-provider-engine. What is major difference between using ...
0
votes
0answers
430 views

Web3.providers.HttpProvider is deprecated? How to transition to WebsocketProvider [duplicate]

As per https://web3js.readthedocs.io/en/1.0/web3.html#value the HttpProvider is deprecated. Using the web3 beta 1.0. It seems funny to me that it would be being deprecated. But I am curious as to how ...
0
votes
2answers
683 views

Using Ethereum public and private keys to encrypt and decrypt message (metamask client)

I am trying to use Ethereum private and public keys for message encryption like PGP and I found out this npm module on github, https://github.com/pubkey/eth-crypto#encryptwithpublickey, which it lets ...
1
vote
1answer
692 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&...
1
vote
2answers
1k views

TypeError: Cannot set property 'method' of undefined when using WebsocketProvider

I'm using: web3 v0.20.6 web3-providers-ws v1.0.0-beta.34 First question - can web3-providers-ws be used with web3 v0.20.*? Second question (problem) - I get an error when probably trying to send ...
0
votes
0answers
78 views

Browser stuck when setting Web3 Provider Endpoint in remix

I am following a beginner's course on Youtube for solidity and stuck at the step of setting Environment to "Web3 Provider". After I click "OK" on the popup window from the top as shown below, the ...
3
votes
2answers
749 views

Uncaught ReferenceError: Web3 is not defined Solidity

I've been working with this project and I downloaded all dependencies and Web3 already but when I test my code it shows me this: Uncaught ReferenceError: Web3 is not defined in line 120. This is ...
0
votes
0answers
30 views

ethereum console in a web page

I didn't find this, but it may exists already. I'm looking for a web based Ethereum console that, along the same lines of remix, can use metamask as injected web3 provider.