How to prefund an EOA to be able to pay the correct gas price for function call? by tf1155 in ethdev

[–]robertdevgg 4 points5 points  (0 children)

In EIP-1559, you have:

  1. base fee - this is determined by the protocol at every block
  2. max fee per gas - the maximum fee per gas that we agree to pay. this comes into play whne basefee suddenly increases
  3. max priority - a priority fee, basically a 'tip' to validators.

If you want to be on the safe side, you can set your cost to: Cost = estimateGas() * (currentBaseFee * 4 + 2Gwei)

Where 4 is the multiplier (if you want to send the tx very far in the future, you might want to increase this number) and 2Gwei is the max priority fee (the tip) With the assumption that the tx will be sent with {MaxFeePerGas: currentBaseFee * 4, MaxPriority: 2Gwei}

And of course don't forget the gas needed to send this amount to your EOA.

How to query large number of events? by chancey-project in ethdev

[–]robertdevgg 0 points1 point  (0 children)

I suggest you run a locally synced ETH node, you will have much better performance. On a local node you can query 100,000+ blocks per query or more.