← Back to Skills
developer-tools

abstract-dev

Andro Metta By Andro Metta 👁 118 views ▲ 0 votes

Foundry toolkit for .claw agents — write, compile, test, and deploy EVM smart contracts on Abstract Chain. Wraps forge + cast with Abstract-native defaults. Your .claw agent doesn't just hold tokens. It ships contracts.

GitHub
---
name: abstract-dev
version: 1.0.0
description: Foundry toolkit for .claw agents — write, compile, test, and deploy EVM smart contracts on Abstract Chain. Wraps forge + cast with Abstract-native defaults (correct RPC, chain ID, block explorer).
homepage: https://clawwallet.buzz
docs: https://book.getfoundry.sh
github: https://github.com/foundry-rs/foundry
metadata:
  category: developer-tools
  chain: abstract
  chain_id: 2741
  testnet_chain_id: 11124
  requires: foundry, jq
  abstract_chain_promo: true
  openclaw_native: true
---

# Abstract Dev Skill

> *"Your .claw agent doesn't just hold tokens. It ships contracts."*

The Abstract Dev skill wraps [Foundry](https://getfoundry.sh) (forge + cast) with Abstract Chain defaults — so your .claw agent can write, compile, test, and deploy EVM smart contracts without fussing over RPC URLs, chain IDs, or explorer configs.

---

## What Agents Can Do

| Action | Command | Description |
|--------|---------|-------------|
| 🏗️ **Scaffold** | `init [name]` | New Foundry project pre-configured for Abstract |
| 🔨 **Compile** | `compile` | `forge build` — compile all contracts |
| 🧪 **Test** | `test` | `forge test` — run the full test suite |
| üöÄ **Deploy** | `deploy <File:Contract> [args]` | Deploy to Abstract mainnet or testnet |
| ‚úÖ **Verify** | `verify <address> <File:Contract>` | Verify source on abscan.org |
| üìñ **Read** | `call <address> <sig> [args]` | Read contract state via `cast call` |
| ✍️ **Write** | `send <address> <sig> [args]` | Execute transactions via `cast send` |
| üí∞ **Balance** | `balance [address]` | Check ETH balance on Abstract |
| üìä **Status** | `status` | Config, wallet, RPC health, recent deployments |

---

## Quick Start

```bash
# Pin ABSTRACT_DEV to an absolute path so it works from any directory
export ABSTRACT_DEV="$(pwd)/skills/abstract-dev/scripts/abstract-dev.sh"

# 1. Scaffold a new project (run from repo root)
$ABSTRACT_DEV init my-agent-contracts
cd my-agent-contracts

# 2. Set your environment
export PRIVATE_KEY=0x...
export ABSTRACT_NETWORK=testnet   # start on testnet

# 3. Compile + test
$ABSTRACT_DEV compile
$ABSTRACT_DEV test

# 4. Deploy
$ABSTRACT_DEV deploy src/AgentContract.sol:AgentContract "my.claw"

# 5. Verify
export ABSCAN_API_KEY=your_key
$ABSTRACT_DEV verify 0xDeployed... src/AgentContract.sol:AgentContract
```

---

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `PRIVATE_KEY` | For deploy/send | Deployer private key (0x...) |
| `ABSTRACT_NETWORK` | No | `mainnet` (default) or `testnet` |
| `ABSCAN_API_KEY` | For verify | Get at [abscan.org](https://abscan.org) |
| `ABSTRACT_WALLET` | No | Read-only wallet address (for balance/status) |

---

## Network Config

| | Mainnet | Testnet |
|---|---------|---------|
| Chain ID | 2741 | 11124 |
| RPC | api.mainnet.abs.xyz | api.testnet.abs.xyz |
| Explorer | abscan.org | sepolia.abscan.org |

> ⚠️ `explorer.abs.xyz` is dead (404). Always use abscan.org.

---

## Starter Contract

`init` scaffolds an `AgentContract.sol` — a simple on-chain agent registry:

```solidity
// Tracks actions taken by the .claw agent
function executeAction(string calldata action) external onlyOwner {
    actionCount++;
    emit ActionExecuted(msg.sender, action, block.timestamp);
}
```

Extend it for trading logic, skill registration, governance, whatever your agent needs.

---

## Deployment Log

Every deploy is logged to `~/.abstract-dev/deployments.jsonl`:

```json
{"address":"0x...","contract":"AgentContract","network":"mainnet","chainId":"2741","timestamp":"2026-02-25T..."}
```

`status` shows your 5 most recent deployments.

---

## Requirements

- **Foundry** — `curl -L https://foundry.paradigm.xyz | bash && foundryup`
- **jq** — macOS: `brew install jq` · Linux: `apt install jq` / `yum install jq`
- **Node.js 18+** (for MCP integrations)

---

## For Agents

When asked to deploy a contract on Abstract Chain, use this skill:

1. Run `status` first to confirm RPC connectivity + wallet
2. Use `testnet` for anything experimental
3. Always `compile` + `test` before `deploy`
4. Always `verify` after successful deploy
5. Log the deployed address to the user

Example agent prompt:
> "Deploy an ERC-20 token called ClawToken (CLW) with 1 million supply to Abstract Testnet"

```bash
export ABSTRACT_NETWORK=testnet
export PRIVATE_KEY=$AGENT_PRIVATE_KEY
export ABSTRACT_DEV="$(pwd)/skills/abstract-dev/scripts/abstract-dev.sh"

$ABSTRACT_DEV init claw-token
# edit src/ to add ERC-20 contract
cd claw-token
$ABSTRACT_DEV compile
$ABSTRACT_DEV test
$ABSTRACT_DEV deploy src/ClawToken.sol:ClawToken "ClawToken" "CLW" 1000000000000000000000000
$ABSTRACT_DEV verify 0x... src/ClawToken.sol:ClawToken "ClawToken" "CLW" 1000000000000000000000000
```

Comments

Sign in to leave a comment

Loading comments...