← 返回 Skills 市场
masoncags-tech

Abstract Onboard

作者 Masoncags-tech · GitHub ↗ · v1.6.0
cross-platform ⚠ suspicious
2145
总下载
5
收藏
2
当前安装
7
版本数
在 OpenClaw 中安装
/install abstract-onboard
功能描述
Deploy smart contracts and bridge assets to Abstract (ZK Stack L2). Use when an agent needs to deploy contracts on Abstract, bridge ETH/tokens to Abstract, trade/swap tokens, place predictions on Myriad Markets, check balances, transfer assets, or interact with Abstract mainnet. Covers zksolc compilation, Hardhat deployment, Relay bridging, DEX trading (Kona, Aborean), Myriad prediction markets, and key contract addresses.
使用说明 (SKILL.md)

Abstract Onboard

Everything an AI agent needs to operate on Abstract (ZK Stack L2).

🚀 New Agent? Start Here

# Check if you're ready to operate
node scripts/quick-start.js check \x3Cyour-wallet-address>

# Or get the full setup guide
node scripts/quick-start.js

Quick Start

Create Abstract Global Wallet (AGW)

AGW is a smart contract wallet that earns XP on Abstract. Essential for agents!

⚠️ CRITICAL: Understand the 3 layers first:

Private Key → EOA (signer) → AGW (smart contract wallet)

The correct funding flow:

1. Fund EOA with small ETH (for gas)
2. Create/deploy AGW (EOA pays gas for first tx)
3. Fund AGW with your main balance
4. Everything runs through AGW from now on
export WALLET_PRIVATE_KEY=0x...
node scripts/create-agw.js

Your EOA becomes the signer, AGW is a separate smart contract address.

⚠️ Version Warning: Different agw-client versions may compute different AGW addresses! Always pin your version. See references/agw.md for details.

Check Balances

node scripts/check-balances.js \x3Cwallet> all

Bridge ETH to Abstract

export WALLET_PRIVATE_KEY=0x...
node scripts/relay-bridge.js --from base --amount 0.01

Deploy a Contract

export WALLET_PRIVATE_KEY=0x...
node scripts/deploy-abstract.js ./artifacts/MyContract.json "constructor-arg"

Transfer Tokens

export WALLET_PRIVATE_KEY=0x...
node scripts/transfer.js --to 0x... --amount 0.01           # ETH
node scripts/transfer.js --to 0x... --amount 100 --token USDC  # Token

Swap Tokens

export WALLET_PRIVATE_KEY=0x...
export DEX_ROUTER=0x...  # Set DEX router address
node scripts/swap-tokens.js --from ETH --to USDC --amount 0.01

DEX Trading (Kona & Aborean)

Abstract has multiple DEXs. Use the protocol-specific scripts for best results:

# Kona Finance (V2) - USDC → ETH
export WALLET_PRIVATE_KEY=0x...
node scripts/swap-kona.js

# Aborean (Velodrome-style) - when router is available
node scripts/swap-aborean.js

# Generic Uniswap V2
node scripts/swap-uniswap-v2.js

See references/dex.md for contract addresses and supported pools.

Myriad Prediction Markets

Trade on Myriad Markets — the largest prediction market on Abstract (415K+ users, $100M+ volume).

# List open markets
node scripts/myriad-trade.js list

# Get market details
node scripts/myriad-trade.js info \x3CmarketId>

# Buy shares (place a prediction)
export WALLET_PRIVATE_KEY=0x...
node scripts/myriad-buy-direct.js \x3CmarketId> \x3CoutcomeId> \x3Camount>

# Example: $1 USDC.e on "Yes" for market 765
node scripts/myriad-buy-direct.js 765 0 1

See references/myriad.md for contract addresses, ABI details, and token info.

Call Any Contract

# Read
node scripts/call-contract.js --address 0x... --abi ./abi.json --function balanceOf --args 0x1234

