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

Difficult to attach one extra module to a web3 instance.. #2231

Closed
pipermerriam opened this issue Dec 1, 2021 · 0 comments · Fixed by #2288
Closed

Difficult to attach one extra module to a web3 instance.. #2231

pipermerriam opened this issue Dec 1, 2021 · 0 comments · Fixed by #2288

Comments

@pipermerriam
Copy link
Member

What was wrong?

There is no simple way to include a custom module in a web3 instance while still also including all of the default modules.

How can it be fixed?

Ideally it should be a one-liner

class Foo(ModuleV2):
    ...

w3 = Web3(...)
w3.attach('foo', Foo)

# or

w3 = Web3(..., extra_modules=(('foo', Foo),)
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 a pull request may close this issue.

1 participant