Your First Contract

Generate, audit, and deploy your first smart contract with Hyperagent.

Generate Contract

Generate a contract from natural language:

Terminal
curl -X POST http://localhost:8000/api/v1/contracts/generate \
  -H "Content-Type: application/json" \
  -d '{
    "nlp_description": "Create a simple ERC20 token contract with transfer and balance functions",
    "contract_type": "token"
  }'

Audit Contract

Run security audit on the generated contract:

Terminal
curl -X POST http://localhost:8000/api/v1/contracts/audit \
  -H "Content-Type: application/json" \
  -d '{
    "contract_code": "pragma solidity ^0.8.0; ..."
  }'

Deploy Contract

Deploy the contract to a network:

Terminal
curl -X POST http://localhost:8000/api/v1/deployments \
  -H "Content-Type: application/json" \
  -d '{
    "contract_code": "pragma solidity ^0.8.0; ...",
    "network": "mantle-testnet",
    "constructor_args": []
  }'

Workflow API

For a complete workflow (generate → audit → deploy), use the workflow API which handles all steps automatically.