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

🪚 Synthetic HardhatRuntimeEnvironment #31

Merged
merged 3 commits into from
Nov 20, 2023
Merged

🪚 Synthetic HardhatRuntimeEnvironment #31

merged 3 commits into from
Nov 20, 2023

Conversation

janjakubnanista
Copy link
Contributor

@janjakubnanista janjakubnanista commented Nov 20, 2023

In this PR

  • Turns out we can synthesize the whole HardhatRuntimeEnvironment, we just need to be a bit careful when it comes to contexts. This means we no longer need to have our fingers in the hardhat internals, we let hardhat do the heavy lifting, and what we get on the output is consistent with the existing user experience (i.e. deployments, ethers etc etc, whatever the user configured)
// So easy
const bsc = getNetworkRuntimeEnvironment("bsc-testnet")
const ftm = getNetworkRuntimeEnvironment("fantom-testnet")

@janjakubnanista janjakubnanista marked this pull request as ready for review November 20, 2023 20:32
@TRileySchwarz TRileySchwarz merged commit 32a99f4 into main Nov 20, 2023
1 check passed
@TRileySchwarz TRileySchwarz deleted the networks branch November 20, 2023 20:39
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.

3 participants