deploy_contract
Deploy a Clarity smart contract to the Stacks blockchain, with optional fee presets and sponsored transactions so a relay can cover deployment fees.
Instructions
Deploy a Clarity smart contract to the Stacks blockchain.
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 50,000 uSTX max for deployments. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true. | |
| codeBody | Yes | The complete Clarity source code | |
| sponsored | No | Use sponsored transaction relay so a relay service pays fees instead of your wallet. Requires SPONSOR_API_KEY env var or wallet-level sponsorApiKey. | |
| contractName | Yes | Unique name for the contract (lowercase, hyphens allowed) |