From morph-skill
Manages EIP-7702 EOA delegations on Morph L2: check status, sign authorizations, send single calls, execute atomic batches, revoke via Python CLI.
npx claudepluginhub morph-l2/morph-skill --plugin morph-skillThis skill uses the workspace's default tool permissions.
> EOA delegation on **Morph Mainnet** (Chain ID: 2818) via EIP-7702 (tx type `0x04`).
Builds unsigned DeFi transactions from natural language intents across EVM chains like Ethereum, Arbitrum, Base, Optimism, Polygon. Supports send, swap, stake, lend on Aave, Uniswap, Lido, etc.
Drives Aomi CLI to turn natural-language DeFi prompts into fork-simulated EVM transactions queued for non-custodial wallet signing on Ethereum, Base, Arbitrum and more. Supports 40+ apps like Uniswap, Aave.
Provides canonical Monad mainnet contract addresses for Zerion CLI swaps, bridges, sends, Permit2 signing, and agent allowlists. Includes verification recipes using cast code or RPC.
Share bugs, ideas, or general feedback.
EOA delegation on Morph Mainnet (Chain ID: 2818) via EIP-7702 (tx type
0x04). All commands output JSON. All amounts use human-readable units (e.g.0.1ETH, not wei).
Use this skill when the user wants to: check EOA delegation status, sign an authorization, send a single call with 7702 delegation, execute an atomic batch of calls via SimpleDelegation, or revoke a delegation.
Decide the mode once via the root SKILL.md and docs/social-wallet-integration.md.
7702-send, 7702-batch, 7702-authorize, 7702-revoke require --private-key (local signing).7702-delegate is read-only — works with any wallet type.The three signing operations in a 7702-batch can each be performed via BGW TEE:
keccak256(0x05 || RLP([chainId, contract, nonce]))) — BGW can sign raw hashes via TEEexecute() digest) — BGW can sign EIP-191 messagesThe agent constructs each hash locally using the formulas in Domain Knowledge, sends to BGW for signing, then assembles and broadcasts the raw transaction manually. This is advanced orchestration — for most SLW users, BGW's native swap flow is simpler.
pip install requests eth_account eth_abi eth_utils
# Run from repository root
python3 scripts/morph_api.py <command> [options]
No API keys required.
7702-delegateCheck whether an EOA has been delegated via EIP-7702.
python3 scripts/morph_api.py 7702-delegate --address 0xYourEOA
7702-authorizeSign a 7702 authorization object offline for a supplied delegate contract. No transaction is sent.
python3 scripts/morph_api.py 7702-authorize --private-key 0xKey --delegate 0xDelegateContract
7702-sendExecute a single delegated call using EIP-7702 (tx type 0x04).
# Simple call
python3 scripts/morph_api.py 7702-send --delegate 0xDelegateContract --to 0xContract --data 0xCalldata --private-key 0xKey
# With ETH value and custom gas
python3 scripts/morph_api.py 7702-send --delegate 0xDelegateContract --to 0xContract --value 0.01 --data 0x --private-key 0xKey --gas 200000
7702-batchAtomically execute multiple calls via an upstream-supplied delegate contract. The primary use case: approve + swap + transfer in a single atomic transaction.
python3 scripts/morph_api.py 7702-batch \
--delegate 0xDelegateContract \
--calls '[{"to":"0xTokenAddr","value":"0","data":"0xApproveCalldata"},{"to":"0xRouterAddr","value":"0","data":"0xSwapCalldata"}]' \
--private-key 0xKey
--calls is a JSON array of {to, value, data} objects. value is in ETH (human-readable). data defaults to 0x if omitted.
7702-revokeRevoke the EIP-7702 delegation. Clears the delegate by authorizing address(0).
python3 scripts/morph_api.py 7702-revoke --private-key 0xKey
7702-send, 7702-batch, or 7702-revoke — show the target, calls, and values before signing.0x7f) are mutually exclusive — cannot use both in a single transaction.7702-revoke clears the delegation — the EOA returns to a normal EOA until re-delegated.7702-authorize is offline — it returns a signed authorization without sending any transaction.--delegate. This skill does not assume a default Morph delegate contract.0xef0100 followed by the 20-byte delegate address.tx_nonce + 1. This is handled automatically by all 7702 commands.tx_nonce is the EOA's standard transaction nonce. delegation_nonce is the SimpleDelegation replay-protection counter, read from the EOA (after delegation) via nonce().0x04: EIP-7702 transactions include an authorizationList in the RLP encoding, enabling temporary or permanent EOA delegation within the transaction.Atomic approve + swap:
dex-quote --recipient 0xEOA (morph-dex skill, get approve + swap calldata)
→ 7702-batch --delegate 0xDelegateContract --calls '[{"to":"token","value":"0","data":"approveData"},{"to":"router","value":"0","data":"swapData"}]'
Check delegation → batch → revoke:
7702-delegate --address 0xEOA (check current status)
→ 7702-batch --delegate 0xDelegateContract --calls '[...]' (execute atomic operations)
→ 7702-revoke (clean up delegation)
One-time delegated call:
7702-send --delegate 0xDelegateContract --to 0xContract --data 0xCalldata (single delegated call; delegation persists until changed or revoked)
dex-quote to get swap calldata, then pass to 7702-batch --delegate <delegate> --calls for atomic approve + swap.0x7f; EIP-7702 uses tx type 0x04. Cannot combine in one transaction.agent-register calldata can be included in a 7702-batch to combine registration with other operations atomically.