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

Break templates out into their own contract #106

Open
edmundedgar opened this issue Dec 16, 2022 · 1 comment
Open

Break templates out into their own contract #106

edmundedgar opened this issue Dec 16, 2022 · 1 comment

Comments

@edmundedgar
Copy link
Contributor

Currently we have a single contract containing templates and everything else. It might be good to break out the templates into their own contract. This would be good because

  • It would avoid needing to recreate templates when we make a new contract version
  • It would make the core contract a bit smaller, which is probably going to be helpful with L2s and also possibly code merkelization.

Currently the only place where we need to read the template data in the main contract logic is when we check that the template in question exists. We could probably just not check this, as we already have cases where you can create a question but it won't make any sense, for instance because it doesn't parse.

@edmundedgar
Copy link
Contributor Author

Consider whether to put this in 3.1, in which case we should preserve the createTemplate function but have it proxy to the old contract, or do 4.0, make a breaking change and make people call the other contract. Either way we should probably keep the address of the template manager in the core contract so people can at least query it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant