Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.
When sending crosschain messages, the source chain has no knowledge of the destination chain’s state or the resources required to execute a transaction on it. Message Execution Options provide a standardized way to specify the execution requirements for transactions on the destination chain.You can think of options as serialized requests in bytes that inform the off-chain infrastructure (DVNs and Executors) how to handle the execution of your message on the destination chain.See Message Options for more details on why Options exist in the LayerZero protocol.
Specifies the gas values and response data size the Executor uses when delivering lzRead responses.
Since the return data size is not known to the Executor ahead of time, you must estimate the expected response data size. This size is priced into the Executor’s fee formula. Failure to correctly estimate the return data size will result in the Executor not delivering the response.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LayerZero","colors":{"primary":"#c084fc","light":"#c084fc","dark":"#c084fc"},"logo":{"light":"https://mintcdn.com/layerzero/MzSiOdXt8xlDlEr4/images/LayerZero_Logo_Black.svg?fit=max\u0026auto=format\u0026n=MzSiOdXt8xlDlEr4\u0026q=85\u0026s=091b05c7556f6e8e948d613c2abf58cb","dark":"https://mintcdn.com/layerzero/MzSiOdXt8xlDlEr4/images/LayerZero_Logo_White.svg?fit=max\u0026auto=format\u0026n=MzSiOdXt8xlDlEr4\u0026q=85\u0026s=d6e58e0cf42c989a1fed9d1345e2d23a"},"favicon":"https://mintcdn.com/layerzero/qVdya_xVZRutFzkr/favicon.png?fit=max\u0026auto=format\u0026n=qVdya_xVZRutFzkr\u0026q=85\u0026s=c7fc37affda645fb663525dcbfc7a3a4","appearance":{"default":"dark"},"navbar":{"primary":{"type":"button","label":"LayerZero Scan","href":"https://layerzeroscan.com"}},"footer":{"socials":{"github":"https://github.com/LayerZero-Labs/LayerZero-v2","x":"https://x.com/layerzero_core","discord":"https://discord.com/invite/ktbvm8Nkcr","youtube":"https://www.youtube.com/@LayerZeroLabs","website":"https://layerzero.network/blog"}},"seo":{"metatags":{"og:site_name":"LayerZero Documentation","twitter:card":"summary_large_image","twitter:site":"@LayerZero_Labs"}},"fonts":{"heading":{"family":"Roboto"},"body":{"family":"Roboto"}},"contextual":{"options":["copy","cursor","vscode","mcp","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://layerzero.network/blog"},{"anchor":"GitHub","icon":"github","href":"https://github.com/LayerZero-Labs"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"layerzero","hasAudioNarration":false,"actualSubdomain":"layerzero","customDomains":["docs.layerzero.network"],"gitSource":{"type":"github","owner":"layerzero-labs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ac831340109de95c3c06c54","collectionId":"caee5397-a3ba-41bd-95a7-8fd4a7ce8a21","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac831340109de95c3c06c54"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ac831340109de95c3c06c54","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Contracts \u0026 Deployments","count":179},{"language":"default","tag":"V2 Deployments","count":133},{"language":"default","tag":"Mainnet Endpoints","count":123},{"language":"default","tag":"Developers","count":122},{"language":"default","tag":"Core Concepts","count":39},{"language":"default","tag":"Developer Tools","count":35},{"language":"default","tag":"EVM","count":32},{"language":"default","tag":"Technical Reference","count":24},{"language":"default","tag":"Testnet Endpoints","count":20},{"language":"default","tag":"Contract Standards","count":20}]},"assistantConfig":{"enableStarterQuestions":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"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":"full-page-search","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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--lz-bg-primary:#fafafa;--lz-bg-secondary:#f5f5f5;--lz-text-primary:#171717;--lz-text-secondary:#5c5c5c;--lz-border-primary:#e5e5e5;--lz-purple-400:#c084fc;--lz-purple-500:#a855f7;--lz-purple-600:#9333ea;--lz-stargate-400:#0fb983;--lz-stargate-500:#10a073;--background-light:250 250 250!important;--background-dark:10 10 10!important}html[class~=dark]{--lz-bg-primary:#0a0a0a;--lz-bg-secondary:#171717;--lz-text-primary:#f0f0f0;--lz-text-secondary:#a3a3a3;--lz-border-primary:#2b2b2b}html[class~=dark],html[class~=dark] body{background-color:#0a0a0a!important}html:not([class~=dark]),html:not([class~=dark]) body{background-color:#fafafa!important}.custom-button{display:inline-flex!important;align-items:center;justify-content:center;padding:.5rem 1rem;border-radius:.375rem;font-weight:600;transition:color 100ms,background-color 100ms,border-color 100ms;cursor:pointer}.custom-button,.custom-button:hover{text-decoration:none!important}.custom-button-primary{background-color:#0a0a0a;color:#f2f2f2!important;border:1px solid transparent}.custom-button-primary:hover{opacity:.9;color:#f2f2f2!important}.custom-button-secondary{background-color:transparent;color:#0a0a0a!important;border:1px solid #0a0a0a}.custom-button-secondary:hover{background-color:#0a0a0a;color:#f2f2f2!important}html[class~=dark] .custom-button-primary{background-color:#f2f2f2;color:#0a0a0a!important}html[class~=dark] .custom-button-primary:hover{color:#0a0a0a!important}html[class~=dark] .custom-button-secondary{color:#f2f2f2!important;border-color:#f2f2f2}html[class~=dark] .custom-button-secondary:hover{background-color:#f2f2f2;color:#0a0a0a!important}a[href=\"/v2/developers/solana/overview\"] svg{-webkit-mask-image:url(/images/icons/solana-mask.svg)!important;mask-image:url(/images/icons/solana-mask.svg)!important}a[href=\"/v2/developers/aptos-move/overview\"] svg{-webkit-mask-image:url(/images/icons/aptos-mask.svg)!important;mask-image:url(/images/icons/aptos-mask.svg)!important}a[href=\"/v2/developers/hyperliquid/hyperliquid-concepts\"] svg{-webkit-mask-image:url(/images/icons/hyperliquid-mask.svg)!important;mask-image:url(/images/icons/hyperliquid-mask.svg)!important}a[href=\"/v2/developers/sui/overview\"] svg{-webkit-mask-image:url(/images/icons/sui-mask.svg)!important;mask-image:url(/images/icons/sui-mask.svg)!important}a[href=\"/v2/developers/iota/overview\"] svg{-webkit-mask-image:url(/images/icons/iota-mask.svg)!important;mask-image:url(/images/icons/iota-mask.svg)!important}a[href=\"/chain\"] svg,a[href=\"/chain/index\"] svg{-webkit-mask-image:url(/images/icons/zero-mask.svg)!important;mask-image:url(/images/icons/zero-mask.svg)!important}a[href=\"/v2/developers/evm/overview\"] svg{-webkit-mask-image:url(/images/icons/ethereum-mask.svg)!important;mask-image:url(/images/icons/ethereum-mask.svg)!important}a[href=\"/v2/developers/stellar/overview\"] svg{-webkit-mask-image:url(/images/icons/stellar-mask.svg)!important;mask-image:url(/images/icons/stellar-mask.svg)!important}a[href=\"/v2/developers/tempo\"] svg,a[href=\"/v2/developers/tempo/overview\"] svg{-webkit-mask-image:url(/images/icons/tempo-mark-white.svg)!important;mask-image:url(/images/icons/tempo-mark-white.svg)!important}.lz-mobile-nav-dialog{touch-action:manipulation;-webkit-tap-highlight-color:transparent;overflow-y:hidden!important}.lz-mobile-nav-dialog .overflow-y-auto{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.lz-mobile-nav-dialog a,.lz-mobile-nav-dialog button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;min-height:44px;display:flex;align-items:center}#navbar-transition{pointer-events:none}html.lz-ios-scroll-lock{position:fixed;width:100%;height:100%;overflow:hidden}#footer a[href*=\"mintlify.com\"][href*=poweredBy]{display:none!important}img.nav-logo{width:102px!important;height:28px!important;aspect-ratio:109/30}.lz-content-wrapper{position:relative}.lz-content-video-bg{position:absolute;top:0;left:50%;transform:translateX(-50%);width:100vw;max-width:900px;height:280px;overflow:hidden;pointer-events:none;z-index:0;mask-image:linear-gradient(to bottom,#000 0,#000 50%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 50%,transparent 100%)}.lz-content-video{width:100%;height:100%;object-fit:cover;object-position:center top;opacity:0}html[class~=dark] .lz-content-video{opacity:.25}@media (min-width:900px){.lz-content-video-bg{border-radius:12px}}.lz-mobile-card-header,.lz-mobile-icon-wrapper{display:flex!important;align-items:center!important}.lz-mobile-card-header{flex-direction:row!important;gap:12px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #e5e7eb}.lz-mobile-icon-wrapper{justify-content:center!important;flex-shrink:0}.lz-mobile-icon-wrapper [data-rmiz-content],.lz-mobile-icon-wrapper [data-rmiz]{display:block!important;width:100%!important;height:100%!important;line-height:normal!important;margin:0!important;padding:0!important}.lz-mobile-card-title{font-size:18px!important;font-weight:700!important;margin:0!important;line-height:1.2!important;color:#000}html[class~=dark] .lz-mobile-card-header{border-bottom-color:rgba(255,255,255,.1)}html[class~=dark] .lz-mobile-card-title{color:#fff}a[data-accent]>div{background-color:#fff!important;border-color:#e5e5e5!important;border-width:2px!important;border-style:solid!important}html[class~=dark] a[data-accent]>div{background-color:#0a0a0a!important;border-color:#2b2b2b!important}a[data-accent] h3{color:#171717!important;font-weight:600!important}html[class~=dark] a[data-accent] h3{color:#fafafa!important}a[data-accent] p{color:#525252!important}html[class~=dark] a[data-accent] p{color:#a1a1a1!important}a[data-accent] svg:last-child{color:#a1a1a1!important}html[class~=dark] a[data-accent] svg:last-child{color:#525252!important}a[data-accent=purple]:hover h3{color:#9333ea!important}html[class~=dark] a[data-accent=purple]:hover h3{color:#c084fc!important}a[data-accent=purple]:hover>div{border-color:#9333ea!important}html[class~=dark] a[data-accent=purple]:hover>div{border-color:#c084fc!important}a[data-accent=purple]:hover svg:last-child{color:#9333ea!important}html[class~=dark] a[data-accent=purple]:hover svg:last-child{color:#c084fc!important}a[data-accent=stargate]:hover h3{color:#10a073!important}html[class~=dark] a[data-accent=stargate]:hover h3{color:#0fb983!important}a[data-accent=stargate]:hover>div{border-color:#10a073!important}html[class~=dark] a[data-accent=stargate]:hover>div{border-color:#0fb983!important}a[data-accent=stargate]:hover svg:last-child{color:#10a073!important}html[class~=dark] a[data-accent=stargate]:hover svg:last-child{color:#0fb983!important}a[data-accent=gray]:hover h3{color:#525252!important}html[class~=dark] a[data-accent=gray]:hover h3{color:#d4d4d4!important}a[data-accent=gray]:hover>div{border-color:#a1a1a1!important}html[class~=dark] a[data-accent=gray]:hover>div{border-color:#525252!important}a[data-accent=gray]:hover svg:last-child{color:#525252!important}html[class~=dark] a[data-accent=gray]:hover svg:last-child{color:#d4d4d4!important}"}],"page":{"pagePath":"v2/tools/sdks/options","slug":"/v2/tools/sdks/options","pageMetadata":{"title":"Message Execution Options","sidebarTitle":"Message Execution Options","description":"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.","keywords":["LayerZero","tools","developer","SDK"],"lastUpdated":"2025-01-13","author":"LayerZero","schema":"HowTo","related":["/v2/tools/sdks/solana-sdk","/v2/tools/api/oft-examples","/v2/tools/api/oft"],"href":"/v2/tools/sdks/options"},"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: \"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\"\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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`When sending crosschain messages, the source chain has no knowledge of the destination chain’s state or the resources required to execute a transaction on it. `,_jsx(_components.strong,{children:`Message Execution Options`}),` provide a standardized way to specify the execution requirements for transactions on the destination chain.`]}),`\n`,_jsxs(_components.p,{children:[`You can think of `,_jsx(_components.code,{children:`options`}),` as serialized requests in `,_jsx(_components.code,{children:`bytes`}),` that inform the off-chain infrastructure (`,_jsx(_components.code,{children:`DVNs`}),` and `,_jsx(_components.code,{children:`Executors`}),`) how to handle the execution of your message on the destination chain.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/v2/concepts/message-options`,children:`Message Options`}),` for more details on why Options exist in the LayerZero protocol.`]}),`\n`,_jsx(Heading,{level:`2`,id:`options-builders`,children:`Options Builders`}),`\n`,_jsx(_components.p,{children:`LayerZero provides tools to build specific Message Execution Options for your application:`}),`\n`,_jsx(Heading,{level:`3`,id:`evm`,children:`EVM`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OptionsBuilder.sol`}),`: Can be imported from `,_jsx(_components.a,{href:`https://www.npmjs.com/package/@layerzerolabs/oapp-evm`,children:_jsx(_components.code,{children:`@layerzerolabs/oapp-evm`})})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`options.ts`}),`: Can be imported from `,_jsx(_components.a,{href:`https://www.npmjs.com/package/@layerzerolabs/lz-v2-utilities`,children:_jsx(_components.code,{children:`@layerzerolabs/lz-v2-utilities`})})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`aptos-\u0026-solana`,children:`Aptos \u0026 Solana`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`options.ts`}),`: Can be imported from `,_jsx(_components.a,{href:`https://www.npmjs.com/package/@layerzerolabs/lz-v2-utilities`,children:_jsx(_components.code,{children:`@layerzerolabs/lz-v2-utilities`})})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`generating-options`,children:`Generating Options`}),`\n`,_jsx(Heading,{level:`3`,id:`evm-solidity`,children:`EVM (Solidity)`}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`5`,language:`solidity`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`solidity`,children:_jsxs(_components.code,{language:`solidity`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` OptionsBuilder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bytes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` memory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` options `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OptionsBuilder.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorLzReceiveOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`all-chains-typescript`,children:`All Chains (TypeScript)`}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@layerzerolabs/lz-v2-utilities'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorLzReceiveOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gas_limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`option-types`,children:`Option Types`}),`\n`,_jsxs(Heading,{level:`3`,id:`lzreceive-option`,children:[_jsx(_components.code,{children:`lzReceive`}),` Option`]}),`\n`,_jsxs(_components.p,{children:[`Specifies the gas values the Executor uses when calling `,_jsx(_components.code,{children:`lzReceive`}),` on the destination chain.`]}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorLzReceiveOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gas_limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`lzread-option`,children:[_jsx(_components.code,{children:`lzRead`}),` Option`]}),`\n`,_jsx(_components.p,{children:`Specifies the gas values and response data size the Executor uses when delivering lzRead responses.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Since the return data size is not known to the Executor ahead of time, you must estimate the expected response data size. This size is priced into the Executor’s fee formula. Failure to correctly estimate the return data size will result in the Executor not delivering the response.`})}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorLzReadOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gas_limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`return_data_size`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`gas_limit`}),`: The amount of gas for delivering the lzRead response`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`return_data_size`}),`: The estimated size (in bytes) of the response data from the read operation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`msg_value`}),`: The `,_jsx(_components.code,{children:`msg.value`}),` for the call`]}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`lzcompose-option`,children:[_jsx(_components.code,{children:`lzCompose`}),` Option`]}),`\n`,_jsxs(_components.p,{children:[`Allocates gas and value for `,_jsx(_components.strong,{children:`Composed Messages`}),` on the destination chain.`]}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorLzComposeOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gas_limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg_value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`_index`}),`: The index of the `,_jsx(_components.code,{children:`lzCompose()`}),` function call`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`_gas`}),`: The gas amount for the lzCompose call`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`_value`}),`: The `,_jsx(_components.code,{children:`msg.value`}),` for the call`]}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`lznativedrop-option`,children:[_jsx(_components.code,{children:`lzNativeDrop`}),` Option`]}),`\n`,_jsx(_components.p,{children:`Specifies how much native gas to drop to any address on the destination chain.`}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorNativeDropOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`receiverAddressInBytes32`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`_amount`}),`: The amount of gas in wei/lamports to drop`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`_receiver`}),`: The `,_jsx(_components.code,{children:`bytes32`}),` representation of the receiver address`]}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`orderedexecution-option`,children:[_jsx(_components.code,{children:`OrderedExecution`}),` Option`]}),`\n`,_jsx(_components.p,{children:`Enables ordered message delivery, overriding the default unordered delivery.`}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addExecutorOrderedExecutionOption`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`chain-specific-considerations`,children:`Chain-Specific Considerations`}),`\n`,_jsx(Heading,{level:`3`,id:`evm-chains`,children:`EVM Chains`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Gas values are specified in wei`}),`\n`,_jsx(_components.li,{children:`Gas costs vary by chain and opcode pricing`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`aptos`,children:`Aptos`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Gas units are similar to EVM but may have different costs`}),`\n`,_jsxs(_components.li,{children:[`Recommended starting gas limit: 1,500 units for `,_jsx(_components.code,{children:`lzReceive`})]}),`\n`,_jsx(_components.li,{children:`Uses APT as native token`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`solana`,children:`Solana`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Uses compute units instead of gas`}),`\n`,_jsx(_components.li,{children:`For SPL token ATAs, rent-exempt minimum is 0.00203928 SOL (2,039,280 lamports); Token-2022 accounts may require more depending on enabled extensions`}),`\n`,_jsx(_components.li,{children:`Native token drops are in lamports`}),`\n`,_jsx(_components.li,{children:`Programs pull SOL from sender’s account rather than pushing with transaction`}),`\n`,_jsxs(_components.li,{children:[`Prefer per-tx `,_jsx(_components.code,{children:`extraOptions`}),` with `,_jsx(_components.code,{children:`gas=0`}),` and non-zero `,_jsx(_components.code,{children:`msg.value`}),` only if the recipient’s `,_jsx(_components.a,{href:`https://www.alchemy.com/overviews/associated-token-account`,children:`Associated Token Account (ATA)`}),` is missing; enforce gas via app-level `,_jsx(_components.code,{children:`enforcedOptions`}),` (options are combined). See `,_jsx(_components.a,{href:`/v2/developers/solana/oft/overview#conditional-msgvalue-for-ata-creation`,children:`Solana OFT: Conditional msg.value for ATA creation`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`determining-gas-costs`,children:`Determining Gas Costs`}),`\n`,_jsx(Heading,{level:`3`,id:`tenderly`,children:`Tenderly`}),`\n`,_jsxs(_components.p,{children:[`For supported chains, the `,_jsx(_components.a,{href:`https://dashboard.tenderly.co/explorer`,children:`Tenderly Gas Profiler`}),` can help determine optimal gas values:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Deploy and test your contract`}),`\n`,_jsx(_components.li,{children:`Use Tenderly to profile actual gas usage`}),`\n`,_jsx(_components.li,{children:`Set your options slightly above the profiled amount`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`testing`,children:`Testing`}),`\n`,_jsx(_components.p,{children:`Always test your gas settings thoroughly:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Start with conservative estimates`}),`\n`,_jsx(_components.li,{children:`Profile actual usage`}),`\n`,_jsx(_components.li,{children:`Adjust based on real-world performance`}),`\n`,_jsx(_components.li,{children:`Consider chain-specific gas mechanisms`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Gas Profiling`}),`: Always profile your contract’s gas usage on each target chain`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Conservative Estimates`}),`: Start with higher gas limits and adjust down`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Chain-Specific Testing`}),`: Test thoroughly on each target chain`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Native Caps`}),`: Check Executor’s native cap for each pathway`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multiple Options`}),`: Consider combining options for complex scenarios`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`further-reading`,children:`Further Reading`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://ethereum.org/en/developers/docs/gas/`,children:`EVM Gas Documentation`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://aptos.dev/en/network/blockchain/gas-txn-fee`,children:`Aptos Gas Fees`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://solana.com/docs/core/fees`,children:`Solana Compute Units`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/v2/concepts/permissionless-execution/executors`,children:`LayerZero Executors`})}),`\n`]})]})}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":{"config":{},"pageMetadata":{"title":"Message Execution Options","sidebarTitle":"Message Execution Options","description":"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.","keywords":["LayerZero","tools","developer","SDK"],"lastUpdated":"2025-01-13","author":"LayerZero","schema":"HowTo","related":["/v2/tools/sdks/solana-sdk","/v2/tools/api/oft-examples","/v2/tools/api/oft"],"href":"/v2/tools/sdks/options"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Options Builders","slug":"options-builders","depth":2,"children":[{"title":"EVM","slug":"evm","depth":3,"children":[]},{"title":"Aptos \u0026 Solana","slug":"aptos-\u0026-solana","depth":3,"children":[]}]},{"title":"Generating Options","slug":"generating-options","depth":2,"children":[{"title":"EVM (Solidity)","slug":"evm-solidity","depth":3,"children":[]},{"title":"All Chains (TypeScript)","slug":"all-chains-typescript","depth":3,"children":[]}]},{"title":"Option Types","slug":"option-types","depth":2,"children":[{"title":"lzReceive Option","slug":"lzreceive-option","depth":3,"children":[]},{"title":"lzRead Option","slug":"lzread-option","depth":3,"children":[]},{"title":"lzCompose Option","slug":"lzcompose-option","depth":3,"children":[]},{"title":"lzNativeDrop Option","slug":"lznativedrop-option","depth":3,"children":[]},{"title":"OrderedExecution Option","slug":"orderedexecution-option","depth":3,"children":[]}]},{"title":"Chain-Specific Considerations","slug":"chain-specific-considerations","depth":2,"children":[{"title":"EVM Chains","slug":"evm-chains","depth":3,"children":[]},{"title":"Aptos","slug":"aptos","depth":3,"children":[]},{"title":"Solana","slug":"solana","depth":3,"children":[]}]},{"title":"Determining Gas Costs","slug":"determining-gas-costs","depth":2,"children":[{"title":"Tenderly","slug":"tenderly","depth":3,"children":[]},{"title":"Testing","slug":"testing","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]},{"title":"Further Reading","slug":"further-reading","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/layerzero/355391ae19c1d258/accessibility.js","/_mintlify/custom/layerzero/714d41473c4c265e/posthog.js","/_mintlify/custom/layerzero/747cfa09f827dae8/snippets/contractAbis.js","/_mintlify/custom/layerzero/e4d3be41c98f3ab2/scripts/generate-chain-pages.js","/_mintlify/custom/layerzero/7530b00fc4b5bdca/scripts/update-deployments/constants.js","/_mintlify/custom/layerzero/c2a5b61ad6c140da/scripts/update-deployments/index.js"],"subdomain":"layerzero","siteName":"LayerZero","title":"Message Execution Options - LayerZero","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-27T20:51:19.178Z","originalFileLocation":"v2/tools/sdks/options.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=\"dark\"}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=\"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LayerZero\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_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=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Message Execution Options - LayerZero\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LayerZero Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.layerzero.network/v2/tools/sdks/options\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://layerzero.mintlify.app/_mintlify/api/og/v2?division=SDKs\u0026amp;title=Message+Execution+Options\u0026amp;description=Use+Message+Execution+Options+with+LayerZero+V2.+Developer+tools+for+building+and+debugging+omnichain+applications.+LayerZero+enables+crosschain+messaging.\u0026amp;theme=28e43194b2d92b2885f4b3d8\u0026amp;signature=44eadaa38912116ee4bf0a0be9c272333414918d057c732cf7b3863e101a6897\">\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=\"Message Execution Options - LayerZero\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://layerzero.mintlify.app/_mintlify/api/og/v2?division=SDKs\u0026amp;title=Message+Execution+Options\u0026amp;description=Use+Message+Execution+Options+with+LayerZero+V2.+Developer+tools+for+building+and+debugging+omnichain+applications.+LayerZero+enables+crosschain+messaging.\u0026amp;theme=28e43194b2d92b2885f4b3d8\u0026amp;signature=44eadaa38912116ee4bf0a0be9c272333414918d057c732cf7b3863e101a6897\">\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=\"/mintlify-assets/_mintlify/favicons/layerzero/kyEYRB05_wMqZ8Gi/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LayerZero\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c084fc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.layerzero.network/v2/tools/sdks/options\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/tools/sdks/options.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.layerzero.network/#organization\",\"name\":\"LayerZero\",\"url\":\"https://docs.layerzero.network\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/layerzero/MzSiOdXt8xlDlEr4/images/LayerZero_Logo_Black.svg?fit=max\u0026auto=format\u0026n=MzSiOdXt8xlDlEr4\u0026q=85\u0026s=091b05c7556f6e8e948d613c2abf58cb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.layerzero.network#website\",\"name\":\"LayerZero\",\"url\":\"https://docs.layerzero.network\",\"publisher\":{\"@id\":\"https://docs.layerzero.network/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.layerzero.network/v2/tools/sdks/options#webpage\",\"url\":\"https://docs.layerzero.network/v2/tools/sdks/options\",\"name\":\"Message Execution Options\",\"description\":\"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\",\"dateModified\":\"2026-01-27T20:51:19.178Z\",\"isPartOf\":{\"@id\":\"https://docs.layerzero.network#website\"},\"breadcrumb\":{\"@id\":\"https://docs.layerzero.network/v2/tools/sdks/options#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.layerzero.network/v2/tools/sdks/options#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LayerZero\",\"item\":\"https://docs.layerzero.network\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Message Execution Options\",\"item\":\"https://docs.layerzero.network/v2/tools/sdks/options\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.layerzero.network/v2/tools/sdks/options#article\",\"headline\":\"Message Execution Options\",\"name\":\"Message Execution Options\",\"description\":\"Use Message Execution Options with LayerZero V2. Developer tools for building and debugging omnichain applications. LayerZero enables crosschain messaging.\",\"url\":\"https://docs.layerzero.network/v2/tools/sdks/options\",\"mainEntityOfPage\":{\"@id\":\"https://docs.layerzero.network/v2/tools/sdks/options#webpage\"},\"dateModified\":\"2026-01-27T20:51:19.178Z\",\"keywords\":\"LayerZero, tools, developer, SDK\",\"publisher\":{\"@id\":\"https://docs.layerzero.network/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.layerzero.network#website\"}}]}\u003c/script>","siteName":"LayerZero","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://layerzero.network/blog"},{"anchor":"GitHub","icon":"github","href":"https://github.com/LayerZero-Labs"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Get Started","pages":[{"title":"Get Started","href":"/v2/get-started/overview"}]},{"tab":"Core Concepts","pages":[{"title":"Core Concepts","href":"/v2/concepts/getting-started/what-is-layerzero"}]},{"tab":"Developers","menu":[{"item":"Zero","icon":"circle","pages":[{"title":"Zero","href":"/chain"}]},{"item":"EVM","icon":"circle","pages":[{"title":"EVM","href":"/v2/developers/evm/overview"}]},{"item":"Solana","icon":"circle","pages":[{"title":"Solana","href":"/v2/developers/solana/overview"}]},{"item":"Starknet","icon":"https://mintlify.s3.us-west-1.amazonaws.com/layerzero/images/icons/starknet.svg","pages":[{"title":"Starknet","href":"/v2/developers/starknet/overview"}]},{"item":"Aptos Move","icon":"code","pages":[{"title":"Aptos Move","href":"/v2/developers/aptos-move/overview"}]},{"item":"Hyperliquid","icon":"droplet","pages":[{"title":"Hyperliquid","href":"/v2/developers/hyperliquid/hyperliquid-concepts"}]},{"item":"Sui","icon":"waves","pages":[{"title":"Sui","href":"/v2/developers/sui/overview"}]},{"item":"Stellar","icon":"star","pages":[{"title":"Stellar","href":"/v2/developers/stellar/overview"}]},{"item":"IOTA L1","icon":"hexagon","pages":[{"title":"IOTA L1","href":"/v2/developers/iota/overview"}]},{"item":"Tempo","icon":"circle","pages":[{"title":"Tempo","href":"/v2/developers/tempo/overview"}]},{"item":"Value Transfer API","icon":"arrow-right-arrow-left","pages":[{"title":"Value Transfer API","href":"/v2/developers/value-transfer-api/start"}]}],"pages":[{"title":"Developers","href":"/chain"}]},{"tab":"Contracts \u0026 Deployments","menu":[{"item":"V2 Deployments","icon":"file-text","pages":[{"title":"V2 Deployments","href":"/v2/deployments/deployed-contracts"}]},{"item":"V1 Deployments","icon":"file-code","pages":[{"title":"V1 Deployments","href":"/v1/deployments/deployed-contracts"}]},{"item":"Developer Tools","icon":"wrench","groups":[{"group":"Tools Overview","pages":[{"title":"LayerZero Tools Overview","sidebarTitle":"LayerZero Tools Overview","href":"/v2/tools/overview"},{"title":"LayerZero Endpoint V2 Examples and Developer Tooling","sidebarTitle":"LayerZero Examples and Packages","href":"/v2/tools/devtools"},{"title":"Download LLM Files","sidebarTitle":"AI Resources","href":"/v2/ai-resources"}]},{"group":"MCP Server","pages":[{"title":"MCP Server for LayerZero Docs","sidebarTitle":"MCP Overview","href":"/v2/tools/mcp/overview"},{"title":"Connect Your AI Tools to LayerZero Docs","sidebarTitle":"IDE Setup","href":"/v2/tools/mcp/ide-setup"}]},{"group":"Integration","pages":[{"title":"Integration Checklist","sidebarTitle":"Integration Checklist","href":"/v2/tools/integration-checklist"}]},{"group":"Simple Config Generator","pages":[{"title":"LayerZero Simple Config Generator","sidebarTitle":"Simple Config Generator","href":"/v2/tools/simple-config"},{"title":"Migrate to Simple Config","sidebarTitle":"Migrate to Simple Config","href":"/v2/tools/migrate-to-simple-config"}]},{"group":"Create LZ OApp CLI","pages":[{"title":"create-lz-oapp CLI guide","sidebarTitle":"CLI Guide","href":"/v2/tools/create-lz-oapp-cli/guide"},{"title":"Recreating Deployments","sidebarTitle":"Recreating Deployments","href":"/v2/tools/create-lz-oapp-cli/recreating-deployments"}]},{"group":"LayerZero Scan API","pages":[{"title":"LayerZero Scan Overview","sidebarTitle":"LayerZero Scan Overview","href":"/v2/tools/layerzeroscan/overview"},{"title":"LayerZero Scan Swagger API","sidebarTitle":"LayerZero Scan Swagger API","href":"/v2/tools/layerzeroscan/api"},{"group":"Mainnet Endpoints","pages":[{"group":"messages","pages":[{"title":"Get messageslatest","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/latest","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messageslatest"},{"title":"Get messagespathway","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/pathway/{pathwayId}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messagespathway"},{"title":"Get messagestx","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/tx/{tx}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messagestx"},{"title":"Get messagesstatus","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/status/{status}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messagesstatus"},{"title":"Get messagesoapp ","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/oapp/{eid}/{address}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messagesoapp-"},{"title":"Get messagesguid","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/guid/{guid}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messagesguid"},{"title":"Get messageswallet","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /messages/wallet/{srcAddress}","href":"/v2/tools/layerzeroscan/mainnet/messages/get-messageswallet"}]},{"group":"openapi","pages":[{"title":"Get openapi","deprecated":null,"version":null,"openapi":"/openapi/scan-mainnet.json get /openapi","href":"/v2/tools/layerzeroscan/mainnet/openapi/get-openapi"}]}]},{"group":"Testnet Endpoints","pages":[{"group":"messages","pages":[{"title":"Get messageslatest","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/latest","href":"/v2/tools/layerzeroscan/testnet/messages/get-messageslatest"},{"title":"Get messagespathway","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/pathway/{pathwayId}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messagespathway"},{"title":"Get messagestx","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/tx/{tx}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messagestx"},{"title":"Get messagesstatus","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/status/{status}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messagesstatus"},{"title":"Get messagesoapp ","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/oapp/{eid}/{address}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messagesoapp-"},{"title":"Get messagesguid","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/guid/{guid}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messagesguid"},{"title":"Get messageswallet","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /messages/wallet/{srcAddress}","href":"/v2/tools/layerzeroscan/testnet/messages/get-messageswallet"}]},{"group":"openapi","pages":[{"title":"Get openapi","deprecated":null,"version":null,"openapi":"/openapi/scan-testnet.json get /openapi","href":"/v2/tools/layerzeroscan/testnet/openapi/get-openapi"}]}]},{"title":"LayerZero Scan API Terms of Use","sidebarTitle":"LayerZero Scan API Terms of Us","href":"/v2/tools/layerzeroscan/terms"}]},{"group":"OFT API","pages":[{"group":"OFT Endpoints","pages":[{"group":"ofts","pages":[{"title":"Get list","deprecated":null,"version":null,"openapi":"/openapi/oft-mainnet.json get /list","href":"/api-reference/ofts/get-list"},{"title":"Get transfer","deprecated":null,"version":null,"openapi":"/openapi/oft-mainnet.json get /transfer","href":"/api-reference/ofts/get-transfer"}]},{"group":"openapi","pages":[{"title":"Get openapi","description":"OpenAPI specs.","deprecated":null,"version":null,"openapi":"/openapi/oft-mainnet.json get /openapi","href":"/api-reference/openapi/get-openapi"}]}]}]},{"group":"SDKs","pages":[{"title":"Message Execution Options","sidebarTitle":"Message Execution Options","href":"/v2/tools/sdks/options"},{"title":"LayerZero Solana SDK","sidebarTitle":"LayerZero Solana SDK","description":"Step-by-step guide to layerzero solana sdk using LayerZero V2. Build and deploy omnichain applications with crosschain messaging. Follow step-by-step develo...","href":"/v2/tools/sdks/solana-sdk"},{"title":"LayerZero Endpoint Metadata","sidebarTitle":"LayerZero Endpoint Metadata","href":"/v2/tools/endpoint-metadata"}]}]},{"item":"DVN \u0026 Executor Reference","icon":"shield-halved","pages":[{"title":"DVN \u0026 Executor Reference","href":"/v2/workers/overview"}]}]}]},"basePath":"","title":"Message Execution Options - LayerZero","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}