Synopsis
Subcommands
cowboy actor deploy
Deploy an actor to the chain from a Python source file.
By default, deploy is atomic: the deployment transaction carries an embedded init call that runs in the same block as the deploy. This closes the race window between deployment and a manual execute --handler init, which previously allowed other transactions to observe the actor in an uninitialised state.
Behavior:
- Load the private key using key auto-discovery.
- Read the actor source code from
--codepath. - Resolve atomic-init parameters (see Atomic init below).
- Build a DeployActor transaction with the specified fee limits, carrying
init_handlerandinit_payloadunless--no-initwas passed. - If
--nonceis omitted, auto-fetch the current nonce from the chain. - If
--cycles-limit/--cells-limitare omitted, auto-discover a safe value from the sender’s balance. If--max-fee-per-cycle/--max-fee-per-cellare omitted, read the current/basefee. An explicit value (including0) is always used as-is — no auto-discovery when the flag is supplied. - Sign and submit the transaction.
- Print the transaction hash, the deterministic actor address, and a summary line showing whether atomic init was applied.
| Flag | Default | Description |
|---|---|---|
--code | Required | Path to the actor Python source file |
--salt | empty | Hex salt for CREATE2-style address derivation (max 32 bytes) |
--private-key | Auto-discovered | Path to private key file |
--nonce | unset (auto-fetch from chain) | Transaction nonce. Pass an explicit integer to override. |
--cycles-limit | unset (auto from balance) | Maximum compute cycles. Pass an explicit integer — including 0, which means no cycles budget — to override. |
--cells-limit | unset (auto from balance) | Maximum storage cells. Pass an explicit integer — including 0, which means no cells budget — to override. |
--max-fee-per-cycle | unset (reads /basefee) | Max fee per compute cycle. Pass an explicit integer — including 0, which will reject any non-zero basefee — to override. |
--max-fee-per-cell | unset (reads /basefee) | Max fee per storage cell. Pass an explicit integer — including 0, which will reject any non-zero basefee — to override. |
--manifest-json | None | Path to an ActorManifest JSON file declaring entitlements (optional) |
--no-init | false | Disable atomic init. Use for actors that do not define an init handler |
--init-handler | init | Handler name to invoke atomically after deploy |
--init-payload | {} | Payload passed to the init handler — inline JSON string or @path/to/file.json |
Note on0vs. omitted.--cycles-limit,--cells-limit,--max-fee-per-cycle, and--max-fee-per-celltreat unset and explicitly0as two different things. Omit the flag to let the CLI pick a safe value from your balance or the current basefee. Pass--cycles-limit 0(or any explicit integer) when you have already computed the exact budget you want — the CLI will use that value verbatim, even if it is zero, and the transaction will revert on the first metered operation if the budget is too small. This avoids surprise overrides in scripts that compute limits up front.
Atomic init
By default, the CLI setsinit_handler = "init" and init_payload = "{}", so a plain cowboy actor deploy --code ... both deploys the actor and calls its init() handler in the same transaction.
--init-handler <name>overrides the handler name (useful if your actor exposes init under a different method).--init-payload '<json>'passes an inline JSON string.--init-payload @./init.jsonreads the payload from a file in the current working directory. File loading is bounded to 1 MB, restricted to the current working directory, and usesO_NOFOLLOWto prevent symlink traversal attacks.--no-initdisables atomic init entirely. Use this when the actor has no init handler; otherwise the deploy transaction will fail because the unknown handler is uncallable.--no-initconflicts with--init-handlerand--init-payload— passing both errors out with a clear message.
cowboy actor execute
Call a handler method on a deployed actor.
Behavior:
- Load the private key using key auto-discovery.
- Build an ActorMessage transaction targeting the specified actor and handler.
- The payload can be a hex string or a file path prefixed with
@. - If
--nonceis omitted, auto-fetch the current nonce from the chain. - Apply the same “unset = auto, explicit = literal” resolution for fee and limit flags as
deploy(see the note below). - Sign and submit the transaction.
- Print the transaction hash.
| Flag | Default | Description |
|---|---|---|
--actor | Required | Target actor address (hex) |
--handler | Required | Handler method name to invoke |
--payload | Required | Hex-encoded payload or @path/to/file |
--private-key | Auto-discovered | Path to private key file |
--nonce | unset (auto-fetch from chain) | Transaction nonce. Pass an explicit integer to override. |
--cycles-limit | unset (auto from balance) | Maximum compute cycles. Pass an explicit integer — including 0, which means no cycles budget — to override. |
--cells-limit | unset (auto from balance) | Maximum storage cells. Pass an explicit integer — including 0, which means no cells budget — to override. |
--max-fee-per-cycle | unset (reads /basefee) | Max fee per compute cycle. Pass an explicit integer — including 0, which will reject any non-zero basefee — to override. |
--max-fee-per-cell | unset (reads /basefee) | Max fee per storage cell. Pass an explicit integer — including 0, which will reject any non-zero basefee — to override. |
Note onExample:0vs. omitted. Same semantics asdeploy: omitting a limit/fee flag lets the CLI pick a safe value; passing an explicit integer (including0) uses that value verbatim. See the note indeployabove for the full rationale.
cowboy actor get
Query actor information from the chain.
Behavior:
- Send
GET /actor/<address>to the RPC endpoint. - Print the actor’s metadata (code hash, creator, state).
| Flag | Default | Description |
|---|---|---|
--address | Required | Actor address to query (hex) |
cowboy actor address
Compute the deterministic address an actor would have without deploying it (CREATE2-style).
Behavior:
- Read the actor source code from
--codepath. - Compute the address using the creator address, code hash, and salt.
- Print the computed address.
| Flag | Default | Description |
|---|---|---|
--code | Required | Path to the actor Python source file |
--creator | Required | Creator address (hex) |
--salt | 0x00 | Hex salt for address derivation |
cowboy actor new
Scaffold a new actor from a template. See cowboy actor new for full documentation.
cowboy actor logs
Fetch the event log for a deployed actor.
Behavior:
- Send a request to the RPC endpoint to fetch logs for the specified actor address.
- Print the log entries.
| Flag | Default | Description |
|---|---|---|
--address | Required | Actor address (hex) |
--rpc-url | Auto-discovered | RPC endpoint |

