You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
When forking a provider, ganache-core should only have to query the provider once for the code/nonce/balance that exists at a particular address at the safeBlockNumber. As the response will not change, any repeated lookups should be cached.
Current Behavior
Even if ganache has queried the code/nonce/balance at a particular address and block number before, it will query the provider again despite the fact this will not have changed
Possible Solution
Memoize the calls to the fallback provider, as I have done here, for example.
Context
While testing upgrades for our dapp, we wish to fork mainnet to test against the current state, but we see a large number of repeated calls to infura when we open our dapp and browse around against our forked ganache-cli - not good for them, or our API limits!
The text was updated successfully, but these errors were encountered:
Expected Behavior
When forking a provider,
ganache-core
should only have to query the provider once for the code/nonce/balance that exists at a particular address at thesafeBlockNumber
. As the response will not change, any repeated lookups should be cached.Current Behavior
Even if
ganache
has queried the code/nonce/balance at a particular address and block number before, it will query the provider again despite the fact this will not have changedPossible Solution
Memoize the calls to the fallback provider, as I have done here, for example.
Context
While testing upgrades for our dapp, we wish to fork mainnet to test against the current state, but we see a large number of repeated calls to
infura
when we open our dapp and browse around against our forkedganache-cli
- not good for them, or our API limits!The text was updated successfully, but these errors were encountered: