All Questions
9 questions
3
votes
1
answer
176
views
how can we control the logic behind ethersJs fallbackProvider's choices
I am trying to use ethersJs to handle multiple RPCs with a fallback mechanism, to ensure we always get a response. I tried the FallbackProvider .
The probelm with it is that event if you set a quorum ...
1
vote
1
answer
40
views
Is paying to an API provider the only way to get reliable events notifications?
I am new to Blockchain development. I am developing a game that depends heavily in random numbers. My first naive implementation was flagged by the auditor as I was generating them on-chain. So I ...
2
votes
1
answer
129
views
How to add a NFT to metamask wallet with a RPC method
We have a way to add an ERC20 token to the metamask wallet from our dapps with a RPC method:
const addTokenToMetamask = async () => {
if (typeof window.ethereum !== "undefined") ...
1
vote
1
answer
424
views
How can I use ethers.js to get streaming events via sockets instead of polling?
I try to use ethers.js events, but they seem to be polling constantly and eventually the RPC provider sends HTTP code 429: Too Many Requests.
I understand that I can use non-standard APIs of providers,...
12
votes
17
answers
33k
views
TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
const ethers = require("ethers");
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io/v3/MYKEYISHERE')
web3.eth.getBlockNumber().then(console.log)
Error:
...
1
vote
1
answer
548
views
How to trace a Internal Ether Send
Good Afternoon,
I am trying to track the ETH Sent internally from a contract.
Specifically https://etherscan.io/tx/0x4e2ef793b4fd7ffa968d49d94c7bab63434eeb9a68572a81f469a4ab8c974d06
you See 2 trnxs ...
3
votes
1
answer
3k
views
How to gather historical events emitted by any contract
I am trying to gather all events of a specific type on the entire chain, regardless of what contract emitted them.
When trying to find solutions online, I came across code like the following (source):
...
2
votes
1
answer
2k
views
HardHat deploy script works on testnet but not on forked hardhat network
The error that I am getting when running this is:
Error: Invalid RpcBlockWithTransactions or null
I have a contract called PriceConsumerV3 and it makes a view function call on a contract. I am ...
0
votes
1
answer
125
views
Is it possible to explicitly tell if a node is using Geth or Parity?
Is it possible to explicitly tell if a node is using Geth or Parity?
This can be from a raw RPC call or the Infura (or other provider) layer. Is there an explicit way to do this without making an ...