Tempo stablecoin and token swap operations for agents. Use when working with pathUSD/USDC.e balances, swapping between USDC.e and pathUSD, or executing any-token swaps via Uniswap on Tempo with quote, Permit2 approvals, simulation, and broadcast.
使用此技能通过 Foundry(cast)和 Uniswap Trade API 实现低摩擦的 Tempo 执行。
仅使用此 SKILL.md 文件,无需其他文件。
如果脚本不可用,请直接运行此文件中的命令操作手册。
检查:
bash
command -v cast && cast --version
如果缺失则安装:
bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
bash
WALLET=$(cast wallet address --private-key $PRIVATE_KEY)
cast call 0x20C0000000000000000000000000000000000000 \
balanceOf(address)(uint256) $WALLET --rpc-url ${RPC_URL:-https://rpc.presto.tempo.xyz}
cast call 0x20c000000000000000000000b9537d11c60e8b50 \
balanceOf(address)(uint256) $WALLET --rpc-url ${RPC_URL:-https://rpc.presto.tempo.xyz}
bash
cast send 0x20C0000000000000000000000000000000000000 \
transfer(address,uint256)
--private-key $PRIVATEKEY --rpc-url ${RPCURL:-https://rpc.presto.tempo.xyz} --gas-limit 100000
bash
curl -sS https://trade-api.gateway.uniswap.org/v1/quote \
-H content-type: application/json \
-H x-api-key: $UNISWAPAPIKEY \
--data {
type:EXACT_INPUT,
amount:
tokenInChainId:4217,
tokenOutChainId:4217,
tokenIn:
tokenOut:
swapper:
slippageTolerance:2.5
}
bash
cast send
0x000000000022D473030F116dDEE9F6B43aC78BA3 \
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff \
--private-key $PRIVATEKEY --rpc-url ${RPCURL:-https://rpc.presto.tempo.xyz} --gas-limit 900000
Permit2 -> spender(spender 来自报价的 permitData.values.spender):
bash
EXP=$(( $(date +%s) + 31536000 ))
cast send 0x000000000022D473030F116dDEE9F6B43aC78BA3 \
approve(address,address,uint160,uint48) \
--private-key $PRIVATEKEY --rpc-url ${RPCURL:-https://rpc.presto.tempo.xyz} --gas-limit 900000
bash
curl -s ${RPC_URL:-https://rpc.presto.tempo.xyz} -H content-type: application/json --data \
{jsonrpc:2.0,id:1,method:ethcall,params:[{from:
bash
cast send
--private-key $PRIVATE_KEY \
--rpc-url ${RPC_URL:-https://rpc.presto.tempo.xyz} \
--gas-limit
如果可用,请使用:
bash
scripts/uniswapexactinputswap.sh --token-in
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 tempo-stable-uniswap-swaps-1776079021 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 tempo-stable-uniswap-swaps-1776079021 技能
skillhub install tempo-stable-uniswap-swaps-1776079021
文件大小: 2.47 KB | 发布时间: 2026-4-17 16:19