بنقرة واحدة
morph-dex
DEX swap execution on Morph L2 — quote and send swaps via Bulbaswap aggregator
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
DEX swap execution on Morph L2 — quote and send swaps via Bulbaswap aggregator
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
AI Agent skill for Morph L2 — wallet, explorer, DEX swap, cross-chain bridge with order management, EIP-8004 agent identity & reputation, alt-fee gas payment, EIP-7702 delegation, and x402 payment protocol
EIP-7702 EOA delegation on Morph L2 — batch calls and delegation management via tx type 0x04
EIP-8004 agent identity and reputation commands for Morph — register agents, query metadata, submit and read feedback
Alt-fee gas payment on Morph L2 — pay gas with alternative ERC20 tokens via tx type 0x7f
Cross-chain swap with JWT auth — quote prices, create orders, submit transactions, track order status across 6 chains
On-chain data queries on Morph L2 — address info, transactions, tokens, contracts via Blockscout API
| name | morph-dex |
| version | 1.0.0 |
| description | DEX swap execution on Morph L2 — quote and send swaps via Bulbaswap aggregator |
DEX swap operations via Bulbaswap aggregator on Morph Mainnet (Chain ID: 2818). All commands output JSON. All amounts use human-readable units.
Use this skill when the user wants to: get a swap quote, check token prices, or execute a token swap on Morph chain only. For swaps on other chains or cross-chain transfers, use the morph-bridge skill instead.
pip install requests eth_account
# Run from repository root
python3 scripts/morph_api.py <command> [options]
No API keys required. DEX API: https://api.bulbaswap.io
Decide the mode once via the root SKILL.md and docs/social-wallet-integration.md.
dex-send requires --private-key (local signing only).dex-quote is still useful for price comparison even when BGW handles execution.dex-quoteGet a swap quote. Returns estimated output amount and price impact. Pass --recipient to include methodParameters (calldata for on-chain execution).
# Preview quote only
python3 scripts/morph_api.py dex-quote --amount 1 --token-in ETH --token-out USDT
# With recipient (returns methodParameters.calldata for dex-send)
python3 scripts/morph_api.py dex-quote --amount 1 --token-in ETH --token-out USDT --recipient 0xYourAddr
Optional: --slippage 0.5 (default: 1%), --deadline 300 (seconds, default: 300), --protocols v2,v3.
dex-sendSign and broadcast a swap transaction using calldata from dex-quote --recipient. Uses methodParameters fields (to, value, calldata) from the quote response.
python3 scripts/morph_api.py dex-send --to 0xRouterAddr --value 0.001 --data 0xCalldata... --private-key 0xKey
dex-approveApprove an ERC-20 token for spending by a DEX router. Required before swapping ERC-20 tokens.
python3 scripts/morph_api.py dex-approve --token USDT --spender 0xRouterAddr --amount 1000 --private-key 0xKey
dex-allowanceCheck the ERC-20 allowance granted to a spender.
python3 scripts/morph_api.py dex-allowance --token USDT --owner 0xOwnerAddr --spender 0xRouterAddr
dex-send or dex-approve — show the swap details (token pair, amount, slippage, router address) before signing.dex-quote and dex-send only work for tokens on Morph. For other chains, use bridge commands.--slippage to protect against price movement.dex-quote returns amounts in human-readable units.dex-send requires methodParameters from a quote with --recipient.Swap tokens (full flow with approval):
dex-allowance (check if approved) → dex-approve (if needed) → dex-quote --recipient 0xAddr → dex-send
Swap tokens:
dex-quote --recipient 0xAddr (get calldata) → dex-send (sign & broadcast)
Swap with alt-fee gas payment:
dex-quote --recipient 0xAddr → altfee-send (morph-altfee skill, pay gas with alt token)
token-search (morph-explorer) to find token contract addresses before quoting.balance / token-balance (morph-wallet) to verify funds before swapping.altfee-send (morph-altfee) instead of dex-send to pay gas with alternative tokens.dex-quote --recipient 0xEOA calldata inside 7702-batch (morph-7702) for atomic approve + swap in a single transaction.