# Write
export WALLET_PRIVATE_KEY=0x...
node scripts/call-contract.js --address 0x... --abi ./abi.json --function transfer --args 0x1234,100 --write

Mint NFT

# Deploy SimpleNFT.sol first, then mint
export WALLET_PRIVATE_KEY=0x...

# Mint to existing contract
node scripts/mint-nft.js --contract 0x... --image QmIPFShash --to 0xRecipient --name "My NFT"

See references/SimpleNFT.sol for a basic NFT contract template.

USDC Operations

# Check USDC balance
node scripts/usdc-ops.js balance \x3Cwallet>

# Transfer USDC
export WALLET_PRIVATE_KEY=0x...
node scripts/usdc-ops.js transfer \x3Cto> \x3Camount>

# Approve spender
node scripts/usdc-ops.js approve \x3Cspender> \x3Camount>

# Check allowance
node scripts/usdc-ops.js allowance \x3Cowner> \x3Cspender>

Estimate Gas

# Get current gas prices
node scripts/estimate-gas.js

# Estimate transfer cost
node scripts/estimate-gas.js transfer \x3Cto> \x3Camount>

# Estimate deployment cost
node scripts/estimate-gas.js deploy \x3CbytecodeSize>

Watch Events

# Watch new blocks
node scripts/watch-events.js blocks

# Watch ETH transfers to/from wallet
node scripts/watch-events.js transfers \x3Cwallet>

# Watch ERC20 transfers
node scripts/watch-events.js erc20 \x3Ctoken> \x3Cwallet>

# Watch contract events
node scripts/watch-events.js contract \x3Caddress>

Testnet Setup

# Get faucet instructions
node scripts/testnet-setup.js faucet

# Check testnet balance
node scripts/testnet-setup.js check \x3Cwallet>

# Verify testnet setup
node scripts/testnet-setup.js verify \x3Cwallet>

Key Information

Item Value
Chain ID 2741
RPC https://api.mainnet.abs.xyz
Explorer https://abscan.org
Bridge https://relay.link/bridge/abstract
USDC 0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1
WETH 0x3439153EB7AF838Ad19d56E1571FBD09333C2809
Kona Router 0x441E0627Db5173Da098De86b734d136b27925250
Uniswap V2 Router 0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c
Myriad PM Contract 0x3e0F5F8F5Fb043aBFA475C0308417Bf72c463289
Myriad PTS Token 0x0b07cf011B6e2b7E0803b892d97f751659940F23
Myriad API https://api-v2.myriadprotocol.com

Scripts

Script Purpose
quick-start.js START HERE - Setup guide & health check
create-agw.js Create Abstract Global Wallet (earns XP!)
check-balances.js Check ETH and token balances
relay-bridge.js Bridge ETH from other chains
bridge-usdc-relay.js Bridge USDC via Relay API
deploy-abstract.js Deploy contracts to Abstract (with verification!)
verify-contract.js Verify contract has bytecode (SAFETY CHECK)
transfer.js Send ETH or tokens
usdc-ops.js USDC transfers, approvals, allowances
swap-tokens.js Trade tokens via DEX (generic)
swap-kona.js Swap on Kona Finance (V2) ✅
swap-aborean.js Swap on Aborean (Velodrome-style)
swap-uniswap-v2.js Swap on Uniswap V2
myriad-trade.js List markets, get info (Myriad API)
myriad-buy-direct.js Place predictions on Myriad (on-chain) ✅
call-contract.js Call any contract function
mint-nft.js Mint NFTs to existing contract
estimate-gas.js Estimate gas costs before transactions
watch-events.js Monitor on-chain events in real-time
testnet-setup.js Setup and verify testnet access

References

File Contents
agw.md Abstract Global Wallet guide (XP, activation)
dex.md DEX contracts & swap patterns (Kona, Aborean)
myriad.md Myriad prediction market contracts, ABI & trading
hardhat.config.js Working Hardhat config for Abstract
addresses.md Key contract addresses
troubleshooting.md Common errors and fixes
SimpleNFT.sol Basic NFT contract template

