Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace e2e fork node with anvil #3781

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Conversation

hyphenized
Copy link
Collaborator

@hyphenized hyphenized commented Feb 14, 2025

This updates fork tests to run on anvil instead of hardhat. The change significantly improves test speed and prevents hangups. Even for simple cases anvil performs better without a cache.

Latest build: extension-builds-3781 (as of Mon, 24 Feb 2025 07:23:37 GMT).

Removes dependency on env vars and adds a script shortcut to run fork tests
This will come useful when we need a deterministic name for test
assertions.
Previous approach would have missed updates if a price fetch was requested
after detecting a new token balance. This also increases the frequency of
price updates.
Since local nodes require higher gas to fulfill read only calls these would
sometimes fail silently when done through multicall.
This updates fork tests to run on anvil instead of hardhat. The change
significantly improves test speed and prevents hangups. Even for simple
cases anvil performs better without a cache.
@hyphenized hyphenized force-pushed the testing-tests-e2e-fork branch 6 times, most recently from 1c43fb9 to 089cc93 Compare February 15, 2025 23:08
These should be consistent between local/ci
By sending sigint to the process this script will stall until anvil
polled requests finish so it can flush the cache to disk before the job
completes
These are meant to help identify price loading has completed for a given
asset
Normalizes balances to ensure tests work when the CI account differs from
the one used locallly
@hyphenized hyphenized force-pushed the testing-tests-e2e-fork branch from 896beee to 402a6d9 Compare February 24, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant