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

Forked environment instantiation failing #31

Open
spengrah opened this issue Apr 24, 2023 · 2 comments
Open

Forked environment instantiation failing #31

spengrah opened this issue Apr 24, 2023 · 2 comments

Comments

@spengrah
Copy link

spengrah commented Apr 24, 2023

Hello, I've been banging my head against the wall trying to get fork tests to run in ci. Everything works great for me locally, but I've tried multiple configurations of RPC provider API keys in github secrets, RPC providers (both infura and alchemy), foundry.toml, and ci.yml, and they all fail in ci.

I keep getting the same error message:

image

As far as I can tell, everything looks right, so either I'm missing something (the likeliest option) or there is a bug somewhere.

All configurations (other than github secrets) are publicly viewable in my repo: https://github.com/Hats-Protocol/season-toggle

Any help or guidance is much appreciated 🙏

@mds1
Copy link

mds1 commented Apr 25, 2023

What if in the [rpc_endpoints] section of the config you try making the env var the full RPC URL instead of interpolating? Also, try vm.rpcUrl("mainnet") instead, which is what I usually do.

Assuming you do have the secrets in github setup correctly, things should work. Here's an example setup that uses forks in CI if it helps: config file, createSelectFork, ci

@spengrah
Copy link
Author

aha, that worked! The issue was some combination of interpolating the url, not using vm.rpcUrl, and using quotes around the env value for the secret in github. By changing the latter two, I got it working for both interpolated and non-interpolated urls.

Thank you @mds1!

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

No branches or pull requests

2 participants