返回顶部
g

gator-cli鳄鱼CLI

Use when you need to operate the @metamask/gator-cli to initialize profiles, upgrade EOA to EIP-7702, grant, redeem, and revoke ERC-7710 delegations, or inspect balances and delegations. Covers commands, required flags, grant scopes, redeem action types, configuration locations, and common usage flows.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
633
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

gator-cli

Quick Reference

Use this skill to run the gator CLI from the repo and to choose the correct command/flags for delegation workflows.

Installation

CODEBLOCK0

CLI Overview

  • - Binary name: INLINECODE0
  • Default profile: INLINECODE1
  • Config path: ~/.gator-cli/permissions.json (or ~/.gator-cli/profiles/<profile-name>.json)
  • Delegations local cache: ~/.gator-cli/delegations/<profile-name>.json when storage not configured

Configuration Requirements

Edit the profile config after gator init:

CODEBLOCK1

  • - delegationStorage is optional; when missing, delegations are stored locally.
  • INLINECODE7 is required for on-chain actions.

Commands

init

Generate a private key and save config. Errors if the profile already exists.

  • - INLINECODE8
  • INLINECODE9 values: base (default), baseSepolia, INLINECODE12
  • INLINECODE13 default: INLINECODE14
  • Prints: address, chain, and config file path.

create

Upgrade an EOA to an EIP-7702 smart account. Uses the chain in your profile config.

  • - INLINECODE15
  • Requires the account to be funded with native token first.
  • Prints: address, chain, and the upgrade transaction hash.

show

Display the EOA address for a profile.

  • - INLINECODE16

status

Check config and on-chain account status.

  • - INLINECODE17
  • Prints: address, chain, config upgrade status, on-chain code presence, storage and RPC URL config.

balance

Show native balance and optional ERC-20 balance.

  • - INLINECODE18
  • If --tokenAddress is provided, prints ERC-20 balance and decimals-derived units.

grant

Create, sign, and store a delegation with a predefined scope.

  • - INLINECODE20

Scope flags:

  • - Token scopes: --tokenAddress <token-address>, --maxAmount <amount>, INLINECODE23
  • Periodic scopes: --periodAmount <amount>, --periodDuration <seconds>, INLINECODE26
  • Streaming scopes: --amountPerSecond <amount>, --initialAmount <amount>, INLINECODE29
  • Function call scope: --targets <addresses>, --selectors <sigs>, INLINECODE32
  • Ownership transfer: INLINECODE33

Supported scopes:

  • - INLINECODE34
  • INLINECODE35
  • INLINECODE36
  • INLINECODE37
  • INLINECODE38
  • INLINECODE39
  • INLINECODE40
  • INLINECODE41
  • INLINECODE42

Grant flags per scope:

ScopeRequired FlagsOptional Flags
INLINECODE43INLINECODE44, INLINECODE45
INLINECODE46
--tokenAddress, --periodAmount, --periodDuration | --startDate |
| erc20Streaming | --tokenAddress, --amountPerSecond, --initialAmount, --maxAmount | --startTime |
| erc721Transfer | --tokenAddress, --tokenId | |
| nativeTokenTransferAmount | --maxAmount | |
| nativeTokenPeriodTransfer | --periodAmount, --periodDuration | --startDate |
| nativeTokenStreaming | --amountPerSecond, --initialAmount, --maxAmount | --startTime |
| functionCall | --targets, --selectors | --valueLte |
| ownershipTransfer | --contractAddress | |

  • - --startDate and --startTime default to the current time (unix seconds) when omitted.
  • INLINECODE79 sets the max native token value per call for functionCall scopes.

redeem

Redeem a stored delegation using a specific action type.

  • - INLINECODE81

Supported action types: erc20Transfer, erc721Transfer, nativeTransfer, functionCall, ownershipTransfer, INLINECODE87

Action-specific flags:

  • - erc20Transfer: --tokenAddress, --to, INLINECODE91
  • INLINECODE92: --tokenAddress, --to, INLINECODE95
  • INLINECODE96: --to, INLINECODE98
  • INLINECODE99: --target, --function, --args, INLINECODE103
  • INLINECODE104: --contractAddress, INLINECODE106
  • INLINECODE107: --target, --callData, INLINECODE110

revoke

Revoke a delegation on-chain. Revokes the first matching delegation.

  • - INLINECODE111

inspect

Inspect delegations for your account.

  • - INLINECODE112
  • With no filters, prints both Given and Received.
  • Printed fields: From, To, Authority, Caveats count, Signed flag.

Redeem Flags per Action

ActionRequired Flags
INLINECODE113INLINECODE114, --to, INLINECODE116
INLINECODE117
--tokenAddress, --to, --tokenId | | nativeTransfer | --to, --amount | | functionCall | --target, --function, --args | | ownershipTransfer | --contractAddress, --to | | raw | --target, --callData |

Example Flows

Initialize and upgrade:

CODEBLOCK2

Grant an ERC-20 transfer delegation:

CODEBLOCK3

Redeem an ERC-20 transfer:

CODEBLOCK4

Redeem a native transfer:

CODEBLOCK5

Redeem in raw mode:

CODEBLOCK6

Inspect delegations:

CODEBLOCK7

Revoke a delegation:

CODEBLOCK8

Operational Notes

  • - Private key security: This is alpha version. Private keys are stored in plaintext JSON. Never use accounts with significant funds.
  • INLINECODE134 refers to the delegator address; --to refers to the delegate/recipient.
  • INLINECODE136 and --selectors are comma-separated lists.
  • INLINECODE138 accepts a human-readable Solidity function signature like "approve(address,uint256)". Do not pass a 4-byte selector (e.g. 0x095ea7b3) — the CLI derives the selector from the signature automatically.
  • INLINECODE141 and --startTime accept unix timestamps in seconds. When omitted, they default to the current time.
  • INLINECODE143 is required for redeem and must be one of: erc20Transfer, erc721Transfer, nativeTransfer, functionCall, ownershipTransfer, raw.
  • Supported chains for --chain in gator init: base (default), baseSepolia, sepolia.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gator-cli-1776420045 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gator-cli-1776420045 技能

通过命令行安装

skillhub install gator-cli-1776420045

下载

⬇ 下载 gator-cli v1.0.1(免费)

文件大小: 3.12 KB | 发布时间: 2026-4-17 20:20

v1.0.1 最新 2026-4-17 20:20
- Added quick global installation instructions using `npm install -g @metamask/gator-cli`.
- Documented support for the `baseSepolia` chain in the `init` command.
- Clarified scopes, required and optional flags, and added detail on default values for `--startDate` and `--startTime`.
- For `functionCall` grants, explicitly documented the optional `--valueLte` flag.
- Added a warning regarding private key storage in plaintext JSON and alpha state of the tool.
- Made minor corrections and clarifications for improved usability and accuracy.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部