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: custom ecosystem work and custom network fixes #1868

Merged
merged 7 commits into from
Jan 18, 2024

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Jan 18, 2024

What I did

The custom networks for new ecosystems kinda made no sense, so this PR fixes that.

Before:

networks:
  custom:
    - name: shibarium-mainnet
      ecosystem: polygon
      chain_id: 109
      
geth:
  polygon:
    shibarium-mainnet:
      uri: https://www.shibrpc.com

used via --network polygon:shibarium-mainnet:geth which makes less sense.

After:

networks:
  custom:
    - name: mainnet
      ecosystem: shibarium
      base_ecosystem_plugin: polygon  # Closest base class.
      chain_id: 109

geth:
  shibarium:
    mainnet:
      uri: https://www.shibrpc.com

used via --network shibarium:mainnet:geth which makes more sense.

How I did it

  • Change ecosystem to be allowed to be any str and advise users to put custom names here when it makes sense
  • Add new config option base_ecosystem_plugin to refer to the base-class to use.
  • Fix issues where custom networks had the wrong networks
  • Fix issues with default provider in custom networks.

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

fubuloubu
fubuloubu previously approved these changes Jan 18, 2024
Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Some thoughts, looks good otherwise

src/ape_networks/__init__.py Outdated Show resolved Hide resolved
src/ape_networks/__init__.py Outdated Show resolved Hide resolved
src/ape_networks/__init__.py Outdated Show resolved Hide resolved
@antazoey antazoey merged commit 26da3ff into ApeWorX:main Jan 18, 2024
15 checks passed
@antazoey antazoey deleted the feat/custom-ecosystems branch January 18, 2024 22:50
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