Reading JSON Files is supported directly.
In my Nodejs Express App I loaded the contract:
// Load Contract
var fs = require('fs');
var jsonFile = "abis/abi.json";
var abi = JSON.parse(fs.readFileSync(jsonFile));
var contract = new web3.eth.Contract(abi, "0x068_your_address");
Did you try using eth_getLogs. This is also exposed via the Ethers provider: https://docs.ethers.io/v5/api/providers/provider/#Provider-getLogs.
The syntax for the parameter is the same as for eth_newFilter.
You could try getBlockTransactionCountByNumber RPC method to get the number of transactions in a block. You can query Infura (or any other RPC provider) for each block that's been minted and create an aggregate. Or you can also get other block details too, like timestamp using getBlockByNumber method. It contains the list of all the transactions included in ...
You find the documentation here:
Also there is an EIP-1193 event in WalletConnect that tells you when the chain has been changed:
Ethers it's pretty similar to web3 regarding getTransactionCount.
Using the "pending" switch you can get the number of non mined tx for that address
await provider.getTransactionCount('ricmoo.eth', 'pending');
Beware though: it's quite unreliable.
The pending blockTag is not ...
This is what I would do: I would run a local fork of mainnet using hardhat node provider_url and do the transaction there, while capturing the events and reading the state changes that resulted afterwards.
Failed transactions are also part of the Ethereum blockchain. This is because even for failed transactions a gas fee is paid. This fee payment is a state change and needs to be kept track of in the blockchain.
If a transaction would fail because the fee payment cannot be made or the nonce is not in order anymore, then the transaction will not be included in ...
This happens because eth_getTransactionCount returns the nonce of mined transactions but not the pending ones. So in your case, under heavy load, there will be some transactions that are still pending but not counted by calling eth_getTransactionCount.
I've been looking for a solution for this problem but I haven't found an official one. However, you can ...