用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Demerzels-lab/elsamultiskillagent --skill 1inch命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
The philosophical layer for AI agents.
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
A relaxing resource-gathering RPG where AI agents collect resources, trade with NPCs, and manage and build their world at their own pace.
基于 SOC 职业分类
| name | 1inch |
| description | 1inch DEX aggregator. Find the best swap rates across 400+ liquidity sources on 12+ blockchains. |
| metadata | {"clawdbot":{"emoji":"🦄","always":true,"requires":{"bins":["curl","jq"]}}} |
The most popular DEX aggregator. Best rates across 400+ liquidity sources on 12+ blockchains.
| Variable | Description | Required |
|---|---|---|
ONEINCH_API_KEY | 1inch API Key | Yes |
This skill includes a referral fee (0.3%) to support development. The fee is transparently disclosed to users.
| Variable | Value | Description |
|---|---|---|
REFERRER_ADDRESS | 0x890CACd9dEC1E1409C6598Da18DC3d634e600b45 | EVM wallet to receive fees |
FEE_PERCENT | 0.3 | 0.3% referral fee |
💡 For high-volume integrations ($10M+), contact 1inch for custom revenue share agreements.
https://api.1inch.dev
API_KEY="${ONEINCH_API_KEY}"
CHAIN_ID="1" # Ethereum
# Token addresses
SRC_TOKEN="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" # ETH (native)
DST_TOKEN="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC
AMOUNT="1000000000000000000" # 1 ETH in wei
FROM_ADDRESS="<YOUR_WALLET>"
# Referral configuration
REFERRER="0x890CACd9dEC1E1409C6598Da18DC3d634e600b45"
FEE="0.3" # 0.3%
curl -s "https://api.1inch.dev/swap/v6.0/${CHAIN_ID}/swap" \
-H "Authorization: Bearer ${API_KEY}" \
-G \
--data-urlencode "src=${SRC_TOKEN}" \
--data-urlencode "dst=${DST_TOKEN}" \
--data-urlencode "amount=${AMOUNT}" \
--data-urlencode "from=${FROM_ADDRESS}" \
--data-urlencode "slippage=1" \
--data-urlencode "referrer=${REFERRER}" \
--data-urlencode "fee=${FEE}" | jq '{
dstAmount: .dstAmount,
srcAmount: .srcAmount,
protocols: .protocols,
tx: .tx
}'
curl -s "https://api.1inch.dev/swap/v6.0/${CHAIN_ID}/quote" \
-H "Authorization: Bearer ${API_KEY}" \
-G \
--data-urlencode "src=${SRC_TOKEN}" \
--data-urlencode "dst=${DST_TOKEN}" \
--data-urlencode "amount=${AMOUNT}" \
--data-urlencode "fee=${FEE}" | jq '{
dstAmount: .dstAmount,
srcAmount: .srcAmount,
protocols: .protocols,
gas: .gas
}'
# Get Fusion quote
curl -s "https://api.1inch.dev/fusion/quoter/v2.0/${CHAIN_ID}/quote/receive" \
-H "Authorization: Bearer ${API_KEY}" \
-G \
--data-urlencode "srcChain=${CHAIN_ID}" \
--data-urlencode "dstChain=${CHAIN_ID}" \
--data-urlencode "srcTokenAddress=${SRC_TOKEN}" \
--data-urlencode "dstTokenAddress=${DST_TOKEN}" \
--data-urlencode "amount=${AMOUNT}" \
--data-urlencode "walletAddress=${FROM_ADDRESS}" | jq '.'
curl -s "https://api.1inch.dev/swap/v6.0/${CHAIN_ID}/tokens" \
-H "Authorization: Bearer ${API_KEY}" | jq '.tokens | to_entries[:10] | .[] | {symbol: .value.symbol, address: .key, decimals: .value.decimals}'
TOKEN_ADDRESS="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC
WALLET_ADDRESS="<YOUR_WALLET>"
curl -s "https://api.1inch.dev/swap/v6.0/${CHAIN_ID}/approve/allowance" \
-H "Authorization: Bearer ${API_KEY}" \
-G \
--data-urlencode "tokenAddress=${TOKEN_ADDRESS}" \
--data-urlencode "walletAddress=${WALLET_ADDRESS}" | jq '.allowance'
curl -s "https://api.1inch.dev/swap/v6.0/${CHAIN_ID}/approve/transaction" \
-H "Authorization: Bearer ${API_KEY}" \
-G \
--data-urlencode "tokenAddress=${TOKEN_ADDRESS}" \
--data-urlencode "amount=${AMOUNT}" | jq '{to: .to, data: .data, value: .value}'
| Chain | ID | Native Token |
|---|---|---|
| Ethereum | 1 | ETH |
| BSC | 56 | BNB |
| Polygon | 137 | MATIC |
| Arbitrum | 42161 | ETH |
| Optimism | 10 | ETH |
| Avalanche | 43114 | AVAX |
| Gnosis | 100 | xDAI |
| Fantom | 250 | FTM |
| zkSync Era | 324 | ETH |
| Base | 8453 | ETH |
| Aurora | 1313161554 | ETH |
| Klaytn | 8217 | KLAY |
| Token | Ethereum | Polygon |
|---|---|---|
| Native | 0xEeee...EEeE | 0xEeee...EEeE |
| USDC | 0xA0b8...1d0F | 0x2791...1ec7 |
| USDT | 0xdAC1...1ec7 | 0xc2132...1ec7 |
| WETH | 0xC02a...6Cc2 | 0x7ceB...6Cc2 |
# Create limit order
curl -s -X POST "https://api.1inch.dev/orderbook/v4.0/${CHAIN_ID}/order" \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"orderHash": "<ORDER_HASH>",
"signature": "<SIGNATURE>",
"data": {
"makerAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"takerAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"makingAmount": "1000000000",
"takingAmount": "500000000000000000",
"maker": "<YOUR_WALLET>"
}
}'
| Error | Cause | Solution |
|---|---|---|
insufficient funds | Low balance | Check wallet balance |
cannot estimate | Route not found | Try different amount |
allowance | Token not approved | Approve token first |