docs: document TempoOFTWrapper as recommended bridge-out flow#412
Open
letstokenize wants to merge 5 commits into
Open
docs: document TempoOFTWrapper as recommended bridge-out flow#412letstokenize wants to merge 5 commits into
letstokenize wants to merge 5 commits into
Conversation
LayerZero's docs document a TempoOFTWrapper contract (0xbb95daF376cd63F258d7c37a4eFe57c10055E8E0) that bundles wrap, approve, and send into a single transaction, reducing bridge-out from Tempo from 5 txs + quote to 2 txs + quote. The wrapper is in production use (LZ docs, Boltz Exchange integration) but is currently undocumented in Tempo's docs, so users follow the manual flow unnecessarily. Changes: - Update 'Bridge from Tempo' intro to reference both flows and list the three accepted fee tokens (USDC.e, USDT0, pathUSD) per LZ docs - Add 'Recommended: TempoOFTWrapper' section with cast and viem examples using the verified sendOFT ABI - Document maxNativeFee semantics (reverts on re-quote overshoot) - Add warning about wrapper-as-msg.sender breaking compose-with-refund - Add tip about eth_call preflight to avoid dust - Move the existing 5-tx flow under 'Manual flow' as fallback for cases the wrapper can't handle References: - https://docs.layerzero.network/v2/developers/tempo/how-to/support-ofts-and-oapps - ABI verified against BoltzExchange/boltz-web-app integration Co-Authored-By: Uddhav <255779543+letstokenize@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The contracts table at the top of the page is the first place readers look for canonical addresses. Adding TempoOFTWrapper there (alongside EndpointV2 and LZEndpointDollar) ensures it is discoverable before readers scroll into the per-flow walkthroughs and avoids them defaulting to the manual 5-tx flow out of unawareness. Also: - Add a 'Purpose' column to the contracts table so each entry's role is clear at a glance, with anchor links to the relevant section. - Add a one-liner listing the accepted fee tokens (USDC.e, USDT0, pathUSD) under the contracts table, since this is a top-level fact every outbound integrator needs. Co-Authored-By: Uddhav <255779543+letstokenize@users.noreply.github.com>
For all standard bridging the TempoOFTWrapper is functionally equivalent to the 5-tx manual flow. The manual flow is only required for compose messages with refund-to-sender semantics, where the wrapper becoming msg.sender breaks the refund. Carrying the full 5-tx cast walkthrough plus the matching viem example in Tempo docs encouraged readers to copy the worse path. Replace it with a short pointer to LZ's direct-flow reference plus a one-line breakdown of the call sequence so the structure is still discoverable. Net change: ~190 lines removed from bridge-layerzero.mdx; the wrapper flow remains the only fully documented bridge-out path on Tempo docs. Co-Authored-By: Uddhav <255779543+letstokenize@users.noreply.github.com>
The previous draft of this section was top-heavy with framing. Trim it to just what an integrator needs to copy and run: - Drop the 'Recommended:' subheading and the parallel-flow framing. TempoOFTWrapper is the only flow worth documenting in Tempo's docs; the manual escape hatch is one warning callout pointing to LZ docs. - One-line intro: address, what it does, accepted fee tokens. - Cast walkthrough: 3 short steps (quote, approve, send) with the delivery-tracking URL folded into the send step. - viem example: ~50 lines down from ~140. Use parseAbi for the wrapper signature instead of expanding the full nested ABI by hand. - Drop the eth_call dust-preflight tip (advanced UX detail, not needed for the canonical example). Co-Authored-By: Uddhav <255779543+letstokenize@users.noreply.github.com>
- Restore the 'Verify transaction status' step in the cast walkthrough. Folding it into the Send step's prose hid the LZ scan URL behind a paragraph; integrators expect a numbered step they can copy. - Put --rpc-url and --private-key on separate lines in the approve and send blocks. Matches the formatting used everywhere else on the page (Bridge to Tempo + manual flow examples). Co-Authored-By: Uddhav <255779543+letstokenize@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds documentation for
TempoOFTWrapper(0xbb95daF376cd63F258d7c37a4eFe57c10055E8E0), which collapses the bridge-out flow from 5 transactions + quote → 2 transactions + quote by bundlingwrap,approve, andsendatomically.Why
LayerZero's "Support OFTs and OApps on Tempo" doc treats this wrapper as the default integration path, and Boltz Exchange uses it in production (see
directSend.ts). Tempo docs currently only document the manual 5-tx flow, so anyone following Tempo's docs writes more code than they need to and pays more gas than required.It also introduces a few related facts that LZ docs include but Tempo docs omit:
USDC.e,USDT0, orpathUSD.sendOFTreverts atomically if the re-quoted fee at execution exceedsmaxNativeFee(slippage protection on the fee, not just the bridged amount).msg.sender— funds get refunded to the wrapper and are lost. Documented as a warning, with the manual flow kept as the supported alternative for that case.Changes
### Recommended: TempoOFTWrapperwith:sendOFTsendOFTABIeth_call### Manual flowas the fallback for compose-with-refund cases.Verification
The
sendOFTABI used here is verified against Boltz Exchange's TypeScript integration:Selector:
0xef9c7618. Contract has bytecode (~10KB) at0xbb95daF376cd63F258d7c37a4eFe57c10055E8E0on Tempo mainnet (verified viacast code).Related
OFTAlt/OFTAdapterAlt/OFTBurnSelfMintAltfor OFT deployersaddExecutorNativeDropOptionreverts on TempoenforcedOptionsguidance for inboundlzReceivegas