Questions tagged [web3-providers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
3k views

What are the web3 httpProvider options?

I'm not sure I fully understand how web3 interacts with the ethereum blockchain. When testing things out, I just use web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); And ...
0
votes
1answer
492 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); ...
0
votes
1answer
415 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
623 views

Is it possible to deploy a new contract on ethereum without running a geth node and without using metamask [duplicate]

I need to create several contracts on the click of a button. I cannot run a geth node. I am successfully able to do it via metamask but that results on too many transaction pop ups. Is there a way to ...
2
votes
2answers
4k 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
621 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
581 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.
1
vote
2answers
672 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....
1
vote
0answers
41 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
1answer
503 views

How to interact with a network without a wallet installed?

I'm making a Dapp for users who don't have a wallet installed and have no ETH address. I would like users to use my account for all transactions. I'd like to sign my transactions with the contract ...
3
votes
2answers
1k 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 ...
4
votes
1answer
2k views

How to set truffle-hdwallet-provider as the Web3 currentProvider inside a web page

https://github.com/trufflesuite/truffle-hdwallet-provider/blob/master/README.md provides sample usage for the deployment configuration inside tuffle.js. I need a sample that update the Web3 ...
0
votes
1answer
155 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 ...
4
votes
1answer
666 views

Check if web3js is connected to node

I have a private chain with several nodes. Connecting to only one works fine. However, if this one goes down, I want to connect to one of the other node. Using web3js 1.0.0 beta 26, according to the ...
3
votes
3answers
2k views

What are providers in the Ethereum?

The below given code is from the a tutorial given here at one of the tutorials on Truffle // Set the provider for our contract App.contracts.Adoption.setProvider(App.web3Provider); I see we set up a ...
2
votes
1answer
460 views

Providing Metamask hooks only using node hosted on server

I am currently looking into hosting an Ethereum node on my web server in order to allow my users to interact with my dApps without needing Metamask (although it could be used). How could I have the ...
1
vote
0answers
272 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('...
0
votes
1answer
403 views

Instantiate web3 to work with the real Ethereum network

I know how to instantiate web3 to work with a local test network: var web3Instance = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); How do I change this code to connect to the ...
3
votes
1answer
2k views

Injecting a private key into web3.js execution context

I'm trying to achieve what seems like a simple goal but having trouble finding a simple solution to it. Here's my problem: Given a private key, I would like the simplest way to "inject" this key ...
2
votes
2answers
349 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 ...
0
votes
1answer
75 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 ...
1
vote
0answers
240 views

POST https://ropsten.infura.io/some 405() [duplicate]

I try interect with contract. I use this tutorial and this. I deploed this contract in ropsten testnet by address: 0xF55F55d2b15949ae78a34478CF356D9fF8bB0629. I can read counter value. But I can`t ...
2
votes
1answer
270 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(...
15
votes
4answers
8k 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, ...
3
votes
1answer
2k views

Truffle + INFURA remote provider deployment. Migrations not running

I am running into the same issue proposed by this question. I cannot resolve it because I am using a remote provider (INFURA), per this document. My code looks like this: var ethwallet = require('...
1
vote
1answer
961 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
1answer
73 views

Consortium Ethereum Blockchain

We have deployed consortium ethereum block chain in azure portal. I don't have access to the azure portal except the cloud url. By using the cloud url i have wrote the nodejs code with web3 api to get ...
0
votes
1answer
2k views

web3 is not defined

I read other questions like this here but none solved my issue. I have a terminal window on which I ran geth --networkid=4 --rpc --rpcport 8545 --datadir=$HOME/.rinkeby --syncmode=light --ethstats='...
2
votes
2answers
829 views

Getting data from contract to the DApp without provider

I have a DApp that uses metamask or mist as a provider. The DApp can read some info from the contract and show it on page using mist or metamask. Is it possible to read contract and show information ...
0
votes
1answer
332 views

Problems of connections with we3.providers

I'm using the web3 API and i'm defining the web3 instance, setting a provider like this: if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you ...
2
votes
0answers
292 views

TypeError: filterCreationErrorCallback is not a function

trying to deploy contract to Ropsten network-
15
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 ...
0
votes
1answer
167 views

Location of coder.js in Windows

I have web3.js working on my Windows machine, I need to access web3 library called coder.js, according to this answer the location of that library is web3/lib/solidity/coder.js But I cannot find ...
2
votes
1answer
757 views

recommended datatype for “data” in ethereum transaction

I am sending data with my transaction by using following way var tx = {from: eth.coinbase, to:eth.accounts[1], value: web3.toWei(1, "ether"),data:web3.toHex("Test Data")} personal.sendTransaction(tx,...
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
486 views

infura.info error method post

I have deployed a smart contract in the testnet using MetaMask and a solidity online compiler(injected web3): pragma solidity ^0.4.7; contract SimpleStorage { uint public storedData; string ...
6
votes
1answer
3k views

How does Truffle work without a web3 provider?

I have a question about the init project with Truffle. I can't understand how - in app.js - they use the deployed contract without a web3 provider, like this: var provider = new Web3.providers....
2
votes
0answers
344 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() ...
2
votes
1answer
893 views

socket.timeout timed out when connecting to a remote server with web3.py

I use Web3 to connect to my remote server. 10.xxx.xxx.xxxis ip address of a remote server. First I start the server with this command : parity --chain frontier.json --rpcapi="eth,net,web3,personal,...
5
votes
2answers
2k views

Alternative to filter.watch()

Here's a scenario: Dapp backend connects to a remote Ethereum node using external HTTP RPC: const web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/janNFDJkMgDfan")); Dapp ...
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 ...

1 2 3