Migrations for Application Developers
In order to be wired with the new StackBuilder primitive, applications and middlewares must implement new methods as part of their respective interfaces. IBC Applications must implement a newSetICS4Wrapper
which will set the ICS4Wrapper
through which the application will call SendPacket
and WriteAcknowledgement
. It is recommended that IBC applications are initialized first with the IBC ChannelKeeper directly, and then modified with a middleware ICS4Wrapper during the stack wiring.
ics4Wrapper
as this gets modified later by SetICS4Wrapper
. The constructor function must also return a pointer reference so that it may be modified in-place by the stack builder.
Below is an example IBCModule that supports the stack builder wiring.
E.g.
Migration for Middleware Developers
Since Middleware is itself implement the IBC application interface, it must also implementSetICS4Wrapper
in the same way as IBC applications.
Additionally, IBC Middleware has an underlying IBC application that it calls into as well. Previously this application would be set in the middleware upon construction. With the stack builder primitive, the application is only set during upon calling stack.Build()
. Thus, middleware is additionally responsible for implementing the new method: SetUnderlyingApplication
: