Following https://github.com/dymensionxyz/ibc-go/issues/14 we could also add hooks for more IBC messages.
Instead of hooks, we can export the message server that is registered for the IBC messages.
Say am.msgSrvInterceptor is implementing the required interface, we can just change the registry:
That way, we can define one interface that is implementing the required message handling and initialize the IBC module with it.
The default would be to initialize with the IBC keeper, but other application logic could be applied as well.
The common use should be wrapping the IBC keeper handling with the required logic.
The interception is needed for creating a framework to support more features of the IRC that middleware can't achieve.
Remove client hooks
The use of client hooks should be replaced with this interceptor.
Overview
Following https://github.com/dymensionxyz/ibc-go/issues/14 we could also add hooks for more IBC messages. Instead of hooks, we can export the message server that is registered for the IBC messages. Say am.msgSrvInterceptor is implementing the required interface, we can just change the registry:
That way, we can define one interface that is implementing the required message handling and initialize the IBC module with it. The default would be to initialize with the IBC keeper, but other application logic could be applied as well. The common use should be wrapping the IBC keeper handling with the required logic.
The interception is needed for creating a framework to support more features of the IRC that middleware can't achieve.
Remove client hooks
The use of client hooks should be replaced with this interceptor.