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

fix: ensure GRE handles multiple chains with same chainId gracefully #695

Merged
merged 2 commits into from
Aug 30, 2022

Conversation

tmigone
Copy link
Contributor

@tmigone tmigone commented Aug 23, 2022

Motivation

This PR fixes a bug in GRE where it would always connect to the first network in the case where multiple chains are listed in hardhat.config.ts with the same chainId. This is most likely to happen with local networks colliding with hardhat's own network (chainId=1337).

Changes

Now GRE will try to use the main network name (as specified by --network) to disambiguate and if that is not enough it will throw an error saying this behavior is not supported.

Signed-off-by: Tomás Migone [email protected]

@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Merging #695 (4cedbc8) into dev (707b856) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #695   +/-   ##
=======================================
  Coverage   90.35%   90.35%           
=======================================
  Files          35       35           
  Lines        1762     1762           
  Branches      296      296           
=======================================
  Hits         1592     1592           
  Misses        170      170           
Flag Coverage Δ
unittests 90.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tmigone tmigone requested a review from abarmat August 23, 2022 16:15
Signed-off-by: Tomás Migone <[email protected]>
@tmigone tmigone merged commit f9deb7b into dev Aug 30, 2022
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.

2 participants