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

Replace Clock contract instances by abstract Clock contract #28

Open
marcoonroad opened this issue Dec 12, 2018 · 0 comments
Open

Replace Clock contract instances by abstract Clock contract #28

marcoonroad opened this issue Dec 12, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@marcoonroad
Copy link
Owner

Related to #4. Creating a single and sole contract to just track one variable / attribute, without any encapsulated business logic and business invariants, is non-sense. It impacts our application with huge costs associated with the contract creation instruction (and its underlying gas consumption).

A better alternative would be to make the Clock contract abstract, and then clients inherit from it. In this way, the Clock contract's API / methods can be still preserved, somehow, we will just need to pass the sender's address into every call and make such methods private (they will be just called internally within the contract itself, this is to prevent malicious players from affecting internal clock / timing logic).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant