Questions tagged [web3-providers]

The tag has no usage guidance.

88 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
492 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 = ..., ...
3
votes
1answer
367 views

How to set multiple nodes in HttpProvider web3 v1.2.0

I'm working with Nodejs application, and using a multi-node setup on different servers. If I have single node end point like http://localhost:8545 I can use Web3 providers as below var web3 = new Web3(...
3
votes
1answer
355 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 ...
3
votes
0answers
6k 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 ...
3
votes
0answers
111 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
0answers
1k 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: ...
3
votes
1answer
3k 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
685 views

I keep getting the `Set 'ethereum.autoRefreshOnNetworkChange' to 'false'` warning, despite setting value to false

I'm using ethers.js to connect to MetaMask. I keep seeing this warning in my console: inpage.js:1 MetaMask: MetaMask will soon stop reloading pages on network change. For more information, see: https:...
2
votes
0answers
520 views

Why ethers.js sign function not working?

I am using the ethers.js library, and am trying to code a transaction. Here is a snippet where I connect a wallet to a provider, connect to a contract I want to call a function in, and try to call the ...
2
votes
1answer
281 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
594 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
348 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
5k 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
683 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
424 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
341 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
304 views

TypeError: filterCreationErrorCallback is not a function

trying to deploy contract to Ropsten network-
2
votes
0answers
356 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
18 views

How to redirect from browser to Metamask or similar app like trustwallet on android?

I have a website that detects metamask and connects with it on pc, but on the android mobile app browser when I open my website it doesn't show some functions as it needs to be connected with BSC, So ...
1
vote
1answer
16 views

Which Provider Can Provide High Transaction Fee Cap?

Geth's default transaction fee cap is 1ETH/BNB/HT controlled by txfeecap. Infura and quicknode use the default option and will raise error tx fee (1.2 ether) exceeds the configured cap (1.00 ether) ...
1
vote
0answers
41 views

Listening to smart contract events RPC, using web3, on aleth node

bakcground, I am working on an ethereum based fork of cpp-ethereum/aleth node and not using the official golang client (geth), unfortunately from what I read, websocket support has been 'ditched' in ...
1
vote
0answers
58 views

Unknown account while trying to send transaction via OptimismProvider

I'm trying to make use of OptimismProvider to sign the transaction on Mumbai Matic. I'm making use of provider.send("eth_sendTransaction", [hexTxn]) and instantiating provider object by: ...
1
vote
0answers
182 views

How to catch contract exception in Web3 py?

I'm using infura.io with web3.py and I would like to catch exception thrown by smart contract. Currently, web3.py does not throw any exception even if the contract does, and hence it burns a lot of ...
1
vote
0answers
130 views

How to get event from geth ethereum node using web3.js

I have created a simple contract where I am trying to write a value to a state variable in solidity smart contract, and emit that written value. I am using Truffle v5.1.28 (core: 5.1.28) Solidity - 0....
1
vote
1answer
440 views

The send transactions “from” field must be defined using Infura web3

when I try to send my transaction using infura I get this error "The send transactions "from" field must be defined" My problem is my web3 object. When I used Metamask and ...
1
vote
1answer
861 views

Websocket provider reconnects every 1 minute

I'm developing an application on a private Ethereum chain and trying to listen to some events. I wrote a basic indexer script for listening to events and writing them in a database. To listen to the ...
1
vote
1answer
157 views

web3.eth.getAccounts() gets no accounts

I got no accounts loaded with code import Web3 from "web3"; let web3; // typeof check if variable exists if (typeof window !== 'undefined' && typeof window.web3 !== 'undefined') { web3 ...
1
vote
2answers
491 views

How do I make my smart contract available for interaction with Metamask?

I am using OpenZeppelin starter kit. I wrote a smart contract that simply contains two integers which can be called. I compiled and deployed the smart contract to my local Ganache blockchain. I have ...
1
vote
0answers
163 views

Connection not open on send when subscribing to new block headers

I am running a local ethereum node with the below configuration geth --syncmode "full" --datadir "." --ethash.dagdir "." --cache=4096 --rpc --rpcaddr test.example.com --rpcapi="web3,miner,admin,...
1
vote
0answers
238 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
2k 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
1answer
1k 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
57 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
287 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
1k 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
610 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
0answers
151 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
402 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
43 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
304 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
1k 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
2k 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
29 views

Cannot find module web3

I've tried npm install web3 already but it didn't work. I suspect that this Chainlink deployment does not come with the web3 configuration files, is that possible? For example, in another Truffle ...
0
votes
0answers
18 views

How can I set timeout limit for my pending transactions in the transaction pool?

Sometimes when I send transactions to some of my providers (using web3.js), they keep them pending on their pool (maybe in a queue) for a while before really processing them and including transactions ...
0
votes
1answer
84 views

Error in block header subscription: Error: The current provider doesn't support subscriptions: HttpProvider while connecting the bsc blockchain

I'm trying to connect to the binance smart chain in frontend but although window.ethereum do works i keep having those issues in the title no matter what change i made in the code. My Get Blockchain ...
0
votes
0answers
17 views

Rinkeby - Not found: no matching order found

I am working on buying asset script using opensea js. I followed the docs and got it working on Mainnet. But when I change my Network and MetaMask to Rinkeby. I get an error: Not found: no matching ...
0
votes
0answers
14 views

remix.ethereum.org refused to connect

I was trying to connect remix to ganache, but the https link is forced. so I followed this up to geth attach <IPC_LOCATION> - now the connection to https://remix.ethereum.org/ is refused. Anyway ...
0
votes
0answers
51 views

How to handle connection to a wallet in a dapp

I'm a bit confused on how to handle a connection to a wallet such as Metamask in a decentralised web-app. Let's consider this very simple contract: pragma solidity ^0.8.0; contract ToDo { struct ...
0
votes
1answer
67 views

Retrieving the private/ public key with web3js for a specific wallet provided by truffle/hdwallet-provider

I can't find a way to retrieve the private key / public key / public address for a web3 account loaded via a provider. I have tried the web3.eth.accounts command but I am not getting the private key / ...
0
votes
1answer
35 views

How to prevent user to change recipient address when MetaMask transaction window pops up?

I want to integrate MetaMask as one of payment methods on my website. The idea is to lock my content, when user made a successful ETH payment so the content will be revealed. This is the source code: &...