Repository navigation
feat(wallet-mcp): add LI.FI plugin - #25
Open
brucexu-eth wants to merge 2 commits into
Open
brucexu-eth wants to merge 2 commits into
brucexu-eth wants to merge 2 commits into
Conversation
🟡 Heimdall Review Status
|
Some bridges (Stargate's LayerZero fee, Glacis) add a native fee to transactionRequest.value. The value check now expects fromAmount (native input) or 0 (ERC-20 input) plus every native feeCosts entry with included: false, and the user is shown that fee before confirming.
This branch has not been deployed
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.
Description
Adds a LI.FI plugin (
skills/wallet-mcp/plugins/lifi.md) for cross-chain bridging and swap-and-bridge. No current Wallet MCP plugin moves funds between chains, and Wallet MCP has no bridge tool.How it works:
get_wallets→ wallet address.GET https://li.quest/v1/quote→ route plus unsigned source-chaintransactionRequest.from,to==approvalAddress== LI.FI Diamond (0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE), andvalue(native =fromAmount, ERC-20 =0x0).send_callson the source chain: exact-amountapprove+ bridge call in one batch for ERC-20 (USDT on Ethereum gets anapprove(0)first), bridge call only for native input.get_request_status→ source tx hash →GET https://li.quest/v1/statusuntilDONE. Success is reported only forDONE/COMPLETED;PARTIALandREFUNDEDare reported as such.Frontmatter:
integration: http-api, chainsarbitrum, avalanche, base, bsc, ethereum, optimism, polygon,allowlist: [li.quest],auth: none,risk: [slippage, irreversible]. All LI.FI calls are GETs, so the user-paste fallback fromreferences/custom-plugins.mdworks whenli.questis not allowlisted.Per Contribution Scope, the diff is the plugin file plus two new tags (
bridge,cross-chain) appended to the vocabulary inplugin-spec.md. TheSKILL.mdregistry table is left to maintainers.Change type
Validation
Run:
http-api, allowlist, risk tags): 38/38.python3 -m unittest discover -s tests: OK./v1/quoteresponses mapped tosend_callspayloads with the steps in the plugin, all checks passing: 10 USDC Base→Arbitrum, 0.005 ETH Base→Arbitrum (re-run 2026-11-16), 20 USDT Ethereum→USDC Base.allowBridges= across, relay, mayan, symbiosis, celercircle, stargateV2, glacis; 12 routes returned): everytransactionRequest.valueequals the expected native amount (fromAmountor0, plus nativefeeCostswithincluded: false). Stargate and Glacis charge such a fee; the second commit relaxes the earliervalue == 0/value == fromAmountcheck to accept it.transactionRequest.toandestimate.approvalAddressequal the LI.FI Diamond on all 7 listed chains.eth_callof the native ETH bridge call on Base: no revert./v1/statuson a real Base→Arbitrum transfer:DONE/COMPLETED.Not run:
get_wallets,send_callsandget_request_statuswere not exercised, and no transaction was signed. It is unverified whetherget_request_statusreturns the on-chain tx hash (needed for/v1/status) or a user-op ID, and whether the approve + bridge batch executes atomically.li.questis on theweb_requestallowlist.plugin-reviewskill referenced in plugin-spec.md is not in the repository, so it was not run.robinhood-chainis left out until its Wallet MCP chain ID is confirmed against LI.FI's chain list.Checklist (harness/packaging items do not apply to a plugin file):
Release considerations
SKILL.mdplugin table and whether to allowlistli.questforweb_request.