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

Move Contract class into its own file #3

Open
1 of 2 tasks
danfinlay opened this issue Apr 24, 2017 · 0 comments
Open
1 of 2 tasks

Move Contract class into its own file #3

danfinlay opened this issue Apr 24, 2017 · 0 comments

Comments

@danfinlay
Copy link

Issue Type

Description

In pursuit of #2, I've begun writing a module that imports this one and wraps it with an event-emitter.

Ideally I'd just inherit from the current Contract class, but right now that's not possible, because the Contract class is initialized on each contract creation. This is slightly memory inefficient, but more importantly it prevents me from subclassing the class.

I'm opening this issue to ask if that sounds like an appropriate change to make, before I just open a PR proposing the change.

danfinlay added a commit to danfinlay/ethjs-contract that referenced this issue Apr 24, 2017
In particular, breaks the Contract class into its own file.

This has the benefit of being more modular, allowing subclassing for external modules, as well as saving memory that was previously wasted re-initializing the class on each instance creation.

Fixes ethjs#3.
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

No branches or pull requests

1 participant