⚠️ CRITICAL: Contract Deployment

Abstract is a zkSync-based chain. Standard EVM deployment methods DON'T WORK.

What WORKS ✅

// Use zksync-ethers (NOT viem, NOT standard ethers)
const { ContractFactory } = require("zksync-ethers");
const factory = new ContractFactory(abi, bytecode, wallet);
const contract = await factory.deploy(args);

// ALWAYS verify bytecode after deploy
const code = await provider.getCode(address);
if (code === '0x') throw new Error("Deploy failed!");

What DOESN'T WORK ❌

// DON'T use viem's deployContract
await walletClient.deployContract({...}); // Returns success but NO BYTECODE

// DON'T use standard ethers ContractFactory
// DON'T trust transaction success alone

Deployment Checklist

  • Compiled with zksolc (not standard solc)
  • Using zksync-ethers ContractFactory
  • Verify eth_getCode != 0x after deploy
  • Test contract functions before sending tokens

Common Issues

  1. Gas estimation fails → Use Hardhat, not foundry-zksync
  2. Compiler errors → Use Solidity 0.8.x with zksolc
  3. TX stuck → Check gas price, verify on abscan.org
  4. Deploy succeeds but no bytecode → Use zksync-ethers, not viem
  5. Tokens sent to empty address → Always verify bytecode first!

See references/troubleshooting.md for detailed solutions.

Dependencies

# Core dependencies
npm install ethers zksync-ethers viem

# For contract deployment
npm install @matterlabs/hardhat-zksync

# For AGW (Abstract Global Wallet) - PIN THE VERSION!
# Different versions compute different AGW addresses
npm install @abstract-foundation/[email protected]

⚠️ agw-client version warning: Newer versions may use different factory contracts, computing different AGW addresses for the same EOA. If you change versions, verify your AGW address hasn't changed before sending funds!

