cmdargs

package
v0.97.3-pre Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CosignersSeparator marks the start of cosigners cli args.
	CosignersSeparator = "--"
	// ArrayStartSeparator marks the start of array cli arg.
	ArrayStartSeparator = "["
	// ArrayEndSeparator marks the end of array cli arg.
	ArrayEndSeparator = "]"
)

Variables

This section is empty.

Functions

func GetDataFromContext

func GetDataFromContext(ctx *cli.Context) (int, interface{}, *cli.ExitError)

GetDataFromContext returns data parameter from context args.

func GetSignersAccounts

func GetSignersAccounts(wall *wallet.Wallet, signers []transaction.Signer) ([]client.SignerAccount, error)

GetSignersAccounts returns the list of signers combined with the corresponding accounts from the provided wallet.

func GetSignersFromContext

func GetSignersFromContext(ctx *cli.Context, offset int) ([]transaction.Signer, *cli.ExitError)

GetSignersFromContext returns signers parsed from context args starting from the specified offset.

func ParseParams

func ParseParams(args []string, calledFromMain bool) (int, []smartcontract.Parameter, error)

ParseParams extracts array of smartcontract.Parameter from the given args and returns the number of handled words, the array itself and an error. `calledFromMain` denotes whether the method was called from the outside or recursively and used to check if CosignersSeparator and ArrayEndSeparator are allowed to be in `args` sequence.

Types

This section is empty.

Jump to

Keyboard shortcuts

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