As discussed here and here, this PR upstreams my RPC caching method in foundry-toolchain itself.
I explained how the caching works in the README, but I will paste it here as well:
This action matches Forge's behavior and caches all RPC responses in the ~/.foundry/cache/rpc directory. This is done
to speed up the tests and avoid hitting the rate limit of your RPC provider.
The logic of the caching is as follows:
Always load the latest valid cache, and always create a new one with the updated cache.
When there are no changes to the fork tests, the cache does not change but the key does, since the key is > based on the commit hash.
When the fork tests are changed, both the cache and the key are updated.
Side note: this PR also installs Prettier and adds a basic config file.
I tested this in my private repo that has fork tests, and both restoring the cache and saving it worked as expected:
As discussed here and here, this PR upstreams my RPC caching method in
foundry-toolchain
itself.I explained how the caching works in the README, but I will paste it here as well:
Side note: this PR also installs Prettier and adds a basic config file.
I tested this in my private repo that has fork tests, and both restoring the cache and saving it worked as expected:
Feel free to test in your repos, too: