abstract-onboardDeploy 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.
Install via ClawdBot CLI:
clawdbot install Masoncags-tech/abstract-onboardEverything an AI agent needs to operate on Abstract (ZK Stack L2).
# Check if you're ready to operate
node scripts/quick-start.js check <your-wallet-address>
# Or get the full setup guide
node scripts/quick-start.js
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.
node scripts/check-balances.js <wallet> all
export WALLET_PRIVATE_KEY=0x...
node scripts/relay-bridge.js --from base --amount 0.01
export WALLET_PRIVATE_KEY=0x...
node scripts/deploy-abstract.js ./artifacts/MyContract.json "constructor-arg"
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
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
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.
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 <marketId>
# Buy shares (place a prediction)
export WALLET_PRIVATE_KEY=0x...
node scripts/myriad-buy-direct.js <marketId> <outcomeId> <amount>
# 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.
# 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
# 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.
# Check USDC balance
node scripts/usdc-ops.js balance <wallet>
# Transfer USDC
export WALLET_PRIVATE_KEY=0x...
node scripts/usdc-ops.js transfer <to> <amount>
# Approve spender
node scripts/usdc-ops.js approve <spender> <amount>
# Check allowance
node scripts/usdc-ops.js allowance <owner> <spender>
# Get current gas prices
node scripts/estimate-gas.js
# Estimate transfer cost
node scripts/estimate-gas.js transfer <to> <amount>
# Estimate deployment cost
node scripts/estimate-gas.js deploy <bytecodeSize>
# Watch new blocks
node scripts/watch-events.js blocks
# Watch ETH transfers to/from wallet
node scripts/watch-events.js transfers <wallet>
# Watch ERC20 transfers
node scripts/watch-events.js erc20 <token> <wallet>
# Watch contract events
node scripts/watch-events.js contract <address>
# Get faucet instructions
node scripts/testnet-setup.js faucet
# Check testnet balance
node scripts/testnet-setup.js check <wallet>
# Verify testnet setup
node scripts/testnet-setup.js verify <wallet>
| 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 |
| 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 |
| 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 |
Abstract is a zkSync-based chain. Standard EVM deployment methods DON'T WORK.
// 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!");
// 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
zksync-ethers ContractFactoryeth_getCode != 0x after deploySee references/troubleshooting.md for detailed solutions.
# 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/agw-client@1.10.0
⚠️ 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!
Generated Mar 1, 2026
An AI agent automates yield farming strategies on Abstract by deploying custom smart contracts to interact with DEXs like Kona and Aborean. It bridges assets from Ethereum or Base, swaps tokens for optimal liquidity provision, and monitors events for rebalancing. This reduces manual intervention and maximizes returns through algorithmic trading.
An AI agent trades on Myriad Markets by analyzing market data and placing predictions automatically. It uses scripts to list markets, buy shares in outcomes, and manage USDC balances for efficient capital allocation. This enables scalable, data-driven betting in prediction markets with high volume.
An AI agent deploys NFT contracts using zksolc compilation and mints NFTs for creators on Abstract. It handles transfers to recipients, manages metadata, and integrates with DEXs for token swaps to fund operations. This streamlines NFT launches and secondary market interactions.
An AI agent bridges ETH and USDC from other chains to Abstract using Relay, then deploys AGWs for smart contract wallets to earn XP. It automates balance checks, transfers, and contract interactions for portfolio management. This simplifies multi-chain operations and enhances security through AGW usage.
An AI agent assists developers by deploying and testing contracts on Abstract's testnet and mainnet. It uses Hardhat scripts for compilation, estimates gas costs, and calls contracts for verification. This accelerates development cycles and ensures reliable deployments in ZK Stack environments.
Offer a subscription-based service where users access AI agents to automate yield farming, trading, and asset bridging on Abstract. Revenue comes from monthly fees and a percentage of profits generated by the agents. This model targets retail and institutional investors seeking passive income.
Sell data analytics and trading signals for Myriad Markets, with AI agents executing trades based on insights. Revenue is generated through premium API access, one-time report sales, and affiliate partnerships. This caters to traders and researchers in prediction markets.
Provide a customizable platform for creators to launch NFTs on Abstract, using AI agents to handle deployment, minting, and distribution. Revenue comes from setup fees, transaction royalties, and ongoing maintenance charges. This serves artists and brands entering the NFT space.
💬 Integration Tip
Start by setting up an Abstract Global Wallet with the correct funding flow to avoid gas issues, and use the quick-start script for health checks before deploying agents.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.