安全使用建议
This skill appears to implement the advertised Abstract (ZK Stack L2) operations, but the registry metadata is misleading: it claims no required environment variables while the scripts repeatedly expect your wallet private key (WALLET_PRIVATE_KEY or PRIVATE_KEY) and will sign and send real transactions (bridge, swap, transfer, deploy). Before installing or running it: - Do not provide your mainnet private key to this skill without strong review and safeguards. Treat the key as highly sensitive. - Audit the scripts you plan to run. The bridge script will attempt to bridge nearly the entire token balance automatically — run it only after inspecting the code and testing on testnet with a throwaway key. - Prefer using a testnet or a throwaway wallet first to validate behavior, or use a hardware wallet / multisig where feasible (these scripts expect raw private keys and will not work with hardware wallets as-is). - Pin and inspect dependencies locally (package.json). Run npm install in an isolated environment and review node_modules or use reproducible lockfile to avoid supply-chain risks. - Note inconsistent env var names across scripts (WALLET_PRIVATE_KEY vs PRIVATE_KEY). Use caution to avoid accidentally exposing the wrong key. - If you decide to use it, run each action manually (read the script, run in dry-run or with small amounts) and avoid any script that automatically moves your entire balance without confirmation. Given the metadata omissions and potentially destructive defaults, treat this skill as suspicious until you (or a trusted auditor) verify the code and run it in a safe environment.
功能分析
Type: OpenClaw Skill Name: abstract-onboard Version: 1.6.0 The skill bundle provides a comprehensive set of tools for interacting with the Abstract L2 blockchain, including deploying contracts, bridging assets, swapping tokens, and interacting with prediction markets. All scripts requiring sensitive operations, such as signing transactions, correctly utilize `WALLET_PRIVATE_KEY` from environment variables, which is a standard and necessary practice for automated blockchain interaction. External network calls are made to legitimate RPC endpoints and dApp-specific APIs (e.g., `api.relay.link`, `api-v2.myriadprotocol.com`). The `SKILL.md` instructions and other documentation files guide the AI agent in performing its stated task, including critical warnings about blockchain-specific risks (e.g., AGW versioning, deployment failures), but do not contain any prompt injection attempts to subvert the agent's core directives or exfiltrate unrelated data. There is no evidence of intentional harmful behavior, data exfiltration, malicious execution, persistence mechanisms, or obfuscation for illicit purposes.
能力评估
Purpose & Capability
The name/description (deploy, bridge, trade, manage AGW on Abstract) match the included scripts and reference docs. The code implements the advertised capabilities (deploy-abstract, relay-bridge, swaps, Myriad interactions, AGW creation).
Instruction Scope
SKILL.md and scripts instruct the agent/user to provide private keys (WALLET_PRIVATE_KEY or PRIVATE_KEY) and to run actions that transfer value (bridge, swap, transfer, approve). Some scripts (bridge-usdc-relay.js) automatically compute the full token balance and execute all steps returned by an external quote API, effectively bridging nearly the entire balance without an explicit per-step confirmation. Scripts expect and will use secrets and can perform irreversible on-chain operations — this is in-scope for the stated purpose but requires clear user consent and safeguards; the skill's instructions do not enforce or document enough safety checks.
Install Mechanism
There is no install spec in registry metadata (instruction-only), but a package.json with dependencies (ethers, zksync-ethers, viem, @abstract-foundation/agw-client) is included. Installing these via npm is expected for functionality; there are no obscure external download URLs in the manifest. However the install step is not declared in the registry metadata, which is an omission the user should be aware of.
Credentials
Registry metadata states 'Required env vars: none', but many scripts and SKILL.md explicitly require WALLET_PRIVATE_KEY or PRIVATE_KEY, and some accept ABSTRACT_RPC/ABSTRACT_RPC/DEX_ROUTER and other env vars. Requiring a private key is proportionate to the claimed functionality, but the metadata omission is a significant mismatch and the skill asks for highly sensitive secrets without declaring them. Multiple env var names are used inconsistently across scripts (WALLET_PRIVATE_KEY vs PRIVATE_KEY), increasing risk of accidental use of the wrong secret.
Persistence & Privilege
The skill does not request always:true, does not attempt to alter other skills or system-wide settings, and is not marked to run persistently. It operates as invoked — autonomy is allowed by default but not elevated here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install abstract-onboard
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /abstract-onboard 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.6.0
- added 3, updated 1 file(s). - Updated SKILL.md and bundle contents.
v1.5.0
Added DEX trading (Kona, Aborean, Uniswap V2), USDC bridging via Relay, improved AGW funding flow docs
v1.2.0
Added NFT minting script and SimpleNFT.sol template
v1.1.0
Added verify-contract.js safety tool, fixed deployment warnings, comprehensive troubleshooting guide
v1.0.2
Full Abstract toolkit for agents
v1.0.1
Initial release: AGW creation, bridging, deployment, trading, transfers
v1.0.0
Initial release: AGW creation, bridging, deployment, trading, transfers
元数据
Slug abstract-onboard
版本 1.6.0
许可证
累计安装 2
当前安装数 2
历史版本数 7
常见问题

Abstract Onboard 是什么?

Deploy smart contracts and bridge assets to Abstract (ZK Stack L2). Use when an agent needs to deploy contracts on Abstract, bridge ETH/tokens to Abstract, trade/swap tokens, place predictions on Myriad Markets, check balances, transfer assets, or interact with Abstract mainnet. Covers zksolc compilation, Hardhat deployment, Relay bridging, DEX trading (Kona, Aborean), Myriad prediction markets, and key contract addresses. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2145 次。

如何安装 Abstract Onboard?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install abstract-onboard」即可一键安装,无需额外配置。

Abstract Onboard 是免费的吗?

是的,Abstract Onboard 完全免费(开源免费),可自由下载、安装和使用。

Abstract Onboard 支持哪些平台?

Abstract Onboard 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Abstract Onboard?

由 Masoncags-tech(@masoncags-tech)开发并维护,当前版本 v1.6.0。

💬 留言讨论