OmniRoute — Unified Swap + Bridge Router
One skill for any "get token A on chain X into token B on chain Y" request. It combines
two engines and selects the best complete executable route, not just the best quote:
| Engine |
Base URL |
Strengths |
| WOOFi V2 |
https://sapi.woofi.com |
Best-price same-chain swaps (WooPP + 1inch + ODOS), simple cross-chain on 14 EVM chains. Chain names + token symbols, human-readable amounts, no auth. Rate limit 5 req/s. |
| LayerZero Value Transfer |
https://transfer.layerzero-api.com/v1 |
Broad multi-chain bridging (EVM, Solana, Aptos, TON…) via OFT / Stargate / CCTP / Aori. Status polling with explorer URLs. Proxied auth via core.http_client. |
Do not hard-code chain/token coverage claims — discover live via LayerZero
GET /v1/chains and GET /v1/tokens, and WOOFi's chain table below.
Step 0 — Classify the request
- Same-chain swap on an EVM chain → WOOFi (
/v2/swap). LayerZero does not do
same-chain swaps.
- Cross-chain, both chains in WOOFi's 14 EVM list, both tokens ERC-20/native →
quote both engines and select per the route-ranking rules in Step 2.
- Any non-EVM chain (Solana, Aptos, TON, Tron…), or a chain outside WOOFi's list,
or native-USDC-via-CCTP preference → LayerZero only.
- Swap needed on the destination that LayerZero can't fulfill → chain the engines:
LayerZero bridge first, then WOOFi swap on the destination chain (two confirmations,
gas on both chains — tell the user, and include destination gas in the comparison).
WOOFi's documented v2 chain set (validate support at execution time — treat an API
error as "unsupported", not a bug): arbitrum, base, bsc, polygon, optimism, avalanche,
ethereum, linea, mantle, sonic, berachain, hyperevm, monad, zksync.
Native-token handling differs per engine:
- WOOFi (EVM only): use the symbol (
"ETH", "BNB", "AVAX", "POL", "MNT",
"S", "BERA", "MON") or the EVM placeholder
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.
- LayerZero: do NOT assume a universal placeholder. Resolve the native/token
address per chain via
GET /v1/chains (nativeCurrency.address) and
GET /v1/tokens — non-EVM chains (Solana, Aptos, TON…) use different address
formats entirely.
Step 1 — Pre-flight validation (two stages)
A better quote can still be an unexecutable route. Exact gas requirements are unknown
before transaction construction, so validation happens in two stages:
Stage A — before quoting:
- Source token balance covers the sell amount (fetch on-chain, using the token's
real
decimals — never assume 18).
- Token identity: confirm chain ID, token address, decimals, and symbol together.
Never trust symbol resolution alone, especially for unknown or unverified tokens —
cross-check the resolved address against discovery data before quoting.
- Destination address is valid for the destination chain's format and matches the
user's stated intent (source and destination wallets may legitimately differ —
confirm explicitly when they do).
- Wallet compatibility in broad terms (e.g. can it sign EIP-712? can it sign on
Solana?).
Stage B — after transaction construction, before signing:
- Native gas balance covers the actual built steps: approval gas + swap/bridge gas
- any
value/native_fee attached. For chained routes, also destination-chain gas.
- Step types in the built route are all executable by the wallet.
- Approval target and spender match the API-generated calldata.
- Balances still sufficient for the exact amounts in the built transactions.
If any check fails, report it instead of proceeding.
Step 2 — Quote and compare complete routes
WOOFi (no auth, human-readable amounts)
# Same-chain
curl -X POST "https://sapi.woofi.com/v2/quote" -H "Content-Type: application/json" \
-d '{"chain": "arbitrum", "sell_token": "USDC", "buy_token": "WETH", "sell_amount": "1000"}'
# Cross-chain
curl -X POST "https://sapi.woofi.com/v2/cross_chain/quote" -H "Content-Type: application/json" \
-d '{"src_chain": "arbitrum", "dst_chain": "base", "src_token": "USDC", "dst_token": "USDC", "src_amount": "100"}'
LayerZero (proxied auth, base-unit string amounts)
The key is injected by sc-proxy — do not set LAYERZERO_API_KEY; route calls
through core.http_client (proxied_post/proxied_get). Plain curl works only for
the no-auth discovery endpoints (/chains, /tokens, /metadata).
from core.http_client import proxied_post
r = proxied_post(
"https://transfer.layerzero-api.com/v1/quotes",
json={
"srcChainKey": "base", "dstChainKey": "solana",
"srcTokenAddress": "<src token address, resolved via discovery>",
"dstTokenAddress": "<dst token address, resolved via discovery>",
"srcWalletAddress": "<wallet>", "dstWalletAddress": "<dst wallet>",
"amount": "1000000000000000", # STRING, token base units per its decimals
"options": {"amountType": "EXACT_SRC_AMOUNT",
"feeTolerance": {"type": "PERCENT", "amount": 2}},
},
headers={"x-api-key": "proxy", "SC-CALLER-ID": f"chat:{thread_id}"},
timeout=40,
)
Handle the LayerZero response defensively:
- The body may contain
error, an empty quotes array, and/or rejectedQuotes.
Treat empty/error as "no route" and say why (surface rejection reasons if present).
- Compare every entry in
quotes on dstAmount, dstAmountMin, feeUsd, and
step count — do not blindly take quotes[0].
- Inspect each quote's
userSteps for step types: transaction steps vs signature
(EIP-712) steps. Only select routes whose step types the wallet can execute.
- Quotes expire — track age and re-quote if execution is delayed.
Comparison rules
- Never subtract
feeUsd from a destination token quantity. Compare destination
output in human token units (convert LayerZero base units using the destination
token's decimals; WOOFi amounts are already human-readable).
- Minimum received is an amount, not a price. LayerZero returns it directly as
dstAmountMin. WOOFi's guaranteed_price is a price: compute WOOFi's minimum
output as guaranteed_price × sell_amount (or use a returned minimum-output field
if the response provides one). Never present the two fields as equivalent.
- Display these separately, never blended into one number:
- protocol destination output (expected)
- minimum received, in destination-token units (computed as above)
- native gas cost on source (and destination, for chained routes)
- bridge/protocol fee (
feeUsd, native_fee)
- estimated USD value of the output (informational)
- Account for approval gas, and for chained routes the destination swap's gas and
slippage, when ranking.
Route ranking (no fixed engine preference)
Rank candidate routes by, in order of weight:
- Net destination value, defined as:
output USD value − source gas USD − destination gas USD − protocol fees USD.
Token and native-gas USD prices must come from a stated live source (e.g. token
price.usd from LayerZero /v1/tokens, or another live price feed named in the
comparison). If reliable live prices are unavailable, do not claim a definitive
net-value winner — present the raw per-route figures and let the user choose.
- Minimum received (worst-case protection)
- Total gas across all required transactions
- Estimated duration
- Number of signatures/transactions and route reliability — when outputs are
close, prefer the route with fewer transactions and fewer failure points
- Slippage exposure
Present the comparison and get explicit user confirmation before signing anything.
Step 3 — Execute
⚠️ Approval sequencing — never blindly iterate original tx_steps
After an approval confirms, rebuild the transaction: quotes, calldata, allowance
state, and routing conditions may have changed since the original response was built,
and executing the stale step risks a revert (observed in live testing). For both
WOOFi same-chain and cross-chain routes:
- If
needs_approve is true, send only the approval step first.
- Before signing it, verify the approval's
to is the sell token's contract and
the approved spender matches the spender in the API-generated calldata. Use an
exact-amount approval where possible — never unlimited allowances.
- Wait for the approval transaction to confirm on-chain.
- Re-call
/v2/swap (or /v2/cross_chain/swap) to rebuild the transaction.
- Verify the fresh response has
needs_approve: false.
- Execute the fresh swap step. If it still reports approval needed, stop and report —
do not loop retries.
The same principle applies to LayerZero userSteps: after an approval step confirms,
prefer regenerating steps (POST /v1/build-user-steps with {"quoteId": ...}) before
sending the bridge transaction, and always regenerate for Solana (blockhashes expire
in ~60s).
Before every signature
Decode and display to the user: destination contract, chain, token, amount, spender
(for approvals), and native value attached. Enforce guardrails: maximum total fee,
maximum slippage, and minimum received — abort if the fresh transaction violates what
was confirmed.
Confirmation validity: a rebuilt/fresh quote may execute without asking the user
again only if amount, destination address, spender, slippage, minimum received, and
total fee all remain within the limits the user already approved. Any material change
to any of these requires renewed confirmation.
LayerZero step types
- Transaction steps: sign and send in order, waiting for confirmation between steps.
- Signature steps (AORI/intent): sign the EIP-712 payload in
userStep.signature.typedData, then POST /v1/submit-signature with
{"quoteId", "signatures": ["0x..."]}.
- AA wallets: if the wallet returns only a
user_operation_hash, resolve it to
the final on-chain transaction hash — via the bundler receipt when available,
otherwise via wallet transaction history or destination transfer records. A
missing bundler receipt is not evidence of failure: never mark a transfer failed
merely because the receipt is unavailable; fall back to on-chain verification.
Step 4 — Verify completion (not just "tx sent")
Success requires all of the following, not merely an explorer link:
- Source transaction confirmed (final tx hash, not a user-op hash).
- Source wallet actually debited the expected amount.
- Destination receipt — primary evidence is the destination transaction receipt
and its token Transfer logs (amount, recipient, token contract). Use the
destination wallet's balance delta only as corroboration: unrelated concurrent
transfers can distort a balance-only check, and for native assets the delta is
also skewed by destination gas or other activity. Compare the received amount
against the minimum received — flag if below.
- Report the exact destination amount received, in human units.
Polling:
- LayerZero:
GET /v1/status/{quoteId}?txHash=0x... (proxied) every ~4s.
Terminal: SUCCEEDED, FAILED, UNKNOWN; non-terminal: PENDING, PROCESSING.
Share explorerUrl — but still perform the destination receipt/log verification
above.
- WOOFi cross-chain: LayerZeroScan (
https://layerzeroscan.com/tx/<hash>) is a
tracking aid only — completion is confirmed by the destination receipt/log
verification.
- Chained flows (bridge → swap): start the destination-chain WOOFi swap only after
the bridge is verified complete (funds visible), then run the full approval-requote
sequence again on the destination chain.
Safety rules
- ⚠️ Never approve the LZMulticall (Wrapper) contract as a token spender. Execute
API-returned steps as-is; never hand-craft approvals.
- Prefer exact-amount approvals; never unlimited allowances.
- Quotes expire — re-quote if execution is delayed; never reuse a stale quote.
- Check source token and native gas balances before asking the user to confirm.
- Rate limits: WOOFi 5 req/s; keep LayerZero status polling at ~4s intervals.
- Never retry a failed transaction automatically. On revert,
FAILED, or
UNKNOWN, report the tx hash / explorerUrl and the decoded cause if available,
then wait for the user.
- State chain, token, amount, fees, spender, and destination address before every
signature; re-verify guardrails against the freshest quote, not the original one.
Pre-release test gate
Before treating a deployment as production-ready, pass live tests for:
same-chain ERC-20→ERC-20; native→ERC-20 and ERC-20→native; cross-chain same-token
EVM→EVM; cross-chain token conversion; LayerZero-only EVM→Solana and Solana→EVM;
bridge-then-destination-swap; existing-allowance and approval-required paths;
insufficient token and insufficient gas; expired quote, reverted swap, failed bridge,
delayed destination; different source vs destination wallets; AA wallet returning only
user_operation_hash.
1---
2name: starchild-swap-and-bridge
3version: 1.2.0
4description: |
5 Unified swap + bridge router combining WOOFi (best-price meta-aggregator on 14 EVM
6 chains) and the LayerZero Value Transfer API (broad multi-chain bridging incl.
7 Solana, Aptos, TON — discover supported chains/tokens dynamically). One workflow:
8 classify the request, validate the wallet can actually execute, quote, compare
9 complete routes, approve-then-requote-then-execute, and verify destination receipt.
10author: starchild
11tags: [swap, bridge, cross-chain, dex-aggregator, best-price, layerzero, stargate, woofi, cctp, oft, defi, multichain]
12
13metadata:
14 source: https://skillmd.com/skills/starchild-ai-agent/starchild-swap-and-bridge
15 starchild:
16 emoji: "🧭"
17 skillKey: omniroute-swap-bridge
18 registry: starchild-official
19 requires:
20 bins: [curl]
21
22triggers:
23 - "swap"
24 - "bridge"
25 - "trade"
26 - "convert tokens"
27 - "cross chain swap"
28 - "bridge tokens"
29 - "best price"
30 - "best rate"
31 - "swap and bridge"
32 - "move tokens to another chain"
33 - "transfer across chains"
34
35user-invocable: true
36---
37
38# OmniRoute — Unified Swap + Bridge Router
39
40One skill for any "get token A on chain X into token B on chain Y" request. It combines
41two engines and selects the best *complete executable route*, not just the best quote:
42
43| Engine | Base URL | Strengths |
44|---|---|---|
45| **WOOFi V2** | `https://sapi.woofi.com` | Best-price same-chain swaps (WooPP + 1inch + ODOS), simple cross-chain on 14 EVM chains. Chain names + token symbols, human-readable amounts, no auth. Rate limit 5 req/s. |
46| **LayerZero Value Transfer** | `https://transfer.layerzero-api.com/v1` | Broad multi-chain bridging (EVM, Solana, Aptos, TON…) via OFT / Stargate / CCTP / Aori. Status polling with explorer URLs. Proxied auth via `core.http_client`. |
47
48Do not hard-code chain/token coverage claims — discover live via LayerZero
49`GET /v1/chains` and `GET /v1/tokens`, and WOOFi's chain table below.
50
51## Step 0 — Classify the request
52
531. **Same-chain swap on an EVM chain** → **WOOFi** (`/v2/swap`). LayerZero does not do
54 same-chain swaps.
552. **Cross-chain, both chains in WOOFi's 14 EVM list, both tokens ERC-20/native** →
56 quote **both** engines and select per the route-ranking rules in Step 2.
573. **Any non-EVM chain (Solana, Aptos, TON, Tron…), or a chain outside WOOFi's list,
58 or native-USDC-via-CCTP preference** → **LayerZero** only.
594. **Swap needed on the destination that LayerZero can't fulfill** → chain the engines:
60 LayerZero bridge first, then WOOFi swap on the destination chain (two confirmations,
61 gas on both chains — tell the user, and include destination gas in the comparison).
62
63WOOFi's documented v2 chain set (validate support at execution time — treat an API
64error as "unsupported", not a bug): arbitrum, base, bsc, polygon, optimism, avalanche,
65ethereum, linea, mantle, sonic, berachain, hyperevm, monad, zksync.
66
67**Native-token handling differs per engine:**
68- **WOOFi (EVM only):** use the symbol (`"ETH"`, `"BNB"`, `"AVAX"`, `"POL"`, `"MNT"`,
69 `"S"`, `"BERA"`, `"MON"`) or the EVM placeholder
70 `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`.
71- **LayerZero:** do NOT assume a universal placeholder. Resolve the native/token
72 address per chain via `GET /v1/chains` (`nativeCurrency.address`) and
73 `GET /v1/tokens` — non-EVM chains (Solana, Aptos, TON…) use different address
74 formats entirely.
75
76## Step 1 — Pre-flight validation (two stages)
77
78A better quote can still be an unexecutable route. Exact gas requirements are unknown
79before transaction construction, so validation happens in two stages:
80
81**Stage A — before quoting:**
82- **Source token balance** covers the sell amount (fetch on-chain, using the token's
83 real `decimals` — never assume 18).
84- **Token identity**: confirm chain ID, token address, decimals, and symbol together.
85 Never trust symbol resolution alone, especially for unknown or unverified tokens —
86 cross-check the resolved address against discovery data before quoting.
87- **Destination address** is valid for the destination chain's format and matches the
88 user's stated intent (source and destination wallets may legitimately differ —
89 confirm explicitly when they do).
90- **Wallet compatibility** in broad terms (e.g. can it sign EIP-712? can it sign on
91 Solana?).
92
93**Stage B — after transaction construction, before signing:**
94- **Native gas balance** covers the actual built steps: approval gas + swap/bridge gas
95 + any `value`/`native_fee` attached. For chained routes, also destination-chain gas.
96- **Step types** in the built route are all executable by the wallet.
97- **Approval target and spender** match the API-generated calldata.
98- **Balances still sufficient** for the exact amounts in the built transactions.
99
100If any check fails, report it instead of proceeding.
101
102## Step 2 — Quote and compare complete routes
103
104### WOOFi (no auth, human-readable amounts)
105
106```bash
107# Same-chain
108curl -X POST "https://sapi.woofi.com/v2/quote" -H "Content-Type: application/json" \
109 -d '{"chain": "arbitrum", "sell_token": "USDC", "buy_token": "WETH", "sell_amount": "1000"}'
110
111# Cross-chain
112curl -X POST "https://sapi.woofi.com/v2/cross_chain/quote" -H "Content-Type: application/json" \
113 -d '{"src_chain": "arbitrum", "dst_chain": "base", "src_token": "USDC", "dst_token": "USDC", "src_amount": "100"}'
114```
115
116### LayerZero (proxied auth, base-unit string amounts)
117
118The key is injected by sc-proxy — do **not** set `LAYERZERO_API_KEY`; route calls
119through `core.http_client` (`proxied_post`/`proxied_get`). Plain `curl` works only for
120the no-auth discovery endpoints (`/chains`, `/tokens`, `/metadata`).
121
122```python
123from core.http_client import proxied_post
124r = proxied_post(
125 "https://transfer.layerzero-api.com/v1/quotes",
126 json={
127 "srcChainKey": "base", "dstChainKey": "solana",
128 "srcTokenAddress": "<src token address, resolved via discovery>",
129 "dstTokenAddress": "<dst token address, resolved via discovery>",
130 "srcWalletAddress": "<wallet>", "dstWalletAddress": "<dst wallet>",
131 "amount": "1000000000000000", # STRING, token base units per its decimals
132 "options": {"amountType": "EXACT_SRC_AMOUNT",
133 "feeTolerance": {"type": "PERCENT", "amount": 2}},
134 },
135 headers={"x-api-key": "proxy", "SC-CALLER-ID": f"chat:{thread_id}"},
136 timeout=40,
137)
138```
139
140**Handle the LayerZero response defensively:**
141- The body may contain `error`, an empty `quotes` array, and/or `rejectedQuotes`.
142 Treat empty/error as "no route" and say why (surface rejection reasons if present).
143- **Compare every entry in `quotes`** on `dstAmount`, `dstAmountMin`, `feeUsd`, and
144 step count — do not blindly take `quotes[0]`.
145- Inspect each quote's `userSteps` for step *types*: transaction steps vs signature
146 (EIP-712) steps. Only select routes whose step types the wallet can execute.
147- Quotes expire — track age and re-quote if execution is delayed.
148
149### Comparison rules
150
151- **Never subtract `feeUsd` from a destination token quantity.** Compare destination
152 output in **human token units** (convert LayerZero base units using the destination
153 token's `decimals`; WOOFi amounts are already human-readable).
154- **Minimum received is an amount, not a price.** LayerZero returns it directly as
155 `dstAmountMin`. WOOFi's `guaranteed_price` is a *price*: compute WOOFi's minimum
156 output as `guaranteed_price × sell_amount` (or use a returned minimum-output field
157 if the response provides one). Never present the two fields as equivalent.
158- Display these **separately**, never blended into one number:
159 - protocol destination output (expected)
160 - minimum received, in destination-token units (computed as above)
161 - native gas cost on source (and destination, for chained routes)
162 - bridge/protocol fee (`feeUsd`, `native_fee`)
163 - estimated USD value of the output (informational)
164- Account for approval gas, and for chained routes the destination swap's gas and
165 slippage, when ranking.
166
167### Route ranking (no fixed engine preference)
168
169Rank candidate routes by, in order of weight:
1701. Net destination value, defined as:
171 `output USD value − source gas USD − destination gas USD − protocol fees USD`.
172 Token and native-gas USD prices must come from a stated live source (e.g. token
173 `price.usd` from LayerZero `/v1/tokens`, or another live price feed named in the
174 comparison). If reliable live prices are unavailable, do not claim a definitive
175 net-value winner — present the raw per-route figures and let the user choose.
1762. Minimum received (worst-case protection)
1773. Total gas across all required transactions
1784. Estimated duration
1795. Number of signatures/transactions and route reliability — **when outputs are
180 close, prefer the route with fewer transactions and fewer failure points**
1816. Slippage exposure
182
183Present the comparison and get explicit user confirmation before signing anything.
184
185## Step 3 — Execute
186
187### ⚠️ Approval sequencing — never blindly iterate original tx_steps
188
189After an approval confirms, rebuild the transaction: quotes, calldata, allowance
190state, and routing conditions may have changed since the original response was built,
191and executing the stale step risks a revert (observed in live testing). For **both**
192WOOFi same-chain and cross-chain routes:
193
1941. If `needs_approve` is true, send **only the approval step** first.
195 - Before signing it, verify the approval's `to` is the sell token's contract and
196 the approved spender matches the spender in the API-generated calldata. Use an
197 **exact-amount approval** where possible — never unlimited allowances.
1982. Wait for the approval transaction to confirm on-chain.
1993. **Re-call `/v2/swap` (or `/v2/cross_chain/swap`) to rebuild the transaction.**
2004. Verify the fresh response has `needs_approve: false`.
2015. Execute the fresh swap step. If it still reports approval needed, stop and report —
202 do not loop retries.
203
204The same principle applies to LayerZero `userSteps`: after an approval step confirms,
205prefer regenerating steps (`POST /v1/build-user-steps` with `{"quoteId": ...}`) before
206sending the bridge transaction, and always regenerate for Solana (blockhashes expire
207in ~60s).
208
209### Before every signature
210
211Decode and display to the user: destination contract, chain, token, amount, spender
212(for approvals), and native `value` attached. Enforce guardrails: maximum total fee,
213maximum slippage, and minimum received — abort if the fresh transaction violates what
214was confirmed.
215
216**Confirmation validity:** a rebuilt/fresh quote may execute without asking the user
217again only if amount, destination address, spender, slippage, minimum received, and
218total fee all remain within the limits the user already approved. Any material change
219to any of these requires renewed confirmation.
220
221### LayerZero step types
222
223- **Transaction steps:** sign and send in order, waiting for confirmation between steps.
224- **Signature steps (AORI/intent):** sign the EIP-712 payload in
225 `userStep.signature.typedData`, then `POST /v1/submit-signature` with
226 `{"quoteId", "signatures": ["0x..."]}`.
227- **AA wallets:** if the wallet returns only a `user_operation_hash`, resolve it to
228 the final on-chain transaction hash — via the bundler receipt when available,
229 otherwise via wallet transaction history or destination transfer records. A
230 missing bundler receipt is not evidence of failure: never mark a transfer failed
231 merely because the receipt is unavailable; fall back to on-chain verification.
232
233## Step 4 — Verify completion (not just "tx sent")
234
235Success requires **all** of the following, not merely an explorer link:
236
2371. Source transaction confirmed (final tx hash, not a user-op hash).
2382. Source wallet actually debited the expected amount.
2393. Destination receipt — **primary evidence is the destination transaction receipt
240 and its token Transfer logs** (amount, recipient, token contract). Use the
241 destination wallet's balance delta only as corroboration: unrelated concurrent
242 transfers can distort a balance-only check, and for native assets the delta is
243 also skewed by destination gas or other activity. Compare the received amount
244 against the minimum received — flag if below.
2454. Report the exact destination amount received, in human units.
246
247Polling:
248- **LayerZero:** `GET /v1/status/{quoteId}?txHash=0x...` (proxied) every ~4s.
249 Terminal: `SUCCEEDED`, `FAILED`, `UNKNOWN`; non-terminal: `PENDING`, `PROCESSING`.
250 Share `explorerUrl` — but still perform the destination receipt/log verification
251 above.
252- **WOOFi cross-chain:** LayerZeroScan (`https://layerzeroscan.com/tx/<hash>`) is a
253 tracking aid only — completion is confirmed by the destination receipt/log
254 verification.
255- **Chained flows (bridge → swap):** start the destination-chain WOOFi swap only after
256 the bridge is verified complete (funds visible), then run the full approval-requote
257 sequence again on the destination chain.
258
259## Safety rules
260
261- ⚠️ **Never approve the LZMulticall (Wrapper) contract as a token spender.** Execute
262 API-returned steps as-is; never hand-craft approvals.
263- Prefer exact-amount approvals; never unlimited allowances.
264- Quotes expire — re-quote if execution is delayed; never reuse a stale quote.
265- Check source token and native gas balances before asking the user to confirm.
266- Rate limits: WOOFi 5 req/s; keep LayerZero status polling at ~4s intervals.
267- **Never retry a failed transaction automatically.** On revert, `FAILED`, or
268 `UNKNOWN`, report the tx hash / `explorerUrl` and the decoded cause if available,
269 then wait for the user.
270- State chain, token, amount, fees, spender, and destination address before every
271 signature; re-verify guardrails against the freshest quote, not the original one.
272
273## Pre-release test gate
274
275Before treating a deployment as production-ready, pass live tests for:
276same-chain ERC-20→ERC-20; native→ERC-20 and ERC-20→native; cross-chain same-token
277EVM→EVM; cross-chain token conversion; LayerZero-only EVM→Solana and Solana→EVM;
278bridge-then-destination-swap; existing-allowance and approval-required paths;
279insufficient token and insufficient gas; expired quote, reverted swap, failed bridge,
280delayed destination; different source vs destination wallets; AA wallet returning only
281`user_operation_hash`.