MCPcopy Create free account
hub / github.com/chain/txvm / usage

Function usage

cmd/tx/main.go:429–509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

427}
428
429func usage() {
430 fmt.Fprint(os.Stderr, `Usage:
431
432 tx SUBCOMMAND ...args...
433
434Available subcommands are: id, validate, trace, log, result, build.
435
436All subcommands except build expect a transaction program on standard
437input, assigning it a default version of 3 and a default runlimit of
4382^63-1. The -runlimit and -version flags can override those default
439values. These subcommands also accept a -witness flag tells tx to
440expect a transaction witness tuple on standard input instead (such as
441can be produced with the "block tx -raw" command, qv), which dictates
442the version and runlimit.
443
444The id subcommand causes tx to compute the transaction's ID and send
445it to standard output. Errors in the transaction beyond the "finalize"
446instruction are not detected.
447
448The validate subcommand causes tx to validate the transaction. Exit
449value 0 means the transaction is valid, non-zero means it is not.
450
451The trace subcommand causes an execution trace of the tx to be sent to
452standard output.
453
454The log subcommand causes the transaction's log entries to be sent to
455standard output in assembly-language syntax, one per line. Errors in
456the transaction beyond the "finalize" instruction are not detected.
457
458The result subcommand parses the transaction log for information
459produced by "standard" issuance, retirement, input, and output
460contracts and prints the information in human-readable form.
461
462The build subcommand creates a transaction. It is used like this:
463
464 tx build [-ttl TIME] [-tags TAGS] DIRECTIVE ...args... DIRECTIVE ...args...
465
466where each DIRECTIVE is one of "issue," "input," "output," and
467"retire." Each directive adds an entry to the transaction being
468built. The -ttl flag specifies the transaction's time to live; its
469format must be understood by Go's time.ParseDuration. The -tags flag
470specifies a hex- or JSON-encoded set of tags for the transaction.
471
472Each directive has its own set of arguments:
473
474 issue:
475 -version V integer version of the asset contract to use
476 -blockchain HEX hex-encoded blockchain ID for unanchored issuances
477 -tag TAG hex- or JSON-encoded asset tag
478 -quorum N integer quorum
479 -prv 'S1 S2 ...' hex-encoded, space-separated private keys for signing
480 -pub 'P1 P2 ...' hex-encoded, space-separated public keys
481 -amount N integer amount to issue
482 -refdata D hex- or JSON-encoded reference data
483 -nonce HEX hex-encoded issuance nonce
484
485 input:
486 -quorum N integer quorum

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected