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: Lighthouse provider #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: Lighthouse provider #1

wants to merge 4 commits into from

Conversation

fmrmf
Copy link
Member

@fmrmf fmrmf commented Oct 26, 2022

What I did

Added Lighthouse provider for connecting with Beacon chain.

How I did it

Moved LighthouseProvider from ape-beacon into this repo. Resolves naming issues in #11.

How to verify it

Start your lighthouse node

lighthouse bn --http

run in ape-lighthouse dir

python

then e.g.

>>> from ape import networks
>>> with networks.beacon.mainnet.use_provider("lighthouse") as provider:
...    bal = provider.get_balance("0")
...    print('bal', bal)
... 
INFO: Connecting to existing Lighthouse node at 'http://localhost:5052'.
bal 33606621886

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@fmrmf fmrmf marked this pull request as ready for review October 26, 2022 22:15
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.

1 participant