Hot answers tagged

6 votes
Accepted

Advantages of Infura over Ganache?

Ganache and Infura are two very different things. Ganache is a tool for quickly creating a local network that can be used for development. It can be used to automatically run tests, etc. completely ...
user avatar
  • 5,129
4 votes

Is there any way to see the txpool with infura and web3?

The standard Infura endpoint does not allow you to do that. I would suggest to use Chainsack, you can create a free node and allows you to do it. I have a repo showing exactly that in python using ...
user avatar
  • 366
4 votes

Single Call vs MultiCall

In some cases, you might need to gather synchronized data from the blockchain. A good example is querying token prices from Uniswap. You don't want to have the price for one token from block x and a ...
user avatar
3 votes
Accepted

Unable to add transaction to blockchain (I'm invoking the setMessage(str) method but the string i pass doesn't get set but getMessage() method works)

when you are calling setMessage function you should use send instead of call $("#setMessageButton").click(function () { var val = $("#userInput").val(); ...
user avatar
  • 7,885
3 votes
Accepted

How to send a signed transaction using metamask and web3?

Since you created a contract instance, you can use it have Metamask format the transaction and send sign request to user. Try replacing this: const txHash = await this.provider.request({ method: '...
user avatar
  • 661
2 votes

Can I get more specific metadata for a certain transaction hash from a basic RPC connection (e.g. Infura)

You can use web3.js / ethers.js method getTransactionReceipt await provider.getTransactionReceipt("0x_your_tx_hash"); It returns raw data of the transaction, all events, etc. To check if a ...
user avatar
2 votes
Accepted

How to broadcast signed transaction with ethers.js?

Just found out. Dont need to get signer from provider. The tx can be sent by: provider.sendTransaction(signedTx)
user avatar
  • 21
2 votes
Accepted

How do node providers (e.g. Infura, Alchemy) determine gas pricing on contract writes?

yes, ethers.js .getFeeData() returns hardcoded values and they are used as defaults to send a type2 (eip-1559) transaction if the network supports it, otherwise, gasPrice is used with the legacy ...
user avatar
  • 185
2 votes

HTTPError: 401 Client Error: Unauthorized for url: https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID

There seems to be an issue with the values (WEB3_INFURA_PROJECT_ID) provided in your .env file, check if there are any errors in the Key or The value provided there are any empty lines in the .env ...
user avatar
1 vote

do wallets like metamask interact with infura.io?

Yes, currently metamask uses an upstream RPC node to read information from the chain as well as broadcast transactions to the chain. The RPC used is configured per network - when a user adds a new ...
user avatar
  • 131
1 vote

Can I get more specific metadata for a certain transaction hash from a basic RPC connection (e.g. Infura)

One way to get information regarding the replaced transaction is by listening and recording the pending transactions of that node. In the end, you will record the same tx-hash more than once, ...
user avatar
  • 1,039
1 vote

Why doesn't MetaMask pop up when my web3.py script successfully establishes a connection with Infura?

Your script establishes a network connection to an Ethereum node running at Infura. This means that you can use the JSON-RPC API to send commands to the node which lets you execute transactions, check ...
user avatar
  • 1,526
1 vote
Accepted

web3.py geth txpool help

It's an infura specific issue. I get the same error in web3 rust. Using my local full node fixes the issue.
user avatar
  • 38
1 vote

Brownie / Rinkeby ValueError: Gas estimation failed: "you must set the gas limit manually"

I think this has already been answered here. To summarize it, you probably have vrf_coordinator version error. Try the rinkeby's values from the official docs. Try changing values in the config.yaml. ...
user avatar
1 vote

{ code: -32000, message: 'insufficient funds for gas * price + value' }

I solve this problem by getting test ethers in my rinkeby wallet and then transferring some ethers to the address from which I'm deploying the contract.
user avatar
1 vote
Accepted

How to call a function of a contract using web3 and infura

Using ethers, you need to create the contract using the contracts address + abi and a signer. import <Your contract deployment address>; import <Your contract abi>; const connection = ...
user avatar
  • 46
1 vote
Accepted

What are the security and privacy risks of using a custom node provider instead of Metamask's default node provider?

There is no risk of having your wallet drained, since you build your transactions and sign these via the frontend + you wallet extension. The node provider receives a signed transaction and thus can't ...
user avatar
  • 1,229
1 vote

Error: Transaction has been reverted by the EVM:

According to your abi, you transfer method is not payable, but you set the value of you transaction payload to one wei { … value: 1, (…) } To use your transfer method (and, therefore, transfer your ...
user avatar
1 vote
Accepted

Brownie, Where do I put my Infura API Key... not The ID, The Actual Key?

Brownie actually has infura built in, so you only need the WEB3_INFURA_PROJECT_ID and brownie will sort all the URLs and such under the hood. Test it out and see what happens!
user avatar
1 vote

How do I automatically update the latest block number and pending txns in my app?

Maybe this code help you. It contains recursive function. def checkBlockNumber(blockNumber = None): if blockNumber: if blockNumber == w3.eth.get_block_number(): time.sleep(1) ...
user avatar
1 vote

Truffle Migrate Rinkeby - Error: PollingBlockTracker - encountered an error while attempting to update latest block: Error: ETIMEDOUT

I met the same problem. Here is how I resolved this problem: I saw this error message, just saying "this operation is timeout", don't just focus on this error, you should also check the ...
user avatar
  • 172
1 vote

Is there an Infura equivalent for BSC?

There are some RPC providers for Binance Smart Chain, BSC. You can read BSC docs for RPC I think this will be the best curated (and official) list for RPC in BSC.
user avatar
  • 181
1 vote

infura.io secret configuration in HDWalletProvider (truffle-config.js)

After some trial and error I've found a way to make this work. Not sure if this is the only way or the best, but here it goes: const provider = new HDWalletProvider(process.env.WALLET_MNEMONIC, `https:...
user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible