openocean
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenOcean Skill (Starchild Adapter)
OpenOcean Skill(Starchild适配器)
Use this skill when user asks to:
- get OpenOcean quote
- execute swap via OpenOcean route
- run OpenOcean trade through Starchild wallet
当用户提出以下需求时使用本Skill:
- 获取OpenOcean报价
- 通过OpenOcean路由执行交换
- 通过Starchild钱包完成OpenOcean交易
Runtime Mode
运行模式
Script-only. Does not register tools.
Imports:
from skills.openocean.exports import openocean_gas_price, openocean_quote, openocean_swap仅脚本模式。不注册工具。
导入语句:
from skills.openocean.exports import openocean_gas_price, openocean_quote, openocean_swapFunctions
函数
openocean_gas_price(chain='ethereum')openocean_quote(chain, in_token, out_token, amount_wei, slippage='1')openocean_swap(chain, in_token, out_token, amount_wei, slippage='1', verify_timeout_seconds=90, poll_interval_seconds=5)
openocean_gas_price(chain='ethereum')openocean_quote(chain, in_token, out_token, amount_wei, slippage='1')openocean_swap(chain, in_token, out_token, amount_wei, slippage='1', verify_timeout_seconds=90, poll_interval_seconds=5)
Current Scope
当前适用范围
- Ethereum mainnet execution path tested (ETH -> ERC20 and ERC20 -> ETH)
- Uses Starchild wallet runtime () to broadcast
/agent/transfer - Built-in ERC20 approval flow (checks allowance and sends approve when needed)
- Verifies result by balance delta (works when tx hash is delayed)
- 已测试以太坊主网执行流程(ETH -> ERC20 及 ERC20 -> ETH)
- 使用Starchild钱包运行时()进行广播
/agent/transfer - 内置ERC20授权流程(检查额度,必要时发送授权请求)
- 通过余额差值验证结果(适用于交易哈希延迟返回的场景)
Safety Checklist
安全检查清单
- First call and show output.
openocean_quote - Confirm amount and slippage with user.
- Execute with small amount first.
- Require verification result () before claiming success.
verified_by_balance_delta=true
- 先调用并展示输出结果。
openocean_quote - 与用户确认金额和滑点设置。
- 先执行小额交易测试。
- 需验证结果()后再确认交易成功。
verified_by_balance_delta=true