Skip to main content

Quick Start

This guide walks you through the core ClawWallet workflow in under 5 minutes:

  1. Connect your wallet to Abstract Chain
  2. Mint a .claw identity domain
  3. Deploy an agent wallet
  4. Install your first skill

Prerequisites

  • A wallet with ETH on Abstract Chain (Chain ID 2741)
  • Node.js v18+ (for code examples)
  • Basic familiarity with ethers.js v6
Getting ETH on Abstract

Bridge ETH to Abstract Chain via the Abstract Bridge or directly from Ethereum mainnet. You'll need approximately 0.003 ETH for this entire quickstart.

Step 1: Connect to Abstract Chain

setup.ts
import { ethers } from 'ethers';

// Abstract Chain RPC
const provider = new ethers.JsonRpcProvider('https://api.mainnet.abs.xyz');

// Connect your wallet
const wallet = new ethers.Wallet('YOUR_PRIVATE_KEY', provider);

console.log('Connected to Abstract Chain');
console.log('Address:', wallet.address);
console.log('Chain ID:', (await provider.getNetwork()).chainId); // 2741n

Step 2: Mint a .claw Domain

Your .claw domain is your on-chain agent identity — an ERC-721 NFT registered in the ERC-8004 Identity Registry. It costs 0.001 ETH to mint.

mint-domain.ts
const IDENTITY_REGISTRY = '0x01949e45FabCD684bcD4747966145140aB4778E5';

const identityABI = [
'function register(string calldata agentURI) external payable returns (uint256 agentId)',
'function mintFee() external view returns (uint256)',
'function totalAgents() external view returns (uint256)',
];

const identity = new ethers.Contract(IDENTITY_REGISTRY, identityABI, wallet);

// Check the current mint fee
const mintFee = await identity.mintFee();
console.log('Mint fee:', ethers.formatEther(mintFee), 'ETH'); // 0.001 ETH

// Register your agent with a metadata URI
const agentURI = 'https://example.com/agent-metadata.json';
const tx = await identity.register(agentURI, { value: mintFee });
const receipt = await tx.wait();

// Extract the agentId from the Registered event
const registeredEvent = receipt.logs.find(
(log) => log.address.toLowerCase() === IDENTITY_REGISTRY.toLowerCase()
);
console.log('✅ .claw domain minted! TX:', receipt.hash);

The agentURI should point to a JSON file following the ERC-8004 registration format:

agent-metadata.json
{
"name": "MyAgent",
"description": "An autonomous trading agent on Abstract Chain",
"version": "1.0.0",
"services": [
{
"type": "defi-trading",
"endpoint": "https://api.myagent.xyz/trade",
"description": "Automated DeFi trading strategies"
}
],
"trustModel": {
"type": "reputation-based",
"registries": ["eip155:2741:0x2AAab9989a127F9Cad871311673fd8c727738F5F"]
}
}

Step 3: Deploy an Agent Wallet

The ClawWalletFactory deploys a smart contract wallet for your agent. The wallet creation fee is 0.0005 ETH.

deploy-wallet.ts
const FACTORY = '0xf6B945dBf532D376A475E31be32F51972915B1cc';

const factoryABI = [
'function createWallet(address agent) external payable returns (address wallet)',
'function creationFee() external view returns (uint256)',
'function agentToWallet(address agent) external view returns (address)',
'function predictWalletAddress(address owner, address agent) external view returns (address)',
];

const factory = new ethers.Contract(FACTORY, factoryABI, wallet);

// Your agent's address (can be an EOA or another contract)
const agentAddress = '0xYOUR_AGENT_ADDRESS';

// Check the creation fee
const creationFee = await factory.creationFee();
console.log('Creation fee:', ethers.formatEther(creationFee), 'ETH');

// Predict the wallet address before deploying
const predictedAddress = await factory.predictWalletAddress(wallet.address, agentAddress);
console.log('Predicted wallet address:', predictedAddress);

// Deploy the wallet
const tx = await factory.createWallet(agentAddress, { value: creationFee });
const receipt = await tx.wait();

// Get the wallet address from the event
const walletAddress = await factory.agentToWallet(agentAddress);
console.log('✅ Agent wallet deployed at:', walletAddress);
Deterministic Addresses

Wallet addresses are derived from keccak256(owner, agent), so you can predict the address before deployment. Use predictWalletAddress() for UI pre-computation.

Step 4: Install a Skill

Skills are smart contracts that your agent wallet can interact with. Install an approved skill from the ClawSkillRegistry:

install-skill.ts
const WALLET_ADDRESS = '0xYOUR_WALLET_ADDRESS'; // from Step 3

const walletABI = [
'function installSkill(address skill) external',
'function getInstalledSkills() external view returns (address[])',
'function isSkillInstalled(address skill) external view returns (bool)',
];

const agentWallet = new ethers.Contract(WALLET_ADDRESS, walletABI, wallet);

// Install an approved skill (example address)
const skillAddress = '0xSKILL_CONTRACT_ADDRESS';
const tx = await agentWallet.installSkill(skillAddress);
await tx.wait();

// Verify installation
const installed = await agentWallet.isSkillInstalled(skillAddress);
console.log('✅ Skill installed:', installed);

// List all installed skills
const skills = await agentWallet.getInstalledSkills();
console.log('Installed skills:', skills);

Step 5: Execute a Transaction

Your agent can now execute transactions through the wallet:

execute-tx.ts
const walletABI = [
'function execute(address target, uint256 value, bytes calldata data) external payable returns (bytes memory)',
];

const agentWallet = new ethers.Contract(WALLET_ADDRESS, walletABI, agentSigner);

// Send ETH to another address
const tx = await agentWallet.execute(
'0xRECIPIENT_ADDRESS',
ethers.parseEther('0.01'),
'0x' // empty calldata for plain ETH transfer
);
await tx.wait();
console.log('✅ Transaction executed!');

What's Next?

You've set up the core ClawWallet stack! Here's where to go from here:

TopicDescription
Architecture OverviewUnderstand how all 12+ contracts work together
Agent WalletsDeep dive into wallet features — session keys, spending limits, batch execution
ERC-8004 IdentityLearn about the full identity standard — reputation, validation
Gasless TransactionsSet up the ClawPaymaster for gas-free agent operations
Building a Custom SkillCreate and register your own skill contract

Contract Addresses Reference

ContractAddress
ClawWalletFactory V20xf6B945dBf532D376A475E31be32F51972915B1cc
ERC8004 Identity V20x01949e45FabCD684bcD4747966145140aB4778E5
ClawSkillRegistry V20xb9913F4fceA83fF3F9c7D56339Abc196408Cf21b
ClawPaymaster0x7BBBBbDaCE3EA19Fe317e620CbD89F1040F2ddAf

See the full list in Deployed Contracts.