Skip to main content

Synopsis

cowboy transaction submit --data <hex>
cowboy transaction get --hash <hex>
cowboy transaction status --hash <hex>

Subcommands

cowboy transaction submit

Submit a raw signed transaction to the chain. Behavior:
  1. Take the hex-encoded transaction data.
  2. Submit it to the RPC endpoint.
  3. Print the transaction hash.
Flags:
FlagDefaultDescription
--dataRequiredHex-encoded signed transaction
Example:
$ cowboy transaction submit --data 0xf86c...
Transaction: 0xabc123...

cowboy transaction get

Retrieve a transaction by its hash. Behavior:
  1. Query the RPC endpoint for the transaction with the given hash.
  2. Print the full transaction details (type, sender, nonce, payload).
Flags:
FlagDefaultDescription
--hashRequiredTransaction hash (hex)
Example:
$ cowboy transaction get --hash 0xabc123...
Transaction: 0xabc123...
  Type: Transfer
  From: 0x7a3B...F92E
  To: 0x1a2B...C3D4
  Amount: 100 CBY
  Nonce: 5
  Status: confirmed
  Block: 142

cowboy transaction status

Query the status of a transaction. Behavior:
  1. Query the RPC endpoint for the transaction status.
  2. Print the status (pending, confirmed, failed).
Flags:
FlagDefaultDescription
--hashRequiredTransaction hash (hex)
Example:
$ cowboy transaction status --hash 0xabc123...
Status: confirmed
Block: 142

Edge Cases

  • If the transaction hash is not found, print Transaction not found.
  • All subcommands are read-only except submit.