Skip to main content

Synopsis

cowboy actor deploy --code <path> [--salt <hex>] [--private-key <path>] [--nonce <n>] [flags]
cowboy actor execute --actor <address> --handler <name> --payload <hex|@file> [--private-key <path>] [--nonce <n>] [flags]
cowboy actor get --address <address>
cowboy actor address --code <path> --creator <address> [--salt <hex>]
cowboy actor new <name>
cowboy actor logs --address <address> [--rpc-url <url>]

Subcommands

cowboy actor deploy

Deploy an actor to the chain from a Python source file. Behavior:
  1. Load the private key using key auto-discovery.
  2. Read the actor source code from --code path.
  3. Build a Deploy transaction with the specified fee limits.
  4. If --nonce 0 (default), auto-fetch the current nonce from the chain.
  5. Sign and submit the transaction.
  6. Print the transaction hash and the deterministic actor address.
Flags:
FlagDefaultDescription
--codeRequiredPath to the actor Python source file
--salt0x00Hex salt for CREATE2-style address derivation
--private-keyAuto-discoveredPath to private key file
--nonce0 (auto-fetch)Transaction nonce
--cycles-limit100000Maximum compute cycles
--cells-limit100000Maximum storage cells
--max-fee-per-cycle1Max fee per compute cycle
--max-fee-per-cell1Max fee per storage cell
Example:
$ cowboy actor deploy --code actors/counter/main.py
Transaction: 0xabc123...
Actor address: 0xdef456...

cowboy actor execute

Call a handler method on a deployed actor. Behavior:
  1. Load the private key using key auto-discovery.
  2. Build an ActorMessage transaction targeting the specified actor and handler.
  3. The payload can be a hex string or a file path prefixed with @.
  4. If --nonce 0 (default), auto-fetch the current nonce from the chain.
  5. Sign and submit the transaction.
  6. Print the transaction hash.
Flags:
FlagDefaultDescription
--actorRequiredTarget actor address (hex)
--handlerRequiredHandler method name to invoke
--payloadRequiredHex-encoded payload or @path/to/file
--private-keyAuto-discoveredPath to private key file
--nonce0 (auto-fetch)Transaction nonce
--cycles-limit200000Maximum compute cycles
--cells-limit200000Maximum storage cells
--max-fee-per-cycle1Max fee per compute cycle
--max-fee-per-cell1Max fee per storage cell
Example:
$ cowboy actor execute --actor 0xdef456... --handler increment --payload 0x
Transaction: 0x789abc...

cowboy actor get

Query actor information from the chain. Behavior:
  1. Send GET /actor/<address> to the RPC endpoint.
  2. Print the actor’s metadata (code hash, creator, state).
Flags:
FlagDefaultDescription
--addressRequiredActor address to query (hex)
Example:
$ cowboy actor get --address 0xdef456...
Actor: 0xdef456...
  Creator: 0x7a3B...F92E
  Code hash: 0xabc...
  State: active

cowboy actor address

Compute the deterministic address an actor would have without deploying it (CREATE2-style). Behavior:
  1. Read the actor source code from --code path.
  2. Compute the address using the creator address, code hash, and salt.
  3. Print the computed address.
Flags:
FlagDefaultDescription
--codeRequiredPath to the actor Python source file
--creatorRequiredCreator address (hex)
--salt0x00Hex salt for address derivation
Example:
$ cowboy actor address --code actors/counter/main.py --creator 0x7a3B...F92E
Actor address: 0xdef456...

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:
  1. Send a request to the RPC endpoint to fetch logs for the specified actor address.
  2. Print the log entries.
Flags:
FlagDefaultDescription
--addressRequiredActor address (hex)
--rpc-urlAuto-discoveredRPC endpoint
Example:
$ cowboy actor logs --address 0xdef456...
[block 42] increment() called
[block 43] increment() called
[block 45] get_count() called -> 2