# Contract Deployer

> Compile and deploy Solidity smart contracts to EVM chains.

- Skill: `xspoonai/contract-deployer` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add xspoonai/contract-deployer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xspoonai/contract-deployer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: XSpoonAi (https://skillmd.com/u/xspoonai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/xspoonai/contract-deployer

---


# Smart Contract Deployer

A skill to compile and deploy Solidity smart contracts. It supports compiling source code or files and deploying to any EVM-compatible blockchain.

## Quick Start

```python
# Deploy a simple contract
result = await agent.run_tool(
    "deploy_contract",
    source_code="contract Hello { string public message = 'Hello'; }",
    contract_name="Hello",
    rpc_url="http://localhost:8545",
    private_key="0x..."
)
print(result)
```

## Scripts

| Script | Purpose |
|--------|---------|
| [deploy.py](scripts/deploy.py) | Compiles and deploys Solidity contracts |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `WEB3_RPC_URL` | No | Default RPC URL (can be passed as arg) |
| `PRIVATE_KEY` | No | Default Private Key (can be passed as arg) |

## Best Practices

1. Use specific compiler versions (e.g., `0.8.19`).
2. Always verify the RPC URL and Chain ID before deploying to mainnet.

