This is the first pre-release of the much awaited ๐ฅ๐บ callbacks middleware ๐๐คฉ
I never heard of this before ๐ what's this callbacks middleware?
The callbacks middleware is an IBC module that implements ADR-008, which means that the module is charged with superpowers to execute callbacks in any execution environment (like the Wasm or EVM execution frameworks) on packet lifecycle events. We have added the ContractKeeper
interface defining the entry points exposed to the execution environment. The execution environment is expected to execute its custom logic within these entry points.
Read the documentation or this blog post by @adiraviraj for more information.
Hmm, ok... that sounds pretentious and a bit vague ๐ค what can I do with it?
I am glad you asked: the callbacks middleware opens up endless possibilities to implement use cases of the form send X, do Y programmatically
. The main benefit for smart contract developers is the ability to leverage existing IBC app and to build new and unique apps for use cases of the form transfer + action
or ICA + action
. For example, the following will be possible to execute in a single user flow:
- Send tokens from chain A to B. If the transfer was successful, then send an ICA packet to stake/LP/swap tokens.
- Execute arbitrary smart contract logic upon receiving an ICS-20 packet.
Wow ๐ฎ this is pretty cool, how can use it like... today?
This pre-release is compatible with ibc-go v7.3 (v7.3.0-rc1 is the latest pre-release available at the time of publishing), so the chain will need to be running at least this version. Please check out the relevant section of the documentation to learn how to wire up the middleware. Additionally, the chain should be running a version of the execution environment that implements the ContractKeeper
interface (the Confio team is aiming to add support for this in x/wasm
during Q4 2023).
This is a fine piece of engineering work ๐ ๏ธ who are the masterminds behind such thing?
The ๐shout-out ๐ฃ๏ธ goes for the IBC team at Interchain, but specially to:
- @AdityaSripal for designing ADR-008 ๐ง
- @srdtrk for writing the implementation and enhancing ADR-008 โ๏ธ
- @colin-axner for reviewing and proposing countless improvements โพ๏ธ
But we would not have been able to achieve this without the invaluable help, feedback and support of:
- @alpe from Confio ๐
- @nicolaslara from Osmosis ๐งช. Their ibc-hooks middleware inspired the design and served as a starting point for the callbacks middleware.