txctx

package
v0.105.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package txctx contains helper functions that deal with transactions in CLI context.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GasFlag is a flag used for the additional network fee.
	GasFlag = flags.Fixed8Flag{
		Name:  "gas, g",
		Usage: "network fee to add to the transaction (prioritizing it)",
	}
	// SysGasFlag is a flag used for the additional system fee.
	SysGasFlag = flags.Fixed8Flag{
		Name:  "sysgas, e",
		Usage: "system fee to add to the transaction (compensating for execution)",
	}
	// OutFlag is a flag used for file output.
	OutFlag = cli.StringFlag{
		Name:  "out",
		Usage: "file (JSON) to put signature context with a transaction to",
	}
	// ForceFlag is a flag used to force transaction send.
	ForceFlag = cli.BoolFlag{
		Name:  "force",
		Usage: "Do not ask for a confirmation (and ignore errors)",
	}
	// AwaitFlag is a flag used to wait for the transaction to be included in a block.
	AwaitFlag = cli.BoolFlag{
		Name:  "await",
		Usage: "wait for the transaction to be included in a block",
	}
)

Functions

func DumpTransactionInfo added in v0.105.0

func DumpTransactionInfo(w io.Writer, h util.Uint256, res *state.AppExecResult)

DumpTransactionInfo prints transaction info to the given writer.

func SignAndSend

func SignAndSend(ctx *cli.Context, act *actor.Actor, acc *wallet.Account, tx *transaction.Transaction) error

SignAndSend adds network and system fees to the provided transaction and either sends it to the network (with a confirmation or --force flag) or saves it into a file (given in the --out flag).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL