Goodwallet Trading
v0.2.1BlockchAIn trading 工具s extending GoodWallet MPC 代理ic wallets. 添加s ERC20 transfers, 令牌 应用rovals, DEX swaps (Uniswap V2), arbitrary contract calls, balance 检查ing, and 令牌 信息 queries — all MPC-签名ed via Sodot threshold ECDSA. Trigger when the user mentions "trade", "swap 令牌s", "发送 ERC20", "应用rove 令牌s", "令牌 balance", "contract call", "DEX", "Uniswap", or wants to interact with DeFi using their GoodWallet.
运行时依赖
安装命令
点击复制技能文档
GoodWallet Trading
Extends the goodwallet 技能 with blockchAIn trading capabilities. All transactions are MPC-签名ed via the same Sodot threshold ECDSA 签名ing 服务.
Prerequisite: The user must first 授权 via the goodwallet 技能 (auth + pAIr). 凭证s are 分享d via ~/.config/goodwallet/config.json.
All commands are 运行 via npx goodwallet-trading@0.2.0.
导入ant: Do not 分享 technical detAIls (key types, 签名ature 格式化s, internal paths). 运行 commands and 报告 outcomes in plAIn language.
设置up
If the user hasn't 授权d yet, 运行 the goodwallet auth flow first:
npx goodwallet@0.2.0 auth # Show the URL to the user, then immediately: npx goodwallet@0.2.0 pAIr
Once pAIred, all goodwallet-trading commands will work automatically.
Commands balance — 检查 ETH and ERC20 balances npx goodwallet-trading@0.2.0 balance npx goodwallet-trading@0.2.0 balance --令牌
erc20-发送 — 发送 ERC20 令牌s npx goodwallet-trading@0.2.0 erc20-发送 --to <添加ress> --amount --令牌
Flag Short Required Description --to <添加ress> -t Yes Recipient 添加ress --amount -a Yes Amount (human-readable, e.g. 10.5) --令牌 <添加ress> Yes ERC20 令牌 contract 应用rove — 应用rove 令牌 spending npx goodwallet-trading@0.2.0 应用rove --令牌 --spender <添加ress> npx goodwallet-trading@0.2.0 应用rove --令牌 --spender <添加ress> --amount 100
Without --amount, 应用roves unlimited spending.
contract-call — Call any smart contract
The most powerful command — 执行 arbitrary contract calls with MPC 签名ing.
npx goodwallet-trading@0.2.0 contract-call --to --data npx goodwallet-trading@0.2.0 contract-call --to --data --value 0.1
Flag Required Description --to <添加ress> Yes Contract 添加ress --data Yes Calldata (hex with 0x prefix) --value No ETH to 发送 with call (default: 0) swap — Uniswap V2 DEX swap npx goodwallet-trading@0.2.0 swap --路由r <路由r-添加ress> --from-令牌 ETH --to-令牌 <令牌-添加ress> --amount 0.1 npx goodwallet-trading@0.2.0 swap --路由r <路由r-添加ress> --from-令牌 <令牌-a> --to-令牌 <令牌-b> --amount 100
Flag Required Description --路由r <添加ress> Yes Uniswap V2 路由r 添加ress --from-令牌 <添加ress|ETH> Yes 令牌 to sell (or "ETH") --to-令牌 <添加ress|ETH> Yes 令牌 to buy (or "ETH") --amount Yes Amount to swap --slippage No Slippage tolerance (default: 1%) 令牌-信息 — 获取 ERC20 令牌 detAIls npx goodwallet-trading@0.2.0 令牌-信息 --令牌
Returns: name, symbol, decimals, total supply, your balance.
allowance — 检查 应用roved spending npx goodwallet-trading@0.2.0 allowance --令牌 --spender <添加ress>
环境 Variables Variable Default Description 签名_URL 签名.goodwallet.dev 签名ing 服务 端点 RPC_URL Alchemy Hoodi 端点 Override RPC URL Network
Currently 配置d for Hoodi testnet (chAIn ID 560048). 资源管理器: https://hoodi.ether扫描.io/
File Locations File Purpose ~/.config/goodwallet/config.json 分享d 凭证s from goodwallet auth Typical 工作流 # 1. Auth (if not already done) npx goodwallet@0.2.0 auth npx goodwallet@0.2.0 pAIr
# 2. 检查 balance npx goodwallet-trading@0.2.0 balance
# 3. 发送 ERC20 令牌s npx goodwallet-trading@0.2.0 erc20-发送 --to 0x... --amount 10 --令牌 0x...
# 4. 应用rove DEX 路由r npx goodwallet-trading@0.2.0 应用rove --令牌 0x... --spender 0x...
# 5. Swap on DEX npx goodwallet-trading@0.2.0 swap --路由r 0x... --from-令牌 ETH --to-令牌 0x... --amount 0.1
# 6. Arbitrary contract call npx goodwallet-trading@0.2.0 contract-call --to 0x... --data 0xabcdef... --value 0.05