This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:
This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:
Source callbacks:
SendPacket callback
OnAcknowledgementPacket callback
OnTimeoutPacket callback
Destination callbacks:
ReceivePacket callback
For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel’s IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel’s IBC stack.
Callbacks are always executed after the packet has been processed by the underlying IBC module.
If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the packet forward middleware is in the stack, and is being used by this packet), then the callbacks middleware will execute the ReceivePacket callback after the acknowledgement has been received.
Source callbacks are natively supported in the following ibc modules (if they are wrapped by the callbacks middleware):
transfer
icacontroller
To have your source callbacks be processed by the callbacks middleware, you must set the memo in the application’s packet data to the following format:
Destination callbacks are natively only supported in the transfer module. Note that wrapping icahost is not supported. This is because icahost should be able to execute an arbitrary transaction anyway, and can call contracts or modules directly.To have your destination callbacks processed by the callbacks middleware, you must set the memo in the application’s packet data to the following format:
User defined gas limit was added for the following reasons:
To prevent callbacks from blocking packet lifecycle.
To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas.
There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the "gas_limit" is not set in the packet memo, then the maximum gas limit is used.
These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again.
SendPacket callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"IBC Documentation","description":"Documentation for the Inter-Blockchain Communication protocol, its Go implementation, and the IBC CLI.","colors":{"primary":"#000000","light":"#cccccc","dark":"#0E0E0E"},"logo":{"light":"https://mintcdn.com/ibc-docs/_IzGrVOELf0DsHtq/mintlify/assets/brand/ibc-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=_IzGrVOELf0DsHtq\u0026q=85\u0026s=dd69509f8e278637cefba78620bc6f19","dark":"https://mintcdn.com/ibc-docs/_IzGrVOELf0DsHtq/mintlify/assets/brand/ibc-wordmark.svg?fit=max\u0026auto=format\u0026n=_IzGrVOELf0DsHtq\u0026q=85\u0026s=4332fd7d24e0e9834a0ff6d9b0907db8","href":"/"},"favicon":{"light":"https://mintcdn.com/ibc-docs/_IzGrVOELf0DsHtq/mintlify/assets/brand/ibc-dark.svg?fit=max\u0026auto=format\u0026n=_IzGrVOELf0DsHtq\u0026q=85\u0026s=950310224e31e8dcbbbae521db80542e","dark":"https://mintcdn.com/ibc-docs/_IzGrVOELf0DsHtq/mintlify/assets/brand/ibc.svg?fit=max\u0026auto=format\u0026n=_IzGrVOELf0DsHtq\u0026q=85\u0026s=8846e23ba7502345c1b7016d0ec9315d"},"navbar":{"primary":{"type":"button","label":"Get started","href":"/ibc/05-ibc-cli/02-tutorial/01-deploy-ibc-and-send-a-token"}},"footer":{"socials":{"x":"https://twitter.com/cosmos","github":"https://github.com/cosmos","discord":"https://discord.gg/interchain","website":"https://cosmos.network"},"links":[{"header":"Documentation","items":[{"label":"Learn how IBC works","href":"/ibc/01-introduction/01-what-is-ibc"},{"label":"IBC CLI","href":"/ibc/05-ibc-cli/01-overview"},{"label":"IBC-Solidity","href":"/ibc/06-ibc-solidity-contracts/01-overview"},{"label":"IBC-Go","href":"/ibc-go/latest/intro"},{"label":"Specification","href":"/ibc/spec/ics-001-ics-standard/README"}]},{"header":"Repositories","items":[{"label":"cosmos/ibc","href":"https://github.com/cosmos/ibc"},{"label":"cosmos/ibc-go","href":"https://github.com/cosmos/ibc-go"},{"label":"cosmos/ibc-contracts","href":"https://github.com/cosmos/ibc-contracts"}]},{"header":"Security","items":[{"label":"Security audits","href":"/ibc/07-security/01-audits"},{"label":"Bug Bounty","href":"https://immunefi.com/bug-bounty/cosmos/information"}]}]},"icons":{"library":"lucide"},"styling":{"codeblocks":{"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ibc-docs","hasAudioNarration":false,"actualSubdomain":"ibc-docs","customDomains":[],"gitSource":{"type":"github","owner":"cosmos","repo":"ibc","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":"","_id":"6ae38e8fd265945f8832a739"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae38f56d265945f8832b6ee","collectionId":"e8081330-a92e-4d86-a023-d2707473bf51","liveDeploymentHistoryId":"6ae38f56d265945f8832b6ee","schemaVersion":"v3"},"entitlements":{},"buildId":"6ae393af0b369713606c9b5e","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Getting Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"mintlify/style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh0NSDulI.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh2dSDulI.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh0dSDulI.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3tSDulI.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bhZ_Wmh2uX.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh09SDulI.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh0NSDulI.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh2dSDulI.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh0dSDulI.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3tSDulI.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bhZ_Wmh2uX.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh09SDulI.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Fira Code';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--background-light:255 255 255}.bg-primary\\/10,.dark .bg-primary\\/10,.dark\\:bg-primary-light\\/10:is(.dark *){background-color:var(--nav-accent, #40b3ff)}.bg-primary\\/10 .text-primary,.bg-primary\\/10.text-primary,.dark\\:bg-primary-light\\/10:is(.dark *),.dark\\:bg-primary-light\\/10:is(.dark *) .text-primary,.dark\\:bg-primary-light\\/10:is(.dark *).dark\\:text-primary-light{color:var(--nav-accent-ink, #0e0e0e)}@font-face{font-family:'The Future';src:url(/mintlify/assets/fonts/the-future-regular.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'The Future';src:url(/mintlify/assets/fonts/the-future-medium.woff2) format('woff2');font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:'The Future';src:url(/mintlify/assets/fonts/the-future-bold.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:'The Future';src:url(/mintlify/assets/fonts/the-future-light.woff2) format('woff2');font-weight:300;font-style:normal;font-display:swap}body:has(#custom-index-content) #header,body:has(#custom-index-content) #navbar,body:has(#custom-index-content) #search-bar-entry,body:has(#custom-index-content) #search-bar-entry-mobile,body:has(#custom-index-content) .chat-assistant-floating-input,body:has(#custom-index-content) :has(>.chat-assistant-floating-input),body:has(#custom-index-content) button#search-bar-entry,body:has(#custom-index-content) button#search-bar-entry-mobile,body:has(#custom-index-content) header,body:has(#custom-index-content) nav[aria-label]{display:none!important;visibility:hidden!important;opacity:0!important;width:0!important;height:0!important;position:absolute!important;left:-99999px!important;pointer-events:none!important}body:has(#custom-index-content) #custom-index-content,body:has(#custom-index-content) #custom-index-content a,body:has(#custom-index-content) #custom-index-content h1,body:has(#custom-index-content) #custom-index-content h2,body:has(#custom-index-content) #custom-index-content h3,body:has(#custom-index-content) #custom-index-content p{font-family:'The Future',sans-serif}@media (max-width:768px){button[aria-label=\"More actions\"]{display:none!important}#custom-index-content{margin-top:-120px}}@media (min-width:769px) and (max-width:1023px){#custom-index-content{margin-top:-120px}}.prose .callout a,.prose .info a,.prose .note a,.prose .step a,.prose .steps a,.prose .tip a,.prose .warning a,.prose [role=listitem] a,.prose div[data-callout-type] a,.prose li a,.prose p a,.prose span a,.prose ul a{border-bottom-color:#0e0e0e!important;text-decoration-color:#0e0e0e!important}.dark .prose .callout a,.dark .prose .info a,.dark .prose .note a,.dark .prose .step a,.dark .prose .steps a,.dark .prose .tip a,.dark .prose .warning a,.dark .prose [role=listitem] a,.dark .prose div[data-callout-type] a,.dark .prose li a,.dark .prose p a,.dark .prose span a,.dark .prose ul a{border-bottom-color:#ccc!important;text-decoration-color:#ccc!important}.highlighted-card-bg{background-color:#ffb84d;position:relative;overflow:hidden;transition:box-shadow .3s ease-in-out}.highlighted-card-bg:hover{box-shadow:0 0 30px rgba(255,184,77,.5),0 0 60px rgba(255,184,77,.3),0 10px 40px rgba(255,184,77,.2)}.highlighted-card-bg::before{content:'';position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(45deg,transparent 30%,rgba(255,255,255,.4) 50%,transparent 70%);transform:translateX(-100%) translateY(-100%) rotate(45deg);transition:transform .6s ease-in-out}.highlighted-card-bg:hover::before{transform:translateX(100%) translateY(100%) rotate(45deg)}@layer utilities{body:has(#custom-index-content) #footer{display:flex!important}}code,pre,pre code{font-family:'Fira Code','Cascadia Code','JetBrains Mono',monospace!important}#navbar a>span.absolute.bg-primary-dark,header a>span.absolute.bg-primary-dark{background-color:var(--nav-accent, #40b3ff);transition:background-color 120ms ease}#navbar a:hover>span.absolute.bg-primary-dark,header a:hover>span.absolute.bg-primary-dark{background-color:color-mix(in srgb,var(--nav-accent, #40b3ff) 82%,white);opacity:1}#navbar a:has(>span.absolute.bg-primary-dark),#navbar a:has(>span.absolute.bg-primary-dark) *,header a:has(>span.absolute.bg-primary-dark),header a:has(>span.absolute.bg-primary-dark) *{color:var(--nav-accent-ink, #0e0e0e);font-weight:600}.nav-tabs-item{--tab-accent:#40b3ff;--tab-ink:#0e0e0e;transition:color 120ms ease}.nav-tabs-item::before{content:\"\";position:absolute;inset:9px -10px;border-radius:.5rem;background-color:transparent;transition:background-color 120ms ease;z-index:-1}.nav-tabs-item:hover::before{background-color:var(--tab-accent)}.nav-tabs-item:hover,.nav-tabs-item:hover *{color:var(--tab-ink)!important}.nav-tabs-item[href^=\"/ibc/05-ibc-cli/\"]{--tab-accent:#22e2a8;--tab-ink:#0e0e0e}.nav-tabs-item[href^=\"/ibc/06-ibc-solidity-contracts/\"]{--tab-accent:#7522b5;--tab-ink:#ffffff}.nav-tabs-item[href^=\"/ibc-go/\"]{--tab-accent:#4b47ca;--tab-ink:#ffffff}.nav-tabs-item[href^=\"/ibc/spec/\"]{--tab-accent:#ef5628;--tab-ink:#0e0e0e}img.nav-logo{height:3rem}"}],"page":{"pagePath":"ibc-go/latest/middleware/callbacks/end-users","slug":"/ibc-go/latest/middleware/callbacks/end-users","pageMetadata":{"title":"End Users","description":"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:","href":"/ibc-go/latest/middleware/callbacks/end-users"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Source callbacks:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SendPacket`}),` callback`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OnAcknowledgementPacket`}),` callback`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OnTimeoutPacket`}),` callback`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Destination callbacks:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ReceivePacket`}),` callback`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel’s IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel’s IBC stack.`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Callbacks are always executed after the packet has been processed by the underlying IBC module.`})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the `,_jsx(_components.a,{href:`https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware`,children:`packet forward middleware`}),` is in the stack, and is being used by this packet), then the callbacks middleware will execute the `,_jsx(_components.code,{children:`ReceivePacket`}),` callback after the acknowledgement has been received.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`source-callbacks`,children:`Source Callbacks`}),`\n`,_jsx(_components.p,{children:`Source callbacks are natively supported in the following ibc modules (if they are wrapped by the callbacks middleware):`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`transfer`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`icacontroller`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`To have your source callbacks be processed by the callbacks middleware, you must set the memo in the application’s packet data to the following format:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-high-contrast github-dark-high-contrast`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0a0c10`,color:`#0e1116`,\"--shiki-dark\":`#f0f3f6`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"src_callback\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"callbackAddressString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#66707B`,\"--shiki-dark\":`#BDC4CC`},children:` // optional`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"gas_limit\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"userDefinedGasLimitString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`destination-callbacks`,children:`Destination Callbacks`}),`\n`,_jsx(_components.p,{children:`Destination callbacks are natively only supported in the transfer module. Note that wrapping icahost is not supported. This is because icahost should be able to execute an arbitrary transaction anyway, and can call contracts or modules directly.`}),`\n`,_jsx(_components.p,{children:`To have your destination callbacks processed by the callbacks middleware, you must set the memo in the application’s packet data to the following format:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-high-contrast github-dark-high-contrast`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0a0c10`,color:`#0e1116`,\"--shiki-dark\":`#f0f3f6`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"dest_callback\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"callbackAddressString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#66707B`,\"--shiki-dark\":`#BDC4CC`},children:` // optional`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"gas_limit\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"userDefinedGasLimitString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Note that a packet can have both a source and destination callback.`}),`\n`,_jsx(CodeBlock,{filename:``,expandable:`true`,numberOfLines:`13`,language:`jsonc`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-high-contrast github-dark-high-contrast`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0a0c10`,color:`#0e1116`,\"--shiki-dark\":`#f0f3f6`},language:`jsonc`,children:_jsxs(_components.code,{language:`jsonc`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"src_callback\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"callbackAddressString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#66707B`,\"--shiki-dark\":`#BDC4CC`},children:` // optional`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"gas_limit\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"userDefinedGasLimitString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"dest_callback\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"callbackAddressString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#66707B`,\"--shiki-dark\":`#BDC4CC`},children:` // optional`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#024C1A`,\"--shiki-dark\":`#72F088`},children:` \"gas_limit\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`: `}),_jsx(_components.span,{style:{color:`#032563`,\"--shiki-dark\":`#ADDCFF`},children:`\"userDefinedGasLimitString\"`}),_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0E1116`,\"--shiki-dark\":`#F0F3F6`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`user-defined-gas-limit`,children:`User Defined Gas Limit`}),`\n`,_jsx(_components.p,{children:`User defined gas limit was added for the following reasons:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`To prevent callbacks from blocking packet lifecycle.`}),`\n`,_jsx(_components.li,{children:`To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas.`}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the `,_jsx(_components.code,{children:`\"gas_limit\"`}),` is not set in the packet memo, then the maximum gas limit is used.`]})}),`\n`,_jsx(_components.p,{children:`These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SendPacket`}),` callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}},"config":{},"pageMetadata":{"title":"End Users","description":"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:","href":"/ibc-go/latest/middleware/callbacks/end-users"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Source Callbacks","slug":"source-callbacks","depth":2,"children":[]},{"title":"Destination Callbacks","slug":"destination-callbacks","depth":2,"children":[]},{"title":"User Defined Gas Limit","slug":"user-defined-gas-limit","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/ibc-docs/1efa1b9f25769b22/custom.js"],"subdomain":"ibc-docs","siteName":"IBC Documentation","title":"End Users - IBC Documentation","navMaps":{"firstHrefInVersion":{"latest":{"href":"/ibc-go/latest/middleware/callbacks/end-users","matchLevel":0},"v10.1.x":{"href":"/ibc-go/v10.1.x/middleware/callbacks/end-users","matchLevel":1,"noindex":true,"canonicalOverride":true}},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T18:43:17.188Z","originalFileLocation":"ibc-go/latest/middleware/callbacks/end-users.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\">\u003cmeta data-mint-head name=\"application-name\" content=\"IBC Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"End Users - IBC Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"IBC Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ibc-docs.mintlify.app/_mintlify/api/og/v2?division=Callbacks\u0026amp;title=End+Users\u0026amp;description=This+section+explains+how+to+use+the+callbacks+middleware+from+the+perspective+of+an+IBC+Actor.+Callbacks+middleware+provides+two+types+of+callbacks%3A\u0026amp;theme=83cf7571a86e66a217192c59\u0026amp;signature=12ac0dc4ce08a1cb1301ab086197d0a3d4ee0c64c2088f8e7f8054d33370ce9b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"End Users - IBC Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ibc-docs.mintlify.app/_mintlify/api/og/v2?division=Callbacks\u0026amp;title=End+Users\u0026amp;description=This+section+explains+how+to+use+the+callbacks+middleware+from+the+perspective+of+an+IBC+Actor.+Callbacks+middleware+provides+two+types+of+callbacks%3A\u0026amp;theme=83cf7571a86e66a217192c59\u0026amp;signature=12ac0dc4ce08a1cb1301ab086197d0a3d4ee0c64c2088f8e7f8054d33370ce9b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/ibc-docs/M8QbcV1CzT5u-Qmv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"IBC Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ibc-go/latest/middleware/callbacks/end-users.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://ibc-docs.mintlify.dev/#organization\",\"name\":\"IBC Documentation\",\"url\":\"https://ibc-docs.mintlify.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ibc-docs/_IzGrVOELf0DsHtq/mintlify/assets/brand/ibc-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=_IzGrVOELf0DsHtq\u0026q=85\u0026s=dd69509f8e278637cefba78620bc6f19\"}},{\"@type\":\"WebSite\",\"@id\":\"https://ibc-docs.mintlify.dev/docs#website\",\"name\":\"IBC Documentation\",\"url\":\"https://ibc-docs.mintlify.dev/docs\",\"publisher\":{\"@id\":\"https://ibc-docs.mintlify.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users#webpage\",\"url\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users\",\"name\":\"End Users\",\"description\":\"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\",\"dateModified\":\"2026-10-29T18:43:17.188Z\",\"isPartOf\":{\"@id\":\"https://ibc-docs.mintlify.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IBC Middleware\",\"item\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Callbacks\",\"item\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"End Users\",\"item\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users#article\",\"headline\":\"End Users\",\"name\":\"End Users\",\"description\":\"This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks:\",\"url\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users\",\"mainEntityOfPage\":{\"@id\":\"https://ibc-docs.mintlify.dev/docs/ibc-go/latest/middleware/callbacks/end-users#webpage\"},\"dateModified\":\"2026-10-29T18:43:17.188Z\",\"publisher\":{\"@id\":\"https://ibc-docs.mintlify.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://ibc-docs.mintlify.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"IBC Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"IBC Documentation","nav":{"global":null,"tabs":[{"tab":"Learn","pages":[{"title":"Learn","href":""}]},{"tab":"IBC CLI","pages":[{"title":"IBC CLI","href":"/ibc/05-ibc-cli/01-overview"}]},{"tab":"IBC-Solidity","pages":[{"title":"IBC-Solidity","href":"/ibc/06-ibc-solidity-contracts/01-overview"}]},{"tab":"IBC-Go","versions":[{"version":"latest","groups":[{"group":"Introduction","icon":"book-open","pages":[{"title":"IBC Documentation","href":"/ibc-go/latest/intro"}]},{"group":"IBC Core","icon":"box","pages":[{"title":"Overview","href":"/ibc-go/latest/ibc/overview"},{"group":"Core Concepts","icon":"lightbulb","pages":[{"title":"Best Practices","href":"/ibc-go/latest/ibc/best-practices"},{"title":"Integration","href":"/ibc-go/latest/ibc/integration"},{"title":"Permissioning","href":"/ibc-go/latest/ibc/permissioning"},{"title":"Relayer","href":"/ibc-go/latest/ibc/relayer"}]},{"group":"Apps","icon":"app-window","pages":[{"title":"IBC v2 Applications","href":"/ibc-go/latest/ibc/apps/ibcv2apps"},{"title":"IBC Applications","href":"/ibc-go/latest/ibc/apps/apps"},{"title":"Implement IBCModule interface and callbacks","href":"/ibc-go/latest/ibc/apps/ibcmodule"},{"title":"Bind ports","href":"/ibc-go/latest/ibc/apps/bindports"},{"title":"Keeper","href":"/ibc-go/latest/ibc/apps/keeper"},{"title":"Define packets and acks","href":"/ibc-go/latest/ibc/apps/packets_acks"},{"title":"Routing","href":"/ibc-go/latest/ibc/apps/routing"},{"title":"Custom Address Codec","href":"/ibc-go/latest/ibc/apps/address-codec"}]},{"group":"Middleware","icon":"layers","pages":[{"title":"IBC middleware","href":"/ibc-go/latest/ibc/middleware/overview"},{"title":"Create a custom IBC middleware","href":"/ibc-go/latest/ibc/middleware/develop"},{"title":"Create and integrate IBC v2 middleware","href":"/ibc-go/latest/ibc/middleware/developIBCv2"},{"title":"Integrating IBC middleware into a chain","href":"/ibc-go/latest/ibc/middleware/integration"}]},{"group":"Upgrades","icon":"arrow-up","pages":[{"title":"Upgrading IBC Chains Overview","href":"/ibc-go/latest/ibc/upgrades/intro"},{"title":"How to Upgrade IBC Chains and their Clients","href":"/ibc-go/latest/ibc/upgrades/quick-guide"},{"title":"IBC Client Developer Guide to Upgrades","href":"/ibc-go/latest/ibc/upgrades/developer-guide"},{"title":"Genesis Restart Upgrades","href":"/ibc-go/latest/ibc/upgrades/genesis-restart"}]}]},{"group":"IBC Migrations","icon":"arrow-right-left","pages":[{"group":"Version Upgrades","icon":"git-branch","pages":[{"title":"IBC-Go v11.0 to v11.1","href":"/ibc-go/latest/migrations/v11-to-v11-1"},{"title":"IBC-Go v10 to v11.1","href":"/ibc-go/latest/migrations/v10-to-v11-1"},{"title":"IBC-Go v10 to v11","href":"/ibc-go/latest/migrations/v10-to-v11"},{"title":"IBC-Go v8.1 to v10","href":"/ibc-go/latest/migrations/v8_1-to-v10"},{"title":"IBC-Go v8 to v8.1","href":"/ibc-go/latest/migrations/v8-to-v8_1"},{"title":"IBC-Go v7 to v8","href":"/ibc-go/latest/migrations/v7-to-v8"},{"title":"IBC-Go v7.2 to v7.3","href":"/ibc-go/latest/migrations/v7_2-to-v7_3"},{"title":"IBC-Go v7 to v7.1","href":"/ibc-go/latest/migrations/v7-to-v7_1"},{"title":"IBC-Go v6 to v7","href":"/ibc-go/latest/migrations/v6-to-v7"},{"title":"IBC-Go v5 to v6","href":"/ibc-go/latest/migrations/v5-to-v6"},{"title":"IBC-Go v4 to v5","href":"/ibc-go/latest/migrations/v4-to-v5"},{"title":"IBC-Go v3 to v4","href":"/ibc-go/latest/migrations/v3-to-v4"},{"title":"IBC-Go v2 to v3","href":"/ibc-go/latest/migrations/v2-to-v3"},{"title":"IBC-Go v1 to v2","href":"/ibc-go/latest/migrations/v1-to-v2"}]},{"group":"Additional Migration Guides","icon":"map","pages":[{"title":"SDK v0.43 to IBC-Go v1","href":"/ibc-go/latest/migrations/sdk-to-v1"},{"title":"Support transfer of coins whose base denom contains slashes","href":"/ibc-go/latest/migrations/support-denoms-with-slashes"},{"title":"Support the new StackBuilder primitive for Wiring Middlewares in the chain application","href":"/ibc-go/latest/migrations/support-stackbuilder"}]}]},{"group":"IBC Light Clients","icon":"shield-check","pages":[{"group":"Developer Guide","icon":"code","pages":[{"title":"Overview","href":"/ibc-go/latest/light-clients/developer-guide/overview"},{"title":"Light Client Module interface","href":"/ibc-go/latest/light-clients/developer-guide/light-client-module"},{"title":"Client State interface","href":"/ibc-go/latest/light-clients/developer-guide/client-state"},{"title":"Consensus State interface","href":"/ibc-go/latest/light-clients/developer-guide/consensus-state"},{"title":"Handling Updates and Misbehaviour","href":"/ibc-go/latest/light-clients/developer-guide/updates-and-misbehaviour"},{"title":"Handling Upgrades","href":"/ibc-go/latest/light-clients/developer-guide/upgrades"},{"title":"Existence/Non-Existence Proofs","href":"/ibc-go/latest/light-clients/developer-guide/proofs"},{"title":"Handling Proposals","href":"/ibc-go/latest/light-clients/developer-guide/proposals"},{"title":"Setup","href":"/ibc-go/latest/light-clients/developer-guide/setup"},{"title":"Governance Proposals","href":"/ibc-go/latest/light-clients/proposals"}]},{"group":"Attestation","icon":"badge-check","pages":[{"title":"The attestation light client","href":"/ibc-go/latest/light-clients/attestation/attestation-light-client"}]},{"group":"Localhost","icon":"monitor","pages":[{"title":"Overview","href":"/ibc-go/latest/light-clients/localhost/overview"},{"title":"Integration","href":"/ibc-go/latest/light-clients/localhost/integration"},{"title":"ClientState","href":"/ibc-go/latest/light-clients/localhost/client-state"},{"title":"Connection","href":"/ibc-go/latest/light-clients/localhost/connection"},{"title":"State Verification","href":"/ibc-go/latest/light-clients/localhost/state-verification"}]},{"group":"Solo Machine","icon":"cpu","pages":[{"title":"Solomachine","href":"/ibc-go/latest/light-clients/solomachine/solomachine"},{"title":"Concepts","href":"/ibc-go/latest/light-clients/solomachine/concepts"},{"title":"State","href":"/ibc-go/latest/light-clients/solomachine/state"},{"title":"State Transitions","href":"/ibc-go/latest/light-clients/solomachine/state_transitions"}]},{"group":"Tendermint","icon":"boxes","pages":[{"title":"Overview","href":"/ibc-go/latest/light-clients/tendermint/overview"}]},{"group":"WASM","icon":"binary","pages":[{"title":"Overview","href":"/ibc-go/latest/light-clients/wasm/overview"},{"title":"Concepts","href":"/ibc-go/latest/light-clients/wasm/concepts"},{"title":"Integration","href":"/ibc-go/latest/light-clients/wasm/integration"},{"title":"Messages","href":"/ibc-go/latest/light-clients/wasm/messages"},{"title":"Governance","href":"/ibc-go/latest/light-clients/wasm/governance"},{"title":"Events","href":"/ibc-go/latest/light-clients/wasm/events"},{"title":"Contracts","href":"/ibc-go/latest/light-clients/wasm/contracts"},{"title":"Client","href":"/ibc-go/latest/light-clients/wasm/client"},{"title":"Migrations","href":"/ibc-go/latest/light-clients/wasm/migrations"}]}]},{"group":"IBC Apps","icon":"blocks","pages":[{"title":"General Message Passing (GMP)","href":"/ibc-go/latest/apps/gmp"},{"group":"Interchain Accounts","icon":"users","pages":[{"title":"Overview","href":"/ibc-go/latest/apps/interchain-accounts/overview"},{"title":"Development Use Cases","href":"/ibc-go/latest/apps/interchain-accounts/development"},{"title":"Authentication Modules","href":"/ibc-go/latest/apps/interchain-accounts/auth-modules"},{"title":"Integration","href":"/ibc-go/latest/apps/interchain-accounts/integration"},{"title":"Messages","href":"/ibc-go/latest/apps/interchain-accounts/messages"},{"title":"Parameters","href":"/ibc-go/latest/apps/interchain-accounts/parameters"},{"title":"Transaction Encoding","href":"/ibc-go/latest/apps/interchain-accounts/tx-encoding"},{"title":"Client","href":"/ibc-go/latest/apps/interchain-accounts/client"},{"title":"Active Channels","href":"/ibc-go/latest/apps/interchain-accounts/active-channels"},{"group":"Legacy","icon":"archive","pages":[{"title":"Authentication Modules","href":"/ibc-go/latest/apps/interchain-accounts/legacy/auth-modules"},{"title":"Integration","href":"/ibc-go/latest/apps/interchain-accounts/legacy/integration"},{"title":"Keeper API","href":"/ibc-go/latest/apps/interchain-accounts/legacy/keeper-api"}]}]},{"group":"Transfer","icon":"send","pages":[{"title":"Overview","href":"/ibc-go/latest/apps/transfer/overview"},{"title":"State","href":"/ibc-go/latest/apps/transfer/state"},{"title":"State Transitions","href":"/ibc-go/latest/apps/transfer/state-transitions"},{"title":"Messages","href":"/ibc-go/latest/apps/transfer/messages"},{"title":"Events","href":"/ibc-go/latest/apps/transfer/events"},{"title":"Metrics","href":"/ibc-go/latest/apps/transfer/metrics"},{"title":"Params","href":"/ibc-go/latest/apps/transfer/params"},{"title":"Authorizations","href":"/ibc-go/latest/apps/transfer/authorizations"},{"title":"Client","href":"/ibc-go/latest/apps/transfer/client"},{"title":"IBC v2 Transfer","href":"/ibc-go/latest/apps/transfer/IBCv2-transfer"}]}]},{"group":"IBC Middleware","icon":"layers","pages":[{"group":"Callbacks","icon":"repeat","pages":[{"title":"Overview","href":"/ibc-go/latest/middleware/callbacks/overview"},{"title":"Integration","href":"/ibc-go/latest/middleware/callbacks/integration"},{"title":"Interfaces","href":"/ibc-go/latest/middleware/callbacks/interfaces"},{"title":"Events","description":"An overview of all events related to the callbacks middleware. There are two types of events, \"ibcsrccallback\" and \"ibcdestcallback\".","href":"/ibc-go/latest/middleware/callbacks/events"},{"title":"End Users","href":"/ibc-go/latest/middleware/callbacks/end-users"},{"title":"Gas Management","description":"Executing arbitrary code on a chain can be arbitrarily expensive. In general, a callback may consume infinite gas (think of a callback that loops forever). This is problematic for a few reasons:","href":"/ibc-go/latest/middleware/callbacks/gas"},{"title":"Callbacks with IBC v2","href":"/ibc-go/latest/middleware/callbacks/callbacks-IBCv2"}]},{"group":"Packet Forward Middleware","icon":"forward","pages":[{"title":"Overview","href":"/ibc-go/latest/middleware/packet-forward-middleware/overview"},{"title":"Integration","href":"/ibc-go/latest/middleware/packet-forward-middleware/integration"},{"title":"Example Flows","href":"/ibc-go/latest/middleware/packet-forward-middleware/example-usage"}]},{"group":"Rate Limit Middleware","icon":"gauge","pages":[{"title":"Overview","href":"/ibc-go/latest/middleware/rate-limit-middleware/overview"},{"title":"Integration","href":"/ibc-go/latest/middleware/rate-limit-middleware/integration"},{"title":"Setting Rate Limits","href":"/ibc-go/latest/middleware/rate-limit-middleware/setting-limits"},{"title":"Migration","href":"/ibc-go/latest/middleware/rate-limit-middleware/migration"}]}]},{"group":"Security","icon":"lock","pages":[{"title":"Security Audits","href":"/ibc-go/latest/security-audits"}]},{"group":"Architecture Decision Records","icon":"scroll-text","pages":[{"title":"Architecture Decision Records (ADR)","href":"/ibc-go/latest/architecture/README"},{"title":"ADR 001: Coin Source Tracing","href":"/ibc-go/latest/architecture/adr-001-coin-source-tracing"},{"title":"ADR 002: Go Module Versioning","href":"/ibc-go/latest/architecture/adr-002-go-module-versioning"},{"title":"ADR 003: ICS-27 Acknowledgement Format","href":"/ibc-go/latest/architecture/adr-003-ics27-acknowledgement"},{"title":"ADR 004: Lock Fee Module Upon Escrow Out Of Balance","href":"/ibc-go/latest/architecture/adr-004-ics29-lock-fee-module"},{"title":"ADR 005: UpdateClient Events ClientState Consensus Heights","href":"/ibc-go/latest/architecture/adr-005-consensus-height-events"},{"title":"ADR 006: 02-Client Refactor","href":"/ibc-go/latest/architecture/adr-006-02-client-refactor"},{"title":"ADR 007: Solo Machine Sign Bytes","href":"/ibc-go/latest/architecture/adr-007-solomachine-signbytes"},{"title":"ADR 008: Callback to IBC Actors","href":"/ibc-go/latest/architecture/adr-008-app-caller-cbs"},{"title":"ADR 009: ICS27 Message Server Addition","href":"/ibc-go/latest/architecture/adr-009-v6-ics27-msgserver"},{"title":"ADR 010: IBC Light Clients As SDK Modules","href":"/ibc-go/latest/architecture/adr-010-light-clients-as-sdk-modules"},{"title":"ADR 011: ICS-20 Transfer State Entry For Total Amount Of Tokens In Escrow","href":"/ibc-go/latest/architecture/adr-011-transfer-total-escrow-state-entry"},{"title":"ADR 015: IBC Packet Receiver","href":"/ibc-go/latest/architecture/adr-015-ibc-packet-receiver"},{"title":"ADR 025: IBC Passive Channels","href":"/ibc-go/latest/architecture/adr-025-ibc-passive-channels"},{"title":"ADR 026: IBC Client Recovery Mechanisms","href":"/ibc-go/latest/architecture/adr-026-ibc-client-recovery-mechanisms"},{"title":"ADR 27: Add Support For Wasm Based Light Client","href":"/ibc-go/latest/architecture/adr-027-ibc-wasm"}]},{"group":"Changelog","icon":"rotate-ccw","pages":[{"title":"Changelog","mode":"wide","href":"/ibc-go/latest/changelog/release-notes"}]},{"group":"Repositories","icon":"folder-git-2","pages":[{"title":"cosmos/ibc-go","url":"https://github.com/cosmos/ibc-go","icon":"github","href":"/ibc-go/latest/repos/go-ibc-go"}]}]},{"version":"v10.1.x","pages":[{"title":"v10.1.x","href":"/ibc-go/v10.1.x/middleware/callbacks/end-users"}]}]},{"tab":"Specification","pages":[{"title":"Specification","href":"/ibc/spec/ics-001-ics-standard/README"}]}]},"title":"End Users - IBC Documentation","buildId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","deploymentId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","dynamics":[],"chunks":[]}