Get the FREE Ultimate OpenClaw Setup Guide →

status

Scanned
npx machina-cli add skill HCS412/contractkit/status --openclaw
Files (1)
SKILL.md
1.9 KB

ContractKit: Status

Display current project status, network configuration, and deployed contract addresses.

Usage

/contractkit:status [--network <network>]

Process

1. Verify Project

Check that foundry.toml exists. If not:

Error: Not in a ContractKit/Foundry project.
Run /contractkit:new to create a project first.

2. Check Local Chain

Test if Anvil is running:

curl -s http://127.0.0.1:8545 -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

3. Load Deployments

Check for deployment files:

  • deployments/local.json
  • deployments/sepolia.json

4. Display Status

Output Format

=== ContractKit Status ===

Project: MyToken
Directory: /path/to/mytoken

=== Networks ===

Local (http://127.0.0.1:8545)
  Status: Running (block #42)
  Deployments:
    Token: 0x5FbDB2315678afecb367f032d93F642f64180aa3

Sepolia
  Status: Configured (RPC in .env)
  Deployments:
    Token: 0x1234...abcd

=== Quick Commands ===

  /contractkit:call name                    # Get token name
  /contractkit:call balanceOf --args "0x..."  # Check balance
  /contractkit:deploy local                 # Deploy to local

Deployment File Schema

deployments/<network>.json:

{
  "Token": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
  "deployedAt": "2024-01-15T10:30:00Z",
  "deployer": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
}

Error States

No Project

Error: Not in a ContractKit project.
Navigate to a project directory or run /contractkit:new

No Deployments

=== Deployments ===
No deployments found.

Run /contractkit:deploy local to deploy.

Local Chain Not Running

Local (http://127.0.0.1:8545)
  Status: Not running

Start with: /contractkit:local

Source

git clone https://github.com/HCS412/contractkit/blob/main/plugins/contractkit/skills/status/SKILL.mdView on GitHub

Overview

Displays the current ContractKit project state, network configuration, and deployed contract addresses. It helps you verify you’re in a valid project, confirm the local chain status, and see which contracts are deployed where.

How This Skill Works

The skill first verifies the project by checking for foundry.toml. It then checks the local chain (e.g., Anvil) via a RPC call. Next it loads deployment data from deployments/local.json and deployments/sepolia.json and finally formats a status summary showing networks and deployments.

When to Use It

  • You want to confirm you’re inside a ContractKit/Foundry project before proceeding.
  • You need to verify whether a local chain is running (e.g., Anvil).
  • You want to inspect configured networks and their deployment addresses.
  • You need to view deployed contract addresses (e.g., Token) across networks.
  • You need guidance when deployments are missing or the local chain isn’t running.

Quick Start

  1. Step 1: Run /contractkit:status [--network <network>].
  2. Step 2: Review the Networks and Deployments sections for current state.
  3. Step 3: If issues appear, start the local chain with /contractkit:local or create a project with /contractkit:new.

Best Practices

  • Always verify foundry.toml exists before running /contractkit:status.
  • Check the Local chain status (Anvil) prior to inspecting deployments.
  • Keep deployments/local.json and deployments/sepolia.json up to date with new deployments.
  • Review the Status output format to confirm correct network and addresses.
  • Use the quick commands section to interact with contracts after confirming status.

Example Use Cases

  • View the Local network status and Token address after a local deploy.
  • Verify Sepolia deployment addresses to ensure correct network targets.
  • Encounter Not in a ContractKit/Foundry project error and follow the guidance.
  • No deployments found; run /contractkit:deploy local to create them.
  • Start the local chain and run /contractkit:status to see the latest block and deployments.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers