RealityETH / reality-eth-monorepo

Monorepo containing reality.eth contracts, UI code and everything else.
38 stars 22 forks source link

Break templates out into their own contract #106

Open edmundedgar opened 1 year ago

edmundedgar commented 1 year ago

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

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 commented 1 year ago

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.