We've been trying to use the new try_state
hook. However, a significant limitation seems to be that this hook is only accessible from the individual pallets. We want to add some checks that depend on different pallets. Is it possible somehow implement a top-level hook, similar to how it's possible to define on_runtime_upgrade
hooks on the top-level Executive
type?
1 Answer
This is currently not possible. The Executive
only accepts a runtime-wide OnRuntimeUpgrade
which can be used adjacent to the pallets on_runtime_upgrade
hooks.
TryState
can currently only be used on a per-pallet level. But it is a good idea to extend it for runtime-wide usage (issue).
As makeshift you can maybe write a pallet which only contains the TryState
logic, but that would be quite ugly.