If you squeeze your eyes enough, both ink! and FRAME are doing a similar job. As @rphmeier touched on, they are on different levels of the stack. It’s always been considered that ink! is an easy tool but a bit blunt, and FRAME allows you to do more things, including cutting your leg off. For example, FRAME Runtime can write every storage entry, and it can remove the :code
. Another example, is a Substrate Runtime that has to be careful about resource usage, for that it has to perform thorough runtime benchmarks. It also is not allowed to panic, otherwise it’s a risk for DoS.
But, then there are these two ideas:
- There was an old idea introducing try…catch functionality into Substrate Runtime. It was partially implemented in the form of transactional storage.
- Recently, a way how to do a very low overhead gas metering on wasm was discovered. The primary motivation is to fit it into PVF execution metering. However, potentially we could introduce it into Substrate Runtime.
Those two ideas might allow us to bring the contract-like environment to FRAME, blurring the line between the two. I am not sure that would kill one or another, but maybe it will be two flavors of one thing.