0

Releasing a DAPP soon that uses Infura to read information from my smart contract. There are a lot of calls using Infura on the frontend because I want to keep everything updated. Are there any limits to amount of RPC calls I can do. They say without setting a limit, they use a default, but can't seem to find that cap.

There was about 700 calls on frontend after testing A LOT just by myself for 30 min. Makes sense because I am hitting multiple checks every x amount of seconds. Would rather the user not refresh to see changes.

1 Answer 1

0

Quoted from the Infura Docs,

Infura is constantly adjusting rate limits based on overall usage and possible abuse. Typically only aggressive use should experience rate limiting.

According to another page on the Infura Docs, it's possible to set rate limits yourself if you wish to do so.

A quote from Github Issue #58 on the Infura repo: (may be outdated, this was posted in October 2018)

We do not currently have any rate limits, and will clearly publish them if we implement them. However the production infrastructure is a shared resource, so you may be seeing contention w/ other requests.

2
  • Ahhhh I see, so is there a better way to automatically update the frontend when the contract updates other than calling a read call every X amount of seconds? Jul 9, 2022 at 15:03
  • 1
    @frankied003 Yes! The web3 subscribe function would be perfect for this. web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html - You can subscribe to a specific event in your smart contract, so the frontend will only make a new call everytime it knows the data going to be fetched is updated.
    – Enzo
    Jul 10, 2022 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.