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

Feat chainid networkid #908

Merged
merged 6 commits into from
Dec 26, 2020

Conversation

matnad
Copy link
Collaborator

@matnad matnad commented Dec 26, 2020

What I did

Exposed --chainId -> chain_id and --networkId -> network_id parameters for ganache-cli to the brownie network config.
Forked networks will default to the chain_id of the origin network (can be overwritten).

IMPORTANT: --chainId requires ganache-cli version 6.11.0 or higher. To use this feature, ganache-cli has to be updated.

Related issue: #901

How I did it

Added the parameters to the list of accepted network settings.
Fetch chain_id from origin network and set as default when a fork (and no custom chain_id) is specified.
Accepted types for both values are integers (ganache will ignore anything else). Other types will issue a warning.

How to verify it

Run updated tests.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@iamdefinitelyahuman iamdefinitelyahuman merged commit 9097521 into eth-brownie:master Dec 26, 2020
@matnad matnad deleted the feat-chainid-networkid branch December 28, 2020 12:16
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